@qawolf/api-contracts 0.47.0 → 0.51.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/agent/get.d.ts +1 -1
- package/dist/v1/agent/get.d.ts.map +1 -1
- package/dist/v1/agent/get.js +4 -2
- package/dist/v1/agent/get.js.map +1 -1
- package/dist/v1/agent/send.d.ts +1 -1
- package/dist/v1/agent/send.d.ts.map +1 -1
- package/dist/v1/agent/send.js +4 -2
- package/dist/v1/agent/send.js.map +1 -1
- package/dist/v1/email/listAddresses.d.ts.map +1 -1
- package/dist/v1/email/listAddresses.js +2 -10
- package/dist/v1/email/listAddresses.js.map +1 -1
- package/dist/v1/email/registerAddress.d.ts +19 -0
- package/dist/v1/email/registerAddress.d.ts.map +1 -0
- package/dist/v1/email/registerAddress.js +30 -0
- package/dist/v1/email/registerAddress.js.map +1 -0
- package/dist/v1/email/resource.d.ts +5 -0
- package/dist/v1/email/resource.d.ts.map +1 -1
- package/dist/v1/email/resource.js +10 -0
- package/dist/v1/email/resource.js.map +1 -1
- package/dist/v1/index.d.ts +110 -10
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +18 -14
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/run/stop.d.ts +22 -0
- package/dist/v1/run/stop.d.ts.map +1 -0
- package/dist/v1/run/stop.js +19 -0
- package/dist/v1/run/stop.js.map +1 -0
- package/dist/v1/runner/evaluateSnippet.d.ts +5 -1
- package/dist/v1/runner/evaluateSnippet.d.ts.map +1 -1
- package/dist/v1/runner/evaluateSnippet.js +5 -2
- package/dist/v1/runner/evaluateSnippet.js.map +1 -1
- package/dist/v1/runner/get.d.ts +5 -1
- package/dist/v1/runner/get.d.ts.map +1 -1
- package/dist/v1/runner/get.js +5 -2
- package/dist/v1/runner/get.js.map +1 -1
- package/dist/v1/runner/highlightSelector.d.ts +5 -1
- package/dist/v1/runner/highlightSelector.d.ts.map +1 -1
- package/dist/v1/runner/highlightSelector.js +5 -2
- package/dist/v1/runner/highlightSelector.js.map +1 -1
- package/dist/v1/runner/identity.d.ts +2 -0
- package/dist/v1/runner/identity.d.ts.map +1 -1
- package/dist/v1/runner/identity.js +2 -0
- package/dist/v1/runner/identity.js.map +1 -1
- package/dist/v1/runner/importPackage.d.ts +5 -1
- package/dist/v1/runner/importPackage.d.ts.map +1 -1
- package/dist/v1/runner/importPackage.js +5 -2
- package/dist/v1/runner/importPackage.js.map +1 -1
- package/dist/v1/runner/index.d.ts +9 -2
- package/dist/v1/runner/index.d.ts.map +1 -1
- package/dist/v1/runner/index.js +9 -3
- package/dist/v1/runner/index.js.map +1 -1
- package/dist/v1/runner/inspect.d.ts +5 -1
- package/dist/v1/runner/inspect.d.ts.map +1 -1
- package/dist/v1/runner/inspect.js +5 -2
- package/dist/v1/runner/inspect.js.map +1 -1
- package/dist/v1/runner/inspectMobile.d.ts +5 -1
- package/dist/v1/runner/inspectMobile.d.ts.map +1 -1
- package/dist/v1/runner/inspectMobile.js +5 -2
- package/dist/v1/runner/inspectMobile.js.map +1 -1
- package/dist/v1/runner/journal.d.ts +5 -1
- package/dist/v1/runner/journal.d.ts.map +1 -1
- package/dist/v1/runner/journal.js.map +1 -1
- package/dist/v1/runner/list.d.ts +8 -3
- package/dist/v1/runner/list.d.ts.map +1 -1
- package/dist/v1/runner/list.js +8 -4
- package/dist/v1/runner/list.js.map +1 -1
- package/dist/v1/runner/performAction.d.ts +9 -2
- package/dist/v1/runner/performAction.d.ts.map +1 -1
- package/dist/v1/runner/performAction.js +18 -5
- package/dist/v1/runner/performAction.js.map +1 -1
- package/dist/v1/runner/promoteSnapshot.d.ts +5 -1
- package/dist/v1/runner/promoteSnapshot.d.ts.map +1 -1
- package/dist/v1/runner/promoteSnapshot.js +5 -2
- package/dist/v1/runner/promoteSnapshot.js.map +1 -1
- package/dist/v1/runner/readJournal.d.ts +5 -1
- package/dist/v1/runner/readJournal.d.ts.map +1 -1
- package/dist/v1/runner/readJournal.js +5 -2
- package/dist/v1/runner/readJournal.js.map +1 -1
- package/dist/v1/runner/runFlow.d.ts +3 -1
- package/dist/v1/runner/runFlow.d.ts.map +1 -1
- package/dist/v1/runner/runFlow.js +4 -1
- package/dist/v1/runner/runFlow.js.map +1 -1
- package/dist/v1/runner/screen.d.ts +8 -0
- package/dist/v1/runner/screen.d.ts.map +1 -1
- package/dist/v1/runner/screen.js +11 -0
- package/dist/v1/runner/screen.js.map +1 -1
- package/dist/v1/runner/stopRun.d.ts +5 -1
- package/dist/v1/runner/stopRun.d.ts.map +1 -1
- package/dist/v1/runner/stopRun.js +5 -2
- package/dist/v1/runner/stopRun.js.map +1 -1
- package/dist/v1/runner/takeScreenshot.d.ts +5 -1
- package/dist/v1/runner/takeScreenshot.d.ts.map +1 -1
- package/dist/v1/runner/takeScreenshot.js +7 -11
- package/dist/v1/runner/takeScreenshot.js.map +1 -1
- package/package.json +1 -1
package/dist/v1/agent/get.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const makeAgentGetContract: <ChatSessionId extends PublicIdSchema
|
|
|
4
4
|
chatSession: ChatSessionId;
|
|
5
5
|
workspace: WorkspaceId;
|
|
6
6
|
}) => {
|
|
7
|
-
readonly description: "
|
|
7
|
+
readonly description: "Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says \"working\". Include the session URL when reporting a blocker or final outcome. On \"completed\", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains \"working\", report the mismatch and stop monitoring. Stop on \"failed\" or \"cancelled\" and report any confirmed partial result.";
|
|
8
8
|
readonly input: z.ZodObject<{
|
|
9
9
|
sessionId: ChatSessionId;
|
|
10
10
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;CAiCA,CAAC"}
|
package/dist/v1/agent/get.js
CHANGED
|
@@ -11,9 +11,11 @@ export const makeAgentGetContract = (ids) => {
|
|
|
11
11
|
.describe("Everything the AI has said so far, oldest first. A reply carrying choices is a question the work is blocked on."),
|
|
12
12
|
sessionId: ids.chatSession,
|
|
13
13
|
status: agentSessionStatusSchema,
|
|
14
|
-
}, {
|
|
14
|
+
}, {
|
|
15
|
+
urlFieldDescription: "Absolute URL of the live session in the QA Wolf app.",
|
|
16
|
+
});
|
|
15
17
|
return {
|
|
16
|
-
description: '
|
|
18
|
+
description: 'Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.',
|
|
17
19
|
input,
|
|
18
20
|
kind: "read",
|
|
19
21
|
name: "agent.get",
|
package/dist/v1/agent/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,GAGD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACxE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC;aACvB,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;QAC1B,MAAM,EAAE,wBAAwB;KACjC,EACD,
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,GAGD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACxE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC;aACvB,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;QAC1B,MAAM,EAAE,wBAAwB;KACjC,EACD;QACE,mBAAmB,EACjB,sDAAsD;KACzD,CACF,CAAC;IAEF,OAAO;QACL,WAAW,EACT,ytCAAytC;QAC3tC,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/v1/agent/send.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const makeAgentSendContract: <ChatSessionId extends PublicIdSchem
|
|
|
5
5
|
environmentRef: PublicIdSchema;
|
|
6
6
|
workspace: WorkspaceId;
|
|
7
7
|
}) => {
|
|
8
|
-
readonly description: "
|
|
8
|
+
readonly description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.";
|
|
9
9
|
readonly input: z.ZodObject<{
|
|
10
10
|
environmentId: z.ZodOptional<PublicIdSchema>;
|
|
11
11
|
message: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;CAoDA,CAAC"}
|
package/dist/v1/agent/send.js
CHANGED
|
@@ -22,9 +22,11 @@ export const makeAgentSendContract = (ids) => {
|
|
|
22
22
|
const output = resource({
|
|
23
23
|
sessionId: ids.chatSession.describe("Follow the work by passing this to agent.get."),
|
|
24
24
|
status: agentSessionStatusSchema,
|
|
25
|
-
}, {
|
|
25
|
+
}, {
|
|
26
|
+
urlFieldDescription: "Absolute URL of the live session in the QA Wolf app.",
|
|
27
|
+
});
|
|
26
28
|
return {
|
|
27
|
-
description: "
|
|
29
|
+
description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.",
|
|
28
30
|
input,
|
|
29
31
|
kind: "write",
|
|
30
32
|
name: "agent.send",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/v1/agent/send.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,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAGnC,GAID,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,aAAa,EAAE,GAAG,CAAC,cAAc;aAC9B,QAAQ,EAAE;aACV,QAAQ,CACP,gKAAgK,CACjK;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,MAAM,CAAC;aACX,QAAQ,CACP,iSAAiS,CAClS;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,gKAAgK,CACjK;QACH,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;a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,YAAY;QAClB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAKhD,eAAO,MAAM,8BAA8B,GACzC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CA6BA,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
|
|
3
|
-
import {
|
|
4
|
-
import { emailUrlFieldDescription } from "./resource.js";
|
|
3
|
+
import { makeEmailAddressResourceSchema } from "./resource.js";
|
|
5
4
|
export const makeListEmailAddressesContract = (ids) => {
|
|
6
5
|
const input = z.object({
|
|
7
6
|
workspaceId: ids.workspace
|
|
@@ -11,14 +10,7 @@ export const makeListEmailAddressesContract = (ids) => {
|
|
|
11
10
|
});
|
|
12
11
|
const output = z.object({
|
|
13
12
|
addresses: z
|
|
14
|
-
.array(
|
|
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 }))
|
|
13
|
+
.array(makeEmailAddressResourceSchema())
|
|
22
14
|
.describe("The workspace's permanent inbox addresses, alphabetical."),
|
|
23
15
|
nextCursor: nextCursorSchema,
|
|
24
16
|
});
|
|
@@ -1 +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;
|
|
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;AAE/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE/D,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,CAAC,8BAA8B,EAAE,CAAC;aACvC,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,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeRegisterEmailAddressContract: <WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
|
+
workspace: WorkspaceId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
address: z.ZodEmail;
|
|
9
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
readonly kind: "write";
|
|
12
|
+
readonly name: "email.registerAddress";
|
|
13
|
+
readonly output: z.ZodObject<{
|
|
14
|
+
address: z.ZodString;
|
|
15
|
+
isDefault: z.ZodBoolean;
|
|
16
|
+
url: z.ZodURL;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=registerAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerAddress.d.ts","sourceRoot":"","sources":["../../../src/v1/email/registerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAWhD,eAAO,MAAM,gCAAgC,GAC3C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;CAgCA,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeEmailAddressResourceSchema } from "./resource.js";
|
|
3
|
+
// Mail to inbox+abc@example.com lands in the inbox@example.com inbox already.
|
|
4
|
+
// A registered plus form would never receive on its own.
|
|
5
|
+
const hasNoPlusSuffix = (address) => {
|
|
6
|
+
const [localPart] = address.split("@");
|
|
7
|
+
return localPart !== undefined && !localPart.includes("+");
|
|
8
|
+
};
|
|
9
|
+
export const makeRegisterEmailAddressContract = (ids) => {
|
|
10
|
+
const input = z.object({
|
|
11
|
+
address: z
|
|
12
|
+
.email()
|
|
13
|
+
.refine(hasNoPlusSuffix, {
|
|
14
|
+
message: "Register the base address. Mail to a plus-suffixed form lands in the base inbox.",
|
|
15
|
+
})
|
|
16
|
+
.describe("The inbox address to register. Its domain must be one QA Wolf serves for the workspace."),
|
|
17
|
+
workspaceId: ids.workspace
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("The workspace to register the address in. Required when authenticating with an organization or user API key."),
|
|
20
|
+
});
|
|
21
|
+
const output = makeEmailAddressResourceSchema();
|
|
22
|
+
return {
|
|
23
|
+
description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.",
|
|
24
|
+
input,
|
|
25
|
+
kind: "write",
|
|
26
|
+
name: "email.registerAddress",
|
|
27
|
+
output,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=registerAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerAddress.js","sourceRoot":"","sources":["../../../src/v1/email/registerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE/D,8EAA8E;AAC9E,yDAAyD;AACzD,MAAM,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE;IAC1C,MAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAE9C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,EAAE;aACP,MAAM,CAAC,eAAe,EAAE;YACvB,OAAO,EACL,kFAAkF;SACrF,CAAC;aACD,QAAQ,CACP,yFAAyF,CAC1F;QACH,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,8GAA8G,CAC/G;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,8BAA8B,EAAE,CAAC;IAEhD,OAAO;QACL,WAAW,EACT,mKAAmK;QACrK,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,uBAAuB;QAC7B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -64,4 +64,9 @@ export declare const makeEmailResourceSchema: () => z.ZodObject<{
|
|
|
64
64
|
}, z.core.$strip>>;
|
|
65
65
|
url: z.ZodURL;
|
|
66
66
|
}, z.core.$strip>;
|
|
67
|
+
export declare const makeEmailAddressResourceSchema: () => z.ZodObject<{
|
|
68
|
+
address: z.ZodString;
|
|
69
|
+
isDefault: z.ZodBoolean;
|
|
70
|
+
url: z.ZodURL;
|
|
71
|
+
}, z.core.$strip>;
|
|
67
72
|
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -1 +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"}
|
|
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;AAIJ,eAAO,MAAM,8BAA8B;;;;iBAaxC,CAAC"}
|
|
@@ -53,4 +53,14 @@ export const makeEmailResourceSchema = () => resource({
|
|
|
53
53
|
replyTo: z.array(namedAddressSchema).optional(),
|
|
54
54
|
text: z.string().optional().describe("The plain text body."),
|
|
55
55
|
}, { urlFieldDescription: emailUrlFieldDescription });
|
|
56
|
+
// email.listAddresses returns these rows and email.registerAddress returns
|
|
57
|
+
// one. One factory keeps the two shapes from drifting.
|
|
58
|
+
export const makeEmailAddressResourceSchema = () => resource({
|
|
59
|
+
address: z
|
|
60
|
+
.string()
|
|
61
|
+
.describe("The inbox address. Mail sent to any plus-suffixed form, such as inbox+abc@example.com, lands in the same inbox."),
|
|
62
|
+
isDefault: z
|
|
63
|
+
.boolean()
|
|
64
|
+
.describe("Whether this is the workspace's default inbox address."),
|
|
65
|
+
}, { urlFieldDescription: emailUrlFieldDescription });
|
|
56
66
|
//# sourceMappingURL=resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":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