@intentic/sandbox-contract 1.374.0 → 1.376.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/contracts/accounts.contract.d.ts +16 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +8 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.d.ts +15 -0
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +123 -123
- package/dist/contracts/runs.contract.d.ts +2 -1
- package/dist/contracts/runs.contract.d.ts.map +1 -1
- package/dist/contracts/sharing.contract.d.ts +58 -0
- package/dist/contracts/sharing.contract.d.ts.map +1 -0
- package/dist/contracts/sharing.contract.js +41 -0
- package/dist/contracts/sharing.contract.js.map +1 -0
- package/dist/contracts/workspace.contract.d.ts +1 -0
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/formats/archives.d.ts.map +1 -0
- package/dist/formats/archives.js.map +1 -0
- package/dist/formats/packed-formats.d.ts.map +1 -0
- package/dist/formats/packed-formats.js.map +1 -0
- package/dist/ids/conversation-ids.d.ts +4 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +1 -0
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/index.d.ts +99 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/models/account-moves.d.ts +8 -0
- package/dist/models/account-moves.d.ts.map +1 -0
- package/dist/models/account-moves.js +3 -0
- package/dist/models/account-moves.js.map +1 -0
- package/dist/protocol/raw/raw-json-routes.d.ts +152 -2
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +6 -1
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +16 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +4 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +8 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +4 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/links.d.ts +29 -2
- package/dist/schemas/links.d.ts.map +1 -1
- package/dist/schemas/links.js +28 -12
- package/dist/schemas/links.js.map +1 -1
- package/dist/schemas/panels.d.ts +38 -0
- package/dist/schemas/panels.d.ts.map +1 -1
- package/dist/schemas/panels.js +21 -2
- package/dist/schemas/panels.js.map +1 -1
- package/dist/schemas/providers/account-sharing.d.ts +275 -0
- package/dist/schemas/providers/account-sharing.d.ts.map +1 -0
- package/dist/schemas/providers/account-sharing.js +68 -0
- package/dist/schemas/providers/account-sharing.js.map +1 -0
- package/dist/schemas/providers/provider-oauth.d.ts +16 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/providers/provider-oauth.js +4 -0
- package/dist/schemas/providers/provider-oauth.js.map +1 -1
- package/dist/schemas/run-targets.d.ts +11 -4
- package/dist/schemas/run-targets.d.ts.map +1 -1
- package/dist/schemas/run-targets.js +8 -2
- package/dist/schemas/run-targets.js.map +1 -1
- package/dist/schemas/workspace/workspace-repos.d.ts +2 -0
- package/dist/schemas/workspace/workspace-repos.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-repos.js +2 -1
- package/dist/schemas/workspace/workspace-repos.js.map +1 -1
- package/dist/state/definition.d.ts +8 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/contracts/sharing.contract.ts +54 -0
- package/src/ids/conversation-ids.ts +4 -0
- package/src/index.ts +2 -0
- package/src/models/account-moves.test.ts +24 -0
- package/src/models/account-moves.ts +26 -0
- package/src/protocol/raw/raw-json-routes.ts +14 -1
- package/src/protocol/raw/raw-routes.ts +7 -0
- package/src/schemas/agents.ts +4 -2
- package/src/schemas/capabilities.ts +6 -0
- package/src/schemas/links.ts +39 -14
- package/src/schemas/panels.ts +38 -6
- package/src/schemas/providers/account-sharing.ts +123 -0
- package/src/schemas/providers/provider-oauth.ts +6 -0
- package/src/schemas/run-targets.ts +35 -7
- package/src/schemas/workspace/workspace-repos.ts +5 -3
- package/dist/text/archives.d.ts.map +0 -1
- package/dist/text/archives.js.map +0 -1
- package/dist/text/packed-formats.d.ts.map +0 -1
- package/dist/text/packed-formats.js.map +0 -1
- /package/dist/{text → formats}/archives.d.ts +0 -0
- /package/dist/{text → formats}/archives.js +0 -0
- /package/dist/{text → formats}/packed-formats.d.ts +0 -0
- /package/dist/{text → formats}/packed-formats.js +0 -0
- /package/src/{text → formats}/archives.test.ts +0 -0
- /package/src/{text → formats}/archives.ts +0 -0
- /package/src/{text → formats}/packed-formats.ts +0 -0
package/dist/schemas/links.js
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AskQuestionSchema } from "../events/requests.js";
|
|
3
3
|
import { entryId } from "./internal.js";
|
|
4
|
+
import { SharedAccountRefSchema } from "./providers/account-sharing.js";
|
|
4
5
|
export const LINK_TOKEN_PREFIX = "ilk_";
|
|
5
6
|
export const LINK_HEADER = "x-intentic-link";
|
|
6
7
|
export const LINK_MAX_HOPS = 2;
|
|
7
8
|
export const LINK_TURNS_PER_HOUR_MAX = 120;
|
|
8
9
|
export const LINK_TURNS_PER_HOUR_DEFAULT = 20;
|
|
10
|
+
const approveTerm = z
|
|
11
|
+
.boolean()
|
|
12
|
+
.describe("Each new task waits for this sandbox's owner to allow it before anything runs. Follow-up messages to a task already allowed do not.");
|
|
13
|
+
const turnsPerHourTerm = z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(LINK_TURNS_PER_HOUR_MAX)
|
|
18
|
+
.describe("How many turns the link may start in an hour, new tasks and follow-ups alike. Words said into a turn already running are not counted.");
|
|
19
|
+
const tasksTerm = z
|
|
20
|
+
.boolean()
|
|
21
|
+
.describe("Whether the link may hand this sandbox tasks at all. An accounts link is minted without: it only borrows and copies the accounts below.");
|
|
22
|
+
const accountsTerm = z
|
|
23
|
+
.array(SharedAccountRefSchema)
|
|
24
|
+
.max(64)
|
|
25
|
+
.describe("The model accounts the asking sandbox may use (schemas/providers/account-sharing.ts): a static key it may copy, a sign-in it borrows turn by turn. Empty lends nothing.");
|
|
9
26
|
export const LinkTermsSchema = z.object({
|
|
10
27
|
actsAs: entryId
|
|
11
28
|
.optional()
|
|
@@ -13,17 +30,10 @@ export const LinkTermsSchema = z.object({
|
|
|
13
30
|
runAs: entryId
|
|
14
31
|
.optional()
|
|
15
32
|
.describe("The service every task through this link acts as: whose authority it uses, held to that service's access profile. Absent means this sandbox's owner, limited only by the persona."),
|
|
16
|
-
approve:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
turnsPerHour: z
|
|
21
|
-
.number()
|
|
22
|
-
.int()
|
|
23
|
-
.min(1)
|
|
24
|
-
.max(LINK_TURNS_PER_HOUR_MAX)
|
|
25
|
-
.default(LINK_TURNS_PER_HOUR_DEFAULT)
|
|
26
|
-
.describe("How many turns the link may start in an hour, new tasks and follow-ups alike. Words said into a turn already running are not counted."),
|
|
33
|
+
approve: approveTerm.default(false),
|
|
34
|
+
turnsPerHour: turnsPerHourTerm.default(LINK_TURNS_PER_HOUR_DEFAULT),
|
|
35
|
+
tasks: tasksTerm.default(true),
|
|
36
|
+
accounts: accountsTerm.default([]),
|
|
27
37
|
});
|
|
28
38
|
export const LinkPeerSchema = z.object({
|
|
29
39
|
sandboxId: z.string().max(100).optional().describe("The asking sandbox's id on the owner's account."),
|
|
@@ -54,10 +64,14 @@ export const InboundLinkMintSchema = z.object({
|
|
|
54
64
|
terms: LinkTermsSchema.partial().optional(),
|
|
55
65
|
});
|
|
56
66
|
export const InboundLinkMintedSchema = z.object({ id: z.string(), token: z.string() });
|
|
57
|
-
export const InboundLinkTermsUpdateSchema =
|
|
67
|
+
export const InboundLinkTermsUpdateSchema = z.object({
|
|
58
68
|
label: z.string().trim().min(1).max(60).optional(),
|
|
59
69
|
actsAs: entryId.nullable().optional().describe("The persona every task wears; null takes it off."),
|
|
60
70
|
runAs: entryId.nullable().optional().describe("The service every task acts as; null takes it off, so tasks act for this sandbox's owner."),
|
|
71
|
+
approve: approveTerm.optional(),
|
|
72
|
+
turnsPerHour: turnsPerHourTerm.optional(),
|
|
73
|
+
tasks: tasksTerm.optional(),
|
|
74
|
+
accounts: accountsTerm.optional(),
|
|
61
75
|
});
|
|
62
76
|
export const LinkRequestDecisionSchema = z.object({ approve: z.boolean() });
|
|
63
77
|
export const LinkHelloSchema = z.object({
|
|
@@ -67,6 +81,8 @@ export const LinkHelloSchema = z.object({
|
|
|
67
81
|
approve: z.boolean(),
|
|
68
82
|
turnsPerHour: z.number().int(),
|
|
69
83
|
persona: z.string().optional().describe("The name of the persona its tasks wear, when they wear one."),
|
|
84
|
+
tasks: z.boolean().optional(),
|
|
85
|
+
accounts: z.number().int().nonnegative().optional().describe("How many accounts the link may use."),
|
|
70
86
|
}),
|
|
71
87
|
maxHops: z.number().int(),
|
|
72
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/schemas/links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/schemas/links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,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AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;CACtD,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CACrD,CAAC,CAAC"}
|
package/dist/schemas/panels.d.ts
CHANGED
|
@@ -6,9 +6,28 @@ export declare const PanelLaunchSchema: z.ZodEnum<{
|
|
|
6
6
|
starting: "starting";
|
|
7
7
|
}>;
|
|
8
8
|
export type PanelLaunch = z.infer<typeof PanelLaunchSchema>;
|
|
9
|
+
export declare const PanelStartSourceSchema: z.ZodEnum<{
|
|
10
|
+
cargo: "cargo";
|
|
11
|
+
dev: "dev";
|
|
12
|
+
operator: "operator";
|
|
13
|
+
procfile: "procfile";
|
|
14
|
+
start: "start";
|
|
15
|
+
}>;
|
|
16
|
+
export type PanelStartSource = z.infer<typeof PanelStartSourceSchema>;
|
|
9
17
|
export declare const PanelSummarySchema: z.ZodObject<{
|
|
10
18
|
repo: z.ZodString;
|
|
11
19
|
hasPanel: z.ZodBoolean;
|
|
20
|
+
start: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
from: z.ZodEnum<{
|
|
22
|
+
cargo: "cargo";
|
|
23
|
+
dev: "dev";
|
|
24
|
+
operator: "operator";
|
|
25
|
+
procfile: "procfile";
|
|
26
|
+
start: "start";
|
|
27
|
+
}>;
|
|
28
|
+
command: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
sandboxTargets: z.ZodOptional<z.ZodBoolean>;
|
|
12
31
|
running: z.ZodBoolean;
|
|
13
32
|
installed: z.ZodBoolean;
|
|
14
33
|
launch: z.ZodOptional<z.ZodEnum<{
|
|
@@ -25,6 +44,10 @@ export declare const PanelSummarySchema: z.ZodObject<{
|
|
|
25
44
|
dir: z.ZodOptional<z.ZodString>;
|
|
26
45
|
session: z.ZodOptional<z.ZodString>;
|
|
27
46
|
}, z.core.$strip>>;
|
|
47
|
+
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
title: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
28
51
|
previewUrl: z.ZodOptional<z.ZodString>;
|
|
29
52
|
role: z.ZodOptional<z.ZodEnum<{
|
|
30
53
|
app: "app";
|
|
@@ -44,6 +67,17 @@ export declare const PanelsListSchema: z.ZodObject<{
|
|
|
44
67
|
panels: z.ZodArray<z.ZodObject<{
|
|
45
68
|
repo: z.ZodString;
|
|
46
69
|
hasPanel: z.ZodBoolean;
|
|
70
|
+
start: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
from: z.ZodEnum<{
|
|
72
|
+
cargo: "cargo";
|
|
73
|
+
dev: "dev";
|
|
74
|
+
operator: "operator";
|
|
75
|
+
procfile: "procfile";
|
|
76
|
+
start: "start";
|
|
77
|
+
}>;
|
|
78
|
+
command: z.ZodString;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
sandboxTargets: z.ZodOptional<z.ZodBoolean>;
|
|
47
81
|
running: z.ZodBoolean;
|
|
48
82
|
installed: z.ZodBoolean;
|
|
49
83
|
launch: z.ZodOptional<z.ZodEnum<{
|
|
@@ -60,6 +94,10 @@ export declare const PanelsListSchema: z.ZodObject<{
|
|
|
60
94
|
dir: z.ZodOptional<z.ZodString>;
|
|
61
95
|
session: z.ZodOptional<z.ZodString>;
|
|
62
96
|
}, z.core.$strip>>;
|
|
97
|
+
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
title: z.ZodString;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
63
101
|
previewUrl: z.ZodOptional<z.ZodString>;
|
|
64
102
|
role: z.ZodOptional<z.ZodEnum<{
|
|
65
103
|
app: "app";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/schemas/panels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,iBAAiB;;;;;EAA4D,CAAC;AAC3F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/schemas/panels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,iBAAiB;;;;;EAA4D,CAAC;AAC3F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI5D,eAAO,MAAM,sBAAsB;;;;;;EAA4D,CAAC;AAChG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,oBAAoB;;iBAA+D,CAAC"}
|
package/dist/schemas/panels.js
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const PanelLaunchSchema = z.enum(["launching", "installing", "starting", "exited"]);
|
|
3
|
+
export const PanelStartSourceSchema = z.enum(["procfile", "operator", "dev", "start", "cargo"]);
|
|
3
4
|
export const PanelSummarySchema = z.object({
|
|
4
5
|
repo: z.string().describe("Which repository."),
|
|
5
6
|
hasPanel: z.boolean().describe("Whether it has anything runnable at all."),
|
|
7
|
+
start: z
|
|
8
|
+
.object({
|
|
9
|
+
from: PanelStartSourceSchema.describe("Which file said how to start it."),
|
|
10
|
+
command: z.string().describe("What it runs, as a person would type it: `pnpm dev`, `cargo run`, or a Procfile's entries."),
|
|
11
|
+
})
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("What Start runs. Absent for a repository with nothing to start."),
|
|
14
|
+
sandboxTargets: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Whether its .intentic/run.json declares targets that run in the sandbox. Each is one of its apps, with its own preview address, Start and Stop."),
|
|
6
18
|
running: z.boolean().describe("Whether the sandbox has it running."),
|
|
7
19
|
installed: z
|
|
8
20
|
.boolean()
|
|
9
21
|
.describe("Whether its dependencies are installed, which is what decides whether a start takes seconds or an install first."),
|
|
10
|
-
launch: PanelLaunchSchema.optional().describe("Where a start the sandbox is running has got to: its shell coming up, installing, its dev command running with nothing listening yet, or exited back to a prompt. Absent when nothing is starting and once it serves."),
|
|
22
|
+
launch: PanelLaunchSchema.optional().describe("Where a start the sandbox is running has got to: its shell coming up, installing, its dev command running with nothing listening yet, or exited back to a prompt. Absent when nothing is starting and once it serves or opens a window."),
|
|
11
23
|
healthy: z
|
|
12
24
|
.boolean()
|
|
13
|
-
.describe("Whether anything it owns is actually answering. A different question: a server still installing is running and not yet healthy, and one somebody started by hand is healthy without the sandbox running it."),
|
|
25
|
+
.describe("Whether anything it owns is actually answering: a server, or a window open on the sandbox desktop. A different question: a server still installing is running and not yet healthy, and one somebody started by hand is healthy without the sandbox running it."),
|
|
14
26
|
port: z
|
|
15
27
|
.number()
|
|
16
28
|
.optional()
|
|
@@ -29,6 +41,13 @@ export const PanelSummarySchema = z.object({
|
|
|
29
41
|
.describe("The terminal it runs in: the sandbox's when it started it, yours when you did, and absent when nothing here owns it, which is the case worth designing for."),
|
|
30
42
|
}))
|
|
31
43
|
.describe("Every server this repository is really serving, found by looking at what is listening. Empty when nothing answers."),
|
|
44
|
+
windows: z
|
|
45
|
+
.array(z.object({
|
|
46
|
+
id: z.string().describe("The window's id on the sandbox desktop, which is what opening it there takes."),
|
|
47
|
+
title: z.string().describe("Its title."),
|
|
48
|
+
}))
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("The windows its programs have open on the sandbox desktop: how a game or a desktop app shows it is up, since it serves no page. Absent when none is open."),
|
|
32
51
|
previewUrl: z
|
|
33
52
|
.string()
|
|
34
53
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panels.js","sourceRoot":"","sources":["../../src/schemas/panels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"panels.js","sourceRoot":"","sources":["../../src/schemas/panels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAK3F,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE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AC,kDAAkD,CAAC;CACjF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,CAAC;SACJ,KAAK,CAAC,kBAAkB,CAAC;SACzB,QAAQ,CAAC,0GAA0G,CAAC;CAC5H,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ShareModeSchema: z.ZodEnum<{
|
|
3
|
+
copy: "copy";
|
|
4
|
+
lend: "lend";
|
|
5
|
+
no: "no";
|
|
6
|
+
}>;
|
|
7
|
+
export type ShareMode = z.infer<typeof ShareModeSchema>;
|
|
8
|
+
export declare const SharedAccountRefSchema: z.ZodObject<{
|
|
9
|
+
provider: z.ZodString;
|
|
10
|
+
account: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type SharedAccountRef = z.infer<typeof SharedAccountRefSchema>;
|
|
13
|
+
export declare const sameSharedRef: (a: SharedAccountRef, b: SharedAccountRef) => boolean;
|
|
14
|
+
export declare const ShareableAccountSchema: z.ZodObject<{
|
|
15
|
+
provider: z.ZodString;
|
|
16
|
+
account: z.ZodOptional<z.ZodString>;
|
|
17
|
+
label: z.ZodString;
|
|
18
|
+
email: z.ZodOptional<z.ZodString>;
|
|
19
|
+
mode: z.ZodEnum<{
|
|
20
|
+
copy: "copy";
|
|
21
|
+
lend: "lend";
|
|
22
|
+
no: "no";
|
|
23
|
+
}>;
|
|
24
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type ShareableAccount = z.infer<typeof ShareableAccountSchema>;
|
|
27
|
+
export declare const ShareableAccountsSchema: z.ZodObject<{
|
|
28
|
+
sandbox: z.ZodString;
|
|
29
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
30
|
+
provider: z.ZodString;
|
|
31
|
+
account: z.ZodOptional<z.ZodString>;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
email: z.ZodOptional<z.ZodString>;
|
|
34
|
+
mode: z.ZodEnum<{
|
|
35
|
+
copy: "copy";
|
|
36
|
+
lend: "lend";
|
|
37
|
+
no: "no";
|
|
38
|
+
}>;
|
|
39
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type ShareableAccounts = z.infer<typeof ShareableAccountsSchema>;
|
|
43
|
+
export declare const StaticAccountCopySchema: z.ZodObject<{
|
|
44
|
+
label: z.ZodOptional<z.ZodString>;
|
|
45
|
+
email: z.ZodOptional<z.ZodString>;
|
|
46
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
47
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
48
|
+
apiKey: z.ZodString;
|
|
49
|
+
apiKeyExpiresAtMs: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
backendUrl: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type StaticAccountCopy = z.infer<typeof StaticAccountCopySchema>;
|
|
53
|
+
export declare const AccountCopySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"account">;
|
|
55
|
+
account: z.ZodObject<{
|
|
56
|
+
label: z.ZodOptional<z.ZodString>;
|
|
57
|
+
email: z.ZodOptional<z.ZodString>;
|
|
58
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
59
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
60
|
+
apiKey: z.ZodString;
|
|
61
|
+
apiKeyExpiresAtMs: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
backendUrl: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"endpoint">;
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
config: z.ZodObject<{
|
|
68
|
+
baseUrl: z.ZodURL;
|
|
69
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
70
|
+
anthropic: "anthropic";
|
|
71
|
+
openai: "openai";
|
|
72
|
+
}>>;
|
|
73
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
74
|
+
headers: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>], "kind">;
|
|
77
|
+
export type AccountCopy = z.infer<typeof AccountCopySchema>;
|
|
78
|
+
export declare const LinkAccountSchema: z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
label: z.ZodString;
|
|
81
|
+
email: z.ZodOptional<z.ZodString>;
|
|
82
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
83
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
84
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
85
|
+
connectedAt: z.ZodNumber;
|
|
86
|
+
needsReauth: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
88
|
+
seatRefusal: z.ZodOptional<z.ZodString>;
|
|
89
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
91
|
+
kind: z.ZodString;
|
|
92
|
+
label: z.ZodOptional<z.ZodString>;
|
|
93
|
+
utilization: z.ZodNumber;
|
|
94
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
gates: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
96
|
+
models: z.ZodArray<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>]>;
|
|
98
|
+
rounded: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
lapsedAt: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
missingSince: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
measuredAt: z.ZodNumber;
|
|
103
|
+
unread: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
since: z.ZodNumber;
|
|
105
|
+
reason: z.ZodString;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
uncovered: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
contradicted: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
at: z.ZodNumber;
|
|
110
|
+
model: z.ZodString;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
provider: z.ZodString;
|
|
118
|
+
mode: z.ZodEnum<{
|
|
119
|
+
copy: "copy";
|
|
120
|
+
lend: "lend";
|
|
121
|
+
}>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type LinkAccount = z.infer<typeof LinkAccountSchema>;
|
|
124
|
+
export declare const LinkAccountsSchema: z.ZodObject<{
|
|
125
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
label: z.ZodString;
|
|
128
|
+
email: z.ZodOptional<z.ZodString>;
|
|
129
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
130
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
131
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
132
|
+
connectedAt: z.ZodNumber;
|
|
133
|
+
needsReauth: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
135
|
+
seatRefusal: z.ZodOptional<z.ZodString>;
|
|
136
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
138
|
+
kind: z.ZodString;
|
|
139
|
+
label: z.ZodOptional<z.ZodString>;
|
|
140
|
+
utilization: z.ZodNumber;
|
|
141
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
gates: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
143
|
+
models: z.ZodArray<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>]>;
|
|
145
|
+
rounded: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
lapsedAt: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
missingSince: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
measuredAt: z.ZodNumber;
|
|
150
|
+
unread: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
since: z.ZodNumber;
|
|
152
|
+
reason: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
uncovered: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
155
|
+
contradicted: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
at: z.ZodNumber;
|
|
157
|
+
model: z.ZodString;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
161
|
+
name: z.ZodString;
|
|
162
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
provider: z.ZodString;
|
|
165
|
+
mode: z.ZodEnum<{
|
|
166
|
+
copy: "copy";
|
|
167
|
+
lend: "lend";
|
|
168
|
+
}>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
export type LinkAccounts = z.infer<typeof LinkAccountsSchema>;
|
|
172
|
+
export declare const LinkAccountCopySchema: z.ZodObject<{
|
|
173
|
+
copy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
174
|
+
kind: z.ZodLiteral<"account">;
|
|
175
|
+
account: z.ZodObject<{
|
|
176
|
+
label: z.ZodOptional<z.ZodString>;
|
|
177
|
+
email: z.ZodOptional<z.ZodString>;
|
|
178
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
179
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
180
|
+
apiKey: z.ZodString;
|
|
181
|
+
apiKeyExpiresAtMs: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
backendUrl: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
kind: z.ZodLiteral<"endpoint">;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
config: z.ZodObject<{
|
|
188
|
+
baseUrl: z.ZodURL;
|
|
189
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
190
|
+
anthropic: "anthropic";
|
|
191
|
+
openai: "openai";
|
|
192
|
+
}>>;
|
|
193
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
194
|
+
headers: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
}, z.core.$strip>], "kind">;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
export type LinkAccountCopy = z.infer<typeof LinkAccountCopySchema>;
|
|
199
|
+
export declare const AccountsBorrowSchema: z.ZodObject<{
|
|
200
|
+
card: z.ZodString;
|
|
201
|
+
items: z.ZodArray<z.ZodObject<{
|
|
202
|
+
provider: z.ZodString;
|
|
203
|
+
account: z.ZodOptional<z.ZodString>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export type AccountsBorrow = z.infer<typeof AccountsBorrowSchema>;
|
|
207
|
+
export declare const BorrowOutcomeSchema: z.ZodObject<{
|
|
208
|
+
provider: z.ZodString;
|
|
209
|
+
account: z.ZodOptional<z.ZodString>;
|
|
210
|
+
outcome: z.ZodEnum<{
|
|
211
|
+
borrowed: "borrowed";
|
|
212
|
+
copied: "copied";
|
|
213
|
+
failed: "failed";
|
|
214
|
+
}>;
|
|
215
|
+
id: z.ZodOptional<z.ZodString>;
|
|
216
|
+
message: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
export type BorrowOutcome = z.infer<typeof BorrowOutcomeSchema>;
|
|
219
|
+
export declare const AccountsBorrowedSchema: z.ZodObject<{
|
|
220
|
+
results: z.ZodArray<z.ZodObject<{
|
|
221
|
+
provider: z.ZodString;
|
|
222
|
+
account: z.ZodOptional<z.ZodString>;
|
|
223
|
+
outcome: z.ZodEnum<{
|
|
224
|
+
borrowed: "borrowed";
|
|
225
|
+
copied: "copied";
|
|
226
|
+
failed: "failed";
|
|
227
|
+
}>;
|
|
228
|
+
id: z.ZodOptional<z.ZodString>;
|
|
229
|
+
message: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export type AccountsBorrowed = z.infer<typeof AccountsBorrowedSchema>;
|
|
233
|
+
export declare const BorrowedFromSchema: z.ZodObject<{
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
export type BorrowedFrom = z.infer<typeof BorrowedFromSchema>;
|
|
238
|
+
export declare const BorrowedAccountSchema: z.ZodObject<{
|
|
239
|
+
id: z.ZodString;
|
|
240
|
+
card: z.ZodString;
|
|
241
|
+
provider: z.ZodString;
|
|
242
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
243
|
+
label: z.ZodString;
|
|
244
|
+
email: z.ZodOptional<z.ZodString>;
|
|
245
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
246
|
+
from: z.ZodObject<{
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
borrowedAt: z.ZodNumber;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
export type BorrowedAccount = z.infer<typeof BorrowedAccountSchema>;
|
|
253
|
+
export declare const BorrowedAccountsSchema: z.ZodObject<{
|
|
254
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
card: z.ZodString;
|
|
257
|
+
provider: z.ZodString;
|
|
258
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
259
|
+
label: z.ZodString;
|
|
260
|
+
email: z.ZodOptional<z.ZodString>;
|
|
261
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
262
|
+
from: z.ZodObject<{
|
|
263
|
+
name: z.ZodString;
|
|
264
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
borrowedAt: z.ZodNumber;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
export type BorrowedAccounts = z.infer<typeof BorrowedAccountsSchema>;
|
|
270
|
+
export declare const BorrowedAccountIdSchema: z.ZodObject<{
|
|
271
|
+
id: z.ZodString;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
export declare const BORROWED_ID_PREFIX = "lent-";
|
|
274
|
+
export declare const isBorrowedId: (id: string) => boolean;
|
|
275
|
+
//# sourceMappingURL=account-sharing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-sharing.d.ts","sourceRoot":"","sources":["../../../src/schemas/providers/account-sharing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,eAAe;;;;EAAiC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,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AC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAKpE,eAAO,MAAM,oBAAoB;;;;;;iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAAsD,CAAC;AAC1F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAUhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;iBAAyD,CAAC;AAC7F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;iBAAsC,CAAC;AAG3E,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAC1C,eAAO,MAAM,YAAY,OAAQ,MAAM,KAAG,OAA4C,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { EndpointConfigSchema } from "../capabilities.js";
|
|
3
|
+
import { OauthAccountSchema } from "./provider-oauth.js";
|
|
4
|
+
export const ShareModeSchema = z.enum(["copy", "lend", "no"]);
|
|
5
|
+
export const SharedAccountRefSchema = z.object({
|
|
6
|
+
provider: z.string().min(1).max(120),
|
|
7
|
+
account: z.string().min(1).max(200).optional(),
|
|
8
|
+
});
|
|
9
|
+
export const sameSharedRef = (a, b) => a.provider === b.provider && a.account === b.account;
|
|
10
|
+
export const ShareableAccountSchema = SharedAccountRefSchema.extend({
|
|
11
|
+
label: z.string().describe("What the source calls it."),
|
|
12
|
+
email: z.string().optional(),
|
|
13
|
+
mode: ShareModeSchema,
|
|
14
|
+
reason: z.string().optional().describe("Why it cannot be shared, when `mode` is no."),
|
|
15
|
+
});
|
|
16
|
+
export const ShareableAccountsSchema = z.object({
|
|
17
|
+
sandbox: z.string().describe("What the source calls itself."),
|
|
18
|
+
accounts: z.array(ShareableAccountSchema),
|
|
19
|
+
});
|
|
20
|
+
export const StaticAccountCopySchema = z.object({
|
|
21
|
+
label: z.string().optional(),
|
|
22
|
+
email: z.string().optional(),
|
|
23
|
+
variant: z.string().optional(),
|
|
24
|
+
plan: z.string().optional(),
|
|
25
|
+
apiKey: z.string().min(1),
|
|
26
|
+
apiKeyExpiresAtMs: z.number().optional(),
|
|
27
|
+
backendUrl: z.string().optional(),
|
|
28
|
+
});
|
|
29
|
+
export const AccountCopySchema = z.discriminatedUnion("kind", [
|
|
30
|
+
z.object({ kind: z.literal("account"), account: StaticAccountCopySchema }),
|
|
31
|
+
z.object({ kind: z.literal("endpoint"), id: z.string().min(1), config: EndpointConfigSchema }),
|
|
32
|
+
]);
|
|
33
|
+
export const LinkAccountSchema = OauthAccountSchema.extend({
|
|
34
|
+
provider: z.string(),
|
|
35
|
+
mode: z.enum(["copy", "lend"]),
|
|
36
|
+
});
|
|
37
|
+
export const LinkAccountsSchema = z.object({ accounts: z.array(LinkAccountSchema) });
|
|
38
|
+
export const LinkAccountCopySchema = z.object({ copy: AccountCopySchema });
|
|
39
|
+
export const AccountsBorrowSchema = z.object({
|
|
40
|
+
card: z.string().min(1).describe("The link card the editor saved for the source."),
|
|
41
|
+
items: z.array(SharedAccountRefSchema).min(1).max(64),
|
|
42
|
+
});
|
|
43
|
+
export const BorrowOutcomeSchema = SharedAccountRefSchema.extend({
|
|
44
|
+
outcome: z.enum(["copied", "borrowed", "failed"]),
|
|
45
|
+
id: z.string().optional().describe("The account's id here, for a copy or a borrow."),
|
|
46
|
+
message: z.string().optional().describe("Why it failed, in words a person can act on."),
|
|
47
|
+
});
|
|
48
|
+
export const AccountsBorrowedSchema = z.object({ results: z.array(BorrowOutcomeSchema) });
|
|
49
|
+
export const BorrowedFromSchema = z.object({
|
|
50
|
+
name: z.string().describe("What the source calls itself."),
|
|
51
|
+
sandboxId: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
export const BorrowedAccountSchema = z.object({
|
|
54
|
+
id: z.string().describe("Its id here: what a turn names, and what Stop borrowing takes."),
|
|
55
|
+
card: z.string().describe("The link card it is borrowed through."),
|
|
56
|
+
provider: z.string(),
|
|
57
|
+
remote: z.string().optional().describe("Its id on the source; absent for a translator provider, borrowed whole."),
|
|
58
|
+
label: z.string(),
|
|
59
|
+
email: z.string().optional(),
|
|
60
|
+
organization: z.string().optional(),
|
|
61
|
+
from: BorrowedFromSchema,
|
|
62
|
+
borrowedAt: z.number(),
|
|
63
|
+
});
|
|
64
|
+
export const BorrowedAccountsSchema = z.object({ accounts: z.array(BorrowedAccountSchema) });
|
|
65
|
+
export const BorrowedAccountIdSchema = z.object({ id: z.string().min(1) });
|
|
66
|
+
export const BORROWED_ID_PREFIX = "lent-";
|
|
67
|
+
export const isBorrowedId = (id) => id.startsWith(BORROWED_ID_PREFIX);
|
|
68
|
+
//# sourceMappingURL=account-sharing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-sharing.js","sourceRoot":"","sources":["../../../src/schemas/providers/account-sharing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC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AC,QAAQ,CAAC,gEAAgE,CAAC;IACzF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACjH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,kBAAkB;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;AAG7F,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAG3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -34,6 +34,10 @@ export declare const OauthAccountSchema: z.ZodObject<{
|
|
|
34
34
|
model: z.ZodString;
|
|
35
35
|
}, z.core.$strip>>;
|
|
36
36
|
}, z.core.$strip>>;
|
|
37
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
37
41
|
}, z.core.$strip>;
|
|
38
42
|
export type OauthAccount = z.infer<typeof OauthAccountSchema>;
|
|
39
43
|
export declare const OauthAccountListSchema: z.ZodObject<{
|
|
@@ -72,6 +76,10 @@ export declare const OauthAccountListSchema: z.ZodObject<{
|
|
|
72
76
|
model: z.ZodString;
|
|
73
77
|
}, z.core.$strip>>;
|
|
74
78
|
}, z.core.$strip>>;
|
|
79
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
75
83
|
}, z.core.$strip>>;
|
|
76
84
|
}, z.core.$strip>;
|
|
77
85
|
export type OauthAccountList = z.infer<typeof OauthAccountListSchema>;
|
|
@@ -157,6 +165,10 @@ export declare const LoginCompletedSchema: z.ZodObject<{
|
|
|
157
165
|
model: z.ZodString;
|
|
158
166
|
}, z.core.$strip>>;
|
|
159
167
|
}, z.core.$strip>>;
|
|
168
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
160
172
|
}, z.core.$strip>>;
|
|
161
173
|
}, z.core.$strip>;
|
|
162
174
|
export declare const LoginStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -198,6 +210,10 @@ export declare const LoginStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
198
210
|
model: z.ZodString;
|
|
199
211
|
}, z.core.$strip>>;
|
|
200
212
|
}, z.core.$strip>>;
|
|
213
|
+
borrowedFrom: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
name: z.ZodString;
|
|
215
|
+
sandboxId: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
201
217
|
}, z.core.$strip>>;
|
|
202
218
|
}, z.core.$strip>, z.ZodObject<{
|
|
203
219
|
status: z.ZodLiteral<"error">;
|