@allyhub/sdk 0.15.3 → 0.16.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/CHANGELOG.md +9 -0
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +30 -4
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -5
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
- package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +15 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
- package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
- package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +20 -20
- package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
- package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/docs/batches.md +4 -4
- package/docs/contract.md +5 -5
- package/docs/defaults.md +2 -2
- package/docs/docs.md +5 -5
- package/docs/footage.md +8 -8
- package/docs/image.md +5 -5
- package/docs/layers.md +10 -10
- package/docs/linkedin.md +1 -1
- package/docs/modeling.md +3 -3
- package/docs/pictures.md +4 -4
- package/docs/project.md +11 -7
- package/docs/scenery.md +3 -3
- package/docs/sheets.md +5 -5
- package/docs/slides.md +2 -2
- package/docs/sound.md +7 -7
- package/docs/speech.md +7 -7
- package/docs/video.md +3 -3
- package/docs/websites.md +3 -3
- package/docs/x.md +2 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./events.js";export*from"./errors.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
|
|
2
|
+
export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./events.js";export*from"./purposes.js";export*from"./turns.js";export*from"./errors.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";export*from"./studio-server.js";export*from"./studio-window-requests.js";export*from"./studio-tool-calls.js";export*from"./cloud-computer.js";export*from"./sidebar-deletion.js";export*from"./paywall.js";
|
|
@@ -14,8 +14,8 @@ export type JobState = (typeof JOB_STATES)[number];
|
|
|
14
14
|
export type JobFailureReason = (typeof JOB_FAILURES)[number];
|
|
15
15
|
export declare const JobAboutSchema: z.ZodObject<{
|
|
16
16
|
kind: z.ZodEnum<{
|
|
17
|
-
studio: "studio";
|
|
18
17
|
agent: "agent";
|
|
18
|
+
studio: "studio";
|
|
19
19
|
project: "project";
|
|
20
20
|
piece: "piece";
|
|
21
21
|
plugin: "plugin";
|
|
@@ -29,8 +29,8 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
29
29
|
id: z.ZodString;
|
|
30
30
|
about: z.ZodObject<{
|
|
31
31
|
kind: z.ZodEnum<{
|
|
32
|
-
studio: "studio";
|
|
33
32
|
agent: "agent";
|
|
33
|
+
studio: "studio";
|
|
34
34
|
project: "project";
|
|
35
35
|
piece: "piece";
|
|
36
36
|
plugin: "plugin";
|
|
@@ -50,12 +50,12 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
50
50
|
}>;
|
|
51
51
|
name: z.ZodOptional<z.ZodString>;
|
|
52
52
|
state: z.ZodEnum<{
|
|
53
|
+
done: "done";
|
|
53
54
|
failed: "failed";
|
|
55
|
+
cancelled: "cancelled";
|
|
56
|
+
paused: "paused";
|
|
54
57
|
queued: "queued";
|
|
55
58
|
running: "running";
|
|
56
|
-
paused: "paused";
|
|
57
|
-
done: "done";
|
|
58
|
-
cancelled: "cancelled";
|
|
59
59
|
}>;
|
|
60
60
|
completed: z.ZodNumber;
|
|
61
61
|
total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -95,4 +95,19 @@ export declare function starterFiles(starter: NonNullable<ListedKind["starter"]>
|
|
|
95
95
|
* listed) is named by its id and offers nothing.
|
|
96
96
|
*/
|
|
97
97
|
export declare function kindInfoIn(kind: string | undefined, listed: ListedKind | undefined, locale: string): KindInfo;
|
|
98
|
+
/** What Download gives of an item or of a listed file. */
|
|
99
|
+
export type DownloadOffered = "formats" | "file as it is" | "nothing";
|
|
100
|
+
/**
|
|
101
|
+
* What Download gives of an item or of a listed file, read from what its
|
|
102
|
+
* listing says and never from which kind it is: the formats its kind's
|
|
103
|
+
* editor makes (its manifest's `exports`), chosen in the editor's panel;
|
|
104
|
+
* the file as it is, for a file an editor opens by its name (listed with
|
|
105
|
+
* no kind); nothing, for a kind whose manifest offers no format.
|
|
106
|
+
*/
|
|
107
|
+
export declare function downloadOffered(listed: {
|
|
108
|
+
kind?: string | undefined;
|
|
109
|
+
kindInfo?: {
|
|
110
|
+
exports?: unknown;
|
|
111
|
+
} | undefined;
|
|
112
|
+
}): DownloadOffered;
|
|
98
113
|
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as r}from"zod";const
|
|
2
|
+
import{z as r}from"zod";const m=r.object({name:r.string().min(1),only:r.array(r.string().min(1)),values:r.array(r.string().min(1)).optional()});export const ExportOfferSchema=r.object({types:r.array(r.string().min(1)),extras:r.array(r.string().min(1)),options:r.array(m),names:r.record(r.string(),r.record(r.string(),r.string())).optional()});const u={noun:r.string().min(1),icon:r.string().min(1).optional(),color:r.string().min(1).optional(),editor:r.string().min(1).optional(),exports:ExportOfferSchema.optional(),share:r.boolean().optional()};export const KindInfoSchema=r.object({name:r.string().min(1),...u}),ListedKindSchema=r.object({name:r.record(r.string(),r.string().min(1)),plural:r.record(r.string(),r.string().min(1)).optional(),starter:r.object({files:r.record(r.string().min(1),r.string()),entry:r.string().min(1)}).optional(),...u});export function listedKind(n){return{name:n.name??{en:n.noun},...n.plural===void 0?{}:{plural:{...n.plural}},...n.starter===void 0?{}:{starter:{files:{...n.starter.files},entry:n.starter.entry}},noun:n.noun,...n.icon===void 0?{}:{icon:n.icon},...n.color===void 0?{}:{color:n.color},...n.editor===void 0?{}:{editor:n.editor},...n.exports===void 0?{}:{exports:{types:[...n.exports.types],extras:[...n.exports.extras],options:n.exports.options.map(o=>({name:o.name,only:[...o.only],...o.values===void 0?{}:{values:[...o.values]}})),...n.exports.names===void 0?{}:{names:Object.fromEntries(Object.entries(n.exports.names).map(([o,e])=>[o,{...e}]))}}},...n.share===void 0?{}:{share:n.share}}}export function listedFileEditor(n){return{name:{...n.name},...n.plural===void 0?{}:{plural:{...n.plural}},noun:n.noun,...n.icon===void 0?{}:{icon:n.icon},...n.color===void 0?{}:{color:n.color},editor:n.id}}export const kindNameIn=(n,o)=>n.name[o]??n.name.en??n.noun,kindPluralIn=(n,o)=>n.plural?.[o]??n.plural?.en??kindNameIn(n,o);const s=/\.(ya?ml|json)$/u;export function starterFiles(n,o,e,i){const a=t=>t.replaceAll("{{locale}}",e).replaceAll("{{name}}",i);return{files:Object.entries(n.files).map(([t,d])=>{const l=a(t),f=s.test(l)?JSON.stringify(o):o;return{path:l,text:d.replaceAll("{{locale}}",e).replaceAll("{{name}}",i).replaceAll("{{title}}",()=>f)}}),entry:a(n.entry)}}export function kindInfoIn(n,o,e){return o===void 0?{name:n??"file",noun:n??"file"}:{name:kindNameIn(o,e),noun:o.noun,...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.editor===void 0?{}:{editor:o.editor},...o.exports===void 0?{}:{exports:o.exports},...o.share===void 0?{}:{share:o.share}}}export function downloadOffered(n){return n.kindInfo?.exports!==void 0?"formats":n.kind===void 0?"file as it is":"nothing"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The reasons the services refuse what buying fixes, by their own codes. */
|
|
3
|
+
export declare const PAYWALL_REASONS: readonly ["insufficient_credits", "plan_required", "storage_full"];
|
|
4
|
+
export type PaywallReason = (typeof PAYWALL_REASONS)[number];
|
|
5
|
+
/** What was refused, a word for it: a model's call, a cloud tool's, a command's, a save to storage, a share's snapshot, an upload, or one of the window's own calls. */
|
|
6
|
+
export declare const PAYWALL_WHATS: readonly ["model", "tool", "command", "save", "share", "upload", "call"];
|
|
7
|
+
export type PaywallWhat = (typeof PAYWALL_WHATS)[number];
|
|
8
|
+
/** What the refusal said of why, where it said: credits left and what the call may use at the most; storage kept and its cap. */
|
|
9
|
+
export declare const PaywallNumbersSchema: z.ZodObject<{
|
|
10
|
+
creditsLeft: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
creditsNeeded: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
keptBytes: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
capBytes: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type PaywallNumbers = z.infer<typeof PaywallNumbersSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* A paywall met, as the Studio server tells its windows of it
|
|
18
|
+
* (`StudioAccount.onPaywallMet`): which reason, what was refused, its
|
|
19
|
+
* numbers, and whether the person asked for what was refused (a turn they
|
|
20
|
+
* sent, a command their agent ran, a share) or background work did it (the
|
|
21
|
+
* five-minute save, which a window shows as a reminder and opens nothing
|
|
22
|
+
* for). `id`: the same paywall told again (a stream resumed) is the same
|
|
23
|
+
* id, and opens nothing more.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PaywallMetSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
reason: z.ZodUnion<readonly [z.ZodEnum<{
|
|
28
|
+
insufficient_credits: "insufficient_credits";
|
|
29
|
+
plan_required: "plan_required";
|
|
30
|
+
storage_full: "storage_full";
|
|
31
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
32
|
+
what: z.ZodUnion<readonly [z.ZodEnum<{
|
|
33
|
+
command: "command";
|
|
34
|
+
call: "call";
|
|
35
|
+
tool: "tool";
|
|
36
|
+
upload: "upload";
|
|
37
|
+
share: "share";
|
|
38
|
+
model: "model";
|
|
39
|
+
save: "save";
|
|
40
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
41
|
+
numbers: z.ZodDefault<z.ZodObject<{
|
|
42
|
+
creditsLeft: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
creditsNeeded: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
keptBytes: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
capBytes: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
byPerson: z.ZodDefault<z.ZodBoolean>;
|
|
48
|
+
atMs: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type PaywallMet = z.infer<typeof PaywallMetSchema>;
|
|
51
|
+
/**
|
|
52
|
+
* What the Studio server's hearing of paywalls tells (`StudioAccount.onPaywallMet`):
|
|
53
|
+
* a paywall met. `gone`, a reason that stands no more, is told by no
|
|
54
|
+
* Studio server now (it keeps no paywall: whether a reason stands is the
|
|
55
|
+
* account's to say), and a window still reads it. A window reads either
|
|
56
|
+
* as a tolerant reader does.
|
|
57
|
+
*/
|
|
58
|
+
export declare const PaywallHeardSchema: z.ZodObject<{
|
|
59
|
+
met: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
reason: z.ZodUnion<readonly [z.ZodEnum<{
|
|
62
|
+
insufficient_credits: "insufficient_credits";
|
|
63
|
+
plan_required: "plan_required";
|
|
64
|
+
storage_full: "storage_full";
|
|
65
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
66
|
+
what: z.ZodUnion<readonly [z.ZodEnum<{
|
|
67
|
+
command: "command";
|
|
68
|
+
call: "call";
|
|
69
|
+
tool: "tool";
|
|
70
|
+
upload: "upload";
|
|
71
|
+
share: "share";
|
|
72
|
+
model: "model";
|
|
73
|
+
save: "save";
|
|
74
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
75
|
+
numbers: z.ZodDefault<z.ZodObject<{
|
|
76
|
+
creditsLeft: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
creditsNeeded: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
keptBytes: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
capBytes: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
byPerson: z.ZodDefault<z.ZodBoolean>;
|
|
82
|
+
atMs: z.ZodNumber;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
gone: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
85
|
+
insufficient_credits: "insufficient_credits";
|
|
86
|
+
plan_required: "plan_required";
|
|
87
|
+
storage_full: "storage_full";
|
|
88
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type PaywallHeard = z.infer<typeof PaywallHeardSchema>;
|
|
91
|
+
/**
|
|
92
|
+
* Where the `allyhub` command line tells the Studio server it runs under
|
|
93
|
+
* that a call was refused for a paywall's reason (`POST <address>/paywall-met`),
|
|
94
|
+
* with what it was and the numbers its refusal said. A command line from
|
|
95
|
+
* before tells only credits, at `out-of-credits`, which a Studio server
|
|
96
|
+
* still takes.
|
|
97
|
+
*/
|
|
98
|
+
export declare const COMMAND_LINE_PAYWALL_MET = "paywall-met";
|
|
99
|
+
/** What the command line tells at `paywall-met`: strict, as what the Studio server receives. */
|
|
100
|
+
export declare const CommandLinePaywallMetSchema: z.ZodObject<{
|
|
101
|
+
reason: z.ZodEnum<{
|
|
102
|
+
insufficient_credits: "insufficient_credits";
|
|
103
|
+
plan_required: "plan_required";
|
|
104
|
+
storage_full: "storage_full";
|
|
105
|
+
}>;
|
|
106
|
+
what: z.ZodDefault<z.ZodEnum<{
|
|
107
|
+
command: "command";
|
|
108
|
+
tool: "tool";
|
|
109
|
+
}>>;
|
|
110
|
+
numbers: z.ZodDefault<z.ZodObject<{
|
|
111
|
+
creditsLeft: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
creditsNeeded: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
keptBytes: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
capBytes: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type CommandLinePaywallMet = z.infer<typeof CommandLinePaywallMetSchema>;
|
|
118
|
+
/** A paywall's reason as a word reads it: the services' code in snake case, or the CLI's in kebab case. */
|
|
119
|
+
export declare function paywallReasonOfCode(code: unknown): PaywallReason | undefined;
|
|
120
|
+
/** The numbers a refusal's data says: credits as the API says them (`available`, `needed`), storage as it says it (`keptBytes`, `capBytes`). */
|
|
121
|
+
export declare function paywallNumbersOfData(data: unknown): PaywallNumbers;
|
|
122
|
+
/**
|
|
123
|
+
* The paywall an error is, whatever carried it: its own `code` (the
|
|
124
|
+
* services' envelope, a CLI's CloudError, kebab case), its data's
|
|
125
|
+
* `reason` or `code` (as a Host relays a refusal, and a Studio server,
|
|
126
|
+
* which also gives AllyHub's own data as `said`), or the same of an error
|
|
127
|
+
* it was caused by. With the numbers its data said. Nothing for any other
|
|
128
|
+
* failure.
|
|
129
|
+
*/
|
|
130
|
+
export declare function paywallOfError(e: unknown): {
|
|
131
|
+
reason: PaywallReason;
|
|
132
|
+
numbers: PaywallNumbers;
|
|
133
|
+
} | undefined;
|
|
134
|
+
//# sourceMappingURL=paywall.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as n}from"zod";import{known as m,openEnum as u}from"./open.js";export const PAYWALL_REASONS=["insufficient_credits","plan_required","storage_full"],PAYWALL_WHATS=["model","tool","command","save","share","upload","call"],PaywallNumbersSchema=n.object({creditsLeft:n.number().optional(),creditsNeeded:n.number().optional(),keptBytes:n.number().optional(),capBytes:n.number().optional()}),PaywallMetSchema=n.object({id:n.string(),reason:u(PAYWALL_REASONS),what:u(PAYWALL_WHATS),numbers:PaywallNumbersSchema.default({}),byPerson:n.boolean().default(!0),atMs:n.number()}),PaywallHeardSchema=n.object({met:PaywallMetSchema.optional(),gone:u(PAYWALL_REASONS).optional()}),COMMAND_LINE_PAYWALL_MET="paywall-met",CommandLinePaywallMetSchema=n.object({reason:n.enum(PAYWALL_REASONS),what:n.enum(["tool","command"]).default("command"),numbers:PaywallNumbersSchema.default({})});export function paywallReasonOfCode(o){if(typeof o!="string")return;const e=o.replaceAll("-","_");return m(PAYWALL_REASONS,e)?e:void 0}const l=(o,e)=>{const t=o[e];return typeof t=="number"&&Number.isFinite(t)?t:void 0};export function paywallNumbersOfData(o){if(typeof o!="object"||o===null)return{};const e=o,t=l(e,"available"),r=l(e,"needed"),s=l(e,"keptBytes"),c=l(e,"capBytes");return{...t===void 0?{}:{creditsLeft:t},...r===void 0?{}:{creditsNeeded:r},...s===void 0?{}:{keptBytes:s},...c===void 0?{}:{capBytes:c}}}const b=12;export function paywallOfError(o){const e=[o];for(let t=0;t<e.length&&t<b;t++){const r=e[t];if(typeof r!="object"||r===null)continue;const{code:s,reason:c,data:d,said:i,cause:p}=r,f=paywallReasonOfCode(s)??paywallReasonOfCode(c);if(f!==void 0){const a={...paywallNumbersOfData(r),...paywallNumbersOfData(i),...paywallNumbersOfData(d)};return{reason:f,numbers:a}}for(const a of[d,i,p])typeof a=="object"&&a!==null&&e.push(a)}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as n}from"zod";export const PlaceSchema=n.record(n.string(),n.json()),PLACE_PARAM="place";export function placeParams(e){return e===void 0?{}:{[PLACE_PARAM]:JSON.stringify(e)}}export function placeIn(e){const t=e.get(PLACE_PARAM);if(t===null)return;let r;try{r=JSON.parse(t)}catch{return}const c=PlaceSchema.safeParse(r);return c.success?c.data:void 0}
|
|
2
|
+
import{z as n}from"zod";export const PlaceSchema=n.record(n.string(),n.json()),PLACE_PARAM="place";export function placeParams(e){return e===void 0?{}:{[PLACE_PARAM]:JSON.stringify(e)}}export function placeIn(e){const t=e.get(PLACE_PARAM);if(t===null)return;let r;try{r=JSON.parse(t)}catch(o){if(o instanceof SyntaxError)return;throw o}const c=PlaceSchema.safeParse(r);return c.success?c.data:void 0}
|
|
@@ -51,8 +51,8 @@ export declare const CollaboratorSchema: z.ZodObject<{
|
|
|
51
51
|
}, z.core.$strict>>;
|
|
52
52
|
id: z.ZodString;
|
|
53
53
|
kind: z.ZodEnum<{
|
|
54
|
-
person: "person";
|
|
55
54
|
agent: "agent";
|
|
55
|
+
person: "person";
|
|
56
56
|
}>;
|
|
57
57
|
name: z.ZodString;
|
|
58
58
|
at: z.ZodNumber;
|
|
@@ -90,8 +90,8 @@ export declare const PRESENCE_METHODS: {
|
|
|
90
90
|
}, z.core.$strict>>;
|
|
91
91
|
id: z.ZodString;
|
|
92
92
|
kind: z.ZodEnum<{
|
|
93
|
-
person: "person";
|
|
94
93
|
agent: "agent";
|
|
94
|
+
person: "person";
|
|
95
95
|
}>;
|
|
96
96
|
name: z.ZodString;
|
|
97
97
|
at: z.ZodNumber;
|
|
@@ -114,8 +114,8 @@ export declare const PRESENCE_NOTIFICATIONS: {
|
|
|
114
114
|
}, z.core.$strict>>;
|
|
115
115
|
id: z.ZodString;
|
|
116
116
|
kind: z.ZodEnum<{
|
|
117
|
-
person: "person";
|
|
118
117
|
agent: "agent";
|
|
118
|
+
person: "person";
|
|
119
119
|
}>;
|
|
120
120
|
name: z.ZodString;
|
|
121
121
|
at: z.ZodNumber;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** Each purpose a message may have, with what it covers. */
|
|
2
|
+
export declare const TURN_PURPOSE_ABOUT: {
|
|
3
|
+
readonly research_social: "Research on social media: accounts, posts, creators, trends on a platform.";
|
|
4
|
+
readonly research_market: "Research on e-commerce and markets: competitors, products, prices, reviews, a market's size.";
|
|
5
|
+
readonly document: "A document, a report, a sheet or slides.";
|
|
6
|
+
readonly media: "A video, an image, audio, voice or music.";
|
|
7
|
+
readonly writing: "Copy, a script, a post's text, rewriting or translating text.";
|
|
8
|
+
readonly browse_act: "Operating a website or an account for the person: signing in, filling a form, posting, buying.";
|
|
9
|
+
readonly question: "A question about AllyHub itself, or conversation with no work.";
|
|
10
|
+
readonly other: "Anything else.";
|
|
11
|
+
};
|
|
12
|
+
export type TurnPurpose = keyof typeof TURN_PURPOSE_ABOUT;
|
|
13
|
+
/** The purposes, in the order the model is told them. */
|
|
14
|
+
export declare const TURN_PURPOSES: [TurnPurpose, ...TurnPurpose[]];
|
|
15
|
+
/** Whether a word is one of the purposes. */
|
|
16
|
+
export declare const isTurnPurpose: (word: string) => word is TurnPurpose;
|
|
17
|
+
/** How a person sounds in a message, with what each covers. */
|
|
18
|
+
export declare const TURN_MOOD_ABOUT: {
|
|
19
|
+
readonly pleased: "Thanks, praise or relief.";
|
|
20
|
+
readonly neutral: "A request or a question with no feeling in it.";
|
|
21
|
+
readonly confused: "They do not understand what happened or how to do something: where a file is, how to get it, what was done.";
|
|
22
|
+
readonly frustrated: "A complaint: something is wrong or did not work, is asked again, or they are annoyed or angry.";
|
|
23
|
+
};
|
|
24
|
+
export type TurnMood = keyof typeof TURN_MOOD_ABOUT;
|
|
25
|
+
/** The moods, in the order the model is told them. */
|
|
26
|
+
export declare const TURN_MOODS: [TurnMood, ...TurnMood[]];
|
|
27
|
+
/** Whether a word is one of the moods. */
|
|
28
|
+
export declare const isTurnMood: (word: string) => word is TurnMood;
|
|
29
|
+
/** The moods a trouble is read with. */
|
|
30
|
+
export declare const MOODS_WITH_TROUBLE: readonly TurnMood[];
|
|
31
|
+
/** What a confused or frustrated message is about, with what each covers. */
|
|
32
|
+
export declare const TURN_TROUBLE_ABOUT: {
|
|
33
|
+
readonly result: "The work is wrong, not what was asked, or of poor quality.";
|
|
34
|
+
readonly speed: "It is slow, stuck or still running.";
|
|
35
|
+
readonly cost: "Credits, a price, a payment or a limit.";
|
|
36
|
+
readonly access: "They cannot find, open, download or reach something, or something is lost.";
|
|
37
|
+
readonly ability: "AllyHub or the agent cannot do what they want (operate their screen, a website).";
|
|
38
|
+
readonly other: "Anything else.";
|
|
39
|
+
};
|
|
40
|
+
export type TurnTrouble = keyof typeof TURN_TROUBLE_ABOUT;
|
|
41
|
+
/** The troubles, in the order the model is told them. */
|
|
42
|
+
export declare const TURN_TROUBLES: [TurnTrouble, ...TurnTrouble[]];
|
|
43
|
+
/** Whether a word is one of the troubles. */
|
|
44
|
+
export declare const isTurnTrouble: (word: string) => word is TurnTrouble;
|
|
45
|
+
/** Whether a word is a language as a message's label gives it: an ISO 639-1 code, two lowercase letters. */
|
|
46
|
+
export declare const isLanguageCode: (word: string) => boolean;
|
|
47
|
+
//# sourceMappingURL=purposes.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const TURN_PURPOSE_ABOUT={research_social:"Research on social media: accounts, posts, creators, trends on a platform.",research_market:"Research on e-commerce and markets: competitors, products, prices, reviews, a market's size.",document:"A document, a report, a sheet or slides.",media:"A video, an image, audio, voice or music.",writing:"Copy, a script, a post's text, rewriting or translating text.",browse_act:"Operating a website or an account for the person: signing in, filling a form, posting, buying.",question:"A question about AllyHub itself, or conversation with no work.",other:"Anything else."},TURN_PURPOSES=Object.keys(TURN_PURPOSE_ABOUT),isTurnPurpose=e=>Object.hasOwn(TURN_PURPOSE_ABOUT,e),TURN_MOOD_ABOUT={pleased:"Thanks, praise or relief.",neutral:"A request or a question with no feeling in it.",confused:"They do not understand what happened or how to do something: where a file is, how to get it, what was done.",frustrated:"A complaint: something is wrong or did not work, is asked again, or they are annoyed or angry."},TURN_MOODS=Object.keys(TURN_MOOD_ABOUT),isTurnMood=e=>Object.hasOwn(TURN_MOOD_ABOUT,e),MOODS_WITH_TROUBLE=["confused","frustrated"],TURN_TROUBLE_ABOUT={result:"The work is wrong, not what was asked, or of poor quality.",speed:"It is slow, stuck or still running.",cost:"Credits, a price, a payment or a limit.",access:"They cannot find, open, download or reach something, or something is lost.",ability:"AllyHub or the agent cannot do what they want (operate their screen, a website).",other:"Anything else."},TURN_TROUBLES=Object.keys(TURN_TROUBLE_ABOUT),isTurnTrouble=e=>Object.hasOwn(TURN_TROUBLE_ABOUT,e),isLanguageCode=e=>/^[a-z]{2}$/u.test(e);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{ACCOUNT_CALLS as
|
|
2
|
+
import{ACCOUNT_CALLS as _}from"./account.js";import{ACCOUNT_PATH as O,BROWSER_LINK_PATH as r,METADATA_PATH as i,SIGN_IN_LINK_PATH as H}from"./auth.js";import{CATALOG_PATH as I,FILES_PATH as e,LLM_MESSAGES_PATH as L,LLM_MODELS_PATH as G}from"./cloud.js";import{ERRORS_PATH as U}from"./errors.js";import{EVENTS_PATH as n}from"./events.js";import{TURN_PATH as d}from"./turns.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as a,SNAPSHOTS_PATH as P,SNAPSHOT_BLOBS_PATH as s}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as $,MAIL_MESSAGES_PATH as o,MAIL_PATH as D,MAIL_SEND_PATH as N,MAIL_SETTINGS_PATH as f}from"./mail.js";import{ORGANIZATIONS_PATH as R,STUDIO_OPEN_PATH as l,STUDIO_PATH as m,STUDIO_TICKET_PATH as C,STUDIO_WAKE_PATH as M,STUDIO_WAKES_PATH as c,STUDIO_PAUSE_PATH as u,STUDIO_POLICY_PATH as S,STUDIO_RESTART_PATH as b,STUDIO_PREPARE_PATH as v}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:i},{method:"GET",path:O},{method:"POST",path:r},{method:"POST",path:H},{method:"GET",path:G},{method:"POST",path:L},{method:"GET",path:I},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:n},{method:"PUT",path:d},{method:"PATCH",path:d},{method:"POST",path:U},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:R},{method:"GET",path:m},{method:"DELETE",path:m},{method:"PATCH",path:m},{method:"POST",path:b},{method:"GET",path:S},{method:"PUT",path:S},{method:"POST",path:l},{method:"POST",path:C},{method:"PUT",path:M},{method:"POST",path:c},{method:"POST",path:u},{method:"POST",path:v},{method:"POST",path:s},{method:"POST",path:P},{method:"POST",path:`${P}/:id/view`},{method:"GET",path:a},{method:"DELETE",path:`${a}/:id`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"PUT",path:`${T}/:id/version`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(_).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:D},{method:"POST",path:$},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:N},{method:"PUT",path:f}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,A,E){if(A!==404)return!1;const p=E.error;return p?.code==="not_found"&&p.message===`There is no ${h.method} ${probePath(h)}.`}
|
|
@@ -18,19 +18,46 @@ export declare const ShareSchema: z.ZodObject<{
|
|
|
18
18
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
19
19
|
url: z.ZodURL;
|
|
20
20
|
createdAt: z.ZodISODateTime;
|
|
21
|
+
madeAt: z.ZodOptional<z.ZodISODateTime>;
|
|
21
22
|
reason: z.ZodOptional<z.ZodString>;
|
|
22
23
|
}, z.core.$strip>;
|
|
23
24
|
export type Share = z.infer<typeof ShareSchema>;
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* `POST { project, manifest, item, audience }`: a share made with its own
|
|
27
|
+
* snapshot, the manifest of the item's reach whose blobs were put first
|
|
28
|
+
* (`SNAPSHOT_BLOBS_PATH`), answered as a `Share`, or 409 with the blobs
|
|
29
|
+
* storage lacks (`{ missing }`). An item of a project at the API has one
|
|
30
|
+
* link at most (409 while it has one). `GET`: the person's shares in the
|
|
31
|
+
* organization; `GET ?projectId=`: a project's.
|
|
32
|
+
*/
|
|
25
33
|
export declare const SHARES_PATH = "/api/shares";
|
|
26
|
-
|
|
34
|
+
/**
|
|
35
|
+
* In a refusal's `data.reason`: a share asked of a project's latest
|
|
36
|
+
* snapshot (`{ projectId }`, while its computer does not run) cannot be
|
|
37
|
+
* made from it (the snapshot lists no items, does not say what the item
|
|
38
|
+
* reaches, or keeps nothing of it to copy), and a machine can make it of
|
|
39
|
+
* the project as it is. A window resumes the computer and asks it there.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SHARE_NEEDS_MACHINE = "share_needs_machine";
|
|
42
|
+
export declare const ShareCreateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
43
|
+
item: z.ZodString;
|
|
44
|
+
audience: z.ZodEnum<{
|
|
45
|
+
organization: "organization";
|
|
46
|
+
anyone: "anyone";
|
|
47
|
+
}>;
|
|
48
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
49
|
+
project: z.ZodObject<{
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
manifest: z.ZodString;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
54
|
projectId: z.ZodString;
|
|
28
55
|
item: z.ZodString;
|
|
29
56
|
audience: z.ZodEnum<{
|
|
30
57
|
organization: "organization";
|
|
31
58
|
anyone: "anyone";
|
|
32
59
|
}>;
|
|
33
|
-
}, z.core.$strict>;
|
|
60
|
+
}, z.core.$strict>]>;
|
|
34
61
|
export type ShareCreate = z.infer<typeof ShareCreateSchema>;
|
|
35
62
|
export declare const SharesResponseSchema: z.ZodObject<{
|
|
36
63
|
shares: z.ZodArray<z.ZodObject<{
|
|
@@ -48,16 +75,36 @@ export declare const SharesResponseSchema: z.ZodObject<{
|
|
|
48
75
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
49
76
|
url: z.ZodURL;
|
|
50
77
|
createdAt: z.ZodISODateTime;
|
|
78
|
+
madeAt: z.ZodOptional<z.ZodISODateTime>;
|
|
51
79
|
reason: z.ZodOptional<z.ZodString>;
|
|
52
80
|
}, z.core.$strip>>;
|
|
53
81
|
}, z.core.$strip>;
|
|
54
|
-
/** `PATCH { audience }`: its audience changed; `DELETE`:
|
|
82
|
+
/** `PATCH { audience }`: its audience changed; `DELETE`: stopped, its link and its snapshot gone. */
|
|
55
83
|
export declare const sharePath: (id: string) => string;
|
|
84
|
+
/** `PUT { project, manifest }` or `{ projectId }`: the share shows the item as it is now (Update shared content); its link stays. Answered as a `Share`, or 409 with what storage lacks. */
|
|
85
|
+
export declare const shareVersionPath: (id: string) => string;
|
|
86
|
+
/** A share's snapshot as a Host records it: the item's reach, as a project's manifest. */
|
|
87
|
+
export declare const ShareSnapshotSchema: z.ZodObject<{
|
|
88
|
+
project: z.ZodObject<{
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
manifest: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export type ShareSnapshot = z.infer<typeof ShareSnapshotSchema>;
|
|
94
|
+
export declare const ShareVersionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
95
|
+
project: z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
manifest: z.ZodString;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
projectId: z.ZodString;
|
|
101
|
+
}, z.core.$strict>]>;
|
|
102
|
+
export type ShareVersion = z.infer<typeof ShareVersionSchema>;
|
|
56
103
|
/** Where a share is seen: the viewer's page on the app's origin. */
|
|
57
104
|
export declare const shareLink: (app: string, token: string) => string;
|
|
58
105
|
/**
|
|
59
106
|
* `GET`, anyone's (a signed-in member's for the organization's audience):
|
|
60
|
-
* what a share shows
|
|
107
|
+
* what a share shows, with a read view of its snapshot.
|
|
61
108
|
* 404 for a token that is not a share or was revoked, 410 when taken down
|
|
62
109
|
* (`TakenDownSchema`), 401 when it is the organization's and the viewer is not
|
|
63
110
|
* signed in, 403 when signed in elsewhere.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{openEnum as o}from"./open.js";import{SnapshotViewSchema as
|
|
2
|
+
import{z as e}from"zod";import{Sha256Schema as a}from"./blobs.js";import{openEnum as o}from"./open.js";import{SnapshotViewSchema as i}from"./snapshots.js";export const SHARE_AUDIENCES=["anyone","organization"],SHARE_STATES=["shared","revoked","taken-down"],ShareSchema=e.object({id:e.string().min(1),projectId:e.string().min(1),item:e.string(),audience:o(SHARE_AUDIENCES),state:o(SHARE_STATES),url:e.url(),createdAt:e.iso.datetime(),madeAt:e.iso.datetime().optional(),reason:e.string().optional()}),SHARES_PATH="/api/shares",SHARE_NEEDS_MACHINE="share_needs_machine";const r={project:e.strictObject({name:e.string().min(1).max(255)}),manifest:a};export const ShareCreateSchema=e.union([e.strictObject({...r,item:e.string(),audience:e.enum(SHARE_AUDIENCES),projectId:e.string().min(1).optional()}),e.strictObject({projectId:e.string().min(1),item:e.string(),audience:e.enum(SHARE_AUDIENCES)})]),SharesResponseSchema=e.object({shares:e.array(ShareSchema)}),sharePath=t=>`${SHARES_PATH}/${encodeURIComponent(t)}`,shareVersionPath=t=>`${sharePath(t)}/version`,ShareSnapshotSchema=e.strictObject(r),ShareVersionSchema=e.union([ShareSnapshotSchema,e.strictObject({projectId:e.string().min(1)})]),shareLink=(t,n)=>`${t.replace(/\/+$/u,"")}/s/${encodeURIComponent(n)}`,sharedPath=t=>`/api/s/${encodeURIComponent(t)}`,SharedSchema=e.object({project:e.string(),item:e.object({id:e.string(),dir:e.string(),kind:e.string().min(1),name:e.string()}),view:i,madeAt:e.iso.datetime()}),TakenDownSchema=e.object({error:e.object({code:e.literal("gone"),data:e.object({reason:e.string()})})}),shareReportPath=t=>`${sharedPath(t)}/report`,SHARE_REPORT_REASONS=["phishing","malware","sexual","violence","hate","copyright","privacy","other"],ShareReportSchema=e.strictObject({reason:e.enum(SHARE_REPORT_REASONS),details:e.string().max(2e3),email:e.email().optional()});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* What a Studio server of the first release that deleted from the sidebar
|
|
4
|
+
* (#773) planned before it deleted: the window it answers deletes by its
|
|
5
|
+
* `stamp`. A Studio server since then plans as it deletes, in one call,
|
|
6
|
+
* and answers this only to that release's windows.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PlanToDeleteFromSidebarSchema: z.ZodObject<{
|
|
9
|
+
item: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
12
|
+
entry: z.ZodString;
|
|
13
|
+
moves: z.ZodArray<z.ZodString>;
|
|
14
|
+
stays: z.ZodArray<z.ZodString>;
|
|
15
|
+
stamp: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type PlanToDeleteFromSidebar = z.infer<typeof PlanToDeleteFromSidebarSchema>;
|
|
18
|
+
/** What came of a deletion. */
|
|
19
|
+
export declare const DeletedFromSidebarSchema: z.ZodObject<{
|
|
20
|
+
deleted: z.ZodBoolean;
|
|
21
|
+
changed: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
item: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
25
|
+
entry: z.ZodString;
|
|
26
|
+
moves: z.ZodArray<z.ZodString>;
|
|
27
|
+
stays: z.ZodArray<z.ZodString>;
|
|
28
|
+
stamp: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
trash: z.ZodOptional<z.ZodString>;
|
|
31
|
+
moved: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type DeletedFromSidebar = z.infer<typeof DeletedFromSidebarSchema>;
|
|
34
|
+
//# sourceMappingURL=sidebar-deletion.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as t}from"zod";export const PlanToDeleteFromSidebarSchema=t.object({item:t.string().min(1),name:t.string(),kind:t.string().optional(),entry:t.string().min(1),moves:t.array(t.string()),stays:t.array(t.string()),stamp:t.string().min(1)}),DeletedFromSidebarSchema=t.object({deleted:t.boolean(),changed:PlanToDeleteFromSidebarSchema.optional(),trash:t.string().optional(),moved:t.array(t.string()).optional()});
|