@soat/sdk 0.106.1 → 0.108.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.cjs +20 -5
- package/dist/index.d.cts +166 -22
- package/dist/index.d.mts +166 -22
- package/dist/index.mjs +20 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1106,7 +1106,7 @@ var ApiKeys = class {
|
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Create an API key
|
|
1108
1108
|
*
|
|
1109
|
-
* Creates a new API key for the authenticated user. - `project_id` is optional. When set, the key is scoped to that single project. When omitted or null, the key is **unscoped** and spans every project its owner can reach. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - Otherwise the key inherits the user's permissions (confined to the key's project when scoped). - When the request is authenticated with a **project-scoped token** (an OAuth access token, a trigger run-as token
|
|
1109
|
+
* Creates a new API key for the authenticated user. - `project_id` is optional. When set, the key is scoped to that single project. When omitted or null, the key is **unscoped** and spans every project its owner can reach. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - Otherwise the key inherits the user's permissions (confined to the key's project when scoped). - When the request is authenticated with a **project-scoped token** (an OAuth access token, a trigger run-as token, a run token or an IAM token), it returns `403 API_KEY_SCOPED_TOKEN`: such a token never creates a key. - When the request is authenticated with a **project-scoped API key**, the new key is confined to that same project: omitting `project_id` defaults to it, naming a different project returns `403 API_KEY_PROJECT_SCOPE`, and `project_id: null` (an unscoped key) is likewise refused. Minting an unscoped key requires an unscoped credential. - When the request is authenticated with an **API key narrowed by `policy_ids`**, the new key stays inside that boundary: omitting `policy_ids` inherits the caller's own, a non-empty subset of them is accepted, and an empty list or any other policy returns `403 API_KEY_POLICY_BOUNDARY`.
|
|
1110
1110
|
*
|
|
1111
1111
|
*/
|
|
1112
1112
|
static createApiKey(options) {
|
|
@@ -1144,7 +1144,7 @@ var ApiKeys = class {
|
|
|
1144
1144
|
/**
|
|
1145
1145
|
* Update an API key
|
|
1146
1146
|
*
|
|
1147
|
-
* Updates an API key's name, project scope, or policies. The project scope can be changed to another project, set (scoping a previously unscoped key), or cleared with null (unscoping the key). Only the owner or an admin can update it. A project-scoped credential can only update keys in its own project, and cannot move a key to another project or unscope it. An API key narrowed by `policy_ids` can only set `policy_ids` to a non-empty subset of its own (`403 API_KEY_POLICY_BOUNDARY` otherwise). A project-scoped token (OAuth, trigger or
|
|
1147
|
+
* Updates an API key's name, project scope, or policies. The project scope can be changed to another project, set (scoping a previously unscoped key), or cleared with null (unscoping the key). Only the owner or an admin can update it. A project-scoped credential can only update keys in its own project, and cannot move a key to another project or unscope it. An API key narrowed by `policy_ids` can only set `policy_ids` to a non-empty subset of its own (`403 API_KEY_POLICY_BOUNDARY` otherwise). A project-scoped token (OAuth, trigger, run or IAM) never updates a key (`403 API_KEY_SCOPED_TOKEN`).
|
|
1148
1148
|
*/
|
|
1149
1149
|
static updateApiKey(options) {
|
|
1150
1150
|
return (options.client ?? client).put({
|
|
@@ -3040,7 +3040,7 @@ var Iam = class {
|
|
|
3040
3040
|
/**
|
|
3041
3041
|
* Check a permission of the calling credential
|
|
3042
3042
|
*
|
|
3043
|
-
* Evaluates the calling credential's own policies (its owner's and, for an API key or OAuth token, its boundary and project scope) for an action the deployment registered (`IAM_REGISTRATIONS_CONFIG`) on an SRN, with the engine the runtime's own routes use. A denial is `200` with `allowed: false`, never `403`. Only policies are evaluated: the answer says nothing about whether the resource exists.
|
|
3043
|
+
* Evaluates the calling credential's own policies (its owner's and, for an API key or OAuth token, its boundary and project scope) for an action the deployment registered (`IAM_REGISTRATIONS_CONFIG`), or an action the writer rule asks of whoever writes a resource that acts later (a target's start action, `secrets:UseSecret`), on an SRN, with the engine the runtime's own routes use. A denial is `200` with `allowed: false`, never `403`. Only policies are evaluated: the answer says nothing about whether the resource exists.
|
|
3044
3044
|
*/
|
|
3045
3045
|
static checkIamPermission(options) {
|
|
3046
3046
|
return (options.client ?? client).post({
|
|
@@ -3052,6 +3052,21 @@ var Iam = class {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
});
|
|
3054
3054
|
}
|
|
3055
|
+
/**
|
|
3056
|
+
* Issue an IAM token
|
|
3057
|
+
*
|
|
3058
|
+
* Issues a short-lived token that acts as the calling API key held to a bound: `policy`, an inline policy document, or `policy_ids`, policies of the key's project or global ones. Every request on the token is authorized against the key's grant as it stands at that request ∩ the bound, so an `Allow` beyond the key grants nothing and a permission removed from the key leaves the token too. Work the token starts (a generation, a session turn, a task dispatch, an orchestration run, a playbook version) keeps the bound after the token expires. Only an API key scoped to a project issues one (`403 IAM_TOKEN_ISSUER_NOT_ALLOWED`); a token creates neither tokens nor API keys. The audit log records the token's `jti` and `principal` under `detail.iam_token` on every entry the token makes.
|
|
3059
|
+
*/
|
|
3060
|
+
static createIamToken(options) {
|
|
3061
|
+
return (options.client ?? client).post({
|
|
3062
|
+
url: "/api/v1/iam/tokens",
|
|
3063
|
+
...options,
|
|
3064
|
+
headers: {
|
|
3065
|
+
"Content-Type": "application/json",
|
|
3066
|
+
...options.headers
|
|
3067
|
+
}
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3055
3070
|
};
|
|
3056
3071
|
var IngestionRules = class {
|
|
3057
3072
|
/**
|
|
@@ -4021,7 +4036,7 @@ var Playbooks = class {
|
|
|
4021
4036
|
*
|
|
4022
4037
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
4023
4038
|
*
|
|
4024
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403
|
|
4039
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 ACTION_NOT_HELD`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
4025
4040
|
*/
|
|
4026
4041
|
static createPlaybook(options) {
|
|
4027
4042
|
return (options.client ?? client).post({
|
|
@@ -4077,7 +4092,7 @@ var Playbooks = class {
|
|
|
4077
4092
|
*
|
|
4078
4093
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
4079
4094
|
*
|
|
4080
|
-
* A new version is authored by the caller, checked as on create: `403
|
|
4095
|
+
* A new version is authored by the caller, checked as on create: `403 ACTION_NOT_HELD` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
4081
4096
|
*/
|
|
4082
4097
|
static updatePlaybook(options) {
|
|
4083
4098
|
return (options.client ?? client).patch({
|