@naturali/cli 0.228.0 → 0.229.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 +726 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.229.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -2052,6 +2052,175 @@ var Chains = class {
|
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
2054
|
};
|
|
2055
|
+
var Collections = class {
|
|
2056
|
+
/**
|
|
2057
|
+
* List collections
|
|
2058
|
+
*
|
|
2059
|
+
* Returns the collections in scope, oldest first.
|
|
2060
|
+
*/
|
|
2061
|
+
static listCollections(options) {
|
|
2062
|
+
return (options.client ?? client).get({
|
|
2063
|
+
url: "/v1/projects/{project_id}/collections",
|
|
2064
|
+
...options
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Create a collection
|
|
2069
|
+
*
|
|
2070
|
+
* Creates a collection. `name` is unique per project; a second collection of the same name is `409 NAME_CONFLICT`. A `schema` is compiled here, so one JSON Schema cannot parse is refused rather than stored.
|
|
2071
|
+
*/
|
|
2072
|
+
static createCollection(options) {
|
|
2073
|
+
return (options.client ?? client).post({
|
|
2074
|
+
url: "/v1/projects/{project_id}/collections",
|
|
2075
|
+
...options,
|
|
2076
|
+
headers: {
|
|
2077
|
+
"Content-Type": "application/json",
|
|
2078
|
+
...options.headers
|
|
2079
|
+
}
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Delete a collection
|
|
2084
|
+
*
|
|
2085
|
+
* Deletes the collection and every item in it.
|
|
2086
|
+
*/
|
|
2087
|
+
static deleteCollection(options) {
|
|
2088
|
+
return (options.client ?? client).delete({
|
|
2089
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}",
|
|
2090
|
+
...options
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Get a collection
|
|
2095
|
+
*
|
|
2096
|
+
* Returns one collection.
|
|
2097
|
+
*/
|
|
2098
|
+
static getCollection(options) {
|
|
2099
|
+
return (options.client ?? client).get({
|
|
2100
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}",
|
|
2101
|
+
...options
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* Update a collection
|
|
2106
|
+
*
|
|
2107
|
+
* Renames the collection or replaces its `schema`. A new schema governs the next write of each item; items already stored are not re-judged.
|
|
2108
|
+
*/
|
|
2109
|
+
static updateCollection(options) {
|
|
2110
|
+
return (options.client ?? client).patch({
|
|
2111
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}",
|
|
2112
|
+
...options,
|
|
2113
|
+
headers: {
|
|
2114
|
+
"Content-Type": "application/json",
|
|
2115
|
+
...options.headers
|
|
2116
|
+
}
|
|
2117
|
+
});
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2120
|
+
* List items
|
|
2121
|
+
*
|
|
2122
|
+
* Returns the collection's items in key order, narrowed by `data` and `tags`. The listing is bounded by `limit` (at most 100) and a statement timeout; a query past it is `422 QUERY_TIMEOUT`.
|
|
2123
|
+
*/
|
|
2124
|
+
static listCollectionItems(options) {
|
|
2125
|
+
return (options.client ?? client).get({
|
|
2126
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items",
|
|
2127
|
+
...options
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Delete an item
|
|
2132
|
+
*
|
|
2133
|
+
* Deletes the item at `key`.
|
|
2134
|
+
*/
|
|
2135
|
+
static deleteCollectionItem(options) {
|
|
2136
|
+
return (options.client ?? client).delete({
|
|
2137
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}",
|
|
2138
|
+
...options
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Get an item
|
|
2143
|
+
*
|
|
2144
|
+
* Returns the item at `key`.
|
|
2145
|
+
*/
|
|
2146
|
+
static getCollectionItem(options) {
|
|
2147
|
+
return (options.client ?? client).get({
|
|
2148
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}",
|
|
2149
|
+
...options
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Update an item
|
|
2154
|
+
*
|
|
2155
|
+
* Merges `data` into the item's as a JSON Merge Patch (RFC 7386): an object merges key by key, `null` removes a key, any other value replaces it. The merged `data` is judged as a put's is.
|
|
2156
|
+
*/
|
|
2157
|
+
static updateCollectionItem(options) {
|
|
2158
|
+
return (options.client ?? client).patch({
|
|
2159
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}",
|
|
2160
|
+
...options,
|
|
2161
|
+
headers: {
|
|
2162
|
+
"Content-Type": "application/json",
|
|
2163
|
+
...options.headers
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2168
|
+
* Create or replace an item
|
|
2169
|
+
*
|
|
2170
|
+
* Writes `data` at `key`: `201` when the key was free, `200` when it replaced an item. `tags` replace the bag when sent and leave it alone when omitted. `data` is at most 64 KB as JSON and must satisfy the collection's `schema`. A precondition (`If-Match` or `expected_version`) names a version of an existing item, so it is `404` for a free key.
|
|
2171
|
+
*/
|
|
2172
|
+
static putCollectionItem(options) {
|
|
2173
|
+
return (options.client ?? client).put({
|
|
2174
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}",
|
|
2175
|
+
...options,
|
|
2176
|
+
headers: {
|
|
2177
|
+
"Content-Type": "application/json",
|
|
2178
|
+
...options.headers
|
|
2179
|
+
}
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Get item tags
|
|
2184
|
+
*
|
|
2185
|
+
* Returns the item's tags.
|
|
2186
|
+
*/
|
|
2187
|
+
static getCollectionItemTags(options) {
|
|
2188
|
+
return (options.client ?? client).get({
|
|
2189
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}/tags",
|
|
2190
|
+
...options
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Merge item tags
|
|
2195
|
+
*
|
|
2196
|
+
* Merges the given tags into the item's; a key not sent is kept. Bumps the item's `version`.
|
|
2197
|
+
*/
|
|
2198
|
+
static mergeCollectionItemTags(options) {
|
|
2199
|
+
return (options.client ?? client).patch({
|
|
2200
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}/tags",
|
|
2201
|
+
...options,
|
|
2202
|
+
headers: {
|
|
2203
|
+
"Content-Type": "application/json",
|
|
2204
|
+
...options.headers
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* Replace item tags
|
|
2210
|
+
*
|
|
2211
|
+
* Replaces every tag on the item. Bumps the item's `version`.
|
|
2212
|
+
*/
|
|
2213
|
+
static replaceCollectionItemTags(options) {
|
|
2214
|
+
return (options.client ?? client).put({
|
|
2215
|
+
url: "/v1/projects/{project_id}/collections/{collection_id}/items/{key}/tags",
|
|
2216
|
+
...options,
|
|
2217
|
+
headers: {
|
|
2218
|
+
"Content-Type": "application/json",
|
|
2219
|
+
...options.headers
|
|
2220
|
+
}
|
|
2221
|
+
});
|
|
2222
|
+
}
|
|
2223
|
+
};
|
|
2055
2224
|
var Conversations = class {
|
|
2056
2225
|
/**
|
|
2057
2226
|
* List conversations
|
|
@@ -6724,6 +6893,7 @@ var NaturaliClient = class {
|
|
|
6724
6893
|
auditLog;
|
|
6725
6894
|
assistant;
|
|
6726
6895
|
chains;
|
|
6896
|
+
collections;
|
|
6727
6897
|
channels;
|
|
6728
6898
|
auth;
|
|
6729
6899
|
conversations;
|
|
@@ -6781,6 +6951,7 @@ var NaturaliClient = class {
|
|
|
6781
6951
|
this.auditLog = bindResource(AuditLog, this.http);
|
|
6782
6952
|
this.assistant = bindResource(Assistant, this.http);
|
|
6783
6953
|
this.chains = bindResource(Chains, this.http);
|
|
6954
|
+
this.collections = bindResource(Collections, this.http);
|
|
6784
6955
|
this.channels = bindResource(Channels, this.http);
|
|
6785
6956
|
this.auth = bindResource(Auth, this.http);
|
|
6786
6957
|
this.conversations = bindResource(Conversations, this.http);
|
|
@@ -6835,6 +7006,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
6835
7006
|
Auth: () => Auth,
|
|
6836
7007
|
Chains: () => Chains,
|
|
6837
7008
|
Channels: () => Channels,
|
|
7009
|
+
Collections: () => Collections,
|
|
6838
7010
|
Conversations: () => Conversations,
|
|
6839
7011
|
Deciders: () => Deciders,
|
|
6840
7012
|
Documents: () => Documents,
|
|
@@ -11824,6 +11996,559 @@ const routes = {
|
|
|
11824
11996
|
}
|
|
11825
11997
|
]
|
|
11826
11998
|
},
|
|
11999
|
+
"list-collections": {
|
|
12000
|
+
serviceClass: "Collections",
|
|
12001
|
+
operationId: "listCollections",
|
|
12002
|
+
description: "Returns the collections in scope, oldest first.",
|
|
12003
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12004
|
+
httpMethod: "get",
|
|
12005
|
+
pathParams: ["project_id"],
|
|
12006
|
+
queryParams: ["limit", "cursor"],
|
|
12007
|
+
headerParams: [],
|
|
12008
|
+
cookieParams: [],
|
|
12009
|
+
flags: [
|
|
12010
|
+
{
|
|
12011
|
+
"name": "project_id",
|
|
12012
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12013
|
+
"required": true,
|
|
12014
|
+
"type": "string",
|
|
12015
|
+
"in": "path"
|
|
12016
|
+
},
|
|
12017
|
+
{
|
|
12018
|
+
"name": "limit",
|
|
12019
|
+
"description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
|
|
12020
|
+
"required": false,
|
|
12021
|
+
"type": "integer",
|
|
12022
|
+
"in": "query"
|
|
12023
|
+
},
|
|
12024
|
+
{
|
|
12025
|
+
"name": "cursor",
|
|
12026
|
+
"description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
|
|
12027
|
+
"required": false,
|
|
12028
|
+
"type": "string",
|
|
12029
|
+
"in": "query"
|
|
12030
|
+
}
|
|
12031
|
+
]
|
|
12032
|
+
},
|
|
12033
|
+
"create-collection": {
|
|
12034
|
+
serviceClass: "Collections",
|
|
12035
|
+
operationId: "createCollection",
|
|
12036
|
+
description: "Creates a collection. `name` is unique per project; a second collection of the same name is `409 NAME_CONFLICT`. A `schema` is compiled here, so one JSON Schema cannot parse is refused rather than stored.",
|
|
12037
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12038
|
+
httpMethod: "post",
|
|
12039
|
+
pathParams: ["project_id"],
|
|
12040
|
+
queryParams: [],
|
|
12041
|
+
headerParams: [],
|
|
12042
|
+
cookieParams: [],
|
|
12043
|
+
flags: [
|
|
12044
|
+
{
|
|
12045
|
+
"name": "project_id",
|
|
12046
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12047
|
+
"required": true,
|
|
12048
|
+
"type": "string",
|
|
12049
|
+
"in": "path"
|
|
12050
|
+
},
|
|
12051
|
+
{
|
|
12052
|
+
"name": "name",
|
|
12053
|
+
"description": "Unique within the project.",
|
|
12054
|
+
"required": true,
|
|
12055
|
+
"type": "string",
|
|
12056
|
+
"in": "body"
|
|
12057
|
+
},
|
|
12058
|
+
{
|
|
12059
|
+
"name": "schema",
|
|
12060
|
+
"description": "A JSON Schema every item's `data` must satisfy, stored as written. `null` removes it.",
|
|
12061
|
+
"required": false,
|
|
12062
|
+
"type": "object",
|
|
12063
|
+
"in": "body"
|
|
12064
|
+
}
|
|
12065
|
+
]
|
|
12066
|
+
},
|
|
12067
|
+
"get-collection": {
|
|
12068
|
+
serviceClass: "Collections",
|
|
12069
|
+
operationId: "getCollection",
|
|
12070
|
+
description: "Returns one collection.",
|
|
12071
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12072
|
+
httpMethod: "get",
|
|
12073
|
+
pathParams: ["project_id", "collection_id"],
|
|
12074
|
+
queryParams: [],
|
|
12075
|
+
headerParams: [],
|
|
12076
|
+
cookieParams: [],
|
|
12077
|
+
flags: [{
|
|
12078
|
+
"name": "project_id",
|
|
12079
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12080
|
+
"required": true,
|
|
12081
|
+
"type": "string",
|
|
12082
|
+
"in": "path"
|
|
12083
|
+
}, {
|
|
12084
|
+
"name": "collection_id",
|
|
12085
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12086
|
+
"required": true,
|
|
12087
|
+
"type": "string",
|
|
12088
|
+
"in": "path"
|
|
12089
|
+
}]
|
|
12090
|
+
},
|
|
12091
|
+
"update-collection": {
|
|
12092
|
+
serviceClass: "Collections",
|
|
12093
|
+
operationId: "updateCollection",
|
|
12094
|
+
description: "Renames the collection or replaces its `schema`. A new schema governs the next write of each item; items already stored are not re-judged.",
|
|
12095
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12096
|
+
httpMethod: "patch",
|
|
12097
|
+
pathParams: ["project_id", "collection_id"],
|
|
12098
|
+
queryParams: [],
|
|
12099
|
+
headerParams: [],
|
|
12100
|
+
cookieParams: [],
|
|
12101
|
+
flags: [
|
|
12102
|
+
{
|
|
12103
|
+
"name": "project_id",
|
|
12104
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12105
|
+
"required": true,
|
|
12106
|
+
"type": "string",
|
|
12107
|
+
"in": "path"
|
|
12108
|
+
},
|
|
12109
|
+
{
|
|
12110
|
+
"name": "collection_id",
|
|
12111
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12112
|
+
"required": true,
|
|
12113
|
+
"type": "string",
|
|
12114
|
+
"in": "path"
|
|
12115
|
+
},
|
|
12116
|
+
{
|
|
12117
|
+
"name": "name",
|
|
12118
|
+
"description": "Unique within the project.",
|
|
12119
|
+
"required": false,
|
|
12120
|
+
"type": "string",
|
|
12121
|
+
"in": "body"
|
|
12122
|
+
},
|
|
12123
|
+
{
|
|
12124
|
+
"name": "schema",
|
|
12125
|
+
"description": "A JSON Schema every item's `data` must satisfy, stored as written. `null` removes it.",
|
|
12126
|
+
"required": false,
|
|
12127
|
+
"type": "object",
|
|
12128
|
+
"in": "body"
|
|
12129
|
+
}
|
|
12130
|
+
]
|
|
12131
|
+
},
|
|
12132
|
+
"delete-collection": {
|
|
12133
|
+
serviceClass: "Collections",
|
|
12134
|
+
operationId: "deleteCollection",
|
|
12135
|
+
description: "Deletes the collection and every item in it.",
|
|
12136
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12137
|
+
httpMethod: "delete",
|
|
12138
|
+
pathParams: ["project_id", "collection_id"],
|
|
12139
|
+
queryParams: [],
|
|
12140
|
+
headerParams: [],
|
|
12141
|
+
cookieParams: [],
|
|
12142
|
+
flags: [{
|
|
12143
|
+
"name": "project_id",
|
|
12144
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12145
|
+
"required": true,
|
|
12146
|
+
"type": "string",
|
|
12147
|
+
"in": "path"
|
|
12148
|
+
}, {
|
|
12149
|
+
"name": "collection_id",
|
|
12150
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12151
|
+
"required": true,
|
|
12152
|
+
"type": "string",
|
|
12153
|
+
"in": "path"
|
|
12154
|
+
}]
|
|
12155
|
+
},
|
|
12156
|
+
"list-collection-items": {
|
|
12157
|
+
serviceClass: "Collections",
|
|
12158
|
+
operationId: "listCollectionItems",
|
|
12159
|
+
description: "Returns the collection's items in key order, narrowed by `data` and `tags`. The listing is bounded by `limit` (at most 100) and a statement timeout; a query past it is `422 QUERY_TIMEOUT`.",
|
|
12160
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12161
|
+
httpMethod: "get",
|
|
12162
|
+
pathParams: ["project_id", "collection_id"],
|
|
12163
|
+
queryParams: [
|
|
12164
|
+
"data",
|
|
12165
|
+
"tags",
|
|
12166
|
+
"limit",
|
|
12167
|
+
"cursor"
|
|
12168
|
+
],
|
|
12169
|
+
headerParams: [],
|
|
12170
|
+
cookieParams: [],
|
|
12171
|
+
flags: [
|
|
12172
|
+
{
|
|
12173
|
+
"name": "project_id",
|
|
12174
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12175
|
+
"required": true,
|
|
12176
|
+
"type": "string",
|
|
12177
|
+
"in": "path"
|
|
12178
|
+
},
|
|
12179
|
+
{
|
|
12180
|
+
"name": "collection_id",
|
|
12181
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12182
|
+
"required": true,
|
|
12183
|
+
"type": "string",
|
|
12184
|
+
"in": "path"
|
|
12185
|
+
},
|
|
12186
|
+
{
|
|
12187
|
+
"name": "data",
|
|
12188
|
+
"description": "A `StructuredFilter` over an item's `data`, as JSON, url-encoded. Equality and `in` are answered by an index; a range is evaluated on the rows the other conditions leave.",
|
|
12189
|
+
"required": false,
|
|
12190
|
+
"type": "string",
|
|
12191
|
+
"in": "query"
|
|
12192
|
+
},
|
|
12193
|
+
{
|
|
12194
|
+
"name": "tags",
|
|
12195
|
+
"description": "Filter by tag pairs, written `key:value` (split on the first colon, so a value may contain colons). Repeat the parameter for several pairs; **all** must be present with exactly that value.\n",
|
|
12196
|
+
"required": false,
|
|
12197
|
+
"type": "array",
|
|
12198
|
+
"in": "query"
|
|
12199
|
+
},
|
|
12200
|
+
{
|
|
12201
|
+
"name": "limit",
|
|
12202
|
+
"description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
|
|
12203
|
+
"required": false,
|
|
12204
|
+
"type": "integer",
|
|
12205
|
+
"in": "query"
|
|
12206
|
+
},
|
|
12207
|
+
{
|
|
12208
|
+
"name": "cursor",
|
|
12209
|
+
"description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
|
|
12210
|
+
"required": false,
|
|
12211
|
+
"type": "string",
|
|
12212
|
+
"in": "query"
|
|
12213
|
+
}
|
|
12214
|
+
]
|
|
12215
|
+
},
|
|
12216
|
+
"get-collection-item": {
|
|
12217
|
+
serviceClass: "Collections",
|
|
12218
|
+
operationId: "getCollectionItem",
|
|
12219
|
+
description: "Returns the item at `key`.",
|
|
12220
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12221
|
+
httpMethod: "get",
|
|
12222
|
+
pathParams: [
|
|
12223
|
+
"project_id",
|
|
12224
|
+
"collection_id",
|
|
12225
|
+
"key"
|
|
12226
|
+
],
|
|
12227
|
+
queryParams: [],
|
|
12228
|
+
headerParams: [],
|
|
12229
|
+
cookieParams: [],
|
|
12230
|
+
flags: [
|
|
12231
|
+
{
|
|
12232
|
+
"name": "project_id",
|
|
12233
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12234
|
+
"required": true,
|
|
12235
|
+
"type": "string",
|
|
12236
|
+
"in": "path"
|
|
12237
|
+
},
|
|
12238
|
+
{
|
|
12239
|
+
"name": "collection_id",
|
|
12240
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12241
|
+
"required": true,
|
|
12242
|
+
"type": "string",
|
|
12243
|
+
"in": "path"
|
|
12244
|
+
},
|
|
12245
|
+
{
|
|
12246
|
+
"name": "key",
|
|
12247
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12248
|
+
"required": true,
|
|
12249
|
+
"type": "string",
|
|
12250
|
+
"in": "path"
|
|
12251
|
+
}
|
|
12252
|
+
]
|
|
12253
|
+
},
|
|
12254
|
+
"put-collection-item": {
|
|
12255
|
+
serviceClass: "Collections",
|
|
12256
|
+
operationId: "putCollectionItem",
|
|
12257
|
+
description: "Writes `data` at `key`: `201` when the key was free, `200` when it replaced an item. `tags` replace the bag when sent and leave it alone when omitted. `data` is at most 64 KB as JSON and must satisfy the collection's `schema`. A precondition (`If-Match` or `expected_version`) names a version of an existing item, so it is `404` for a free key.",
|
|
12258
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12259
|
+
httpMethod: "put",
|
|
12260
|
+
pathParams: [
|
|
12261
|
+
"project_id",
|
|
12262
|
+
"collection_id",
|
|
12263
|
+
"key"
|
|
12264
|
+
],
|
|
12265
|
+
queryParams: [],
|
|
12266
|
+
headerParams: ["If-Match"],
|
|
12267
|
+
cookieParams: [],
|
|
12268
|
+
flags: [
|
|
12269
|
+
{
|
|
12270
|
+
"name": "project_id",
|
|
12271
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12272
|
+
"required": true,
|
|
12273
|
+
"type": "string",
|
|
12274
|
+
"in": "path"
|
|
12275
|
+
},
|
|
12276
|
+
{
|
|
12277
|
+
"name": "collection_id",
|
|
12278
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12279
|
+
"required": true,
|
|
12280
|
+
"type": "string",
|
|
12281
|
+
"in": "path"
|
|
12282
|
+
},
|
|
12283
|
+
{
|
|
12284
|
+
"name": "key",
|
|
12285
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12286
|
+
"required": true,
|
|
12287
|
+
"type": "string",
|
|
12288
|
+
"in": "path"
|
|
12289
|
+
},
|
|
12290
|
+
{
|
|
12291
|
+
"name": "If-Match",
|
|
12292
|
+
"description": "The version the caller believes the resource holds, as an entity tag (`3` or `\"3\"`). Equivalent to `expected_version` in the request body; `*` states no precondition beyond the resource existing. A mismatch is `409 VERSION_CONFLICT`.",
|
|
12293
|
+
"required": false,
|
|
12294
|
+
"type": "string",
|
|
12295
|
+
"in": "header"
|
|
12296
|
+
},
|
|
12297
|
+
{
|
|
12298
|
+
"name": "data",
|
|
12299
|
+
"description": "The item's JSON object, at most 64 KB serialized. Stored as `jsonb`, so key order is not kept.",
|
|
12300
|
+
"required": true,
|
|
12301
|
+
"type": "object",
|
|
12302
|
+
"in": "body"
|
|
12303
|
+
},
|
|
12304
|
+
{
|
|
12305
|
+
"name": "tags",
|
|
12306
|
+
"description": "Replaces the item's tags; `null` clears them.",
|
|
12307
|
+
"required": false,
|
|
12308
|
+
"type": "object",
|
|
12309
|
+
"in": "body"
|
|
12310
|
+
},
|
|
12311
|
+
{
|
|
12312
|
+
"name": "expected_version",
|
|
12313
|
+
"description": "Refuses the write unless the item is at this version.",
|
|
12314
|
+
"required": false,
|
|
12315
|
+
"type": "integer",
|
|
12316
|
+
"in": "body"
|
|
12317
|
+
}
|
|
12318
|
+
]
|
|
12319
|
+
},
|
|
12320
|
+
"update-collection-item": {
|
|
12321
|
+
serviceClass: "Collections",
|
|
12322
|
+
operationId: "updateCollectionItem",
|
|
12323
|
+
description: "Merges `data` into the item's as a JSON Merge Patch (RFC 7386): an object merges key by key, `null` removes a key, any other value replaces it. The merged `data` is judged as a put's is.",
|
|
12324
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12325
|
+
httpMethod: "patch",
|
|
12326
|
+
pathParams: [
|
|
12327
|
+
"project_id",
|
|
12328
|
+
"collection_id",
|
|
12329
|
+
"key"
|
|
12330
|
+
],
|
|
12331
|
+
queryParams: [],
|
|
12332
|
+
headerParams: ["If-Match"],
|
|
12333
|
+
cookieParams: [],
|
|
12334
|
+
flags: [
|
|
12335
|
+
{
|
|
12336
|
+
"name": "project_id",
|
|
12337
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12338
|
+
"required": true,
|
|
12339
|
+
"type": "string",
|
|
12340
|
+
"in": "path"
|
|
12341
|
+
},
|
|
12342
|
+
{
|
|
12343
|
+
"name": "collection_id",
|
|
12344
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12345
|
+
"required": true,
|
|
12346
|
+
"type": "string",
|
|
12347
|
+
"in": "path"
|
|
12348
|
+
},
|
|
12349
|
+
{
|
|
12350
|
+
"name": "key",
|
|
12351
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12352
|
+
"required": true,
|
|
12353
|
+
"type": "string",
|
|
12354
|
+
"in": "path"
|
|
12355
|
+
},
|
|
12356
|
+
{
|
|
12357
|
+
"name": "If-Match",
|
|
12358
|
+
"description": "The version the caller believes the resource holds, as an entity tag (`3` or `\"3\"`). Equivalent to `expected_version` in the request body; `*` states no precondition beyond the resource existing. A mismatch is `409 VERSION_CONFLICT`.",
|
|
12359
|
+
"required": false,
|
|
12360
|
+
"type": "string",
|
|
12361
|
+
"in": "header"
|
|
12362
|
+
},
|
|
12363
|
+
{
|
|
12364
|
+
"name": "data",
|
|
12365
|
+
"description": "The merge patch applied to the item's `data`.",
|
|
12366
|
+
"required": false,
|
|
12367
|
+
"type": "object",
|
|
12368
|
+
"in": "body"
|
|
12369
|
+
},
|
|
12370
|
+
{
|
|
12371
|
+
"name": "tags",
|
|
12372
|
+
"description": "Replaces the item's tags; `null` clears them.",
|
|
12373
|
+
"required": false,
|
|
12374
|
+
"type": "object",
|
|
12375
|
+
"in": "body"
|
|
12376
|
+
},
|
|
12377
|
+
{
|
|
12378
|
+
"name": "expected_version",
|
|
12379
|
+
"description": "Refuses the write unless the item is at this version.",
|
|
12380
|
+
"required": false,
|
|
12381
|
+
"type": "integer",
|
|
12382
|
+
"in": "body"
|
|
12383
|
+
}
|
|
12384
|
+
]
|
|
12385
|
+
},
|
|
12386
|
+
"delete-collection-item": {
|
|
12387
|
+
serviceClass: "Collections",
|
|
12388
|
+
operationId: "deleteCollectionItem",
|
|
12389
|
+
description: "Deletes the item at `key`.",
|
|
12390
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12391
|
+
httpMethod: "delete",
|
|
12392
|
+
pathParams: [
|
|
12393
|
+
"project_id",
|
|
12394
|
+
"collection_id",
|
|
12395
|
+
"key"
|
|
12396
|
+
],
|
|
12397
|
+
queryParams: [],
|
|
12398
|
+
headerParams: [],
|
|
12399
|
+
cookieParams: [],
|
|
12400
|
+
flags: [
|
|
12401
|
+
{
|
|
12402
|
+
"name": "project_id",
|
|
12403
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12404
|
+
"required": true,
|
|
12405
|
+
"type": "string",
|
|
12406
|
+
"in": "path"
|
|
12407
|
+
},
|
|
12408
|
+
{
|
|
12409
|
+
"name": "collection_id",
|
|
12410
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12411
|
+
"required": true,
|
|
12412
|
+
"type": "string",
|
|
12413
|
+
"in": "path"
|
|
12414
|
+
},
|
|
12415
|
+
{
|
|
12416
|
+
"name": "key",
|
|
12417
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12418
|
+
"required": true,
|
|
12419
|
+
"type": "string",
|
|
12420
|
+
"in": "path"
|
|
12421
|
+
}
|
|
12422
|
+
]
|
|
12423
|
+
},
|
|
12424
|
+
"get-collection-item-tags": {
|
|
12425
|
+
serviceClass: "Collections",
|
|
12426
|
+
operationId: "getCollectionItemTags",
|
|
12427
|
+
description: "Returns the item's tags.",
|
|
12428
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12429
|
+
httpMethod: "get",
|
|
12430
|
+
pathParams: [
|
|
12431
|
+
"project_id",
|
|
12432
|
+
"collection_id",
|
|
12433
|
+
"key"
|
|
12434
|
+
],
|
|
12435
|
+
queryParams: [],
|
|
12436
|
+
headerParams: [],
|
|
12437
|
+
cookieParams: [],
|
|
12438
|
+
flags: [
|
|
12439
|
+
{
|
|
12440
|
+
"name": "project_id",
|
|
12441
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12442
|
+
"required": true,
|
|
12443
|
+
"type": "string",
|
|
12444
|
+
"in": "path"
|
|
12445
|
+
},
|
|
12446
|
+
{
|
|
12447
|
+
"name": "collection_id",
|
|
12448
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12449
|
+
"required": true,
|
|
12450
|
+
"type": "string",
|
|
12451
|
+
"in": "path"
|
|
12452
|
+
},
|
|
12453
|
+
{
|
|
12454
|
+
"name": "key",
|
|
12455
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12456
|
+
"required": true,
|
|
12457
|
+
"type": "string",
|
|
12458
|
+
"in": "path"
|
|
12459
|
+
}
|
|
12460
|
+
]
|
|
12461
|
+
},
|
|
12462
|
+
"replace-collection-item-tags": {
|
|
12463
|
+
serviceClass: "Collections",
|
|
12464
|
+
operationId: "replaceCollectionItemTags",
|
|
12465
|
+
description: "Replaces every tag on the item. Bumps the item's `version`.",
|
|
12466
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12467
|
+
httpMethod: "put",
|
|
12468
|
+
pathParams: [
|
|
12469
|
+
"project_id",
|
|
12470
|
+
"collection_id",
|
|
12471
|
+
"key"
|
|
12472
|
+
],
|
|
12473
|
+
queryParams: [],
|
|
12474
|
+
headerParams: [],
|
|
12475
|
+
cookieParams: [],
|
|
12476
|
+
flags: [
|
|
12477
|
+
{
|
|
12478
|
+
"name": "project_id",
|
|
12479
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12480
|
+
"required": true,
|
|
12481
|
+
"type": "string",
|
|
12482
|
+
"in": "path"
|
|
12483
|
+
},
|
|
12484
|
+
{
|
|
12485
|
+
"name": "collection_id",
|
|
12486
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12487
|
+
"required": true,
|
|
12488
|
+
"type": "string",
|
|
12489
|
+
"in": "path"
|
|
12490
|
+
},
|
|
12491
|
+
{
|
|
12492
|
+
"name": "key",
|
|
12493
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12494
|
+
"required": true,
|
|
12495
|
+
"type": "string",
|
|
12496
|
+
"in": "path"
|
|
12497
|
+
},
|
|
12498
|
+
{
|
|
12499
|
+
"name": "tags",
|
|
12500
|
+
"description": "Key-value labels on a resource. A flat object of string values — an array, a nested object or a number is rejected with `400 VALIDATION_FAILED`, never coerced. Keys are opaque and stored verbatim, so `cost_center` and `costCenter` are two different tags. Matched by JSONB containment wherever tags are read: the `?tags=` filter and knowledge search.\n\nKeys beginning `system.` are reserved: the platform writes them to record which conversation, actor, agent and role a row came from, and a write naming one is refused with `400 RESERVED_TAG_KEY`. They are read and filtered like any other tag.\n\nThe bag is bounded, because every pair reaches the IAM context of every access check on the resource: at most 50 keys, each key at most 128 characters and each value at most 256. A write past a bound — including a merge that would grow the stored bag past the key count — is `400 VALIDATION_FAILED` with `meta.limit` naming the bound it crossed. `system.*` keys are the platform's and do not count against the 50.",
|
|
12501
|
+
"required": true,
|
|
12502
|
+
"type": "object",
|
|
12503
|
+
"in": "body-root"
|
|
12504
|
+
}
|
|
12505
|
+
]
|
|
12506
|
+
},
|
|
12507
|
+
"merge-collection-item-tags": {
|
|
12508
|
+
serviceClass: "Collections",
|
|
12509
|
+
operationId: "mergeCollectionItemTags",
|
|
12510
|
+
description: "Merges the given tags into the item's; a key not sent is kept. Bumps the item's `version`.",
|
|
12511
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/collections",
|
|
12512
|
+
httpMethod: "patch",
|
|
12513
|
+
pathParams: [
|
|
12514
|
+
"project_id",
|
|
12515
|
+
"collection_id",
|
|
12516
|
+
"key"
|
|
12517
|
+
],
|
|
12518
|
+
queryParams: [],
|
|
12519
|
+
headerParams: [],
|
|
12520
|
+
cookieParams: [],
|
|
12521
|
+
flags: [
|
|
12522
|
+
{
|
|
12523
|
+
"name": "project_id",
|
|
12524
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12525
|
+
"required": true,
|
|
12526
|
+
"type": "string",
|
|
12527
|
+
"in": "path"
|
|
12528
|
+
},
|
|
12529
|
+
{
|
|
12530
|
+
"name": "collection_id",
|
|
12531
|
+
"description": "The collection's public ID (coll_ prefix).",
|
|
12532
|
+
"required": true,
|
|
12533
|
+
"type": "string",
|
|
12534
|
+
"in": "path"
|
|
12535
|
+
},
|
|
12536
|
+
{
|
|
12537
|
+
"name": "key",
|
|
12538
|
+
"description": "The item's key, unique in its collection: 1–256 letters, digits and `. _ : @ -`, starting with a letter or digit.",
|
|
12539
|
+
"required": true,
|
|
12540
|
+
"type": "string",
|
|
12541
|
+
"in": "path"
|
|
12542
|
+
},
|
|
12543
|
+
{
|
|
12544
|
+
"name": "tags",
|
|
12545
|
+
"description": "Key-value labels on a resource. A flat object of string values — an array, a nested object or a number is rejected with `400 VALIDATION_FAILED`, never coerced. Keys are opaque and stored verbatim, so `cost_center` and `costCenter` are two different tags. Matched by JSONB containment wherever tags are read: the `?tags=` filter and knowledge search.\n\nKeys beginning `system.` are reserved: the platform writes them to record which conversation, actor, agent and role a row came from, and a write naming one is refused with `400 RESERVED_TAG_KEY`. They are read and filtered like any other tag.\n\nThe bag is bounded, because every pair reaches the IAM context of every access check on the resource: at most 50 keys, each key at most 128 characters and each value at most 256. A write past a bound — including a merge that would grow the stored bag past the key count — is `400 VALIDATION_FAILED` with `meta.limit` naming the bound it crossed. `system.*` keys are the platform's and do not count against the 50.",
|
|
12546
|
+
"required": true,
|
|
12547
|
+
"type": "object",
|
|
12548
|
+
"in": "body-root"
|
|
12549
|
+
}
|
|
12550
|
+
]
|
|
12551
|
+
},
|
|
11827
12552
|
"list-conversations": {
|
|
11828
12553
|
serviceClass: "Conversations",
|
|
11829
12554
|
operationId: "listConversations",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.229.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"yaml": "^2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@naturali/sdk": "0.
|
|
34
|
+
"@naturali/sdk": "0.229.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|