@onkernel/sdk 0.148.0 → 0.149.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/CHANGELOG.md +11 -0
- package/client.d.mts +18 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -0
- package/client.d.ts.map +1 -1
- package/client.js +18 -0
- package/client.js.map +1 -1
- package/client.mjs +18 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/report-types/index.d.mts +3 -0
- package/resources/report-types/index.d.mts.map +1 -0
- package/resources/report-types/index.d.ts +3 -0
- package/resources/report-types/index.d.ts.map +1 -0
- package/resources/report-types/index.js +9 -0
- package/resources/report-types/index.js.map +1 -0
- package/resources/report-types/index.mjs +4 -0
- package/resources/report-types/index.mjs.map +1 -0
- package/resources/report-types/report-types.d.mts +98 -0
- package/resources/report-types/report-types.d.mts.map +1 -0
- package/resources/report-types/report-types.d.ts +98 -0
- package/resources/report-types/report-types.d.ts.map +1 -0
- package/resources/report-types/report-types.js +38 -0
- package/resources/report-types/report-types.js.map +1 -0
- package/resources/report-types/report-types.mjs +33 -0
- package/resources/report-types/report-types.mjs.map +1 -0
- package/resources/report-types/versions.d.mts +47 -0
- package/resources/report-types/versions.d.mts.map +1 -0
- package/resources/report-types/versions.d.ts +47 -0
- package/resources/report-types/versions.d.ts.map +1 -0
- package/resources/report-types/versions.js +20 -0
- package/resources/report-types/versions.js.map +1 -0
- package/resources/report-types/versions.mjs +16 -0
- package/resources/report-types/versions.mjs.map +1 -0
- package/resources/report-types.d.mts +2 -0
- package/resources/report-types.d.mts.map +1 -0
- package/resources/report-types.d.ts +2 -0
- package/resources/report-types.d.ts.map +1 -0
- package/resources/report-types.js +6 -0
- package/resources/report-types.js.map +1 -0
- package/resources/report-types.mjs +3 -0
- package/resources/report-types.mjs.map +1 -0
- package/resources/reports.d.mts +136 -0
- package/resources/reports.d.mts.map +1 -0
- package/resources/reports.d.ts +136 -0
- package/resources/reports.d.ts.map +1 -0
- package/resources/reports.js +58 -0
- package/resources/reports.js.map +1 -0
- package/resources/reports.mjs +54 -0
- package/resources/reports.mjs.map +1 -0
- package/resources/tasks.d.mts +144 -0
- package/resources/tasks.d.mts.map +1 -0
- package/resources/tasks.d.ts +144 -0
- package/resources/tasks.d.ts.map +1 -0
- package/resources/tasks.js +67 -0
- package/resources/tasks.js.map +1 -0
- package/resources/tasks.mjs +63 -0
- package/resources/tasks.mjs.map +1 -0
- package/resources/vaults/items.d.mts +61 -10
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +61 -10
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +4 -0
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +4 -0
- package/resources/vaults/items.mjs.map +1 -1
- package/resources/vaults/vaults.d.mts +4 -1
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +4 -1
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js +4 -1
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs +4 -1
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/client.ts +66 -0
- package/src/resources/index.ts +24 -0
- package/src/resources/report-types/index.ts +11 -0
- package/src/resources/report-types/report-types.ts +137 -0
- package/src/resources/report-types/versions.ts +61 -0
- package/src/resources/report-types.ts +3 -0
- package/src/resources/reports.ts +166 -0
- package/src/resources/tasks.ts +183 -0
- package/src/resources/vaults/items.ts +64 -2
- package/src/resources/vaults/vaults.ts +4 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Define tasks that agents work toward and link the browsers they use.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Tasks extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Define a task before or while an agent works on it, optionally linking the
|
|
11
|
+
* browsers it uses. Submit reports against the returned task ID.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const task = await client.tasks.create({
|
|
16
|
+
* description: 'Book a hotel room for two nights',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: TaskCreateParams, options?: RequestOptions): APIPromise<Task>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve a task and the IDs of its linked browsers.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const task = await client.tasks.retrieve('id');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Task>;
|
|
30
|
+
/**
|
|
31
|
+
* List tasks in the request's project, newest first.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Automatically fetches more pages as needed.
|
|
36
|
+
* for await (const task of client.tasks.list()) {
|
|
37
|
+
* // ...
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
list(query?: TaskListParams | null | undefined, options?: RequestOptions): PagePromise<TasksOffsetPagination, Task>;
|
|
42
|
+
/**
|
|
43
|
+
* Link browsers to an existing task. Linking a browser that is already linked has
|
|
44
|
+
* no effect, so the call is safe to retry. Returns the updated task.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const task = await client.tasks.linkBrowsers('id', {
|
|
49
|
+
* session_ids: ['x'],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
linkBrowsers(id: string, body: TaskLinkBrowsersParams, options?: RequestOptions): APIPromise<Task>;
|
|
54
|
+
}
|
|
55
|
+
export type TasksOffsetPagination = OffsetPagination<Task>;
|
|
56
|
+
/**
|
|
57
|
+
* A goal an agent works toward. Reports are submitted against a task, and browsers
|
|
58
|
+
* can be linked to it. Tasks are immutable apart from added browser links.
|
|
59
|
+
*/
|
|
60
|
+
export interface Task {
|
|
61
|
+
/**
|
|
62
|
+
* Unique identifier for the task
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
/**
|
|
66
|
+
* When the task was created
|
|
67
|
+
*/
|
|
68
|
+
created_at: string;
|
|
69
|
+
/**
|
|
70
|
+
* What the task is meant to accomplish
|
|
71
|
+
*/
|
|
72
|
+
description: string;
|
|
73
|
+
/**
|
|
74
|
+
* Caller-defined string key-value pairs for grouping and filtering tasks, such as
|
|
75
|
+
* a user or thread ID. At most 20 keys; keys are 1-64 characters, values at most
|
|
76
|
+
* 256 characters, and keys and values together at most 4 KB.
|
|
77
|
+
*/
|
|
78
|
+
metadata: TaskMetadata;
|
|
79
|
+
/**
|
|
80
|
+
* IDs of browsers linked to the task, oldest link first. Linked browsers may since
|
|
81
|
+
* have been deleted.
|
|
82
|
+
*/
|
|
83
|
+
session_ids: Array<string>;
|
|
84
|
+
/**
|
|
85
|
+
* When work on the task started
|
|
86
|
+
*/
|
|
87
|
+
started_at: string;
|
|
88
|
+
/**
|
|
89
|
+
* Hostname of the website the task targets
|
|
90
|
+
*/
|
|
91
|
+
target_website?: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Caller-defined string key-value pairs for grouping and filtering tasks, such as
|
|
95
|
+
* a user or thread ID. At most 20 keys; keys are 1-64 characters, values at most
|
|
96
|
+
* 256 characters, and keys and values together at most 4 KB.
|
|
97
|
+
*/
|
|
98
|
+
export type TaskMetadata = {
|
|
99
|
+
[key: string]: string;
|
|
100
|
+
};
|
|
101
|
+
export interface TaskCreateParams {
|
|
102
|
+
/**
|
|
103
|
+
* What the task is meant to accomplish, at most 4 KB.
|
|
104
|
+
*/
|
|
105
|
+
description: string;
|
|
106
|
+
/**
|
|
107
|
+
* Caller-defined string key-value pairs for grouping and filtering tasks, such as
|
|
108
|
+
* a user or thread ID. At most 20 keys; keys are 1-64 characters, values at most
|
|
109
|
+
* 256 characters, and keys and values together at most 4 KB.
|
|
110
|
+
*/
|
|
111
|
+
metadata?: TaskMetadata;
|
|
112
|
+
/**
|
|
113
|
+
* IDs of browsers to link to the task. Each must belong to the request's project;
|
|
114
|
+
* deleted browsers can be linked.
|
|
115
|
+
*/
|
|
116
|
+
session_ids?: Array<string>;
|
|
117
|
+
/**
|
|
118
|
+
* When work on the task started. Defaults to the time the task is created. Must be
|
|
119
|
+
* no more than 5 minutes in the future or 30 days in the past.
|
|
120
|
+
*/
|
|
121
|
+
started_at?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Hostname of the website the task targets, without a scheme or path.
|
|
124
|
+
*/
|
|
125
|
+
target_website?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface TaskListParams extends OffsetPaginationParams {
|
|
128
|
+
/**
|
|
129
|
+
* Only return tasks linked to this browser ID.
|
|
130
|
+
*/
|
|
131
|
+
session_id?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface TaskLinkBrowsersParams {
|
|
134
|
+
/**
|
|
135
|
+
* IDs of browsers to link. Each must belong to the task's project; deleted
|
|
136
|
+
* browsers can be linked. Browsers already linked are ignored. A task can have at
|
|
137
|
+
* most 100 linked browsers.
|
|
138
|
+
*/
|
|
139
|
+
session_ids: Array<string>;
|
|
140
|
+
}
|
|
141
|
+
export declare namespace Tasks {
|
|
142
|
+
export { type Task as Task, type TaskMetadata as TaskMetadata, type TasksOffsetPagination as TasksOffsetPagination, type TaskCreateParams as TaskCreateParams, type TaskListParams as TaskListParams, type TaskLinkBrowsersParams as TaskLinkBrowsersParams, };
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../src/resources/tasks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,8BAA2B;AAChG,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAI1E;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAIhE;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC;IAI3C;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAGnG;AAED,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,YAAY,CAAC;IAEvB;;;OAGG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAe,SAAQ,sBAAsB;IAC5D;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tasks = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Define tasks that agents work toward and link the browsers they use.
|
|
10
|
+
*/
|
|
11
|
+
class Tasks extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Define a task before or while an agent works on it, optionally linking the
|
|
14
|
+
* browsers it uses. Submit reports against the returned task ID.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const task = await client.tasks.create({
|
|
19
|
+
* description: 'Book a hotel room for two nights',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body, options) {
|
|
24
|
+
return this._client.post('/tasks', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a task and the IDs of its linked browsers.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const task = await client.tasks.retrieve('id');
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
retrieve(id, options) {
|
|
35
|
+
return this._client.get((0, path_1.path) `/tasks/${id}`, options);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* List tasks in the request's project, newest first.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const task of client.tasks.list()) {
|
|
44
|
+
* // ...
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
list(query = {}, options) {
|
|
49
|
+
return this._client.getAPIList('/tasks', (pagination_1.OffsetPagination), { query, ...options });
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Link browsers to an existing task. Linking a browser that is already linked has
|
|
53
|
+
* no effect, so the call is safe to retry. Returns the updated task.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const task = await client.tasks.linkBrowsers('id', {
|
|
58
|
+
* session_ids: ['x'],
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
linkBrowsers(id, body, options) {
|
|
63
|
+
return this._client.post((0, path_1.path) `/tasks/${id}/browsers`, { body, ...options });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.Tasks = Tasks;
|
|
67
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/resources/tasks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAgG;AAEhG,oDAA8C;AAE9C;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,6BAAsB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAU,EAAE,IAA4B,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,UAAU,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA5DD,sBA4DC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { OffsetPagination } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Define tasks that agents work toward and link the browsers they use.
|
|
7
|
+
*/
|
|
8
|
+
export class Tasks extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Define a task before or while an agent works on it, optionally linking the
|
|
11
|
+
* browsers it uses. Submit reports against the returned task ID.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const task = await client.tasks.create({
|
|
16
|
+
* description: 'Book a hotel room for two nights',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body, options) {
|
|
21
|
+
return this._client.post('/tasks', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a task and the IDs of its linked browsers.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const task = await client.tasks.retrieve('id');
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
retrieve(id, options) {
|
|
32
|
+
return this._client.get(path `/tasks/${id}`, options);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* List tasks in the request's project, newest first.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // Automatically fetches more pages as needed.
|
|
40
|
+
* for await (const task of client.tasks.list()) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
list(query = {}, options) {
|
|
46
|
+
return this._client.getAPIList('/tasks', (OffsetPagination), { query, ...options });
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Link browsers to an existing task. Linking a browser that is already linked has
|
|
50
|
+
* no effect, so the call is safe to retry. Returns the updated task.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const task = await client.tasks.linkBrowsers('id', {
|
|
55
|
+
* session_ids: ['x'],
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
linkBrowsers(id, body, options) {
|
|
60
|
+
return this._client.post(path `/tasks/${id}/browsers`, { body, ...options });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=tasks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.mjs","sourceRoot":"","sources":["../src/resources/tasks.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,gBAAgB,EAA4C,+BAA2B;AAEhG,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,gBAAsB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAU,EAAE,IAA4B,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,UAAU,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -82,6 +82,10 @@ export declare class Items extends APIResource {
|
|
|
82
82
|
* or vault remains blocked until the card is deleted. Deleting or recreating an
|
|
83
83
|
* item is not proof that a payment did not occur. Deleting a managed auth
|
|
84
84
|
* credential item leaves the connection and its saved credential unchanged.
|
|
85
|
+
* Deleting a 1Password credential_account stops its fills at once and, when no
|
|
86
|
+
* other vault uses the person's connection, revokes it at 1Password; until
|
|
87
|
+
* 1Password confirms, this returns 409 provider_revocation_pending and Kernel
|
|
88
|
+
* keeps retrying.
|
|
85
89
|
*
|
|
86
90
|
* @example
|
|
87
91
|
* ```ts
|
|
@@ -220,15 +224,40 @@ export interface AgentcardCheckoutAuthorization {
|
|
|
220
224
|
* Display amount shown on the approval screen.
|
|
221
225
|
*/
|
|
222
226
|
amount?: string;
|
|
223
|
-
|
|
227
|
+
/**
|
|
228
|
+
* Source of the approved amount. `processor` is read from the processor request or
|
|
229
|
+
* payment; `agent` is the item's declared amount; `page` is the checkout page
|
|
230
|
+
* total; `none` means no amount was named. `display_only` appears only on
|
|
231
|
+
* authorizations recovered without a provider read. `agent` and `display_only`
|
|
232
|
+
* don't prove what the processor charged.
|
|
233
|
+
*/
|
|
234
|
+
amount_authority?: 'processor' | 'agent' | 'page' | 'none' | 'display_only';
|
|
235
|
+
/**
|
|
236
|
+
* Whether the processor charged the approved amount. Absent when there was no
|
|
237
|
+
* charge to compare, including tokenization checkouts.
|
|
238
|
+
*/
|
|
224
239
|
amount_verified?: boolean;
|
|
225
240
|
approval_url?: string;
|
|
226
241
|
/**
|
|
227
242
|
* Browser session that submitted the checkout.
|
|
228
243
|
*/
|
|
229
244
|
browser_id?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Amount the processor reported collecting. Absent when the provider didn't
|
|
247
|
+
* observe a charge.
|
|
248
|
+
*/
|
|
230
249
|
charged_amount_cents?: number;
|
|
250
|
+
/**
|
|
251
|
+
* Currency of `charged_amount_cents`. Absent when the provider didn't observe a
|
|
252
|
+
* charge.
|
|
253
|
+
*/
|
|
231
254
|
charged_currency?: string;
|
|
255
|
+
/**
|
|
256
|
+
* What the processor collected. `none` means the checkout produced a token or
|
|
257
|
+
* payment method that the merchant charges later. Absent when the provider
|
|
258
|
+
* reported nothing, which is common for tokenization checkouts; use item events
|
|
259
|
+
* and the merchant's order record instead.
|
|
260
|
+
*/
|
|
232
261
|
charged_kind?: 'captured' | 'authorized' | 'none';
|
|
233
262
|
expected_cents?: number;
|
|
234
263
|
expires_at?: string;
|
|
@@ -662,7 +691,7 @@ export declare namespace CredentialAccountVaultItem {
|
|
|
662
691
|
*/
|
|
663
692
|
interface AvailableOperation {
|
|
664
693
|
description: string;
|
|
665
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
694
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
666
695
|
}
|
|
667
696
|
}
|
|
668
697
|
export interface CredentialAccountVaultItemRequest {
|
|
@@ -984,7 +1013,7 @@ export declare namespace CredentialVaultItem {
|
|
|
984
1013
|
*/
|
|
985
1014
|
interface AvailableOperation {
|
|
986
1015
|
description: string;
|
|
987
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
1016
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
988
1017
|
}
|
|
989
1018
|
interface OnePasswordAccessApprovalAction {
|
|
990
1019
|
/**
|
|
@@ -1750,7 +1779,11 @@ export declare namespace OnePasswordCredentialAccountSpec {
|
|
|
1750
1779
|
}
|
|
1751
1780
|
export interface OnePasswordCredentialAccountState {
|
|
1752
1781
|
provider: '1password';
|
|
1753
|
-
|
|
1782
|
+
/**
|
|
1783
|
+
* revoking means the account was deleted or disconnected and Kernel is waiting for
|
|
1784
|
+
* 1Password to confirm the revoke; it cannot be used and Kernel keeps retrying.
|
|
1785
|
+
*/
|
|
1786
|
+
status: 'pending_authorization' | 'connected' | 'reconnect_required' | 'declined' | 'revoking';
|
|
1754
1787
|
status_reason?: string;
|
|
1755
1788
|
}
|
|
1756
1789
|
/**
|
|
@@ -2167,7 +2200,7 @@ export declare namespace PaymentRequestVaultItem {
|
|
|
2167
2200
|
*/
|
|
2168
2201
|
interface AvailableOperation {
|
|
2169
2202
|
description: string;
|
|
2170
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2203
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2171
2204
|
}
|
|
2172
2205
|
}
|
|
2173
2206
|
/**
|
|
@@ -2714,7 +2747,7 @@ export declare namespace VaultItem {
|
|
|
2714
2747
|
*/
|
|
2715
2748
|
interface AvailableOperation {
|
|
2716
2749
|
description: string;
|
|
2717
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2750
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2718
2751
|
}
|
|
2719
2752
|
/**
|
|
2720
2753
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
@@ -2778,7 +2811,7 @@ export declare namespace VaultItem {
|
|
|
2778
2811
|
*/
|
|
2779
2812
|
interface AvailableOperation {
|
|
2780
2813
|
description: string;
|
|
2781
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2814
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2782
2815
|
}
|
|
2783
2816
|
}
|
|
2784
2817
|
}
|
|
@@ -2897,7 +2930,7 @@ export declare namespace VaultItemOperationResponse {
|
|
|
2897
2930
|
*/
|
|
2898
2931
|
interface AvailableOperation {
|
|
2899
2932
|
description: string;
|
|
2900
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2933
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2901
2934
|
}
|
|
2902
2935
|
/**
|
|
2903
2936
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
@@ -2961,7 +2994,7 @@ export declare namespace VaultItemOperationResponse {
|
|
|
2961
2994
|
*/
|
|
2962
2995
|
interface AvailableOperation {
|
|
2963
2996
|
description: string;
|
|
2964
|
-
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2997
|
+
type: 'authorize' | 'restart_verification' | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' | 'arm_passkey' | 'register_passkey' | 'disarm_passkey' | '1pw_create_access_request' | '1pw_access_request_status' | '1pw_fill' | '1pw_recover' | '1pw_disconnect' | '1pw_update_access_token' | 'update_access_token' | 'webmcp_invoke' | 'add_payment_method' | 'remove_payment_method';
|
|
2965
2998
|
}
|
|
2966
2999
|
}
|
|
2967
3000
|
}
|
|
@@ -3517,12 +3550,20 @@ export interface ItemEventsParams {
|
|
|
3517
3550
|
* Query param: Return events after this event ID.
|
|
3518
3551
|
*/
|
|
3519
3552
|
after?: string;
|
|
3553
|
+
/**
|
|
3554
|
+
* Query param: When true, also finds deleted items, and deleted vaults by ID only.
|
|
3555
|
+
* `key` then also accepts an item ID, which takes precedence over a key with the
|
|
3556
|
+
* same value; the lookup order is the item ID, then the live item with that key,
|
|
3557
|
+
* then the most recently deleted one. `wait` is ignored for a deleted item or
|
|
3558
|
+
* vault.
|
|
3559
|
+
*/
|
|
3560
|
+
include_deleted?: boolean;
|
|
3520
3561
|
/**
|
|
3521
3562
|
* Query param: Long-poll for new events for up to this many seconds.
|
|
3522
3563
|
*/
|
|
3523
3564
|
wait?: number;
|
|
3524
3565
|
}
|
|
3525
|
-
export type ItemPerformOperationParams = ItemPerformOperationParams.AuthorizeVaultItemOperationRequest | ItemPerformOperationParams.RestartVerificationVaultItemOperationRequest | ItemPerformOperationParams.ConfirmTransactionVaultItemOperationRequest | ItemPerformOperationParams.CollectVaultItemOperationRequest | ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest | ItemPerformOperationParams.FillVaultItemOperationRequest | ItemPerformOperationParams.ArmPasskeyVaultItemOperationRequest | ItemPerformOperationParams.RegisterPasskeyVaultItemOperationRequest | ItemPerformOperationParams.DisarmPasskeyVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordRequestAccessVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordPollAccessVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordFillVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordRecoverVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordUpdateAccessTokenVaultItemOperationRequest | ItemPerformOperationParams.UpdateAccessTokenVaultItemOperationRequest | ItemPerformOperationParams.WebmcpInvokeVaultItemOperationRequest | ItemPerformOperationParams.AddPaymentMethodVaultItemOperationRequest | ItemPerformOperationParams.RemovePaymentMethodVaultItemOperationRequest;
|
|
3566
|
+
export type ItemPerformOperationParams = ItemPerformOperationParams.AuthorizeVaultItemOperationRequest | ItemPerformOperationParams.RestartVerificationVaultItemOperationRequest | ItemPerformOperationParams.ConfirmTransactionVaultItemOperationRequest | ItemPerformOperationParams.CollectVaultItemOperationRequest | ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest | ItemPerformOperationParams.FillVaultItemOperationRequest | ItemPerformOperationParams.ArmPasskeyVaultItemOperationRequest | ItemPerformOperationParams.RegisterPasskeyVaultItemOperationRequest | ItemPerformOperationParams.DisarmPasskeyVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordRequestAccessVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordPollAccessVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordFillVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordRecoverVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordDisconnectVaultItemOperationRequest | ItemPerformOperationParams.OnePasswordUpdateAccessTokenVaultItemOperationRequest | ItemPerformOperationParams.UpdateAccessTokenVaultItemOperationRequest | ItemPerformOperationParams.WebmcpInvokeVaultItemOperationRequest | ItemPerformOperationParams.AddPaymentMethodVaultItemOperationRequest | ItemPerformOperationParams.RemovePaymentMethodVaultItemOperationRequest;
|
|
3526
3567
|
export declare namespace ItemPerformOperationParams {
|
|
3527
3568
|
interface AuthorizeVaultItemOperationRequest {
|
|
3528
3569
|
/**
|
|
@@ -3807,6 +3848,16 @@ export declare namespace ItemPerformOperationParams {
|
|
|
3807
3848
|
*/
|
|
3808
3849
|
type: '1pw_recover';
|
|
3809
3850
|
}
|
|
3851
|
+
interface OnePasswordDisconnectVaultItemOperationRequest {
|
|
3852
|
+
/**
|
|
3853
|
+
* Path param
|
|
3854
|
+
*/
|
|
3855
|
+
id_or_name: string;
|
|
3856
|
+
/**
|
|
3857
|
+
* Body param
|
|
3858
|
+
*/
|
|
3859
|
+
type: '1pw_disconnect';
|
|
3860
|
+
}
|
|
3810
3861
|
interface OnePasswordUpdateAccessTokenVaultItemOperationRequest {
|
|
3811
3862
|
/**
|
|
3812
3863
|
* Path param
|