indicesio 0.0.4

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.
Files changed (343) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/LICENSE +201 -0
  3. package/README.md +386 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +196 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +196 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +480 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +476 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +85 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +79 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/query.d.mts +5 -0
  199. package/internal/utils/query.d.mts.map +1 -0
  200. package/internal/utils/query.d.ts +5 -0
  201. package/internal/utils/query.d.ts.map +1 -0
  202. package/internal/utils/query.js +23 -0
  203. package/internal/utils/query.js.map +1 -0
  204. package/internal/utils/query.mjs +20 -0
  205. package/internal/utils/query.mjs.map +1 -0
  206. package/internal/utils/sleep.d.mts +2 -0
  207. package/internal/utils/sleep.d.mts.map +1 -0
  208. package/internal/utils/sleep.d.ts +2 -0
  209. package/internal/utils/sleep.d.ts.map +1 -0
  210. package/internal/utils/sleep.js +7 -0
  211. package/internal/utils/sleep.js.map +1 -0
  212. package/internal/utils/sleep.mjs +3 -0
  213. package/internal/utils/sleep.mjs.map +1 -0
  214. package/internal/utils/uuid.d.mts +5 -0
  215. package/internal/utils/uuid.d.mts.map +1 -0
  216. package/internal/utils/uuid.d.ts +5 -0
  217. package/internal/utils/uuid.d.ts.map +1 -0
  218. package/internal/utils/uuid.js +19 -0
  219. package/internal/utils/uuid.js.map +1 -0
  220. package/internal/utils/uuid.mjs +15 -0
  221. package/internal/utils/uuid.mjs.map +1 -0
  222. package/internal/utils/values.d.mts +18 -0
  223. package/internal/utils/values.d.mts.map +1 -0
  224. package/internal/utils/values.d.ts +18 -0
  225. package/internal/utils/values.d.ts.map +1 -0
  226. package/internal/utils/values.js +112 -0
  227. package/internal/utils/values.js.map +1 -0
  228. package/internal/utils/values.mjs +94 -0
  229. package/internal/utils/values.mjs.map +1 -0
  230. package/internal/utils.d.mts +8 -0
  231. package/internal/utils.d.mts.map +1 -0
  232. package/internal/utils.d.ts +8 -0
  233. package/internal/utils.d.ts.map +1 -0
  234. package/internal/utils.js +12 -0
  235. package/internal/utils.js.map +1 -0
  236. package/internal/utils.mjs +9 -0
  237. package/internal/utils.mjs.map +1 -0
  238. package/package.json +146 -0
  239. package/resource.d.mts +2 -0
  240. package/resource.d.mts.map +1 -0
  241. package/resource.d.ts +2 -0
  242. package/resource.d.ts.map +1 -0
  243. package/resource.js +6 -0
  244. package/resource.js.map +1 -0
  245. package/resource.mjs +2 -0
  246. package/resource.mjs.map +1 -0
  247. package/resources/index.d.mts +4 -0
  248. package/resources/index.d.mts.map +1 -0
  249. package/resources/index.d.ts +4 -0
  250. package/resources/index.d.ts.map +1 -0
  251. package/resources/index.js +11 -0
  252. package/resources/index.js.map +1 -0
  253. package/resources/index.mjs +5 -0
  254. package/resources/index.mjs.map +1 -0
  255. package/resources/runs.d.mts +104 -0
  256. package/resources/runs.d.mts.map +1 -0
  257. package/resources/runs.d.ts +104 -0
  258. package/resources/runs.d.ts.map +1 -0
  259. package/resources/runs.js +37 -0
  260. package/resources/runs.js.map +1 -0
  261. package/resources/runs.mjs +33 -0
  262. package/resources/runs.mjs.map +1 -0
  263. package/resources/secrets.d.mts +109 -0
  264. package/resources/secrets.d.mts.map +1 -0
  265. package/resources/secrets.d.ts +109 -0
  266. package/resources/secrets.d.ts.map +1 -0
  267. package/resources/secrets.js +37 -0
  268. package/resources/secrets.js.map +1 -0
  269. package/resources/secrets.mjs +33 -0
  270. package/resources/secrets.mjs.map +1 -0
  271. package/resources/tasks.d.mts +290 -0
  272. package/resources/tasks.d.mts.map +1 -0
  273. package/resources/tasks.d.ts +290 -0
  274. package/resources/tasks.d.ts.map +1 -0
  275. package/resources/tasks.js +49 -0
  276. package/resources/tasks.js.map +1 -0
  277. package/resources/tasks.mjs +45 -0
  278. package/resources/tasks.mjs.map +1 -0
  279. package/resources.d.mts +2 -0
  280. package/resources.d.mts.map +1 -0
  281. package/resources.d.ts +2 -0
  282. package/resources.d.ts.map +1 -0
  283. package/resources.js +5 -0
  284. package/resources.js.map +1 -0
  285. package/resources.mjs +2 -0
  286. package/resources.mjs.map +1 -0
  287. package/src/api-promise.ts +2 -0
  288. package/src/client.ts +786 -0
  289. package/src/core/README.md +3 -0
  290. package/src/core/api-promise.ts +92 -0
  291. package/src/core/error.ts +130 -0
  292. package/src/core/resource.ts +11 -0
  293. package/src/core/uploads.ts +2 -0
  294. package/src/error.ts +2 -0
  295. package/src/index.ts +22 -0
  296. package/src/internal/README.md +3 -0
  297. package/src/internal/builtin-types.ts +93 -0
  298. package/src/internal/detect-platform.ts +196 -0
  299. package/src/internal/errors.ts +33 -0
  300. package/src/internal/headers.ts +97 -0
  301. package/src/internal/parse.ts +56 -0
  302. package/src/internal/request-options.ts +91 -0
  303. package/src/internal/shim-types.ts +26 -0
  304. package/src/internal/shims.ts +107 -0
  305. package/src/internal/to-file.ts +154 -0
  306. package/src/internal/types.ts +95 -0
  307. package/src/internal/uploads.ts +187 -0
  308. package/src/internal/utils/base64.ts +40 -0
  309. package/src/internal/utils/bytes.ts +32 -0
  310. package/src/internal/utils/env.ts +18 -0
  311. package/src/internal/utils/log.ts +126 -0
  312. package/src/internal/utils/path.ts +88 -0
  313. package/src/internal/utils/query.ts +23 -0
  314. package/src/internal/utils/sleep.ts +3 -0
  315. package/src/internal/utils/uuid.ts +17 -0
  316. package/src/internal/utils/values.ts +105 -0
  317. package/src/internal/utils.ts +9 -0
  318. package/src/lib/.keep +4 -0
  319. package/src/resource.ts +2 -0
  320. package/src/resources/index.ts +27 -0
  321. package/src/resources/runs.ts +132 -0
  322. package/src/resources/secrets.ts +149 -0
  323. package/src/resources/tasks.ts +364 -0
  324. package/src/resources.ts +1 -0
  325. package/src/tsconfig.json +11 -0
  326. package/src/uploads.ts +2 -0
  327. package/src/version.ts +1 -0
  328. package/uploads.d.mts +2 -0
  329. package/uploads.d.mts.map +1 -0
  330. package/uploads.d.ts +2 -0
  331. package/uploads.d.ts.map +1 -0
  332. package/uploads.js +6 -0
  333. package/uploads.js.map +1 -0
  334. package/uploads.mjs +2 -0
  335. package/uploads.mjs.map +1 -0
  336. package/version.d.mts +2 -0
  337. package/version.d.mts.map +1 -0
  338. package/version.d.ts +2 -0
  339. package/version.d.ts.map +1 -0
  340. package/version.js +5 -0
  341. package/version.js.map +1 -0
  342. package/version.mjs +2 -0
  343. package/version.mjs.map +1 -0
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Runs,
5
+ type Run,
6
+ type RunListResponse,
7
+ type RunLogsResponse,
8
+ type RunListParams,
9
+ type RunRunParams,
10
+ } from './runs';
11
+ export {
12
+ Secrets,
13
+ type Secret,
14
+ type SecretListResponse,
15
+ type SecretDeleteResponse,
16
+ type SecretGetTotpResponse,
17
+ type SecretCreateParams,
18
+ } from './secrets';
19
+ export {
20
+ Tasks,
21
+ type Task,
22
+ type TaskListResponse,
23
+ type TaskDeleteResponse,
24
+ type TaskStartManualSessionResponse,
25
+ type TaskCreateParams,
26
+ type TaskStartManualSessionParams,
27
+ } from './tasks';
@@ -0,0 +1,132 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ /**
9
+ * Execute a task.
10
+ */
11
+ export class Runs extends APIResource {
12
+ /**
13
+ * <p>Retrieve a run by its ID.</p>
14
+ */
15
+ retrieve(runID: string, options?: RequestOptions): APIPromise<Run> {
16
+ return this._client.get(path`/v1beta/runs/${runID}`, options);
17
+ }
18
+
19
+ /**
20
+ * <p>List all runs for a given task.</p>
21
+ */
22
+ list(query: RunListParams, options?: RequestOptions): APIPromise<RunListResponse> {
23
+ return this._client.get('/v1beta/runs', { query, ...options });
24
+ }
25
+
26
+ /**
27
+ * <p>Retrieve stdout and stderr logs for a run.</p>
28
+ */
29
+ logs(runID: string, options?: RequestOptions): APIPromise<RunLogsResponse> {
30
+ return this._client.get(path`/v1beta/runs/${runID}/logs`, options);
31
+ }
32
+
33
+ /**
34
+ * <p>Execute a task that has already been created.</p>
35
+ */
36
+ run(body: RunRunParams, options?: RequestOptions): APIPromise<Run> {
37
+ return this._client.post('/v1beta/runs', { body, ...options });
38
+ }
39
+ }
40
+
41
+ export interface Run {
42
+ /**
43
+ * Unique identifier for the object.
44
+ */
45
+ id: string;
46
+
47
+ /**
48
+ * Arguments in this run for the task's input parameters.
49
+ */
50
+ arguments: { [key: string]: unknown };
51
+
52
+ /**
53
+ * Timestamp when the object was created.
54
+ */
55
+ created_at: string;
56
+
57
+ /**
58
+ * Timestamp when the object was last updated.
59
+ */
60
+ finished_at: string | null;
61
+
62
+ /**
63
+ * Execution result of the run. In JSON, matching the task's output schema.
64
+ */
65
+ result_json: string | null;
66
+
67
+ /**
68
+ * Whether the run was successful.
69
+ */
70
+ success: boolean;
71
+
72
+ /**
73
+ * ID of the task executed in this run.
74
+ */
75
+ task_id: string;
76
+
77
+ /**
78
+ * Secrets to use for this run. This dict must be a mapping of secret slot names to
79
+ * secret UUIDs.
80
+ */
81
+ secret_bindings?: { [key: string]: string };
82
+ }
83
+
84
+ export type RunListResponse = Array<Run>;
85
+
86
+ export interface RunLogsResponse {
87
+ /**
88
+ * Standard error output from the run execution.
89
+ */
90
+ stderr: string;
91
+
92
+ /**
93
+ * Standard output from the run execution.
94
+ */
95
+ stdout: string;
96
+ }
97
+
98
+ export interface RunListParams {
99
+ /**
100
+ * The ID of the task to list runs for.
101
+ */
102
+ task_id: string;
103
+ }
104
+
105
+ export interface RunRunParams {
106
+ /**
107
+ * ID of the task to execute.
108
+ */
109
+ task_id: string;
110
+
111
+ /**
112
+ * Arguments to pass to the task. Optional if the task does not require any
113
+ * arguments.
114
+ */
115
+ arguments?: { [key: string]: unknown };
116
+
117
+ /**
118
+ * Mapping of secret slot names to secret UUIDs. Each slot defined in the task's
119
+ * required_secrets must be mapped to a user-owned secret.
120
+ */
121
+ secret_bindings?: { [key: string]: string };
122
+ }
123
+
124
+ export declare namespace Runs {
125
+ export {
126
+ type Run as Run,
127
+ type RunListResponse as RunListResponse,
128
+ type RunLogsResponse as RunLogsResponse,
129
+ type RunListParams as RunListParams,
130
+ type RunRunParams as RunRunParams,
131
+ };
132
+ }
@@ -0,0 +1,149 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ /**
9
+ * Manage secrets like login credentials and API keys.
10
+ */
11
+ export class Secrets extends APIResource {
12
+ /**
13
+ * <p>Create a new secret. Credentials are stored securely in 1Password.</p>
14
+ */
15
+ create(body: SecretCreateParams, options?: RequestOptions): APIPromise<Secret> {
16
+ return this._client.post('/v1beta/secrets', { body, ...options });
17
+ }
18
+
19
+ /**
20
+ * <p>List all your secrets. Returns metadata only, not the actual credentials.</p>
21
+ */
22
+ list(options?: RequestOptions): APIPromise<SecretListResponse> {
23
+ return this._client.get('/v1beta/secrets', options);
24
+ }
25
+
26
+ /**
27
+ * <p>Delete a secret. This removes it from both the database and 1Password.</p>
28
+ */
29
+ delete(uuid: string, options?: RequestOptions): APIPromise<SecretDeleteResponse> {
30
+ return this._client.delete(path`/v1beta/secrets/${uuid}`, options);
31
+ }
32
+
33
+ /**
34
+ * <p>Generate a current TOTP code for a login secret that has 2FA configured.</p>
35
+ */
36
+ getTotp(uuid: string, options?: RequestOptions): APIPromise<SecretGetTotpResponse> {
37
+ return this._client.post(path`/v1beta/secrets/${uuid}/totp`, options);
38
+ }
39
+ }
40
+
41
+ export interface Secret {
42
+ /**
43
+ * Timestamp when the secret was created.
44
+ */
45
+ created_at: string;
46
+
47
+ /**
48
+ * Whether the secret has a TOTP configured (only applicable for login type).
49
+ */
50
+ has_totp: boolean;
51
+
52
+ /**
53
+ * Human-readable name for the secret.
54
+ */
55
+ name: string;
56
+
57
+ /**
58
+ * Type of secret: 'login' or 'string'.
59
+ */
60
+ secret_type: 'login' | 'string';
61
+
62
+ /**
63
+ * Timestamp when the secret was last updated.
64
+ */
65
+ updated_at: string;
66
+
67
+ /**
68
+ * Unique identifier for the secret.
69
+ */
70
+ uuid: string;
71
+
72
+ /**
73
+ * Optional website URL.
74
+ */
75
+ website: string | null;
76
+ }
77
+
78
+ export type SecretListResponse = Array<Secret>;
79
+
80
+ export interface SecretDeleteResponse {
81
+ /**
82
+ * Whether the secret was successfully deleted.
83
+ */
84
+ deleted: boolean;
85
+
86
+ /**
87
+ * Unique identifier of the deleted secret.
88
+ */
89
+ uuid: string;
90
+ }
91
+
92
+ export interface SecretGetTotpResponse {
93
+ /**
94
+ * Current 6-digit TOTP code.
95
+ */
96
+ code: string;
97
+
98
+ /**
99
+ * Unique identifier of the secret.
100
+ */
101
+ uuid: string;
102
+ }
103
+
104
+ export interface SecretCreateParams {
105
+ /**
106
+ * Human-readable name for the secret.
107
+ */
108
+ name: string;
109
+
110
+ /**
111
+ * Type of secret: 'login' for credentials, 'string' for simple values.
112
+ */
113
+ secret_type: 'login' | 'string';
114
+
115
+ /**
116
+ * Login password. Required for 'login' type.
117
+ */
118
+ password?: string | null;
119
+
120
+ /**
121
+ * Optional TOTP secret (base32 encoded). Only for 'login' type.
122
+ */
123
+ totp_secret?: string | null;
124
+
125
+ /**
126
+ * Login username. Required for 'login' type.
127
+ */
128
+ username?: string | null;
129
+
130
+ /**
131
+ * Secret value. Required for 'string' type.
132
+ */
133
+ value?: string | null;
134
+
135
+ /**
136
+ * Optional website URL for context.
137
+ */
138
+ website?: string | null;
139
+ }
140
+
141
+ export declare namespace Secrets {
142
+ export {
143
+ type Secret as Secret,
144
+ type SecretListResponse as SecretListResponse,
145
+ type SecretDeleteResponse as SecretDeleteResponse,
146
+ type SecretGetTotpResponse as SecretGetTotpResponse,
147
+ type SecretCreateParams as SecretCreateParams,
148
+ };
149
+ }
@@ -0,0 +1,364 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ /**
9
+ * Create a task to repeatedly perform an action on an external website.
10
+ */
11
+ export class Tasks extends APIResource {
12
+ /**
13
+ * <p>Create a new task to repeatedly perform an action on an external website.</p><p>Once created and ready, it can be repeatedly executed using the <code>run</code> endpoint.</p>
14
+ */
15
+ create(body: TaskCreateParams, options?: RequestOptions): APIPromise<Task> {
16
+ return this._client.post('/v1beta/tasks', { body, ...options });
17
+ }
18
+
19
+ /**
20
+ * <p>Retrieve a task by its ID.</p><p>For tasks that are still being generated, <code>input_schema</code> and <code>output_schema</code> may be <code>null</code>. They are guaranteed to be present once the task reaches the ready state.</p>
21
+ */
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<Task> {
23
+ return this._client.get(path`/v1beta/tasks/${id}`, options);
24
+ }
25
+
26
+ /**
27
+ * <p>List all tasks that have been created.</p><p>For tasks that are still being generated, <code>input_schema</code> and <code>output_schema</code> may be <code>null</code>. They are guaranteed to be present once the task reaches the ready state.</p>
28
+ */
29
+ list(options?: RequestOptions): APIPromise<TaskListResponse> {
30
+ return this._client.get('/v1beta/tasks', options);
31
+ }
32
+
33
+ /**
34
+ * <p>Delete a task by its ID.</p>
35
+ */
36
+ delete(id: string, options?: RequestOptions): APIPromise<unknown> {
37
+ return this._client.delete(path`/v1beta/tasks/${id}`, options);
38
+ }
39
+
40
+ /**
41
+ * <p>Mark the manual browser session as complete and continue the task workflow.</p>
42
+ */
43
+ completeManualSession(id: string, options?: RequestOptions): APIPromise<Task> {
44
+ return this._client.post(path`/v1beta/tasks/${id}/complete-manual-session`, options);
45
+ }
46
+
47
+ /**
48
+ * <p>Spawn a browser session for manual task completion. If a session already exists, it will be closed and replaced.</p>
49
+ */
50
+ startManualSession(
51
+ id: string,
52
+ body: TaskStartManualSessionParams | null | undefined = {},
53
+ options?: RequestOptions,
54
+ ): APIPromise<TaskStartManualSessionResponse> {
55
+ return this._client.post(path`/v1beta/tasks/${id}/start-manual-session`, { body, ...options });
56
+ }
57
+ }
58
+
59
+ export interface Task {
60
+ /**
61
+ * Unique identifier for the object.
62
+ */
63
+ id: string;
64
+
65
+ /**
66
+ * Timestamp when the object was created.
67
+ */
68
+ created_at: string;
69
+
70
+ /**
71
+ * Parameters set during the creation of this task.
72
+ */
73
+ creation: Task.Creation;
74
+
75
+ /**
76
+ * Current state of the task, in particular whether it is ready to use.
77
+ */
78
+ current_state: 'not_ready' | 'waiting_for_manual_completion' | 'ready' | 'failed';
79
+
80
+ /**
81
+ * Short title shown in the dashboard. Informational only.
82
+ */
83
+ display_name: string;
84
+
85
+ /**
86
+ * Task input schema as a JSON schema string. May be null while the task is not
87
+ * ready (e.g. schema generation in progress). Guaranteed non-null when
88
+ * current_state is ready.
89
+ */
90
+ input_schema: string | null;
91
+
92
+ /**
93
+ * Task output schema as a JSON schema string. May be null while the task is not
94
+ * ready (e.g. schema generation in progress). Guaranteed non-null when
95
+ * current_state is ready.
96
+ */
97
+ output_schema: string | null;
98
+
99
+ /**
100
+ * Detailed explanation of the task to be performed.
101
+ */
102
+ task: string;
103
+
104
+ /**
105
+ * Timestamp when the object was last updated.
106
+ */
107
+ updated_at: string;
108
+
109
+ /**
110
+ * The website to perform the task on.
111
+ */
112
+ website: string;
113
+
114
+ /**
115
+ * Information about why a task failed, for user display.
116
+ */
117
+ failure_info?: Task.FailureInfo | null;
118
+
119
+ /**
120
+ * List of secrets that must be provided when running this task.
121
+ */
122
+ required_secrets?: Array<Task.RequiredSecret>;
123
+ }
124
+
125
+ export namespace Task {
126
+ /**
127
+ * Parameters set during the creation of this task.
128
+ */
129
+ export interface Creation {
130
+ /**
131
+ * Whether schemas were configured to auto-generate during task creation.
132
+ */
133
+ auto_generate_schemas: boolean;
134
+
135
+ /**
136
+ * Mapping of required secret slot names to secret UUIDs bound during task
137
+ * creation.
138
+ */
139
+ secret_bindings?: { [key: string]: string };
140
+
141
+ /**
142
+ * List of secrets provided during task creation.
143
+ */
144
+ secrets?: Array<Creation.Secret>;
145
+ }
146
+
147
+ export namespace Creation {
148
+ /**
149
+ * A secret provided during task creation
150
+ */
151
+ export interface Secret {
152
+ /**
153
+ * UUID of the secret to bind.
154
+ */
155
+ secret_uuid: string;
156
+
157
+ /**
158
+ * Optional description of what this secret is used for (helps generate meaningful
159
+ * slot names).
160
+ */
161
+ description?: string | null;
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Information about why a task failed, for user display.
167
+ */
168
+ export interface FailureInfo {
169
+ /**
170
+ * Primary failure category
171
+ */
172
+ category: string;
173
+
174
+ /**
175
+ * Summary of the failure cause
176
+ */
177
+ message: string;
178
+ }
179
+
180
+ /**
181
+ * Definition of a secret slot that a task requires.
182
+ */
183
+ export interface RequiredSecret {
184
+ /**
185
+ * Name of the secret slot (used as env var prefix, e.g., 'LOGIN' →
186
+ * LOGIN_USERNAME).
187
+ */
188
+ name: string;
189
+
190
+ /**
191
+ * Type of secret required: 'login' or 'string'.
192
+ */
193
+ type: 'login' | 'string';
194
+
195
+ /**
196
+ * Whether this login slot requires 2FA/TOTP. Only applicable for 'login' type.
197
+ */
198
+ requires_totp?: boolean;
199
+ }
200
+ }
201
+
202
+ export type TaskListResponse = Array<Task>;
203
+
204
+ export type TaskDeleteResponse = unknown;
205
+
206
+ export interface TaskStartManualSessionResponse {
207
+ /**
208
+ * URL to embed in an iframe to control the browser.
209
+ */
210
+ iframe_url: string;
211
+
212
+ /**
213
+ * Opaque identifier for the spawned browser session.
214
+ */
215
+ session_id: string;
216
+ }
217
+
218
+ export interface TaskCreateParams {
219
+ /**
220
+ * Information used during task creation.
221
+ */
222
+ creation_params: TaskCreateParams.CreationParams;
223
+
224
+ /**
225
+ * Short title shown in the dashboard. Informational only; not used to generate the
226
+ * task.
227
+ */
228
+ display_name: string;
229
+
230
+ /**
231
+ * Detailed explanation of the task to be performed.
232
+ */
233
+ task: string;
234
+
235
+ /**
236
+ * The website to perform the task on.
237
+ */
238
+ website: string;
239
+
240
+ /**
241
+ * Task input parameters as a JSON schema string. Required when
242
+ * auto_generate_schemas is disabled. Must be omitted when auto_generate_schemas is
243
+ * enabled; remains null until generation completes.
244
+ */
245
+ input_schema?: string | null;
246
+
247
+ /**
248
+ * Task output schema as a JSON schema string. Required when auto_generate_schemas
249
+ * is disabled. Must be omitted when auto_generate_schemas is enabled; remains null
250
+ * until generation completes.
251
+ */
252
+ output_schema?: string | null;
253
+ }
254
+
255
+ export namespace TaskCreateParams {
256
+ /**
257
+ * Information used during task creation.
258
+ */
259
+ export interface CreationParams {
260
+ /**
261
+ * If true, input and output schemas will be automatically generated from captured
262
+ * HAR traffic. When enabled, input_schema and output_schema must be omitted from
263
+ * the request. Task responses may return null for these fields until generation
264
+ * completes.
265
+ */
266
+ auto_generate_schemas?: boolean;
267
+
268
+ /**
269
+ * Initial values for input schema fields, keyed by property name. Used during task
270
+ * creation to demonstrate the task. Especially important for tasks requiring
271
+ * authentication, as initial credentials must be provided.
272
+ */
273
+ initial_input_values?: { [key: string]: unknown };
274
+
275
+ /**
276
+ * If true, the server will run the browser task autonomously. If false, the user
277
+ * must complete the task manually in a spawned browser.
278
+ */
279
+ is_fully_autonomous?: boolean;
280
+
281
+ /**
282
+ * List of secrets to use for this task.
283
+ */
284
+ secrets?: Array<CreationParams.Secret>;
285
+ }
286
+
287
+ export namespace CreationParams {
288
+ /**
289
+ * A secret provided during task creation
290
+ */
291
+ export interface Secret {
292
+ /**
293
+ * UUID of the secret to bind.
294
+ */
295
+ secret_uuid: string;
296
+
297
+ /**
298
+ * Optional description of what this secret is used for (helps generate meaningful
299
+ * slot names).
300
+ */
301
+ description?: string | null;
302
+ }
303
+ }
304
+ }
305
+
306
+ export interface TaskStartManualSessionParams {
307
+ /**
308
+ * Initial cookies to set in the browser session.
309
+ */
310
+ cookies?: Array<TaskStartManualSessionParams.Cookie>;
311
+
312
+ /**
313
+ * If true, spawn the browser session using a proxy.
314
+ */
315
+ use_proxy?: boolean;
316
+ }
317
+
318
+ export namespace TaskStartManualSessionParams {
319
+ /**
320
+ * A cookie to set in the browser session.
321
+ */
322
+ export interface Cookie {
323
+ /**
324
+ * The name of the cookie.
325
+ */
326
+ name: string;
327
+
328
+ /**
329
+ * The value of the cookie.
330
+ */
331
+ value: string;
332
+
333
+ /**
334
+ * The domain of the cookie.
335
+ */
336
+ domain?: string | null;
337
+
338
+ /**
339
+ * Whether the cookie is HTTP only.
340
+ */
341
+ http_only?: boolean | null;
342
+
343
+ /**
344
+ * The path of the cookie.
345
+ */
346
+ path?: string | null;
347
+
348
+ /**
349
+ * Whether the cookie is secure.
350
+ */
351
+ secure?: boolean | null;
352
+ }
353
+ }
354
+
355
+ export declare namespace Tasks {
356
+ export {
357
+ type Task as Task,
358
+ type TaskListResponse as TaskListResponse,
359
+ type TaskDeleteResponse as TaskDeleteResponse,
360
+ type TaskStartManualSessionResponse as TaskStartManualSessionResponse,
361
+ type TaskCreateParams as TaskCreateParams,
362
+ type TaskStartManualSessionParams as TaskStartManualSessionParams,
363
+ };
364
+ }
@@ -0,0 +1 @@
1
+ export * from './resources/index';
@@ -0,0 +1,11 @@
1
+ {
2
+ // this config is included in the published src directory to prevent TS errors
3
+ // from appearing when users go to source, and VSCode opens the source .ts file
4
+ // via declaration maps
5
+ "include": ["index.ts"],
6
+ "compilerOptions": {
7
+ "target": "ES2015",
8
+ "lib": ["DOM", "DOM.Iterable", "ES2018"],
9
+ "moduleResolution": "node"
10
+ }
11
+ }
package/src/uploads.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** @deprecated Import from ./core/uploads instead */
2
+ export * from './core/uploads';
package/src/version.ts ADDED
@@ -0,0 +1 @@
1
+ export const VERSION = '0.0.4'; // x-release-please-version
package/uploads.d.mts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./core/uploads.mjs";
2
+ //# sourceMappingURL=uploads.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
package/uploads.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./core/uploads.js";
2
+ //# sourceMappingURL=uploads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}