@naturali/sdk 0.208.0 → 0.208.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.d.cts CHANGED
@@ -8748,6 +8748,10 @@ type CreateTaskRequest = {
8748
8748
  [key: string]: unknown;
8749
8749
  };
8750
8750
  assignee?: string | null;
8751
+ /**
8752
+ * The create's deduplication key, unique within the project and claimed for as long as the task it created exists. The same key with the same body returns that task as it is now (`200`) instead of creating a second one; with a different body it is `409 IDEMPOTENCY_KEY_REUSED`. A create that fails claims no key. Equivalent to the `Idempotency-Key` header.
8753
+ */
8754
+ idempotency_key?: string;
8751
8755
  /**
8752
8756
  * Name of a declared workflow state to create the task in directly, instead of the workflow's `initial` state. Must name a state declared on the workflow, or the request is rejected with `TASK_STATE_NOT_FOUND` (400). Defaults to the `initial` state.
8753
8757
  */
@@ -25917,6 +25921,12 @@ type ListTasksResponses = {
25917
25921
  type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses];
25918
25922
  type CreateTaskData = {
25919
25923
  body: CreateTaskRequest;
25924
+ headers?: {
25925
+ /**
25926
+ * The request's deduplication key. Equivalent to `idempotency_key` in the request body; sending both with different values is `400 VALIDATION_FAILED`. A non-empty string of at most 255 characters.
25927
+ */
25928
+ 'Idempotency-Key'?: string;
25929
+ };
25920
25930
  path: {
25921
25931
  /**
25922
25932
  * Project public ID (proj_ prefix).
@@ -25928,7 +25938,7 @@ type CreateTaskData = {
25928
25938
  };
25929
25939
  type CreateTaskErrors = {
25930
25940
  /**
25931
- * Bad request — invalid payload (`TASK_PAYLOAD_INVALID`), or `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`)
25941
+ * Bad request — invalid payload (`TASK_PAYLOAD_INVALID`), `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`), or an invalid idempotency key (`VALIDATION_FAILED`)
25932
25942
  */
25933
25943
  400: unknown;
25934
25944
  /**
@@ -25943,8 +25953,16 @@ type CreateTaskErrors = {
25943
25953
  * Workflow not found
25944
25954
  */
25945
25955
  404: unknown;
25956
+ /**
25957
+ * The idempotency key names a task created by a different request (`IDEMPOTENCY_KEY_REUSED`)
25958
+ */
25959
+ 409: unknown;
25946
25960
  };
25947
25961
  type CreateTaskResponses = {
25962
+ /**
25963
+ * The idempotency key already names a task created by the same request; that task is returned as it is now and no second task is created
25964
+ */
25965
+ 200: Task;
25948
25966
  /**
25949
25967
  * Task created
25950
25968
  */
package/dist/index.d.mts CHANGED
@@ -8748,6 +8748,10 @@ type CreateTaskRequest = {
8748
8748
  [key: string]: unknown;
8749
8749
  };
8750
8750
  assignee?: string | null;
8751
+ /**
8752
+ * The create's deduplication key, unique within the project and claimed for as long as the task it created exists. The same key with the same body returns that task as it is now (`200`) instead of creating a second one; with a different body it is `409 IDEMPOTENCY_KEY_REUSED`. A create that fails claims no key. Equivalent to the `Idempotency-Key` header.
8753
+ */
8754
+ idempotency_key?: string;
8751
8755
  /**
8752
8756
  * Name of a declared workflow state to create the task in directly, instead of the workflow's `initial` state. Must name a state declared on the workflow, or the request is rejected with `TASK_STATE_NOT_FOUND` (400). Defaults to the `initial` state.
8753
8757
  */
@@ -25917,6 +25921,12 @@ type ListTasksResponses = {
25917
25921
  type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses];
25918
25922
  type CreateTaskData = {
25919
25923
  body: CreateTaskRequest;
25924
+ headers?: {
25925
+ /**
25926
+ * The request's deduplication key. Equivalent to `idempotency_key` in the request body; sending both with different values is `400 VALIDATION_FAILED`. A non-empty string of at most 255 characters.
25927
+ */
25928
+ 'Idempotency-Key'?: string;
25929
+ };
25920
25930
  path: {
25921
25931
  /**
25922
25932
  * Project public ID (proj_ prefix).
@@ -25928,7 +25938,7 @@ type CreateTaskData = {
25928
25938
  };
25929
25939
  type CreateTaskErrors = {
25930
25940
  /**
25931
- * Bad request — invalid payload (`TASK_PAYLOAD_INVALID`), or `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`)
25941
+ * Bad request — invalid payload (`TASK_PAYLOAD_INVALID`), `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`), or an invalid idempotency key (`VALIDATION_FAILED`)
25932
25942
  */
25933
25943
  400: unknown;
25934
25944
  /**
@@ -25943,8 +25953,16 @@ type CreateTaskErrors = {
25943
25953
  * Workflow not found
25944
25954
  */
25945
25955
  404: unknown;
25956
+ /**
25957
+ * The idempotency key names a task created by a different request (`IDEMPOTENCY_KEY_REUSED`)
25958
+ */
25959
+ 409: unknown;
25946
25960
  };
25947
25961
  type CreateTaskResponses = {
25962
+ /**
25963
+ * The idempotency key already names a task created by the same request; that task is returned as it is now and no second task is created
25964
+ */
25965
+ 200: Task;
25948
25966
  /**
25949
25967
  * Task created
25950
25968
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.208.0",
3
+ "version": "0.208.1",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.208.0",
41
+ "@naturali/api": "0.208.1",
42
42
  "@ttoss/openapi-codegen": "^0.5.0",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",