@naturali/sdk 0.293.1 → 0.294.1

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.cjs CHANGED
@@ -3164,6 +3164,17 @@ var Evaluations = class {
3164
3164
  });
3165
3165
  }
3166
3166
  /**
3167
+ * Check an eval's probes
3168
+ *
3169
+ * Grades every probe of the eval's `criteria` with the criterion's scorers, as a run does before its first item, and reports each one without creating a run. A probe holds when the criterion's verdict on it (every scorer it binds passed) is the `passed` it declares; the report passes when every probe holds. The scorers run under the authority a run of the eval holds and are metered as a run's. An eval without `criteria` reports no probes.
3170
+ */
3171
+ static checkEvalProbes(options) {
3172
+ return (options.client ?? client).post({
3173
+ url: "/v1/projects/{project_id}/evals/{eval_id}/probes",
3174
+ ...options
3175
+ });
3176
+ }
3177
+ /**
3167
3178
  * Get an eval run
3168
3179
  *
3169
3180
  * Returns a run's status, counts, and aggregate scores
@@ -3347,6 +3358,52 @@ var Files = class {
3347
3358
  });
3348
3359
  }
3349
3360
  /**
3361
+ * Create a presigned upload URL
3362
+ *
3363
+ * Creates a short-lived, single-use presigned upload URL — the local-storage equivalent of an S3 presigned URL. The token fixes where the file lands, its byte ceiling (`max_bytes`) and, when `content_type` is given, its type. The client then uploads the file to the returned `upload_url` with no credential: as the raw body with `PUT /v1/projects/{project_id}/files/upload/{token}` (what a browser sends), or as multipart or base64 with `POST /v1/projects/{project_id}/files/upload/{token}`.
3364
+ */
3365
+ static createPresignedUrl(options) {
3366
+ return (options.client ?? client).post({
3367
+ url: "/v1/projects/{project_id}/files/presigned-url",
3368
+ ...options,
3369
+ headers: {
3370
+ "Content-Type": "application/json",
3371
+ ...options.headers
3372
+ }
3373
+ });
3374
+ }
3375
+ /**
3376
+ * Upload a file using an upload token
3377
+ *
3378
+ * Uploads file content authorized by a single-use token from `POST /v1/projects/{project_id}/files/presigned-url`. No bearer credential is required — the token is the credential. Accepts either multipart/form-data (field `file`) or JSON with a base64-encoded `content` field.
3379
+ */
3380
+ static uploadFileWithToken(options) {
3381
+ return (options.client ?? client).post({
3382
+ url: "/v1/projects/{project_id}/files/upload/{token}",
3383
+ ...options,
3384
+ headers: {
3385
+ "Content-Type": "application/json",
3386
+ ...options.headers
3387
+ }
3388
+ });
3389
+ }
3390
+ /**
3391
+ * Upload a raw file body with an upload token
3392
+ *
3393
+ * Uploads file content authorized by a single-use token from `POST /v1/projects/{project_id}/files/presigned-url`, sending the file itself as the request body, so a browser can `PUT` a `File` to the token's `upload_url` with no credential. The body is streamed to storage. It must declare its size in `Content-Length`, at most the token's `max_bytes`; when the token fixes a content type, `Content-Type` must match it. A refused upload leaves the token usable.
3394
+ */
3395
+ static putFileWithToken(options) {
3396
+ return (options.client ?? client).put({
3397
+ bodySerializer: null,
3398
+ url: "/v1/projects/{project_id}/files/upload/{token}",
3399
+ ...options,
3400
+ headers: {
3401
+ "Content-Type": "*/*",
3402
+ ...options.headers
3403
+ }
3404
+ });
3405
+ }
3406
+ /**
3350
3407
  * Delete a file
3351
3408
  *
3352
3409
  * Removes a file from the system by ID
@@ -6044,7 +6101,7 @@ var Tasks = class {
6044
6101
  /**
6045
6102
  * Update a task
6046
6103
  *
6047
- * Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`.
6104
+ * Updates a task's payload, title, assignee or metadata. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`. `metadata`, unlike `payload`, replaces the stored bag whole.
6048
6105
  */
6049
6106
  static updateTask(options) {
6050
6107
  return (options.client ?? client).patch({