@qawolf/api-contracts 0.42.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/auth/config.d.ts +14 -6
- package/dist/v1/auth/config.d.ts.map +1 -1
- package/dist/v1/auth/config.js +15 -6
- package/dist/v1/auth/config.js.map +1 -1
- package/dist/v1/email/find.d.ts +42 -0
- package/dist/v1/email/find.d.ts.map +1 -0
- package/dist/v1/email/find.js +44 -0
- package/dist/v1/email/find.js.map +1 -0
- package/dist/v1/email/get.d.ts +52 -0
- package/dist/v1/email/get.d.ts.map +1 -0
- package/dist/v1/email/get.js +19 -0
- package/dist/v1/email/get.js.map +1 -0
- package/dist/v1/email/getAttachment.d.ts +23 -0
- package/dist/v1/email/getAttachment.d.ts.map +1 -0
- package/dist/v1/email/getAttachment.js +46 -0
- package/dist/v1/email/getAttachment.js.map +1 -0
- package/dist/v1/email/listAddresses.d.ts +23 -0
- package/dist/v1/email/listAddresses.d.ts.map +1 -0
- package/dist/v1/email/listAddresses.js +33 -0
- package/dist/v1/email/listAddresses.js.map +1 -0
- package/dist/v1/email/resource.d.ts +67 -0
- package/dist/v1/email/resource.d.ts.map +1 -0
- package/dist/v1/email/resource.js +56 -0
- package/dist/v1/email/resource.js.map +1 -0
- package/dist/v1/email/send.d.ts +46 -0
- package/dist/v1/email/send.d.ts.map +1 -0
- package/dist/v1/email/send.js +62 -0
- package/dist/v1/email/send.js.map +1 -0
- package/dist/v1/index.d.ts +355 -0
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +15 -0
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/runner/list.d.ts +21 -0
- package/dist/v1/runner/list.d.ts.map +1 -0
- package/dist/v1/runner/list.js +19 -0
- package/dist/v1/runner/list.js.map +1 -0
- package/package.json +1 -1
package/dist/v1/auth/config.d.ts
CHANGED
|
@@ -2,16 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
/**
|
|
3
3
|
* The configuration a client needs before it can authenticate.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `workOsClientId` identifies the deployment's WorkOS environment for legacy
|
|
6
|
+
* sign-in. `workOsConnectClientId` identifies the public OAuth application for
|
|
7
|
+
* Connect sign-in. Clients read these deployment-specific identifiers from
|
|
8
|
+
* the host they use.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* `authorizationServer` is the OAuth 2.1 authorization server, the AuthKit
|
|
11
|
+
* domain that serves WorkOS Connect. A client discovers the grant endpoints
|
|
12
|
+
* from its `/.well-known/oauth-authorization-server` document. It is absent
|
|
13
|
+
* when the environment does not trust Connect tokens yet.
|
|
14
|
+
*
|
|
15
|
+
* This carries no secret. A WorkOS client id and an issuer URL are public
|
|
16
|
+
* identifiers, and the device grant is designed for public clients that hold
|
|
17
|
+
* no secret.
|
|
12
18
|
*/
|
|
13
19
|
export declare const authConfigResponse: z.ZodObject<{
|
|
20
|
+
authorizationServer: z.ZodOptional<z.ZodString>;
|
|
14
21
|
workOsClientId: z.ZodString;
|
|
22
|
+
workOsConnectClientId: z.ZodOptional<z.ZodString>;
|
|
15
23
|
}, z.core.$strip>;
|
|
16
24
|
export type AuthConfigResponse = z.infer<typeof authConfigResponse>;
|
|
17
25
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/v1/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/v1/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB;;;;iBAK7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/v1/auth/config.js
CHANGED
|
@@ -2,15 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
/**
|
|
3
3
|
* The configuration a client needs before it can authenticate.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `workOsClientId` identifies the deployment's WorkOS environment for legacy
|
|
6
|
+
* sign-in. `workOsConnectClientId` identifies the public OAuth application for
|
|
7
|
+
* Connect sign-in. Clients read these deployment-specific identifiers from
|
|
8
|
+
* the host they use.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* `authorizationServer` is the OAuth 2.1 authorization server, the AuthKit
|
|
11
|
+
* domain that serves WorkOS Connect. A client discovers the grant endpoints
|
|
12
|
+
* from its `/.well-known/oauth-authorization-server` document. It is absent
|
|
13
|
+
* when the environment does not trust Connect tokens yet.
|
|
14
|
+
*
|
|
15
|
+
* This carries no secret. A WorkOS client id and an issuer URL are public
|
|
16
|
+
* identifiers, and the device grant is designed for public clients that hold
|
|
17
|
+
* no secret.
|
|
12
18
|
*/
|
|
13
19
|
export const authConfigResponse = z.object({
|
|
20
|
+
authorizationServer: z.string().optional(),
|
|
14
21
|
workOsClientId: z.string(),
|
|
22
|
+
/** Public Connect application client ID used with authorizationServer. */
|
|
23
|
+
workOsConnectClientId: z.string().optional(),
|
|
15
24
|
});
|
|
16
25
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/v1/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/v1/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,0EAA0E;IAC1E,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeFindEmailsContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
|
+
workspace: WorkspaceId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "List the workspace's inbox, or its sent mail, newest first. Read a message body with email.get.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
address: z.ZodOptional<z.ZodEmail>;
|
|
11
|
+
createdAfter: z.ZodOptional<z.ZodISODateTime>;
|
|
12
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
inbound: "inbound";
|
|
14
|
+
outbound: "outbound";
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
readonly kind: "read";
|
|
19
|
+
readonly name: "email.find";
|
|
20
|
+
readonly output: z.ZodObject<{
|
|
21
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
22
|
+
createdAt: z.ZodISODateTime;
|
|
23
|
+
direction: z.ZodEnum<{
|
|
24
|
+
inbound: "inbound";
|
|
25
|
+
outbound: "outbound";
|
|
26
|
+
}>;
|
|
27
|
+
from: z.ZodObject<{
|
|
28
|
+
address: z.ZodString;
|
|
29
|
+
name: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
33
|
+
to: z.ZodArray<z.ZodObject<{
|
|
34
|
+
address: z.ZodString;
|
|
35
|
+
name: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
url: z.ZodURL;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=find.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/v1/email/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAUhD,eAAO,MAAM,sBAAsB,GACjC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDA,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
|
|
3
|
+
import { resource } from "../resource.js";
|
|
4
|
+
import { emailDirectionSchema, emailUrlFieldDescription, makeEmailSummaryFields, } from "./resource.js";
|
|
5
|
+
export const makeFindEmailsContract = (ids) => {
|
|
6
|
+
const input = z.object({
|
|
7
|
+
address: z
|
|
8
|
+
.email()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("Only emails delivered to this exact address (inbound) or sent from it (outbound). Mail to a plus-suffixed address such as inbox+abc@example.com is found by that full address, not by inbox@example.com."),
|
|
11
|
+
// `offset: true` accepts all ISO 8601 datetimes, with `Z` or with a
|
|
12
|
+
// timezone offset. Without it, zod rejects valid inputs such as
|
|
13
|
+
// `2026-07-01T00:00:00+02:00`.
|
|
14
|
+
createdAfter: z.iso
|
|
15
|
+
.datetime({ offset: true })
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Only include emails received or sent after this instant, e.g. since a flow submitted a sign-up form."),
|
|
18
|
+
direction: emailDirectionSchema
|
|
19
|
+
.default("inbound")
|
|
20
|
+
.describe("inbound lists the mail the workspace received: its inbox. outbound lists the mail it sent."),
|
|
21
|
+
workspaceId: ids.workspace
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("The workspace whose emails to list. Required when authenticating with an organization or user API key."),
|
|
24
|
+
// Every row the emailer returns carries its full bodies and attachments,
|
|
25
|
+
// even though the listing drops them. The cap stays below the usual 100.
|
|
26
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 50 }),
|
|
27
|
+
});
|
|
28
|
+
const output = z.object({
|
|
29
|
+
emails: z
|
|
30
|
+
.array(resource(makeEmailSummaryFields(), {
|
|
31
|
+
urlFieldDescription: emailUrlFieldDescription,
|
|
32
|
+
}))
|
|
33
|
+
.describe("The workspace's emails, newest first. Bodies are available via email.get."),
|
|
34
|
+
nextCursor: nextCursorSchema,
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
description: "List the workspace's inbox, or its sent mail, newest first. Read a message body with email.get.",
|
|
38
|
+
input,
|
|
39
|
+
kind: "read",
|
|
40
|
+
name: "email.find",
|
|
41
|
+
output,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../src/v1/email/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,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,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeGetEmailContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
|
+
workspace: WorkspaceId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "Read one email of the workspace, with its plain text and HTML bodies. Use it to pull a sign-in code or a verification link out of a message.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
readonly kind: "read";
|
|
12
|
+
readonly name: "email.get";
|
|
13
|
+
readonly output: z.ZodObject<{
|
|
14
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
fileName: z.ZodString;
|
|
16
|
+
index: z.ZodNumber;
|
|
17
|
+
type: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
address: z.ZodString;
|
|
21
|
+
name: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
address: z.ZodString;
|
|
25
|
+
name: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
html: z.ZodOptional<z.ZodString>;
|
|
28
|
+
links: z.ZodArray<z.ZodString>;
|
|
29
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
address: z.ZodString;
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
text: z.ZodOptional<z.ZodString>;
|
|
34
|
+
createdAt: z.ZodISODateTime;
|
|
35
|
+
direction: z.ZodEnum<{
|
|
36
|
+
inbound: "inbound";
|
|
37
|
+
outbound: "outbound";
|
|
38
|
+
}>;
|
|
39
|
+
from: z.ZodObject<{
|
|
40
|
+
address: z.ZodString;
|
|
41
|
+
name: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
45
|
+
to: z.ZodArray<z.ZodObject<{
|
|
46
|
+
address: z.ZodString;
|
|
47
|
+
name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
url: z.ZodURL;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/email/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,oBAAoB,GAAI,WAAW,SAAS,cAAc,EAAE,KAAK;IAC5E,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBA,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeEmailResourceSchema } from "./resource.js";
|
|
3
|
+
export const makeGetEmailContract = (ids) => {
|
|
4
|
+
const input = z.object({
|
|
5
|
+
id: z.string().min(1).describe("The id of the email, from email.find."),
|
|
6
|
+
workspaceId: ids.workspace
|
|
7
|
+
.optional()
|
|
8
|
+
.describe("The workspace the email belongs to. Required when authenticating with an organization or user API key."),
|
|
9
|
+
});
|
|
10
|
+
const output = makeEmailResourceSchema();
|
|
11
|
+
return {
|
|
12
|
+
description: "Read one email of the workspace, with its plain text and HTML bodies. Use it to pull a sign-in code or a verification link out of a message.",
|
|
13
|
+
input,
|
|
14
|
+
kind: "read",
|
|
15
|
+
name: "email.get",
|
|
16
|
+
output,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/email/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAqC,GAExE,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uCAAuC,CAAC;QACvE,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,wGAAwG,CACzG;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IAEzC,OAAO;QACL,WAAW,EACT,8IAA8I;QAChJ,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeGetEmailAttachmentContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
|
+
workspace: WorkspaceId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "Read one attachment of a workspace email as base64 content, by file name or by position. email.get lists both.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
readonly kind: "read";
|
|
14
|
+
readonly name: "email.getAttachment";
|
|
15
|
+
readonly output: z.ZodObject<{
|
|
16
|
+
contentBase64: z.ZodString;
|
|
17
|
+
fileName: z.ZodString;
|
|
18
|
+
index: z.ZodNumber;
|
|
19
|
+
type: z.ZodOptional<z.ZodString>;
|
|
20
|
+
url: z.ZodURL;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=getAttachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAttachment.d.ts","sourceRoot":"","sources":["../../../src/v1/email/getAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,8BAA8B,GACzC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CA4DA,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
import { emailUrlFieldDescription } from "./resource.js";
|
|
4
|
+
export const makeGetEmailAttachmentContract = (ids) => {
|
|
5
|
+
const input = z
|
|
6
|
+
.object({
|
|
7
|
+
fileName: z
|
|
8
|
+
.string()
|
|
9
|
+
.min(1)
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("The attachment's file name, as email.get lists it. The first attachment with that name is returned."),
|
|
12
|
+
id: z.string().min(1).describe("The id of the email, from email.find."),
|
|
13
|
+
index: z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(0)
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("The attachment's position in the email, from 0, as email.get lists it. Use it when file names repeat."),
|
|
19
|
+
workspaceId: ids.workspace
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("The workspace the email belongs to. Required when authenticating with an organization or user API key."),
|
|
22
|
+
})
|
|
23
|
+
.refine((input) => (input.fileName === undefined) !== (input.index === undefined), { message: "Provide fileName or index, not both." });
|
|
24
|
+
const output = resource({
|
|
25
|
+
// Not `z.base64()`: every response is parsed with this schema, on the
|
|
26
|
+
// server and in each client, and the content comes from the emailer's
|
|
27
|
+
// own encoder, so a scan of the whole file buys nothing. The same
|
|
28
|
+
// choice as runner/takeScreenshot.ts.
|
|
29
|
+
contentBase64: z.string().describe("The file content, base64 encoded."),
|
|
30
|
+
fileName: z.string(),
|
|
31
|
+
index: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(0)
|
|
35
|
+
.describe("The position of the attachment in the email, from 0."),
|
|
36
|
+
type: z.string().optional().describe("The MIME type."),
|
|
37
|
+
}, { urlFieldDescription: emailUrlFieldDescription });
|
|
38
|
+
return {
|
|
39
|
+
description: "Read one attachment of a workspace email as base64 content, by file name or by position. email.get lists both.",
|
|
40
|
+
input,
|
|
41
|
+
kind: "read",
|
|
42
|
+
name: "email.getAttachment",
|
|
43
|
+
output,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=getAttachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAttachment.js","sourceRoot":"","sources":["../../../src/v1/email/getAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAE5C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC;SACZ,MAAM,CAAC;QACN,QAAQ,EAA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AAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeListEmailAddressesContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
|
+
workspace: WorkspaceId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "List the workspace's inbox addresses, alphabetical. A flow can sign up with a plus-suffixed form of any of them, and email.find reads what arrives.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
readonly kind: "read";
|
|
13
|
+
readonly name: "email.listAddresses";
|
|
14
|
+
readonly output: z.ZodObject<{
|
|
15
|
+
addresses: z.ZodArray<z.ZodObject<{
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
isDefault: z.ZodBoolean;
|
|
18
|
+
url: z.ZodURL;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=listAddresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listAddresses.d.ts","sourceRoot":"","sources":["../../../src/v1/email/listAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMhD,eAAO,MAAM,8BAA8B,GACzC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CA6CA,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
|
|
3
|
+
import { resource } from "../resource.js";
|
|
4
|
+
import { emailUrlFieldDescription } from "./resource.js";
|
|
5
|
+
export const makeListEmailAddressesContract = (ids) => {
|
|
6
|
+
const input = z.object({
|
|
7
|
+
workspaceId: ids.workspace
|
|
8
|
+
.optional()
|
|
9
|
+
.describe("The workspace whose inbox addresses to list. Required when authenticating with an organization or user API key."),
|
|
10
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 50 }),
|
|
11
|
+
});
|
|
12
|
+
const output = z.object({
|
|
13
|
+
addresses: z
|
|
14
|
+
.array(resource({
|
|
15
|
+
address: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe("The inbox address. Mail sent to any plus-suffixed form, such as inbox+abc@example.com, lands in the same inbox."),
|
|
18
|
+
isDefault: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.describe("Whether this is the workspace's default inbox address."),
|
|
21
|
+
}, { urlFieldDescription: emailUrlFieldDescription }))
|
|
22
|
+
.describe("The workspace's permanent inbox addresses, alphabetical."),
|
|
23
|
+
nextCursor: nextCursorSchema,
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
description: "List the workspace's inbox addresses, alphabetical. A flow can sign up with a plus-suffixed form of any of them, and email.find reads what arrives.",
|
|
27
|
+
input,
|
|
28
|
+
kind: "read",
|
|
29
|
+
name: "email.listAddresses",
|
|
30
|
+
output,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=listAddresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listAddresses.js","sourceRoot":"","sources":["../../../src/v1/email/listAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAE5C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;QACH,GAAG,yBAAyB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;KACjE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,SAAS,EAAE,CAAC;aACT,KAAK,CACJ,QAAQ,CACN;YACE,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CACP,iHAAiH,CAClH;YACH,SAAS,EAAE,CAAC;iBACT,OAAO,EAAE;iBACT,QAAQ,CACP,wDAAwD,CACzD;SACJ,EACD,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAClD,CACF;aACA,QAAQ,CAAC,0DAA0D,CAAC;QACvE,UAAU,EAAE,gBAAgB;KAC7B,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,qJAAqJ;QACvJ,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAqB;QAC3B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const emailDirectionSchema: z.ZodEnum<{
|
|
3
|
+
inbound: "inbound";
|
|
4
|
+
outbound: "outbound";
|
|
5
|
+
}>;
|
|
6
|
+
export type EmailDirection = z.infer<typeof emailDirectionSchema>;
|
|
7
|
+
export declare const namedAddressSchema: z.ZodObject<{
|
|
8
|
+
address: z.ZodString;
|
|
9
|
+
name: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const emailUrlFieldDescription = "Absolute URL of the workspace. The inbox opens from the app header.";
|
|
12
|
+
export declare const makeEmailSummaryFields: () => {
|
|
13
|
+
createdAt: z.ZodISODateTime;
|
|
14
|
+
direction: z.ZodEnum<{
|
|
15
|
+
inbound: "inbound";
|
|
16
|
+
outbound: "outbound";
|
|
17
|
+
}>;
|
|
18
|
+
from: z.ZodObject<{
|
|
19
|
+
address: z.ZodString;
|
|
20
|
+
name: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
24
|
+
to: z.ZodArray<z.ZodObject<{
|
|
25
|
+
address: z.ZodString;
|
|
26
|
+
name: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
};
|
|
29
|
+
export declare const makeEmailResourceSchema: () => z.ZodObject<{
|
|
30
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
fileName: z.ZodString;
|
|
32
|
+
index: z.ZodNumber;
|
|
33
|
+
type: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
address: z.ZodString;
|
|
37
|
+
name: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
39
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
|
+
address: z.ZodString;
|
|
41
|
+
name: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
html: z.ZodOptional<z.ZodString>;
|
|
44
|
+
links: z.ZodArray<z.ZodString>;
|
|
45
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
address: z.ZodString;
|
|
47
|
+
name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>>;
|
|
49
|
+
text: z.ZodOptional<z.ZodString>;
|
|
50
|
+
createdAt: z.ZodISODateTime;
|
|
51
|
+
direction: z.ZodEnum<{
|
|
52
|
+
inbound: "inbound";
|
|
53
|
+
outbound: "outbound";
|
|
54
|
+
}>;
|
|
55
|
+
from: z.ZodObject<{
|
|
56
|
+
address: z.ZodString;
|
|
57
|
+
name: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
61
|
+
to: z.ZodArray<z.ZodObject<{
|
|
62
|
+
address: z.ZodString;
|
|
63
|
+
name: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
url: z.ZodURL;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/email/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;EAAkC,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,kBAAkB;;;iBAM7B,CAAC;AAIH,eAAO,MAAM,wBAAwB,wEACkC,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAgBjC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCjC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
export const emailDirectionSchema = z.enum(["inbound", "outbound"]);
|
|
4
|
+
// Output addresses are loose strings, not `z.email()`. Inbound mail arrives
|
|
5
|
+
// from the wild, and one odd sender address must not fail a whole page.
|
|
6
|
+
export const namedAddressSchema = z.object({
|
|
7
|
+
address: z.string().describe("The email address."),
|
|
8
|
+
name: z
|
|
9
|
+
.string()
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("The display name, when the message carried one."),
|
|
12
|
+
});
|
|
13
|
+
// Every email resource shares the workspace URL: the inbox is a drawer in the
|
|
14
|
+
// app header, and there is no per-email page.
|
|
15
|
+
export const emailUrlFieldDescription = "Absolute URL of the workspace. The inbox opens from the app header.";
|
|
16
|
+
// email.find returns these fields as rows. email.get adds the bodies to them.
|
|
17
|
+
// Both shapes come from this one factory, so the shapes cannot drift.
|
|
18
|
+
export const makeEmailSummaryFields = () => ({
|
|
19
|
+
// `offset: true` keeps the output valid for any ISO 8601 form the emailer
|
|
20
|
+
// may serialize, so one timestamp format cannot fail a page.
|
|
21
|
+
createdAt: z.iso
|
|
22
|
+
.datetime({ offset: true })
|
|
23
|
+
.describe("When QA Wolf received or sent the email."),
|
|
24
|
+
direction: emailDirectionSchema.describe("inbound for mail the workspace received, outbound for mail it sent."),
|
|
25
|
+
from: namedAddressSchema,
|
|
26
|
+
id: z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.describe("The id of the email. Pass it to email.get to read the body."),
|
|
30
|
+
subject: z.string().optional(),
|
|
31
|
+
to: z.array(namedAddressSchema),
|
|
32
|
+
});
|
|
33
|
+
export const makeEmailResourceSchema = () => resource({
|
|
34
|
+
...makeEmailSummaryFields(),
|
|
35
|
+
attachments: z
|
|
36
|
+
.array(z.object({
|
|
37
|
+
fileName: z.string(),
|
|
38
|
+
index: z
|
|
39
|
+
.number()
|
|
40
|
+
.int()
|
|
41
|
+
.min(0)
|
|
42
|
+
.describe("The position of the attachment in the email, from 0. Pass it to email.getAttachment when file names repeat."),
|
|
43
|
+
type: z.string().optional().describe("The MIME type."),
|
|
44
|
+
}))
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("Attachment names, positions, and types. Read the content with email.getAttachment."),
|
|
47
|
+
bcc: z.array(namedAddressSchema).optional(),
|
|
48
|
+
cc: z.array(namedAddressSchema).optional(),
|
|
49
|
+
html: z.string().optional().describe("The HTML body."),
|
|
50
|
+
links: z
|
|
51
|
+
.array(z.string())
|
|
52
|
+
.describe("The links of the email, in order: HTML anchors, then images, then bare URLs of the plain text body. Follow one to confirm a sign-up or reset a password."),
|
|
53
|
+
replyTo: z.array(namedAddressSchema).optional(),
|
|
54
|
+
text: z.string().optional().describe("The plain text body."),
|
|
55
|
+
}, { urlFieldDescription: emailUrlFieldDescription });
|
|
56
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../src/v1/email/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAIpE,4EAA4E;AAC5E,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAClD,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC,CAAC;AAEH,8EAA8E;AAC9E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GACnC,qEAAqE,CAAC;AAExE,8EAA8E;AAC9E,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3C,0EAA0E;IAC1E,6DAA6D;IAC7D,SAA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AAE,CAAC;SACjB,QAAQ,CACP,0JAA0J,CAC3J;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CAC7D,EACD,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAClD,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
/**
|
|
4
|
+
* The most base64 content the attachments of one email may carry together.
|
|
5
|
+
* SendGrid refuses a message over 30 MB, and base64 is the form on the wire.
|
|
6
|
+
*/
|
|
7
|
+
export declare const maxEmailAttachmentsBase64Length: number;
|
|
8
|
+
export declare const makeSendEmailContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
9
|
+
workspace: WorkspaceId;
|
|
10
|
+
}) => {
|
|
11
|
+
readonly description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.";
|
|
12
|
+
readonly input: z.ZodObject<{
|
|
13
|
+
attachments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBase64>>;
|
|
14
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
15
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
16
|
+
from: z.ZodOptional<z.ZodEmail>;
|
|
17
|
+
html: z.ZodOptional<z.ZodString>;
|
|
18
|
+
inReplyTo: z.ZodOptional<z.ZodString>;
|
|
19
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
20
|
+
subject: z.ZodString;
|
|
21
|
+
text: z.ZodOptional<z.ZodString>;
|
|
22
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
23
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
readonly kind: "write";
|
|
26
|
+
readonly name: "email.send";
|
|
27
|
+
readonly output: z.ZodObject<{
|
|
28
|
+
createdAt: z.ZodISODateTime;
|
|
29
|
+
direction: z.ZodEnum<{
|
|
30
|
+
inbound: "inbound";
|
|
31
|
+
outbound: "outbound";
|
|
32
|
+
}>;
|
|
33
|
+
from: z.ZodObject<{
|
|
34
|
+
address: z.ZodString;
|
|
35
|
+
name: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
39
|
+
to: z.ZodArray<z.ZodObject<{
|
|
40
|
+
address: z.ZodString;
|
|
41
|
+
name: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
url: z.ZodURL;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/email/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,QAAmB,CAAC;AAQhE,eAAO,MAAM,qBAAqB,GAAI,WAAW,SAAS,cAAc,EAAE,KAAK;IAC7E,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEA,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
import { emailUrlFieldDescription, makeEmailSummaryFields, } from "./resource.js";
|
|
4
|
+
const recipientsSchema = z.array(z.email()).max(50);
|
|
5
|
+
const maxAttachments = 10;
|
|
6
|
+
/**
|
|
7
|
+
* The most base64 content the attachments of one email may carry together.
|
|
8
|
+
* SendGrid refuses a message over 30 MB, and base64 is the form on the wire.
|
|
9
|
+
*/
|
|
10
|
+
export const maxEmailAttachmentsBase64Length = 30 * 1024 * 1024;
|
|
11
|
+
const attachmentsBase64Length = (attachments) => Object.values(attachments).reduce((total, content) => total + content.length, 0);
|
|
12
|
+
export const makeSendEmailContract = (ids) => {
|
|
13
|
+
const input = z
|
|
14
|
+
.object({
|
|
15
|
+
// A record rather than a list: the CLI expresses a record of strings
|
|
16
|
+
// as one repeatable flag, and cannot express a list of objects.
|
|
17
|
+
attachments: z
|
|
18
|
+
.record(z.string().min(1), z.base64())
|
|
19
|
+
.refine((attachments) => Object.keys(attachments).length <= maxAttachments, { message: `Send at most ${maxAttachments} attachments.` })
|
|
20
|
+
// A cap here answers with a 400 before the payload reaches the
|
|
21
|
+
// emailer, whatever the state of the size guard behind it.
|
|
22
|
+
.refine((attachments) => attachmentsBase64Length(attachments) <=
|
|
23
|
+
maxEmailAttachmentsBase64Length, { message: "Send at most 30 MB of attachments." })
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Files to attach, as file name to base64 content, at most 30 MB in total. The MIME type comes from the file name's extension."),
|
|
26
|
+
bcc: recipientsSchema.optional(),
|
|
27
|
+
cc: recipientsSchema.optional(),
|
|
28
|
+
from: z
|
|
29
|
+
.email()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("The workspace inbox address to send from, or a plus-suffixed form of one. Defaults to the workspace's default inbox address. See email.listAddresses."),
|
|
32
|
+
html: z.string().optional().describe("The HTML body."),
|
|
33
|
+
inReplyTo: z
|
|
34
|
+
.string()
|
|
35
|
+
.min(1)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("The id of an email of the workspace to reply to, from email.find. The reply threads under that message."),
|
|
38
|
+
replyTo: recipientsSchema
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Where replies should go instead of the from address."),
|
|
41
|
+
subject: z.string().min(1),
|
|
42
|
+
text: z.string().optional().describe("The plain text body."),
|
|
43
|
+
to: recipientsSchema.min(1),
|
|
44
|
+
workspaceId: ids.workspace
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("The workspace to send from. Required when authenticating with an organization or user API key."),
|
|
47
|
+
})
|
|
48
|
+
.refine((email) => email.html || email.text, {
|
|
49
|
+
message: "Provide text, html, or both.",
|
|
50
|
+
});
|
|
51
|
+
const output = resource(makeEmailSummaryFields(), {
|
|
52
|
+
urlFieldDescription: emailUrlFieldDescription,
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.",
|
|
56
|
+
input,
|
|
57
|
+
kind: "write",
|
|
58
|
+
name: "email.send",
|
|
59
|
+
output,
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/v1/email/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAEpD,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhE,MAAM,uBAAuB,GAAG,CAAC,WAAmC,EAAE,EAAE,CACtE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAC/B,CAAC,KAAK,EA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AAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QAC5D,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,gGAAgG,CACjG;KACJ,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;QAC3C,OAAO,EAAE,8BAA8B;KACxC,CAAC,CAAC;IACL,MAAM,MAAM,GAAG,QAAQ,CAAC,sBAAsB,EAAE,EAAE;QAChD,mBAAmB,EAAE,wBAAwB;KAC9C,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,8KAA8K;QAChL,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,YAAY;QAClB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { z } from "zod";
|
|
|
2
2
|
export { type AgentSessionStatus, agentSessionStatusSchema, } from "./agent/status.js";
|
|
3
3
|
export { type AuthConfigResponse, authConfigResponse } from "./auth/config.js";
|
|
4
4
|
export type { AnyPublicApiContract, PublicApiContract, PublicApiContractKind, } from "./definition.js";
|
|
5
|
+
export { type EmailDirection, emailDirectionSchema } from "./email/resource.js";
|
|
5
6
|
export { type IdentityResponse, identityResponse } from "./identity/index.js";
|
|
6
7
|
export { type IdentityOrganizationsResponse, identityOrganizationsResponse, } from "./identity/organizations.js";
|
|
7
8
|
export { type PublicIdSchema, type PublicIdSchemas, defaultIdSchemas, } from "./ids.js";
|
|
@@ -82,6 +83,164 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
82
83
|
url: z.ZodURL;
|
|
83
84
|
}, z.core.$strip>;
|
|
84
85
|
};
|
|
86
|
+
email: {
|
|
87
|
+
find: {
|
|
88
|
+
readonly description: "List the workspace's inbox, or its sent mail, newest first. Read a message body with email.get.";
|
|
89
|
+
readonly input: z.ZodObject<{
|
|
90
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
91
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
92
|
+
address: z.ZodOptional<z.ZodEmail>;
|
|
93
|
+
createdAfter: z.ZodOptional<z.ZodISODateTime>;
|
|
94
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
95
|
+
inbound: "inbound";
|
|
96
|
+
outbound: "outbound";
|
|
97
|
+
}>>;
|
|
98
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
readonly kind: "read";
|
|
101
|
+
readonly name: "email.find";
|
|
102
|
+
readonly output: z.ZodObject<{
|
|
103
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
104
|
+
createdAt: z.ZodISODateTime;
|
|
105
|
+
direction: z.ZodEnum<{
|
|
106
|
+
inbound: "inbound";
|
|
107
|
+
outbound: "outbound";
|
|
108
|
+
}>;
|
|
109
|
+
from: z.ZodObject<{
|
|
110
|
+
address: z.ZodString;
|
|
111
|
+
name: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
115
|
+
to: z.ZodArray<z.ZodObject<{
|
|
116
|
+
address: z.ZodString;
|
|
117
|
+
name: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
url: z.ZodURL;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
};
|
|
124
|
+
get: {
|
|
125
|
+
readonly description: "Read one email of the workspace, with its plain text and HTML bodies. Use it to pull a sign-in code or a verification link out of a message.";
|
|
126
|
+
readonly input: z.ZodObject<{
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
readonly kind: "read";
|
|
131
|
+
readonly name: "email.get";
|
|
132
|
+
readonly output: z.ZodObject<{
|
|
133
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
134
|
+
fileName: z.ZodString;
|
|
135
|
+
index: z.ZodNumber;
|
|
136
|
+
type: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
139
|
+
address: z.ZodString;
|
|
140
|
+
name: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>>>;
|
|
142
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
143
|
+
address: z.ZodString;
|
|
144
|
+
name: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>>>;
|
|
146
|
+
html: z.ZodOptional<z.ZodString>;
|
|
147
|
+
links: z.ZodArray<z.ZodString>;
|
|
148
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
address: z.ZodString;
|
|
150
|
+
name: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>>>;
|
|
152
|
+
text: z.ZodOptional<z.ZodString>;
|
|
153
|
+
createdAt: z.ZodISODateTime;
|
|
154
|
+
direction: z.ZodEnum<{
|
|
155
|
+
inbound: "inbound";
|
|
156
|
+
outbound: "outbound";
|
|
157
|
+
}>;
|
|
158
|
+
from: z.ZodObject<{
|
|
159
|
+
address: z.ZodString;
|
|
160
|
+
name: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
164
|
+
to: z.ZodArray<z.ZodObject<{
|
|
165
|
+
address: z.ZodString;
|
|
166
|
+
name: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
url: z.ZodURL;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
};
|
|
171
|
+
getAttachment: {
|
|
172
|
+
readonly description: "Read one attachment of a workspace email as base64 content, by file name or by position. email.get lists both.";
|
|
173
|
+
readonly input: z.ZodObject<{
|
|
174
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
readonly kind: "read";
|
|
180
|
+
readonly name: "email.getAttachment";
|
|
181
|
+
readonly output: z.ZodObject<{
|
|
182
|
+
contentBase64: z.ZodString;
|
|
183
|
+
fileName: z.ZodString;
|
|
184
|
+
index: z.ZodNumber;
|
|
185
|
+
type: z.ZodOptional<z.ZodString>;
|
|
186
|
+
url: z.ZodURL;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
};
|
|
189
|
+
listAddresses: {
|
|
190
|
+
readonly description: "List the workspace's inbox addresses, alphabetical. A flow can sign up with a plus-suffixed form of any of them, and email.find reads what arrives.";
|
|
191
|
+
readonly input: z.ZodObject<{
|
|
192
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
193
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
194
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
readonly kind: "read";
|
|
197
|
+
readonly name: "email.listAddresses";
|
|
198
|
+
readonly output: z.ZodObject<{
|
|
199
|
+
addresses: z.ZodArray<z.ZodObject<{
|
|
200
|
+
address: z.ZodString;
|
|
201
|
+
isDefault: z.ZodBoolean;
|
|
202
|
+
url: z.ZodURL;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
};
|
|
207
|
+
send: {
|
|
208
|
+
readonly description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.";
|
|
209
|
+
readonly input: z.ZodObject<{
|
|
210
|
+
attachments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBase64>>;
|
|
211
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
212
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
213
|
+
from: z.ZodOptional<z.ZodEmail>;
|
|
214
|
+
html: z.ZodOptional<z.ZodString>;
|
|
215
|
+
inReplyTo: z.ZodOptional<z.ZodString>;
|
|
216
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
217
|
+
subject: z.ZodString;
|
|
218
|
+
text: z.ZodOptional<z.ZodString>;
|
|
219
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
220
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
readonly kind: "write";
|
|
223
|
+
readonly name: "email.send";
|
|
224
|
+
readonly output: z.ZodObject<{
|
|
225
|
+
createdAt: z.ZodISODateTime;
|
|
226
|
+
direction: z.ZodEnum<{
|
|
227
|
+
inbound: "inbound";
|
|
228
|
+
outbound: "outbound";
|
|
229
|
+
}>;
|
|
230
|
+
from: z.ZodObject<{
|
|
231
|
+
address: z.ZodString;
|
|
232
|
+
name: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
236
|
+
to: z.ZodArray<z.ZodObject<{
|
|
237
|
+
address: z.ZodString;
|
|
238
|
+
name: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
url: z.ZodURL;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
85
244
|
environment: {
|
|
86
245
|
create: {
|
|
87
246
|
readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
|
|
@@ -1299,6 +1458,25 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
1299
1458
|
outcome: z.ZodLiteral<"success">;
|
|
1300
1459
|
}, z.core.$strip>;
|
|
1301
1460
|
};
|
|
1461
|
+
list: {
|
|
1462
|
+
readonly description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.";
|
|
1463
|
+
readonly input: z.ZodObject<{}, z.core.$strip>;
|
|
1464
|
+
readonly kind: "read";
|
|
1465
|
+
readonly name: "runner.list";
|
|
1466
|
+
readonly output: z.ZodObject<{
|
|
1467
|
+
outcome: z.ZodLiteral<"success">;
|
|
1468
|
+
runners: z.ZodArray<z.ZodObject<{
|
|
1469
|
+
gpuAccelerated: z.ZodBoolean;
|
|
1470
|
+
id: z.ZodString;
|
|
1471
|
+
runnerName: z.ZodEnum<{
|
|
1472
|
+
basic: "basic";
|
|
1473
|
+
playwright: "playwright";
|
|
1474
|
+
android: "android";
|
|
1475
|
+
ios: "ios";
|
|
1476
|
+
}>;
|
|
1477
|
+
}, z.core.$strip>>;
|
|
1478
|
+
}, z.core.$strip>;
|
|
1479
|
+
};
|
|
1302
1480
|
performAction: {
|
|
1303
1481
|
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). A success means the action took effect. `action-failed`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no `runner.runFlow` is needed before acting; if the browser is still starting when the wait runs out, the answer is `screen-not-ready` and retrying converges. On a mobile runner, the same `screen-needs-a-run` and `screen-not-ready` outcomes mean no Appium session has started yet, or it did not answer this instant; `runner.runFlow` is what starts one, same as a browser. `screen-needs-a-run` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call `runner.runFlow` with a flow that opens a browser. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
1304
1482
|
readonly input: z.ZodObject<{
|
|
@@ -1608,6 +1786,164 @@ export declare const publicContractsV1: {
|
|
|
1608
1786
|
url: z.ZodURL;
|
|
1609
1787
|
}, z.core.$strip>;
|
|
1610
1788
|
};
|
|
1789
|
+
email: {
|
|
1790
|
+
find: {
|
|
1791
|
+
readonly description: "List the workspace's inbox, or its sent mail, newest first. Read a message body with email.get.";
|
|
1792
|
+
readonly input: z.ZodObject<{
|
|
1793
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1794
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
1795
|
+
address: z.ZodOptional<z.ZodEmail>;
|
|
1796
|
+
createdAfter: z.ZodOptional<z.ZodISODateTime>;
|
|
1797
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
1798
|
+
inbound: "inbound";
|
|
1799
|
+
outbound: "outbound";
|
|
1800
|
+
}>>;
|
|
1801
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
1802
|
+
}, z.core.$strip>;
|
|
1803
|
+
readonly kind: "read";
|
|
1804
|
+
readonly name: "email.find";
|
|
1805
|
+
readonly output: z.ZodObject<{
|
|
1806
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
1807
|
+
createdAt: z.ZodISODateTime;
|
|
1808
|
+
direction: z.ZodEnum<{
|
|
1809
|
+
inbound: "inbound";
|
|
1810
|
+
outbound: "outbound";
|
|
1811
|
+
}>;
|
|
1812
|
+
from: z.ZodObject<{
|
|
1813
|
+
address: z.ZodString;
|
|
1814
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1815
|
+
}, z.core.$strip>;
|
|
1816
|
+
id: z.ZodString;
|
|
1817
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1818
|
+
to: z.ZodArray<z.ZodObject<{
|
|
1819
|
+
address: z.ZodString;
|
|
1820
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1821
|
+
}, z.core.$strip>>;
|
|
1822
|
+
url: z.ZodURL;
|
|
1823
|
+
}, z.core.$strip>>;
|
|
1824
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
1825
|
+
}, z.core.$strip>;
|
|
1826
|
+
};
|
|
1827
|
+
get: {
|
|
1828
|
+
readonly description: "Read one email of the workspace, with its plain text and HTML bodies. Use it to pull a sign-in code or a verification link out of a message.";
|
|
1829
|
+
readonly input: z.ZodObject<{
|
|
1830
|
+
id: z.ZodString;
|
|
1831
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
1832
|
+
}, z.core.$strip>;
|
|
1833
|
+
readonly kind: "read";
|
|
1834
|
+
readonly name: "email.get";
|
|
1835
|
+
readonly output: z.ZodObject<{
|
|
1836
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1837
|
+
fileName: z.ZodString;
|
|
1838
|
+
index: z.ZodNumber;
|
|
1839
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1840
|
+
}, z.core.$strip>>>;
|
|
1841
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1842
|
+
address: z.ZodString;
|
|
1843
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1844
|
+
}, z.core.$strip>>>;
|
|
1845
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1846
|
+
address: z.ZodString;
|
|
1847
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1848
|
+
}, z.core.$strip>>>;
|
|
1849
|
+
html: z.ZodOptional<z.ZodString>;
|
|
1850
|
+
links: z.ZodArray<z.ZodString>;
|
|
1851
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1852
|
+
address: z.ZodString;
|
|
1853
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
}, z.core.$strip>>>;
|
|
1855
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1856
|
+
createdAt: z.ZodISODateTime;
|
|
1857
|
+
direction: z.ZodEnum<{
|
|
1858
|
+
inbound: "inbound";
|
|
1859
|
+
outbound: "outbound";
|
|
1860
|
+
}>;
|
|
1861
|
+
from: z.ZodObject<{
|
|
1862
|
+
address: z.ZodString;
|
|
1863
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1864
|
+
}, z.core.$strip>;
|
|
1865
|
+
id: z.ZodString;
|
|
1866
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1867
|
+
to: z.ZodArray<z.ZodObject<{
|
|
1868
|
+
address: z.ZodString;
|
|
1869
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1870
|
+
}, z.core.$strip>>;
|
|
1871
|
+
url: z.ZodURL;
|
|
1872
|
+
}, z.core.$strip>;
|
|
1873
|
+
};
|
|
1874
|
+
getAttachment: {
|
|
1875
|
+
readonly description: "Read one attachment of a workspace email as base64 content, by file name or by position. email.get lists both.";
|
|
1876
|
+
readonly input: z.ZodObject<{
|
|
1877
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
1878
|
+
id: z.ZodString;
|
|
1879
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
1880
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
1881
|
+
}, z.core.$strip>;
|
|
1882
|
+
readonly kind: "read";
|
|
1883
|
+
readonly name: "email.getAttachment";
|
|
1884
|
+
readonly output: z.ZodObject<{
|
|
1885
|
+
contentBase64: z.ZodString;
|
|
1886
|
+
fileName: z.ZodString;
|
|
1887
|
+
index: z.ZodNumber;
|
|
1888
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1889
|
+
url: z.ZodURL;
|
|
1890
|
+
}, z.core.$strip>;
|
|
1891
|
+
};
|
|
1892
|
+
listAddresses: {
|
|
1893
|
+
readonly description: "List the workspace's inbox addresses, alphabetical. A flow can sign up with a plus-suffixed form of any of them, and email.find reads what arrives.";
|
|
1894
|
+
readonly input: z.ZodObject<{
|
|
1895
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1896
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
1897
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
1898
|
+
}, z.core.$strip>;
|
|
1899
|
+
readonly kind: "read";
|
|
1900
|
+
readonly name: "email.listAddresses";
|
|
1901
|
+
readonly output: z.ZodObject<{
|
|
1902
|
+
addresses: z.ZodArray<z.ZodObject<{
|
|
1903
|
+
address: z.ZodString;
|
|
1904
|
+
isDefault: z.ZodBoolean;
|
|
1905
|
+
url: z.ZodURL;
|
|
1906
|
+
}, z.core.$strip>>;
|
|
1907
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
1908
|
+
}, z.core.$strip>;
|
|
1909
|
+
};
|
|
1910
|
+
send: {
|
|
1911
|
+
readonly description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.";
|
|
1912
|
+
readonly input: z.ZodObject<{
|
|
1913
|
+
attachments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBase64>>;
|
|
1914
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
1915
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
1916
|
+
from: z.ZodOptional<z.ZodEmail>;
|
|
1917
|
+
html: z.ZodOptional<z.ZodString>;
|
|
1918
|
+
inReplyTo: z.ZodOptional<z.ZodString>;
|
|
1919
|
+
replyTo: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
1920
|
+
subject: z.ZodString;
|
|
1921
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1922
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
1923
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
1924
|
+
}, z.core.$strip>;
|
|
1925
|
+
readonly kind: "write";
|
|
1926
|
+
readonly name: "email.send";
|
|
1927
|
+
readonly output: z.ZodObject<{
|
|
1928
|
+
createdAt: z.ZodISODateTime;
|
|
1929
|
+
direction: z.ZodEnum<{
|
|
1930
|
+
inbound: "inbound";
|
|
1931
|
+
outbound: "outbound";
|
|
1932
|
+
}>;
|
|
1933
|
+
from: z.ZodObject<{
|
|
1934
|
+
address: z.ZodString;
|
|
1935
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1936
|
+
}, z.core.$strip>;
|
|
1937
|
+
id: z.ZodString;
|
|
1938
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1939
|
+
to: z.ZodArray<z.ZodObject<{
|
|
1940
|
+
address: z.ZodString;
|
|
1941
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1942
|
+
}, z.core.$strip>>;
|
|
1943
|
+
url: z.ZodURL;
|
|
1944
|
+
}, z.core.$strip>;
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1611
1947
|
environment: {
|
|
1612
1948
|
create: {
|
|
1613
1949
|
readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
|
|
@@ -2825,6 +3161,25 @@ export declare const publicContractsV1: {
|
|
|
2825
3161
|
outcome: z.ZodLiteral<"success">;
|
|
2826
3162
|
}, z.core.$strip>;
|
|
2827
3163
|
};
|
|
3164
|
+
list: {
|
|
3165
|
+
readonly description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.";
|
|
3166
|
+
readonly input: z.ZodObject<{}, z.core.$strip>;
|
|
3167
|
+
readonly kind: "read";
|
|
3168
|
+
readonly name: "runner.list";
|
|
3169
|
+
readonly output: z.ZodObject<{
|
|
3170
|
+
outcome: z.ZodLiteral<"success">;
|
|
3171
|
+
runners: z.ZodArray<z.ZodObject<{
|
|
3172
|
+
gpuAccelerated: z.ZodBoolean;
|
|
3173
|
+
id: z.ZodString;
|
|
3174
|
+
runnerName: z.ZodEnum<{
|
|
3175
|
+
basic: "basic";
|
|
3176
|
+
playwright: "playwright";
|
|
3177
|
+
android: "android";
|
|
3178
|
+
ios: "ios";
|
|
3179
|
+
}>;
|
|
3180
|
+
}, z.core.$strip>>;
|
|
3181
|
+
}, z.core.$strip>;
|
|
3182
|
+
};
|
|
2828
3183
|
performAction: {
|
|
2829
3184
|
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). A success means the action took effect. `action-failed`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no `runner.runFlow` is needed before acting; if the browser is still starting when the wait runs out, the answer is `screen-not-ready` and retrying converges. On a mobile runner, the same `screen-needs-a-run` and `screen-not-ready` outcomes mean no Appium session has started yet, or it did not answer this instant; `runner.runFlow` is what starts one, same as a browser. `screen-needs-a-run` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call `runner.runFlow` with a flow that opens a browser. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
2830
3185
|
readonly input: z.ZodObject<{
|
package/dist/v1/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,YAAY,EACV,oBAAoB,EACpB,iB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
export { agentSessionStatusSchema, } from "./agent/status.js";
|
|
2
2
|
export { authConfigResponse } from "./auth/config.js";
|
|
3
|
+
export { emailDirectionSchema } from "./email/resource.js";
|
|
3
4
|
export { identityResponse } from "./identity/index.js";
|
|
4
5
|
export { identityOrganizationsResponse, } from "./identity/organizations.js";
|
|
5
6
|
export { defaultIdSchemas, } from "./ids.js";
|
|
@@ -8,6 +9,11 @@ export * from "./runnerReexports.js";
|
|
|
8
9
|
import { makeAgentGetContract } from "./agent/get.js";
|
|
9
10
|
import { makeAgentSendContract } from "./agent/send.js";
|
|
10
11
|
import { makeAutomateContract } from "./automate/index.js";
|
|
12
|
+
import { makeFindEmailsContract } from "./email/find.js";
|
|
13
|
+
import { makeGetEmailContract } from "./email/get.js";
|
|
14
|
+
import { makeGetEmailAttachmentContract } from "./email/getAttachment.js";
|
|
15
|
+
import { makeListEmailAddressesContract } from "./email/listAddresses.js";
|
|
16
|
+
import { makeSendEmailContract } from "./email/send.js";
|
|
11
17
|
import { makeDeleteEnvironmentVariableContract } from "./environment/deleteVariable.js";
|
|
12
18
|
import { makeFindEnvironmentsContract } from "./environment/find.js";
|
|
13
19
|
import { makeGetEnvironmentVariableContract } from "./environment/getVariable.js";
|
|
@@ -35,6 +41,7 @@ import { makeImportPackageOnRunnerContract } from "./runner/importPackage.js";
|
|
|
35
41
|
import { makeLaunchRunnerContract, makeTerminateRunnerContract, } from "./runner/index.js";
|
|
36
42
|
import { makeInspectOnRunnerContract } from "./runner/inspect.js";
|
|
37
43
|
import { makeInspectMobileOnRunnerContract } from "./runner/inspectMobile.js";
|
|
44
|
+
import { makeListRunnersContract } from "./runner/list.js";
|
|
38
45
|
import { makePerformActionOnRunnerContract } from "./runner/performAction.js";
|
|
39
46
|
import { makePromoteSnapshotOnRunnerContract } from "./runner/promoteSnapshot.js";
|
|
40
47
|
import { makeReadRunnerJournalContract } from "./runner/readJournal.js";
|
|
@@ -60,6 +67,13 @@ export const makeContractsV1 = (ids) => {
|
|
|
60
67
|
// Top-level contract: the public command is the verb itself, with no
|
|
61
68
|
// resource namespace (`qawolf automate`).
|
|
62
69
|
automate: makeAutomateContract(resolvedIds),
|
|
70
|
+
email: {
|
|
71
|
+
find: makeFindEmailsContract(resolvedIds),
|
|
72
|
+
get: makeGetEmailContract(resolvedIds),
|
|
73
|
+
getAttachment: makeGetEmailAttachmentContract(resolvedIds),
|
|
74
|
+
listAddresses: makeListEmailAddressesContract(resolvedIds),
|
|
75
|
+
send: makeSendEmailContract(resolvedIds),
|
|
76
|
+
},
|
|
63
77
|
environment: {
|
|
64
78
|
create: makeCreateEnvironmentContract(resolvedIds),
|
|
65
79
|
deleteVariable: makeDeleteEnvironmentVariableContract(resolvedIds),
|
|
@@ -99,6 +113,7 @@ export const makeContractsV1 = (ids) => {
|
|
|
99
113
|
inspect: makeInspectOnRunnerContract(),
|
|
100
114
|
inspectMobile: makeInspectMobileOnRunnerContract(),
|
|
101
115
|
launch: makeLaunchRunnerContract(),
|
|
116
|
+
list: makeListRunnersContract(),
|
|
102
117
|
performAction: makePerformActionOnRunnerContract(),
|
|
103
118
|
promoteSnapshot: makePromoteSnapshotOnRunnerContract(),
|
|
104
119
|
readJournal: makeReadRunnerJournalContract(),
|
package/dist/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAM/E,OAAO,EAAyB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAEL,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,sBAAsB,CAAC;AAErC,OAAO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C;SAC7C;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC;YAC1C,QAAQ,EAAE,uBAAuB,CAAC,WAAW,CAAC;YAC9C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;YACvC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC;YACpC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC;SACjD;QACD,MAAM,EAAE;YACN,eAAe,EAAE,mCAAmC,EAAE;YACtD,GAAG,EAAE,qBAAqB,EAAE;YAC5B,iBAAiB,EAAE,qCAAqC,EAAE;YAC1D,aAAa,EAAE,iCAAiC,EAAE;YAClD,OAAO,EAAE,2BAA2B,EAAE;YACtC,aAAa,EAAE,iCAAiC,EAAE;YAClD,MAAM,EAAE,wBAAwB,EAAE;YAClC,IAAI,EAAE,uBAAuB,EAAE;YAC/B,aAAa,EAAE,iCAAiC,EAAE;YAClD,eAAe,EAAE,mCAAmC,EAAE;YACtD,WAAW,EAAE,6BAA6B,EAAE;YAC5C,OAAO,EAAE,2BAA2B,CAAC,WAAW,CAAC;YACjD,OAAO,EAAE,2BAA2B,EAAE;YACtC,cAAc,EAAE,kCAAkC,EAAE;YACpD,SAAS,EAAE,2BAA2B,EAAE;SACzC;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const makeListRunnersContract: () => {
|
|
3
|
+
readonly description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.";
|
|
4
|
+
readonly input: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
readonly kind: "read";
|
|
6
|
+
readonly name: "runner.list";
|
|
7
|
+
readonly output: z.ZodObject<{
|
|
8
|
+
outcome: z.ZodLiteral<"success">;
|
|
9
|
+
runners: z.ZodArray<z.ZodObject<{
|
|
10
|
+
gpuAccelerated: z.ZodBoolean;
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
runnerName: z.ZodEnum<{
|
|
13
|
+
basic: "basic";
|
|
14
|
+
playwright: "playwright";
|
|
15
|
+
android: "android";
|
|
16
|
+
ios: "ios";
|
|
17
|
+
}>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CAyBnC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeRunnerSchema } from "./identity.js";
|
|
3
|
+
export const makeListRunnersContract = () => {
|
|
4
|
+
const input = z.object({});
|
|
5
|
+
const output = z.object({
|
|
6
|
+
outcome: z.literal("success"),
|
|
7
|
+
runners: z
|
|
8
|
+
.array(makeRunnerSchema())
|
|
9
|
+
.describe("The runners running right now, in no particular order. Each entry carries the same fields a launch reports, so any of them can be addressed like a runner you launched yourself."),
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.",
|
|
13
|
+
input,
|
|
14
|
+
kind: "read",
|
|
15
|
+
name: "runner.list",
|
|
16
|
+
output,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAE3B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7B,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACzB,QAAQ,CACP,kLAAkL,CACnL;KACJ,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,8hBAA8hB;QAChiB,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,aAAa;QACnB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|