agental 0.1.0 → 0.3.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/README.md +5 -536
- package/bin/agental.js +1 -1
- package/dist/cli.js +463 -121
- package/package.json +12 -25
- package/dist/client.d.ts +0 -321
- package/dist/client.js +0 -451
- package/dist/errors.d.ts +0 -62
- package/dist/errors.js +0 -65
- package/dist/http.d.ts +0 -69
- package/dist/http.js +0 -246
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -5
- package/dist/openapi.d.ts +0 -17070
- package/dist/openapi.js +0 -5
- package/dist/sandbox.d.ts +0 -605
- package/dist/sandbox.js +0 -846
- package/dist/template.d.ts +0 -183
- package/dist/template.js +0 -261
- package/dist/types.d.ts +0 -198
- package/dist/types.js +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.js +0 -2
- package/dist/webhooks.d.ts +0 -6
- package/dist/webhooks.js +0 -16
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agental",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "agental
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "The agental command: Linux sandboxes for your agents, from the terminal. npx agental@latest signs you in and installs the agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VERTIXER LTD",
|
|
7
|
-
"homepage": "https://agental.io",
|
|
8
|
-
"bugs": {
|
|
9
|
-
"url": "https://github.com/agental-io/agental-typescript/issues"
|
|
10
|
-
},
|
|
7
|
+
"homepage": "https://agental.io/docs/cli",
|
|
11
8
|
"repository": {
|
|
12
9
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/honzabit/agental.git",
|
|
11
|
+
"directory": "cli"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"email": "squad@agental.io"
|
|
14
15
|
},
|
|
15
16
|
"type": "module",
|
|
16
17
|
"engines": {
|
|
@@ -19,27 +20,16 @@
|
|
|
19
20
|
"bin": {
|
|
20
21
|
"agental": "bin/agental.js"
|
|
21
22
|
},
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./dist/index.d.ts",
|
|
25
|
-
"default": "./dist/index.js"
|
|
26
|
-
},
|
|
27
|
-
"./package.json": "./package.json"
|
|
28
|
-
},
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
23
|
"files": [
|
|
31
24
|
"bin",
|
|
32
25
|
"dist",
|
|
33
26
|
"README.md",
|
|
34
27
|
"LICENSE"
|
|
35
28
|
],
|
|
36
|
-
"sideEffects": false,
|
|
37
29
|
"scripts": {
|
|
38
|
-
"build": "
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"typecheck": "tsc --noEmit",
|
|
42
|
-
"prepublishOnly": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && npm run build && npm run build:cli"
|
|
30
|
+
"build": "node scripts/bundle-cli.mjs",
|
|
31
|
+
"test": "node --test test/*.test.mjs",
|
|
32
|
+
"prepublishOnly": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && npm run build"
|
|
43
33
|
},
|
|
44
34
|
"keywords": [
|
|
45
35
|
"agental",
|
|
@@ -50,9 +40,6 @@
|
|
|
50
40
|
"virtual-machine"
|
|
51
41
|
],
|
|
52
42
|
"devDependencies": {
|
|
53
|
-
"
|
|
54
|
-
"esbuild": "0.28.2",
|
|
55
|
-
"tsx": "^4.23.15",
|
|
56
|
-
"typescript": "^5.9.3"
|
|
43
|
+
"esbuild": "0.28.2"
|
|
57
44
|
}
|
|
58
45
|
}
|
package/dist/client.d.ts
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { Http, type AgentalOptions } from "./http.js";
|
|
2
|
-
import { Email, Sandbox, type CreateOptions } from "./sandbox.js";
|
|
3
|
-
import { Templates } from "./template.js";
|
|
4
|
-
import type { AccountEmail, AccountExport, ApiKey, ApiKeyUsage, Billing, Burst, Catalog, HostRoute, Invite, Me, Member, Organization, Region, AutoReload, Checkout, DataRetention, CreateApiKey, CreatedApiKey, MetricsAtMoment, Policy, Prices, RunningOverTime, Size, Snapshot, Team, TeamRole, Telemetry, TelemetryTest, RunsOnRepository, RunsOnRepositories, Usage, Webhook } from "./types.js";
|
|
5
|
-
declare class Sandboxes {
|
|
6
|
-
private readonly http;
|
|
7
|
-
constructor(http: Http);
|
|
8
|
-
/**
|
|
9
|
-
* Makes a sandbox and waits until it is running. If the create fails part way or its
|
|
10
|
-
* answer is lost, it is sent again with the same key, which gives the same machine back
|
|
11
|
-
* and never a second one. What it paid in burst fees is in the sandbox's burstFeeMicros.
|
|
12
|
-
*/
|
|
13
|
-
create(options?: CreateOptions): Promise<Sandbox>;
|
|
14
|
-
/** One of your sandboxes, by its id. */
|
|
15
|
-
get(id: string): Promise<Sandbox>;
|
|
16
|
-
/**
|
|
17
|
-
* Your sandboxes, stopped ones included. Given a tag, or several, only those with every
|
|
18
|
-
* one of them; given metadata, only those with each key at that value. A template's
|
|
19
|
-
* tags and metadata count.
|
|
20
|
-
*/
|
|
21
|
-
list(filter?: {
|
|
22
|
-
tag?: string | string[];
|
|
23
|
-
metadata?: Record<string, string>;
|
|
24
|
-
}): Promise<Sandbox[]>;
|
|
25
|
-
/**
|
|
26
|
-
* The mail of one sandbox, by the sandbox's id, without reading the sandbox. It asks
|
|
27
|
-
* nothing by itself. It is the way in for a key made with only email.read and
|
|
28
|
-
* email.send on this sandbox, which may read and send its mail and is refused
|
|
29
|
-
* everything else, get(id) included.
|
|
30
|
-
*/
|
|
31
|
-
email(id: string): Email;
|
|
32
|
-
}
|
|
33
|
-
declare class Snapshots {
|
|
34
|
-
private readonly http;
|
|
35
|
-
constructor(http: Http);
|
|
36
|
-
/** Every snapshot you have, those of sandboxes since deleted included. */
|
|
37
|
-
list(): Promise<Snapshot[]>;
|
|
38
|
-
get(id: string): Promise<Snapshot>;
|
|
39
|
-
delete(id: string): Promise<void>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Your API keys. A key may do what it was made to do and nothing else, and a key used to
|
|
43
|
-
* make one makes only a weaker one. Using any of these takes a key with key.manage.
|
|
44
|
-
*/
|
|
45
|
-
declare class ApiKeys {
|
|
46
|
-
private readonly http;
|
|
47
|
-
constructor(http: Http);
|
|
48
|
-
/** Every key of the account, oldest first. Their secrets are never given. */
|
|
49
|
-
list(): Promise<ApiKey[]>;
|
|
50
|
-
get(id: string): Promise<ApiKey>;
|
|
51
|
-
/**
|
|
52
|
-
* Makes a key with a preset, or with the actions named, and limited by the rest: to some
|
|
53
|
-
* sandboxes and templates, until expiresAt, and to the addresses in allowFrom. The
|
|
54
|
-
* answer holds secret, the one time it is given. It is sent once, so a lost answer is
|
|
55
|
-
* not sent again.
|
|
56
|
-
*/
|
|
57
|
-
create(key: CreateApiKey): Promise<CreatedApiKey>;
|
|
58
|
-
/**
|
|
59
|
-
* Replaces the addresses and ranges a key may be used from, from its next request. It is
|
|
60
|
-
* the one thing about a key that changes after it is made. An empty list is anywhere.
|
|
61
|
-
*/
|
|
62
|
-
setAllowFrom(id: string, allowFrom: string[]): Promise<ApiKey>;
|
|
63
|
-
/** Deletes a key. Whatever holds it is refused from its next request, and the sandboxes it made stay the account's. */
|
|
64
|
-
delete(id: string): Promise<void>;
|
|
65
|
-
/** How long the sandboxes a key made ran, and what that comes to at the list price. Without since, everything they ever ran. */
|
|
66
|
-
usage(id: string, window?: {
|
|
67
|
-
since?: string | Date;
|
|
68
|
-
until?: string | Date;
|
|
69
|
-
}): Promise<ApiKeyUsage>;
|
|
70
|
-
private path;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* The organizations the key's person is in, and the team the key acts in. A key acts in the
|
|
74
|
-
* organization it was made in, for good: its person's own or a team. What a key may do of a
|
|
75
|
-
* team's is held by its actions, members.read and members.admin (or account.read and
|
|
76
|
-
* account.admin), and by its person's role in the team.
|
|
77
|
-
*/
|
|
78
|
-
declare class Organizations {
|
|
79
|
-
private readonly http;
|
|
80
|
-
constructor(http: Http);
|
|
81
|
-
/** Every organization the key's person is in, with their role in each, their own first. */
|
|
82
|
-
list(): Promise<Organization[]>;
|
|
83
|
-
/** The one the key acts in. */
|
|
84
|
-
current(): Promise<Organization>;
|
|
85
|
-
/**
|
|
86
|
-
* Makes a team, with the key's person as its owner. The key goes on acting where it was made:
|
|
87
|
-
* a key for the team is made in the console, or with the CLI's agental org use.
|
|
88
|
-
*/
|
|
89
|
-
createTeam(name: string): Promise<Team>;
|
|
90
|
-
/** Renames a team. Only an owner does. */
|
|
91
|
-
rename(id: string, name: string): Promise<Team>;
|
|
92
|
-
/** A team's members, the earliest first. Every member reads them. */
|
|
93
|
-
members(id: string): Promise<Member[]>;
|
|
94
|
-
/** Changes a member's role: an owner any, an admin up to admin and never an owner's. */
|
|
95
|
-
setRole(id: string, userId: string, role: TeamRole): Promise<TeamRole>;
|
|
96
|
-
/**
|
|
97
|
-
* Removes a member, or the key's person themself. The keys they made in the team go on
|
|
98
|
-
* working, as a member's, unless revokeKeys revokes them in the same request.
|
|
99
|
-
*/
|
|
100
|
-
removeMember(id: string, userId: string, options?: {
|
|
101
|
-
revokeKeys?: boolean;
|
|
102
|
-
}): Promise<{
|
|
103
|
-
revokedKeys: number;
|
|
104
|
-
}>;
|
|
105
|
-
/** The invites of the team the key acts in, for its owners and admins. */
|
|
106
|
-
invites(): Promise<Invite[]>;
|
|
107
|
-
/** Invites an email address to the team the key acts in, as a member or an admin. The team's plan has to allow members. */
|
|
108
|
-
invite(email: string, options?: {
|
|
109
|
-
role?: "member" | "admin";
|
|
110
|
-
}): Promise<Invite>;
|
|
111
|
-
/** Revokes an open invite: its link answers 410 from then on. */
|
|
112
|
-
revokeInvite(inviteId: string): Promise<void>;
|
|
113
|
-
private path;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* The agental API.
|
|
117
|
-
*
|
|
118
|
-
* ```ts
|
|
119
|
-
* const agental = new Agental(); // reads AGENTAL_API_KEY
|
|
120
|
-
* const sandbox = await agental.sandboxes.create();
|
|
121
|
-
* const { stdout } = await sandbox.exec("uname -a");
|
|
122
|
-
* await sandbox.delete();
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
export declare class Agental {
|
|
126
|
-
readonly sandboxes: Sandboxes;
|
|
127
|
-
readonly snapshots: Snapshots;
|
|
128
|
-
/** What sandboxes are made as and held to: a start, the variables and files every sandbox on one gets, and what it may reach. */
|
|
129
|
-
readonly templates: Templates;
|
|
130
|
-
/** The account's API keys: what each may do, which sandboxes and templates it reaches, until when, and from where. */
|
|
131
|
-
readonly apiKeys: ApiKeys;
|
|
132
|
-
/** The organizations the key's person is in, and the members and invites of a team. */
|
|
133
|
-
readonly organizations: Organizations;
|
|
134
|
-
private readonly http;
|
|
135
|
-
constructor(options?: AgentalOptions);
|
|
136
|
-
/** The regions sandboxes can be made in now, the default first, with the sizes each has room for. */
|
|
137
|
-
regions(): Promise<Region[]>;
|
|
138
|
-
/** Who the key belongs to: the account's id, name and address, its role, and whether it is closed. */
|
|
139
|
-
me(): Promise<Me>;
|
|
140
|
-
/** Every port given an address, across the account's sandboxes that the key reaches. A sandbox's own are in its routes(). */
|
|
141
|
-
hostRoutes(): Promise<HostRoute[]>;
|
|
142
|
-
/** Hides a port's address: it answers not found from then on. There is no undoing it; give the port an address again instead. */
|
|
143
|
-
hideHostRoute(routeId: string): Promise<HostRoute>;
|
|
144
|
-
/** The sizes on offer, and how much room there is. */
|
|
145
|
-
limits(): Promise<Catalog>;
|
|
146
|
-
/** What applies to every account here: how many sandboxes, how long one runs, whether ports get public addresses. */
|
|
147
|
-
policy(): Promise<Policy>;
|
|
148
|
-
/**
|
|
149
|
-
* What is sold: the list price an hour of each size, the monthly plans, the top-ups offered
|
|
150
|
-
* with what each adds, the range a top-up may be and its bonus, and the free month. It needs
|
|
151
|
-
* no key.
|
|
152
|
-
*/
|
|
153
|
-
prices(): Promise<Prices>;
|
|
154
|
-
/**
|
|
155
|
-
* Where the account stands: its plan, in its free month or not, what it has used this month at list price,
|
|
156
|
-
* what is left of its top-ups, and whether it may run a sandbox. Amounts are millionths of a US dollar.
|
|
157
|
-
*/
|
|
158
|
-
billing(): Promise<Billing>;
|
|
159
|
-
/**
|
|
160
|
-
* Starts a purchase and gives the address of the payment page, for a person to open: a
|
|
161
|
-
* plan, or a top-up of credits that do not expire, any whole number of US dollars
|
|
162
|
-
* from 15 to 100,000. From $200 a top-up adds a bonus, 2% there and growing to 25% at
|
|
163
|
-
* $10,000: $500 adds $537. prices() says what each adds.
|
|
164
|
-
* An account that already has a plan and asks for another is moved to it at once: url is
|
|
165
|
-
* null and changed is true. Nothing is charged until the person pays.
|
|
166
|
-
*/
|
|
167
|
-
checkout(purchase: {
|
|
168
|
-
plan: "plan20" | "plan100" | "plan500" | "plan2000";
|
|
169
|
-
} | {
|
|
170
|
-
topUp: number;
|
|
171
|
-
}): Promise<Checkout>;
|
|
172
|
-
/**
|
|
173
|
-
* Sets the auto-reload, or turns it off with null: when the month's credits and the top-ups run
|
|
174
|
-
* out, the card saved at the last purchase is charged for a top-up of this many US dollars, with
|
|
175
|
-
* tax, and its credits are added at once, before any sandbox is stopped. At most three times a
|
|
176
|
-
* day, and not again for a day after a card that would not pay. It needs a plan or a top-up
|
|
177
|
-
* bought first, which saves the card: billing().canAutoReload says whether it can be set.
|
|
178
|
-
*/
|
|
179
|
-
setAutoReload(dollars: number | null): Promise<AutoReload>;
|
|
180
|
-
/** The account's mail: the handle every address of its sandboxes carries, what its plan allows, and what it has had of that today. */
|
|
181
|
-
email(): Promise<AccountEmail>;
|
|
182
|
-
/**
|
|
183
|
-
* Where your account stands against its plan: how many small sandboxes it runs and may run
|
|
184
|
-
* at once (runningUnits; a tiny counts half, a medium 2, a large 4), what its burst meter
|
|
185
|
-
* reads against the free burst, what it has spent on burst fees this month against its
|
|
186
|
-
* budget, and what one sandbox of each size would cost to start now. With a size, and a
|
|
187
|
-
* count, quote says what starting that many now would cost.
|
|
188
|
-
*
|
|
189
|
-
* Where `enforced` is true, a create, fork or start past the running count throws an
|
|
190
|
-
* `ApiError` 429 `running_limit_reached`; one faster than the free burst costs a burst fee,
|
|
191
|
-
* and is refused with `burst_budget_reached` past the monthly budget or
|
|
192
|
-
* `burst_in_free_month` in the free month. Amounts are millionths of a US dollar.
|
|
193
|
-
*/
|
|
194
|
-
burst(quote?: {
|
|
195
|
-
size: Size;
|
|
196
|
-
count?: number;
|
|
197
|
-
}): Promise<Burst>;
|
|
198
|
-
/**
|
|
199
|
-
* Sets the most the account spends on burst fees in a month, in millionths of a US dollar:
|
|
200
|
-
* 0 refuses every start that would cost one. null gives it the default again,
|
|
201
|
-
* defaultBudgetMicros. It answers with the account's burst as it stands now.
|
|
202
|
-
*/
|
|
203
|
-
setBurstBudget(budgetMicros: number | null): Promise<Burst>;
|
|
204
|
-
/**
|
|
205
|
-
* Running time and what it comes to at the list price, by sandbox, by key, by day and by hour, and the mail of the same
|
|
206
|
-
* window. With apiKeyId, one key or several, only the sandboxes those keys made, "console" standing for those made in
|
|
207
|
-
* the console: the keys stay the whole account's.
|
|
208
|
-
*/
|
|
209
|
-
usage(options?: {
|
|
210
|
-
since?: string | Date;
|
|
211
|
-
until?: string | Date;
|
|
212
|
-
apiKeyId?: string | string[];
|
|
213
|
-
}): Promise<Usage>;
|
|
214
|
-
/**
|
|
215
|
-
* What each of your sandboxes read at one moment: now, unless at says another. A sandbox
|
|
216
|
-
* that was stopped then has a null reading, and so has one on a server that did not
|
|
217
|
-
* answer, which complete says. Only where policy() says metrics.
|
|
218
|
-
*/
|
|
219
|
-
metrics(moment?: {
|
|
220
|
-
at?: string | Date;
|
|
221
|
-
}): Promise<MetricsAtMoment>;
|
|
222
|
-
/**
|
|
223
|
-
* How many of your sandboxes were running at each step between two moments. Without
|
|
224
|
-
* since, the last 24 hours. It is counted from the record of what ran, so it answers
|
|
225
|
-
* wherever sandboxes run, and a sandbox deleted since is still counted.
|
|
226
|
-
*/
|
|
227
|
-
runningOverTime(window?: {
|
|
228
|
-
since?: string | Date;
|
|
229
|
-
until?: string | Date;
|
|
230
|
-
stepSeconds?: number;
|
|
231
|
-
}): Promise<RunningOverTime>;
|
|
232
|
-
/**
|
|
233
|
-
* The OTLP/HTTP collector your sandboxes' metrics and lifecycle events are sent to, with
|
|
234
|
-
* the names of its headers and how the last export went. Null when none is set. Only
|
|
235
|
-
* where policy() says telemetry.
|
|
236
|
-
*/
|
|
237
|
-
getTelemetry(): Promise<Telemetry | null>;
|
|
238
|
-
/**
|
|
239
|
-
* Sets the collector your sandboxes' metrics and lifecycle events are sent to, in place of
|
|
240
|
-
* the one set before. endpoint is its base address, https on port 443 or 4318. headers are
|
|
241
|
-
* sent with each export, such as the collector's API key, and their values are never
|
|
242
|
-
* shown again. Nothing is sent now: testTelemetry() does that. From the next whole minute
|
|
243
|
-
* it is sent the metrics every minute, and each event as it happens.
|
|
244
|
-
*/
|
|
245
|
-
setTelemetry(collector: {
|
|
246
|
-
endpoint: string;
|
|
247
|
-
headers?: Record<string, string>;
|
|
248
|
-
}): Promise<Telemetry>;
|
|
249
|
-
/**
|
|
250
|
-
* Sends your collector one empty export, with its headers, and says what it answered. ok
|
|
251
|
-
* is false when it refused, did not answer in 10 seconds, or is at an address that is not
|
|
252
|
-
* sent to. Nothing else is changed.
|
|
253
|
-
*/
|
|
254
|
-
testTelemetry(): Promise<TelemetryTest>;
|
|
255
|
-
/** Removes your collector, with its headers, and nothing more is sent to it. When none is set it throws an ApiError with the status 404. */
|
|
256
|
-
deleteTelemetry(): Promise<void>;
|
|
257
|
-
/**
|
|
258
|
-
* GitHub Actions jobs on sandboxes: each repository's pool, how many sandboxes of each size it
|
|
259
|
-
* keeps and the template they are made on. available is false where jobs do not run on
|
|
260
|
-
* sandboxes here. GitHub itself is connected in the console.
|
|
261
|
-
*/
|
|
262
|
-
runsOnRepositories(): Promise<RunsOnRepositories>;
|
|
263
|
-
/**
|
|
264
|
-
* Sets a repository's pool, given as owner/name: poolMax, 1 to 50 sandboxes of each size, and
|
|
265
|
-
* templateId, one of your templates, each null for the default and left out to keep what was set.
|
|
266
|
-
* The template is used only where GitHub says the repository is private and runs no workflows
|
|
267
|
-
* from fork pull requests.
|
|
268
|
-
*/
|
|
269
|
-
setRunsOnRepository(repository: string, settings: {
|
|
270
|
-
poolMax?: number | null;
|
|
271
|
-
templateId?: string | null;
|
|
272
|
-
}): Promise<RunsOnRepository>;
|
|
273
|
-
/** Puts a repository's pool back to the defaults. Its sandboxes are kept. When it has no settings it throws an ApiError with the status 404. */
|
|
274
|
-
resetRunsOnRepository(repository: string): Promise<void>;
|
|
275
|
-
/**
|
|
276
|
-
* How long your sandboxes' history is kept: the output of their commands, their agent
|
|
277
|
-
* conversations and their events. keepDays is 1, 7, 30 or 90, or null to keep it until the
|
|
278
|
-
* sandbox is deleted; 30 until you choose. retained lists what is kept for periods agental sets.
|
|
279
|
-
*/
|
|
280
|
-
getDataRetention(): Promise<DataRetention>;
|
|
281
|
-
/**
|
|
282
|
-
* Sets how long your sandboxes' history is kept: 1, 7, 30 or 90 days, or null until the
|
|
283
|
-
* sandbox is deleted. History older than that is deleted within the hour and cannot be
|
|
284
|
-
* brought back. A deleted sandbox's history is deleted with it, whatever is set, its events a day later.
|
|
285
|
-
*/
|
|
286
|
-
setDataRetention(keepDays: 1 | 7 | 30 | 90 | null): Promise<DataRetention>;
|
|
287
|
-
/** The webhooks your account's events are posted to, each with its tries of the last 30 days. Their secrets are not given. */
|
|
288
|
-
listWebhooks(): Promise<Webhook[]>;
|
|
289
|
-
/**
|
|
290
|
-
* Adds a webhook. url is posted each event it takes, and has to be on the public internet.
|
|
291
|
-
* events names the kinds it takes, such as sandbox.stopped, or "*" for every one and any
|
|
292
|
-
* added later, which is what it takes when events is left out. The answer holds
|
|
293
|
-
* signingSecret, the one time it is given: each post's X-Agental-Signature is checked
|
|
294
|
-
* against it with verifyWebhook. It is sent once, so a lost answer is not sent again.
|
|
295
|
-
*/
|
|
296
|
-
createWebhook(webhook: {
|
|
297
|
-
url: string;
|
|
298
|
-
events?: string[];
|
|
299
|
-
description?: string;
|
|
300
|
-
}): Promise<Webhook>;
|
|
301
|
-
/** One webhook, with every try of the last 30 days: the status each was answered, the event it was a try of, and which try. */
|
|
302
|
-
getWebhook(id: string): Promise<Webhook>;
|
|
303
|
-
/** Changes a webhook's url, events or description, and keeps what is left out. A changed url is used from the next try on. */
|
|
304
|
-
updateWebhook(id: string, changes: {
|
|
305
|
-
url?: string;
|
|
306
|
-
events?: string[];
|
|
307
|
-
description?: string;
|
|
308
|
-
}): Promise<Webhook>;
|
|
309
|
-
/** Gives a webhook a new signing secret, in its signingSecret, once. The old one stops working at once. */
|
|
310
|
-
rotateWebhookSecret(id: string): Promise<Webhook>;
|
|
311
|
-
/** Deletes a webhook, the events still owed to it, and its tries. */
|
|
312
|
-
deleteWebhook(id: string): Promise<void>;
|
|
313
|
-
/**
|
|
314
|
-
* Everything agental keeps about your account and the person behind it: the account, its
|
|
315
|
-
* sessions with the address and browser each began from, its keys by name, billing,
|
|
316
|
-
* payments, usage, and what it has made. Secrets are named, never given. Closing an
|
|
317
|
-
* account is not here: only a person signed in to the console can close one.
|
|
318
|
-
*/
|
|
319
|
-
exportAccount(): Promise<AccountExport>;
|
|
320
|
-
}
|
|
321
|
-
export {};
|