@supernova-studio/client 1.64.0 → 1.65.1
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/index.d.mts +722 -652
- package/dist/index.d.ts +722 -652
- package/dist/index.js +633 -617
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1234 -1218
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9375,588 +9375,32 @@ var DTOElementsGetOutputV2 = z310.object({
|
|
|
9375
9375
|
});
|
|
9376
9376
|
|
|
9377
9377
|
// src/api/dto/events/forge-project.ts
|
|
9378
|
-
import
|
|
9379
|
-
|
|
9380
|
-
// src/api/dto/forge/project-member.ts
|
|
9381
|
-
import { z as z312 } from "zod";
|
|
9382
|
-
|
|
9383
|
-
// src/utils/figma.ts
|
|
9384
|
-
var figmaFileIdRegex = /^[0-9a-zA-Z]{22,128}$/;
|
|
9385
|
-
var nodeIdRegex = /^\d+-\d+$/;
|
|
9386
|
-
var nodeTypeRegex = /^[0-9a-zA-Z]^/;
|
|
9387
|
-
var ParsedFigmaFileURLError = /* @__PURE__ */ ((ParsedFigmaFileURLError2) => {
|
|
9388
|
-
ParsedFigmaFileURLError2["InvalidUrl"] = "InvalidUrl";
|
|
9389
|
-
ParsedFigmaFileURLError2["InvalidFigmaFileId"] = "InvalidFigmaFileId";
|
|
9390
|
-
return ParsedFigmaFileURLError2;
|
|
9391
|
-
})(ParsedFigmaFileURLError || {});
|
|
9392
|
-
var FigmaUtils = {
|
|
9393
|
-
tryParseFigmaFileURL(urlString) {
|
|
9394
|
-
if (!URL.canParse(urlString)) {
|
|
9395
|
-
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
9396
|
-
}
|
|
9397
|
-
const url = new URL(urlString);
|
|
9398
|
-
if (!url.hostname.endsWith("figma.com")) {
|
|
9399
|
-
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
9400
|
-
}
|
|
9401
|
-
const pathSegments = url.pathname.split("/");
|
|
9402
|
-
if (pathSegments[1] !== "design" && pathSegments[1] !== "file") {
|
|
9403
|
-
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
9404
|
-
}
|
|
9405
|
-
const fileId = pathSegments[2];
|
|
9406
|
-
if (!fileId || !fileId.match(figmaFileIdRegex)) {
|
|
9407
|
-
return { status: "Error", error: "InvalidFigmaFileId" /* InvalidFigmaFileId */ };
|
|
9408
|
-
}
|
|
9409
|
-
let fileName = null;
|
|
9410
|
-
const rawFileName = pathSegments[3];
|
|
9411
|
-
if (rawFileName) {
|
|
9412
|
-
fileName = rawFileName.replaceAll("-", " ");
|
|
9413
|
-
}
|
|
9414
|
-
let nodeId = null;
|
|
9415
|
-
const nodeIdRaw = url.searchParams.get("node-id");
|
|
9416
|
-
if (nodeIdRaw && nodeIdRaw.match(nodeIdRegex)) {
|
|
9417
|
-
nodeId = nodeIdRaw.replace("-", ":");
|
|
9418
|
-
}
|
|
9419
|
-
let nodeType = null;
|
|
9420
|
-
const nodeTypeRaw = url.searchParams.get("node-type");
|
|
9421
|
-
if (nodeTypeRaw && nodeTypeRaw.match(nodeTypeRegex)) {
|
|
9422
|
-
nodeType = nodeTypeRaw;
|
|
9423
|
-
}
|
|
9424
|
-
return { status: "Success", fileId, fileName, nodeId, nodeType };
|
|
9425
|
-
}
|
|
9426
|
-
};
|
|
9427
|
-
|
|
9428
|
-
// src/utils/hash.ts
|
|
9429
|
-
function hash(input) {
|
|
9430
|
-
return farmhash(input).toString(16);
|
|
9431
|
-
}
|
|
9432
|
-
function farmhash(input) {
|
|
9433
|
-
const seed = 2654435769;
|
|
9434
|
-
let hash2 = seed;
|
|
9435
|
-
for (let i = 0; i < input.length; i++) {
|
|
9436
|
-
const charCode = input.charCodeAt(i);
|
|
9437
|
-
hash2 ^= charCode;
|
|
9438
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
9439
|
-
hash2 ^= hash2 >>> 15;
|
|
9440
|
-
}
|
|
9441
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
9442
|
-
hash2 ^= hash2 >>> 13;
|
|
9443
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
9444
|
-
hash2 ^= hash2 >>> 15;
|
|
9445
|
-
return hash2 >>> 0;
|
|
9446
|
-
}
|
|
9447
|
-
function prepareObject(obj) {
|
|
9448
|
-
if (obj === null || typeof obj !== "object") {
|
|
9449
|
-
return obj;
|
|
9450
|
-
}
|
|
9451
|
-
if (Array.isArray(obj)) {
|
|
9452
|
-
return obj.map(prepareObject);
|
|
9453
|
-
}
|
|
9454
|
-
const sortedObj = {};
|
|
9455
|
-
for (const key of Object.keys(obj).sort()) {
|
|
9456
|
-
if (obj[key] === null || obj[key] === void 0) {
|
|
9457
|
-
continue;
|
|
9458
|
-
}
|
|
9459
|
-
sortedObj[key] = prepareObject(obj[key]);
|
|
9460
|
-
}
|
|
9461
|
-
return sortedObj;
|
|
9462
|
-
}
|
|
9463
|
-
function generateHash(input, debug = false) {
|
|
9464
|
-
if (typeof input === "object") {
|
|
9465
|
-
const sanitized = JSON.stringify(prepareObject(input));
|
|
9466
|
-
if (debug) {
|
|
9467
|
-
console.log("Hashing sanitized string:");
|
|
9468
|
-
console.log(sanitized);
|
|
9469
|
-
}
|
|
9470
|
-
return hash(sanitized);
|
|
9471
|
-
} else {
|
|
9472
|
-
try {
|
|
9473
|
-
const obj = JSON.parse(input);
|
|
9474
|
-
const sanitized = JSON.stringify(prepareObject(obj));
|
|
9475
|
-
if (debug) {
|
|
9476
|
-
console.log("Hashing sanitized string:");
|
|
9477
|
-
console.log(sanitized);
|
|
9478
|
-
}
|
|
9479
|
-
return hash(sanitized);
|
|
9480
|
-
} catch {
|
|
9481
|
-
return hash(input);
|
|
9482
|
-
}
|
|
9483
|
-
}
|
|
9484
|
-
}
|
|
9485
|
-
|
|
9486
|
-
// src/utils/redirect-validation.ts
|
|
9487
|
-
var exhaustiveInvalidUriPaths = {
|
|
9488
|
-
emptyPath: "",
|
|
9489
|
-
spacesInPath: "/invalid path/with spaces",
|
|
9490
|
-
specialCharacter1: "/path/with|invalid>characters",
|
|
9491
|
-
specialCharacter2: "/path/with<invalid*characters",
|
|
9492
|
-
specialCharacter3: "/path/{invalid}?characters",
|
|
9493
|
-
consecutiveSlashes: "/path//with///too/many/slashes",
|
|
9494
|
-
unencodedPercent: "/path/with/unencoded%percent",
|
|
9495
|
-
unencodedSpaces: "/path/with unencoded spaces",
|
|
9496
|
-
fragmentIdentifier: "/path/with#fragment",
|
|
9497
|
-
queryParameters: "/path/with?query=parameter",
|
|
9498
|
-
nullCharacter: "/path/with/\0nullcharacter",
|
|
9499
|
-
onlySlash: "/",
|
|
9500
|
-
controlCharacter: "/path/with/control\0character",
|
|
9501
|
-
extremelyLongPath: "/" + "a".repeat(2047),
|
|
9502
|
-
invalidStartCharacter: "///path/starting/with/slashes",
|
|
9503
|
-
invalidStartCharacterColon: ":/path/starting/with/colon",
|
|
9504
|
-
invalidTrailingDot: "/path/ending/with/dot.",
|
|
9505
|
-
invalidPercentEncoding1: "/path/with/%2",
|
|
9506
|
-
invalidPercentEncoding2: "/path/with/%ZZ",
|
|
9507
|
-
invalidPercentEncoding3: "/path/with/%G1",
|
|
9508
|
-
reservedCharacter1: "/path/with?<reserved>",
|
|
9509
|
-
reservedCharacter2: '/path/with/"quotes"',
|
|
9510
|
-
reservedCharacter3: "/path/with/[brackets]",
|
|
9511
|
-
reservedCharacter4: "/path/with/\\backslashes",
|
|
9512
|
-
nonAscii1: "/path/with/\u4F60\u597D",
|
|
9513
|
-
nonAscii2: "/path/with/emoji/\u{1F603}",
|
|
9514
|
-
mixedEncodingPath: "/path/%41A%42B%C3%28",
|
|
9515
|
-
directoryTraversal1: "/path/../../etc/passwd",
|
|
9516
|
-
directoryTraversal2: "/path/./././"
|
|
9517
|
-
};
|
|
9518
|
-
function isValidRedirectPath(path) {
|
|
9519
|
-
const trimmedPath = path.toLowerCase().trim();
|
|
9520
|
-
const url = "https://www.example.com" + trimmedPath;
|
|
9521
|
-
if (url.length > 2048) {
|
|
9522
|
-
return {
|
|
9523
|
-
isValid: false,
|
|
9524
|
-
reason: "TooLong"
|
|
9525
|
-
};
|
|
9526
|
-
}
|
|
9527
|
-
if (trimmedPath === "") {
|
|
9528
|
-
return {
|
|
9529
|
-
isValid: false,
|
|
9530
|
-
reason: "Empty"
|
|
9531
|
-
};
|
|
9532
|
-
}
|
|
9533
|
-
if (url === "/") {
|
|
9534
|
-
return {
|
|
9535
|
-
isValid: false,
|
|
9536
|
-
reason: "Empty"
|
|
9537
|
-
};
|
|
9538
|
-
}
|
|
9539
|
-
if (url.includes("?")) {
|
|
9540
|
-
return {
|
|
9541
|
-
isValid: false,
|
|
9542
|
-
reason: "ContainsQuery"
|
|
9543
|
-
};
|
|
9544
|
-
}
|
|
9545
|
-
if (url.includes("#")) {
|
|
9546
|
-
return {
|
|
9547
|
-
isValid: false,
|
|
9548
|
-
reason: "ContainsFragment"
|
|
9549
|
-
};
|
|
9550
|
-
}
|
|
9551
|
-
const regex = /^\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*$/;
|
|
9552
|
-
const isValid = regex.test(trimmedPath);
|
|
9553
|
-
return {
|
|
9554
|
-
isValid: regex.test(trimmedPath),
|
|
9555
|
-
reason: !isValid ? "InvalidURI" : void 0
|
|
9556
|
-
};
|
|
9557
|
-
}
|
|
9558
|
-
|
|
9559
|
-
// src/api/dto/forge/project-invitation.ts
|
|
9560
|
-
import { z as z311 } from "zod";
|
|
9561
|
-
var DTOForgeProjectInvitation = ForgeProjectInvitation;
|
|
9562
|
-
var DTOCreateForgeProjectInvitation = DTOForgeProjectInvitation.pick({
|
|
9563
|
-
email: true,
|
|
9564
|
-
role: true
|
|
9565
|
-
});
|
|
9566
|
-
var DTOUpdateForgeProjectInvitation = DTOCreateForgeProjectInvitation;
|
|
9567
|
-
var DTORemoveForgeProjectInvitation = DTOCreateForgeProjectInvitation.pick({
|
|
9568
|
-
email: true
|
|
9569
|
-
});
|
|
9570
|
-
var DTOForgeProjectInvitationsListResponse = z311.object({
|
|
9571
|
-
invitations: z311.array(DTOForgeProjectInvitation)
|
|
9572
|
-
});
|
|
9573
|
-
var DTOForgeProjectInvitationGetResponse = z311.object({
|
|
9574
|
-
invitation: DTOForgeProjectInvitation
|
|
9575
|
-
});
|
|
9576
|
-
var DTOForgeProjectInvitationCreateResponse = z311.object({
|
|
9577
|
-
invitation: DTOForgeProjectInvitation
|
|
9578
|
-
});
|
|
9579
|
-
var DTOForgeProjectInvitationUpdateResponse = z311.object({
|
|
9580
|
-
invitation: DTOForgeProjectInvitation.nullable()
|
|
9581
|
-
});
|
|
9582
|
-
var DTOForgeProjectInvitationRemoveResponse = z311.object({
|
|
9583
|
-
ok: z311.literal(true)
|
|
9584
|
-
});
|
|
9585
|
-
|
|
9586
|
-
// src/api/dto/forge/project-member.ts
|
|
9587
|
-
var DTOForgeProjectMemberRole = ForgeProjectRole;
|
|
9588
|
-
var DTOForgeProjectMember = ForgeProjectMembership.extend({
|
|
9589
|
-
user: DTOUser,
|
|
9590
|
-
effectiveRole: DTOForgeProjectMemberRole,
|
|
9591
|
-
isDeactivated: z312.boolean()
|
|
9592
|
-
});
|
|
9593
|
-
var DTOCreateForgeProjectMember = DTOForgeProjectMember.pick({
|
|
9594
|
-
userId: true,
|
|
9595
|
-
role: true
|
|
9596
|
-
});
|
|
9597
|
-
var DTOUpdateForgeProjectMember = DTOCreateForgeProjectMember;
|
|
9598
|
-
var DTORemoveForgeProjectMember = DTOForgeProjectMember.pick({
|
|
9599
|
-
userId: true
|
|
9600
|
-
});
|
|
9601
|
-
var DTOForgeProjectMemberListQuery = z312.object({
|
|
9602
|
-
includeImplicitMembers: zodQueryBoolean().optional()
|
|
9603
|
-
});
|
|
9604
|
-
var DTOForgeProjectMembersListResponse = z312.object({
|
|
9605
|
-
members: z312.array(DTOForgeProjectMember),
|
|
9606
|
-
invitations: z312.array(DTOForgeProjectInvitation)
|
|
9607
|
-
});
|
|
9608
|
-
var DTOForgeProjectMemberGetResponse = z312.object({
|
|
9609
|
-
member: DTOForgeProjectMember
|
|
9610
|
-
});
|
|
9611
|
-
var DTOForgeProjectMemberCreateResponse = z312.object({
|
|
9612
|
-
member: DTOForgeProjectMember
|
|
9613
|
-
});
|
|
9614
|
-
var DTOForgeProjectMemberUpdateResponse = z312.object({
|
|
9615
|
-
member: DTOForgeProjectMember.nullable()
|
|
9616
|
-
});
|
|
9617
|
-
var DTOForgeProjectMemberRemoveResponse = z312.object({
|
|
9618
|
-
ok: z312.literal(true)
|
|
9619
|
-
});
|
|
9620
|
-
var DTOAddMembersToForgeProject = z312.object({
|
|
9621
|
-
membersToInvite: DTOCreateForgeProjectInvitation.array().min(1)
|
|
9622
|
-
});
|
|
9623
|
-
|
|
9624
|
-
// src/api/dto/events/forge-project.ts
|
|
9625
|
-
var DTOForgeProjectMembersCreated = z313.object({
|
|
9626
|
-
type: z313.literal("ProjectMembersCreated"),
|
|
9627
|
-
data: z313.array(DTOForgeProjectMember)
|
|
9628
|
-
});
|
|
9629
|
-
var DTOForgeProjectMemberUpdated = z313.object({
|
|
9630
|
-
type: z313.literal("ProjectMemberUpdated"),
|
|
9631
|
-
data: DTOForgeProjectMember
|
|
9632
|
-
});
|
|
9633
|
-
var DTOForgeProjectMemberDeleted = z313.object({
|
|
9634
|
-
type: z313.literal("ProjectMemberDeleted"),
|
|
9635
|
-
data: DTOForgeProjectMember.pick({ userId: true })
|
|
9636
|
-
});
|
|
9637
|
-
var DTOForgeProjectRoomEvent = z313.discriminatedUnion("type", [
|
|
9638
|
-
DTOForgeProjectMembersCreated,
|
|
9639
|
-
DTOForgeProjectMemberUpdated,
|
|
9640
|
-
DTOForgeProjectMemberDeleted
|
|
9641
|
-
]);
|
|
9642
|
-
|
|
9643
|
-
// src/api/dto/events/workspace.ts
|
|
9644
|
-
import z316 from "zod";
|
|
9645
|
-
|
|
9646
|
-
// src/api/dto/forge/project-context-v2.ts
|
|
9647
|
-
import { z as z315 } from "zod";
|
|
9648
|
-
|
|
9649
|
-
// src/api/dto/files/files.ts
|
|
9650
|
-
import z314 from "zod";
|
|
9651
|
-
var DTOFileFigmaRenderMode = FileFigmaRenderMode;
|
|
9652
|
-
var DTOFileSourceUpload = FileSourceUpload;
|
|
9653
|
-
var DTOFileSourceFigma = FileSourceFigma;
|
|
9654
|
-
var DTOFileSource = FileSource;
|
|
9655
|
-
var DTOFile = File;
|
|
9656
|
-
var DTOFileReference = FileReference;
|
|
9657
|
-
var DTOFileUploadOwnerUser = z314.object({
|
|
9658
|
-
ownerType: z314.literal("User")
|
|
9659
|
-
});
|
|
9660
|
-
var DTOFileUploadOwnerWorkspace = z314.object({
|
|
9661
|
-
ownerType: z314.literal("Workspace"),
|
|
9662
|
-
workspaceId: z314.string()
|
|
9663
|
-
});
|
|
9664
|
-
var DTOFileUploadOwner = z314.discriminatedUnion("ownerType", [DTOFileUploadOwnerUser, DTOFileUploadOwnerWorkspace]);
|
|
9665
|
-
var DTOFileUploadInput = z314.object({
|
|
9666
|
-
size: z314.number(),
|
|
9667
|
-
name: z314.string(),
|
|
9668
|
-
checksum: z314.string()
|
|
9669
|
-
});
|
|
9670
|
-
var DTOFileUploadBulkPayload = z314.object({
|
|
9671
|
-
files: DTOFileUploadInput.array()
|
|
9672
|
-
}).and(DTOFileUploadOwner);
|
|
9673
|
-
var DTOFileFinalizeBulkPayload = z314.object({
|
|
9674
|
-
fileIds: z314.string().array()
|
|
9675
|
-
}).and(DTOFileUploadOwner);
|
|
9676
|
-
var DTOFileListResponse = z314.object({
|
|
9677
|
-
files: DTOFile.array()
|
|
9678
|
-
});
|
|
9679
|
-
var DTOFileUploadBulkResponse = z314.object({
|
|
9680
|
-
files: z314.array(DTOFile),
|
|
9681
|
-
uploadUrls: z314.array(
|
|
9682
|
-
z314.object({
|
|
9683
|
-
fileId: z314.string(),
|
|
9684
|
-
uploadUrl: z314.string()
|
|
9685
|
-
})
|
|
9686
|
-
)
|
|
9687
|
-
});
|
|
9688
|
-
var DTOFileFinalizeBulkResponse = z314.object({
|
|
9689
|
-
files: z314.array(DTOFile)
|
|
9690
|
-
});
|
|
9691
|
-
|
|
9692
|
-
// src/api/dto/forge/project-context-v2.ts
|
|
9693
|
-
var DTOForgeComponentSetTypeV2 = z315.enum(["Shadcn"]);
|
|
9694
|
-
var DTOForgeComponentSet = z315.object({
|
|
9695
|
-
type: DTOForgeComponentSetTypeV2
|
|
9696
|
-
});
|
|
9697
|
-
var DTOForgeIconSetTypeV2 = z315.enum(["Phosphor", "Lucide", "Tabler"]);
|
|
9698
|
-
var DTOForgeThemeKnownPreset = z315.enum(["Default", "Airbnb", "Spotify", "Windows98"]);
|
|
9699
|
-
var DTOForgeIconSet = z315.object({
|
|
9700
|
-
type: DTOForgeIconSetTypeV2,
|
|
9701
|
-
variant: z315.string().optional()
|
|
9702
|
-
});
|
|
9703
|
-
var DTOForgeTokenThemeSet = z315.object({
|
|
9704
|
-
id: z315.string(),
|
|
9705
|
-
name: z315.string(),
|
|
9706
|
-
tokenThemeIds: z315.array(z315.string())
|
|
9707
|
-
});
|
|
9708
|
-
var DTOForgeProjectTheme = z315.object({
|
|
9709
|
-
// Colors
|
|
9710
|
-
background: ColorTokenData,
|
|
9711
|
-
foreground: ColorTokenData,
|
|
9712
|
-
card: ColorTokenData,
|
|
9713
|
-
cardForeground: ColorTokenData,
|
|
9714
|
-
popover: ColorTokenData,
|
|
9715
|
-
popoverForeground: ColorTokenData,
|
|
9716
|
-
primary: ColorTokenData,
|
|
9717
|
-
primaryForeground: ColorTokenData,
|
|
9718
|
-
secondary: ColorTokenData,
|
|
9719
|
-
secondaryForeground: ColorTokenData,
|
|
9720
|
-
muted: ColorTokenData,
|
|
9721
|
-
mutedForeground: ColorTokenData,
|
|
9722
|
-
accent: ColorTokenData,
|
|
9723
|
-
accentForeground: ColorTokenData,
|
|
9724
|
-
destructive: ColorTokenData,
|
|
9725
|
-
border: ColorTokenData,
|
|
9726
|
-
input: ColorTokenData,
|
|
9727
|
-
ring: ColorTokenData,
|
|
9728
|
-
chart1: ColorTokenData,
|
|
9729
|
-
chart2: ColorTokenData,
|
|
9730
|
-
chart3: ColorTokenData,
|
|
9731
|
-
chart4: ColorTokenData,
|
|
9732
|
-
chart5: ColorTokenData,
|
|
9733
|
-
sidebar: ColorTokenData,
|
|
9734
|
-
sidebarForeground: ColorTokenData,
|
|
9735
|
-
sidebarPrimary: ColorTokenData,
|
|
9736
|
-
sidebarPrimaryForeground: ColorTokenData,
|
|
9737
|
-
sidebarAccent: ColorTokenData,
|
|
9738
|
-
sidebarAccentForeground: ColorTokenData,
|
|
9739
|
-
sidebarBorder: ColorTokenData,
|
|
9740
|
-
sidebarRing: ColorTokenData,
|
|
9741
|
-
// Font family
|
|
9742
|
-
fontFamily: FontFamilyTokenData,
|
|
9743
|
-
// Font sizes
|
|
9744
|
-
textXs: FontSizeTokenData,
|
|
9745
|
-
textSm: FontSizeTokenData,
|
|
9746
|
-
textBase: FontSizeTokenData,
|
|
9747
|
-
textLg: FontSizeTokenData,
|
|
9748
|
-
textXl: FontSizeTokenData,
|
|
9749
|
-
text2xl: FontSizeTokenData,
|
|
9750
|
-
text3xl: FontSizeTokenData,
|
|
9751
|
-
text4xl: FontSizeTokenData,
|
|
9752
|
-
text5xl: FontSizeTokenData,
|
|
9753
|
-
text6xl: FontSizeTokenData,
|
|
9754
|
-
text7xl: FontSizeTokenData,
|
|
9755
|
-
text8xl: FontSizeTokenData,
|
|
9756
|
-
text9xl: FontSizeTokenData,
|
|
9757
|
-
// Line heights
|
|
9758
|
-
textXsLineHeight: LineHeightTokenData,
|
|
9759
|
-
textSmLineHeight: LineHeightTokenData,
|
|
9760
|
-
textBaseLineHeight: LineHeightTokenData,
|
|
9761
|
-
textLgLineHeight: LineHeightTokenData,
|
|
9762
|
-
textXlLineHeight: LineHeightTokenData,
|
|
9763
|
-
text2xlLineHeight: LineHeightTokenData,
|
|
9764
|
-
text3xlLineHeight: LineHeightTokenData,
|
|
9765
|
-
text4xlLineHeight: LineHeightTokenData,
|
|
9766
|
-
text5xlLineHeight: LineHeightTokenData,
|
|
9767
|
-
text6xlLineHeight: LineHeightTokenData,
|
|
9768
|
-
text7xlLineHeight: LineHeightTokenData,
|
|
9769
|
-
text8xlLineHeight: LineHeightTokenData,
|
|
9770
|
-
text9xlLineHeight: LineHeightTokenData,
|
|
9771
|
-
// Font weights
|
|
9772
|
-
fontWeightThin: FontWeightTokenData,
|
|
9773
|
-
fontWeightExtralight: FontWeightTokenData,
|
|
9774
|
-
fontWeightLight: FontWeightTokenData,
|
|
9775
|
-
fontWeightNormal: FontWeightTokenData,
|
|
9776
|
-
fontWeightMedium: FontWeightTokenData,
|
|
9777
|
-
fontWeightSemibold: FontWeightTokenData,
|
|
9778
|
-
fontWeightBold: FontWeightTokenData,
|
|
9779
|
-
fontWeightExtrabold: FontWeightTokenData,
|
|
9780
|
-
fontWeightBlack: FontWeightTokenData,
|
|
9781
|
-
// Other dimensions
|
|
9782
|
-
radius: BorderRadiusTokenData,
|
|
9783
|
-
spacing: SpaceTokenData,
|
|
9784
|
-
// Shadows
|
|
9785
|
-
shadow2xs: ShadowTokenData,
|
|
9786
|
-
shadowXs: ShadowTokenData,
|
|
9787
|
-
shadowSm: ShadowTokenData,
|
|
9788
|
-
shadowMd: ShadowTokenData,
|
|
9789
|
-
shadowLg: ShadowTokenData,
|
|
9790
|
-
shadowXl: ShadowTokenData,
|
|
9791
|
-
shadow2xl: ShadowTokenData
|
|
9792
|
-
});
|
|
9793
|
-
var DTOForgeProjectContextV2 = z315.object({
|
|
9794
|
-
id: z315.string(),
|
|
9795
|
-
name: z315.string(),
|
|
9796
|
-
workspaceId: z315.string(),
|
|
9797
|
-
designSystemId: z315.string().optional(),
|
|
9798
|
-
brandId: z315.string().optional(),
|
|
9799
|
-
defaultTokenThemeSetId: z315.string().optional(),
|
|
9800
|
-
description: z315.string().optional(),
|
|
9801
|
-
productContext: z315.string().optional(),
|
|
9802
|
-
additionalContext: z315.string().optional(),
|
|
9803
|
-
isArchived: z315.boolean(),
|
|
9804
|
-
themePreset: z315.string().optional(),
|
|
9805
|
-
tokenThemeSets: z315.array(DTOForgeTokenThemeSet).optional(),
|
|
9806
|
-
componentSet: DTOForgeComponentSet,
|
|
9807
|
-
iconSet: DTOForgeIconSet,
|
|
9808
|
-
theme: DTOForgeProjectTheme,
|
|
9809
|
-
createdAt: z315.coerce.date(),
|
|
9810
|
-
updatedAt: z315.coerce.date(),
|
|
9811
|
-
thumbnail: DTOFileReference.optional(),
|
|
9812
|
-
sandboxTemplate: z315.object({
|
|
9813
|
-
id: z315.string(),
|
|
9814
|
-
version: z315.string()
|
|
9815
|
-
}).optional()
|
|
9816
|
-
});
|
|
9817
|
-
var DTOForgeProjectContextCreateV2 = DTOForgeProjectContextV2.omit({
|
|
9818
|
-
id: true,
|
|
9819
|
-
createdAt: true,
|
|
9820
|
-
updatedAt: true,
|
|
9821
|
-
isArchived: true,
|
|
9822
|
-
thumbnail: true
|
|
9823
|
-
}).extend({
|
|
9824
|
-
thumbnailFileId: z315.string().optional()
|
|
9825
|
-
});
|
|
9826
|
-
var DTOForgeProjectContextUpdateV2 = DTOForgeProjectContextV2.omit({
|
|
9827
|
-
id: true,
|
|
9828
|
-
workspaceId: true,
|
|
9829
|
-
createdAt: true,
|
|
9830
|
-
updatedAt: true,
|
|
9831
|
-
thumbnail: true
|
|
9832
|
-
}).partial().extend({
|
|
9833
|
-
thumbnailFileId: z315.string().optional()
|
|
9834
|
-
});
|
|
9835
|
-
var DTOForgeProjectContextResponseV2 = z315.object({ context: DTOForgeProjectContextV2 });
|
|
9836
|
-
var DTOForgeProjectContextListQueryV2 = z315.object({
|
|
9837
|
-
workspaceId: z315.string(),
|
|
9838
|
-
isArchived: zodQueryBoolean()
|
|
9839
|
-
});
|
|
9840
|
-
var DTOForgeProjectContextListResponseV2 = z315.object({ contexts: z315.array(DTOForgeProjectContextV2) });
|
|
9841
|
-
|
|
9842
|
-
// src/api/dto/events/workspace.ts
|
|
9843
|
-
var DTOForgeProjectCreated = z316.object({
|
|
9844
|
-
type: z316.literal("ProjectCreated"),
|
|
9845
|
-
data: z316.object({ id: z316.string() })
|
|
9846
|
-
});
|
|
9847
|
-
var DTOForgeProjectUpdated = z316.object({
|
|
9848
|
-
type: z316.literal("ProjectUpdated"),
|
|
9849
|
-
data: z316.object({ id: z316.string() })
|
|
9850
|
-
});
|
|
9851
|
-
var DTOForgeProjectContextCreated = z316.object({
|
|
9852
|
-
type: z316.literal("ProjectContextCreated"),
|
|
9853
|
-
data: DTOForgeProjectContextV2
|
|
9854
|
-
});
|
|
9855
|
-
var DTOForgeProjectContextUpdated = z316.object({
|
|
9856
|
-
type: z316.literal("ProjectContextUpdated"),
|
|
9857
|
-
data: DTOForgeProjectContextV2
|
|
9858
|
-
});
|
|
9859
|
-
var DTOForgeProjectContextDeleted = z316.object({
|
|
9860
|
-
type: z316.literal("ProjectContextDeleted"),
|
|
9861
|
-
data: DTOForgeProjectContextV2.pick({ id: true })
|
|
9862
|
-
});
|
|
9863
|
-
var DTOSandboxTemplateVersionCreated = z316.object({
|
|
9864
|
-
type: z316.literal("SandboxTemplateVersionCreated"),
|
|
9865
|
-
data: z316.object({
|
|
9866
|
-
templateId: z316.string(),
|
|
9867
|
-
version: z316.string()
|
|
9868
|
-
})
|
|
9869
|
-
});
|
|
9870
|
-
var DTOSandboxTemplateBuildCreated = z316.object({
|
|
9871
|
-
type: z316.literal("SandboxTemplateBuildCreated"),
|
|
9872
|
-
data: z316.object({
|
|
9873
|
-
buildId: z316.string(),
|
|
9874
|
-
templateId: z316.string().optional()
|
|
9875
|
-
})
|
|
9876
|
-
});
|
|
9877
|
-
var DTOSandboxTemplateBuildFinished = z316.object({
|
|
9878
|
-
type: z316.literal("SandboxTemplateBuildFinished"),
|
|
9879
|
-
data: z316.object({
|
|
9880
|
-
buildId: z316.string(),
|
|
9881
|
-
templateId: z316.string().optional()
|
|
9882
|
-
})
|
|
9883
|
-
});
|
|
9884
|
-
var DTOWorkspaceRoomEvent = z316.discriminatedUnion("type", [
|
|
9885
|
-
DTOForgeProjectUpdated,
|
|
9886
|
-
DTOForgeProjectCreated,
|
|
9887
|
-
DTOForgeProjectContextCreated,
|
|
9888
|
-
DTOForgeProjectContextUpdated,
|
|
9889
|
-
DTOForgeProjectContextDeleted,
|
|
9890
|
-
DTOSandboxTemplateVersionCreated,
|
|
9891
|
-
DTOSandboxTemplateBuildCreated,
|
|
9892
|
-
DTOSandboxTemplateBuildFinished
|
|
9893
|
-
]);
|
|
9894
|
-
|
|
9895
|
-
// src/api/dto/figma-components/assets/download.ts
|
|
9896
|
-
import { z as z317 } from "zod";
|
|
9897
|
-
var DTOAssetRenderConfiguration = z317.object({
|
|
9898
|
-
prefix: z317.string().optional(),
|
|
9899
|
-
suffix: z317.string().optional(),
|
|
9900
|
-
scale: z317.enum(["x1", "x2", "x3", "x4"]),
|
|
9901
|
-
format: z317.enum(["png", "pdf", "svg"])
|
|
9902
|
-
});
|
|
9903
|
-
var DTORenderedAssetFile = z317.object({
|
|
9904
|
-
assetId: z317.string(),
|
|
9905
|
-
fileName: z317.string(),
|
|
9906
|
-
sourceUrl: z317.string(),
|
|
9907
|
-
settings: DTOAssetRenderConfiguration,
|
|
9908
|
-
originalName: z317.string()
|
|
9909
|
-
});
|
|
9910
|
-
var DTODownloadAssetsRequest = z317.object({
|
|
9911
|
-
persistentIds: z317.array(z317.string().uuid()).optional(),
|
|
9912
|
-
settings: DTOAssetRenderConfiguration.array()
|
|
9913
|
-
});
|
|
9914
|
-
var DTODownloadAssetsResponse = z317.object({
|
|
9915
|
-
items: DTORenderedAssetFile.array()
|
|
9916
|
-
});
|
|
9917
|
-
|
|
9918
|
-
// src/api/dto/figma-exporter/figma-node.ts
|
|
9919
|
-
import { z as z318 } from "zod";
|
|
9920
|
-
var DTOFigmaExportNodeFormat = z318.enum(["HTML", "JSON"]);
|
|
9921
|
-
var DTOFigmaExportNodeConfiguration = z318.object({
|
|
9922
|
-
format: DTOFigmaExportNodeFormat,
|
|
9923
|
-
minifyOutput: z318.boolean().optional(),
|
|
9924
|
-
customFontUrls: z318.string().array().optional()
|
|
9925
|
-
});
|
|
9926
|
-
var DTOFigmaExportNodePayload = z318.object({
|
|
9927
|
-
designSystemId: z318.string(),
|
|
9928
|
-
versionId: z318.string().optional(),
|
|
9929
|
-
figmaUrl: z318.string(),
|
|
9930
|
-
configuration: DTOFigmaExportNodeConfiguration
|
|
9931
|
-
});
|
|
9932
|
-
var DTOFigmaExportNodeResponse = z318.object({
|
|
9933
|
-
file: DTOFile
|
|
9934
|
-
});
|
|
9378
|
+
import z336 from "zod";
|
|
9935
9379
|
|
|
9936
9380
|
// src/api/dto/forge/agent.ts
|
|
9937
|
-
import { z as
|
|
9381
|
+
import { z as z311 } from "zod";
|
|
9938
9382
|
var DTOForgeAgent = ForgeAgent;
|
|
9939
9383
|
var DTOForgeAvatarBuilder = ForgeAvatarBuilder;
|
|
9940
9384
|
var DTOCreateForgeAgent = DTOForgeAgent.omit({ projectId: true });
|
|
9941
|
-
var DTOUpdateForgeAgent = DTOCreateForgeAgent.extend({ id:
|
|
9942
|
-
var DTOCreateForgeAgentResponse =
|
|
9385
|
+
var DTOUpdateForgeAgent = DTOCreateForgeAgent.extend({ id: z311.string() });
|
|
9386
|
+
var DTOCreateForgeAgentResponse = z311.object({
|
|
9943
9387
|
agent: DTOForgeAgent
|
|
9944
9388
|
});
|
|
9945
|
-
var DTOUGetForgeAgentResponse =
|
|
9389
|
+
var DTOUGetForgeAgentResponse = z311.object({
|
|
9946
9390
|
agent: DTOForgeAgent.nullable()
|
|
9947
9391
|
});
|
|
9948
|
-
var DTOUpdateForgeAgentResponse =
|
|
9392
|
+
var DTOUpdateForgeAgentResponse = z311.object({
|
|
9949
9393
|
agent: DTOForgeAgent.nullable()
|
|
9950
9394
|
});
|
|
9951
|
-
var DTOForgeAgentsListResponse =
|
|
9952
|
-
agents:
|
|
9395
|
+
var DTOForgeAgentsListResponse = z311.object({
|
|
9396
|
+
agents: z311.array(DTOForgeAgent)
|
|
9953
9397
|
});
|
|
9954
|
-
var DTODeleteForgeAgentResponse =
|
|
9955
|
-
ok:
|
|
9398
|
+
var DTODeleteForgeAgentResponse = z311.object({
|
|
9399
|
+
ok: z311.literal(true)
|
|
9956
9400
|
});
|
|
9957
9401
|
|
|
9958
9402
|
// src/api/dto/forge/artifact.ts
|
|
9959
|
-
import { z as
|
|
9403
|
+
import { z as z312 } from "zod";
|
|
9960
9404
|
var DTOCreateForgeBuildArtifact = ForgeBuildArtifact.omit({
|
|
9961
9405
|
id: true,
|
|
9962
9406
|
createdAt: true,
|
|
@@ -9977,72 +9421,117 @@ var DTOCreateForgeSpecArtifact = ForgeSpecArtifact.omit({
|
|
|
9977
9421
|
createdAt: true,
|
|
9978
9422
|
projectIterationId: true
|
|
9979
9423
|
});
|
|
9980
|
-
var DTOUpdateForgeBuildArtifact = DTOCreateForgeBuildArtifact.extend({ id:
|
|
9981
|
-
var DTOUpdateForgeFileArtifact = DTOCreateForgeFileArtifact.extend({ id:
|
|
9982
|
-
var DTOUpdateForgeFigmaArtifact = DTOCreateForgeFigmaArtifact.extend({ id:
|
|
9983
|
-
var DTOUpdateForgeSpecArtifact = DTOCreateForgeSpecArtifact.extend({ id:
|
|
9424
|
+
var DTOUpdateForgeBuildArtifact = DTOCreateForgeBuildArtifact.extend({ id: z312.string() });
|
|
9425
|
+
var DTOUpdateForgeFileArtifact = DTOCreateForgeFileArtifact.extend({ id: z312.string() });
|
|
9426
|
+
var DTOUpdateForgeFigmaArtifact = DTOCreateForgeFigmaArtifact.extend({ id: z312.string() });
|
|
9427
|
+
var DTOUpdateForgeSpecArtifact = DTOCreateForgeSpecArtifact.extend({ id: z312.string() });
|
|
9984
9428
|
var DTOForgeArtifact = ForgeArtifact;
|
|
9985
9429
|
var DTOForgeBuildArtifact = ForgeBuildArtifact;
|
|
9986
9430
|
var DTOForgeFileArtifact = ForgeFileArtifact;
|
|
9987
9431
|
var DTOForgeFigmaArtifact = ForgeFigmaArtifact;
|
|
9988
9432
|
var DTOForgeSpecArtifact = ForgeSpecArtifact;
|
|
9989
|
-
var DTOCreateForgeArtifact =
|
|
9433
|
+
var DTOCreateForgeArtifact = z312.union([
|
|
9990
9434
|
DTOCreateForgeBuildArtifact,
|
|
9991
9435
|
DTOCreateForgeFileArtifact,
|
|
9992
9436
|
DTOCreateForgeFigmaArtifact,
|
|
9993
9437
|
DTOCreateForgeSpecArtifact
|
|
9994
9438
|
]);
|
|
9995
|
-
var DTOUpdateForgeArtifact =
|
|
9439
|
+
var DTOUpdateForgeArtifact = z312.union([
|
|
9996
9440
|
DTOUpdateForgeFileArtifact,
|
|
9997
9441
|
DTOUpdateForgeBuildArtifact,
|
|
9998
9442
|
DTOUpdateForgeSpecArtifact,
|
|
9999
9443
|
DTOUpdateForgeFigmaArtifact
|
|
10000
9444
|
]);
|
|
10001
|
-
var DTOCreateForgeArtifactResponse =
|
|
9445
|
+
var DTOCreateForgeArtifactResponse = z312.object({
|
|
10002
9446
|
artifact: DTOForgeArtifact
|
|
10003
9447
|
});
|
|
10004
|
-
var DTOUpdateForgeArtifactResponse =
|
|
10005
|
-
artifact: DTOForgeArtifact.nullable()
|
|
9448
|
+
var DTOUpdateForgeArtifactResponse = z312.object({
|
|
9449
|
+
artifact: DTOForgeArtifact.nullable()
|
|
9450
|
+
});
|
|
9451
|
+
var DTODeleteForgeArtifactResponse = z312.object({
|
|
9452
|
+
ok: z312.literal(true)
|
|
9453
|
+
});
|
|
9454
|
+
var DTOForgeArtifactsListResponse = z312.object({
|
|
9455
|
+
artifacts: z312.array(DTOForgeArtifact)
|
|
9456
|
+
});
|
|
9457
|
+
var DTOForgeArtifactGetResponse = z312.object({
|
|
9458
|
+
artifact: DTOForgeArtifact.nullable()
|
|
9459
|
+
});
|
|
9460
|
+
|
|
9461
|
+
// src/api/dto/forge/feature-messages.ts
|
|
9462
|
+
import z314 from "zod";
|
|
9463
|
+
|
|
9464
|
+
// src/api/dto/files/files.ts
|
|
9465
|
+
import z313 from "zod";
|
|
9466
|
+
var DTOFileFigmaRenderMode = FileFigmaRenderMode;
|
|
9467
|
+
var DTOFileSourceUpload = FileSourceUpload;
|
|
9468
|
+
var DTOFileSourceFigma = FileSourceFigma;
|
|
9469
|
+
var DTOFileSource = FileSource;
|
|
9470
|
+
var DTOFile = File;
|
|
9471
|
+
var DTOFileReference = FileReference;
|
|
9472
|
+
var DTOFileUploadOwnerUser = z313.object({
|
|
9473
|
+
ownerType: z313.literal("User")
|
|
9474
|
+
});
|
|
9475
|
+
var DTOFileUploadOwnerWorkspace = z313.object({
|
|
9476
|
+
ownerType: z313.literal("Workspace"),
|
|
9477
|
+
workspaceId: z313.string()
|
|
10006
9478
|
});
|
|
10007
|
-
var
|
|
10008
|
-
|
|
9479
|
+
var DTOFileUploadOwner = z313.discriminatedUnion("ownerType", [DTOFileUploadOwnerUser, DTOFileUploadOwnerWorkspace]);
|
|
9480
|
+
var DTOFileUploadInput = z313.object({
|
|
9481
|
+
size: z313.number(),
|
|
9482
|
+
name: z313.string(),
|
|
9483
|
+
checksum: z313.string()
|
|
10009
9484
|
});
|
|
10010
|
-
var
|
|
10011
|
-
|
|
9485
|
+
var DTOFileUploadBulkPayload = z313.object({
|
|
9486
|
+
files: DTOFileUploadInput.array()
|
|
9487
|
+
}).and(DTOFileUploadOwner);
|
|
9488
|
+
var DTOFileFinalizeBulkPayload = z313.object({
|
|
9489
|
+
fileIds: z313.string().array()
|
|
9490
|
+
}).and(DTOFileUploadOwner);
|
|
9491
|
+
var DTOFileListResponse = z313.object({
|
|
9492
|
+
files: DTOFile.array()
|
|
10012
9493
|
});
|
|
10013
|
-
var
|
|
10014
|
-
|
|
9494
|
+
var DTOFileUploadBulkResponse = z313.object({
|
|
9495
|
+
files: z313.array(DTOFile),
|
|
9496
|
+
uploadUrls: z313.array(
|
|
9497
|
+
z313.object({
|
|
9498
|
+
fileId: z313.string(),
|
|
9499
|
+
uploadUrl: z313.string()
|
|
9500
|
+
})
|
|
9501
|
+
)
|
|
9502
|
+
});
|
|
9503
|
+
var DTOFileFinalizeBulkResponse = z313.object({
|
|
9504
|
+
files: z313.array(DTOFile)
|
|
10015
9505
|
});
|
|
10016
9506
|
|
|
10017
9507
|
// src/api/dto/forge/feature-messages.ts
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
userId: z321.string()
|
|
9508
|
+
var DTOFeatureMessageUserSender = z314.object({
|
|
9509
|
+
type: z314.literal("User"),
|
|
9510
|
+
userId: z314.string()
|
|
10022
9511
|
});
|
|
10023
|
-
var DTOFeatureMessageAgentSender =
|
|
10024
|
-
type:
|
|
9512
|
+
var DTOFeatureMessageAgentSender = z314.object({
|
|
9513
|
+
type: z314.literal("Agent")
|
|
10025
9514
|
});
|
|
10026
|
-
var DTOFeatureMessageSystemSender =
|
|
10027
|
-
type:
|
|
10028
|
-
onBehalfOfUserId:
|
|
9515
|
+
var DTOFeatureMessageSystemSender = z314.object({
|
|
9516
|
+
type: z314.literal("System"),
|
|
9517
|
+
onBehalfOfUserId: z314.string()
|
|
10029
9518
|
});
|
|
10030
|
-
var DTOFeatureMessageSender =
|
|
9519
|
+
var DTOFeatureMessageSender = z314.discriminatedUnion("type", [
|
|
10031
9520
|
DTOFeatureMessageUserSender,
|
|
10032
9521
|
DTOFeatureMessageAgentSender,
|
|
10033
9522
|
DTOFeatureMessageSystemSender
|
|
10034
9523
|
]);
|
|
10035
|
-
var DTOFeatureMessageReaction =
|
|
9524
|
+
var DTOFeatureMessageReaction = z314.object({
|
|
10036
9525
|
messageId: Id,
|
|
10037
|
-
userId:
|
|
10038
|
-
emoji:
|
|
10039
|
-
createdAt:
|
|
9526
|
+
userId: z314.string(),
|
|
9527
|
+
emoji: z314.string(),
|
|
9528
|
+
createdAt: z314.string()
|
|
10040
9529
|
});
|
|
10041
|
-
var DTOFeatureMessageAttachments =
|
|
9530
|
+
var DTOFeatureMessageAttachments = z314.object({
|
|
10042
9531
|
iterationId: Id.optional()
|
|
10043
9532
|
// TODO Artem: files, etc
|
|
10044
9533
|
});
|
|
10045
|
-
var DTOFeatureMessage =
|
|
9534
|
+
var DTOFeatureMessage = z314.object({
|
|
10046
9535
|
id: Id,
|
|
10047
9536
|
/**
|
|
10048
9537
|
* Describes where the message came from
|
|
@@ -10051,16 +9540,16 @@ var DTOFeatureMessage = z321.object({
|
|
|
10051
9540
|
/**
|
|
10052
9541
|
* Content of the message
|
|
10053
9542
|
*/
|
|
10054
|
-
body:
|
|
9543
|
+
body: z314.string(),
|
|
10055
9544
|
/**
|
|
10056
9545
|
* Indicates if the message was sent in the agentic mode, if so this message will cause an
|
|
10057
9546
|
* AI agent to generate a response and perform an action within the feature
|
|
10058
9547
|
*/
|
|
10059
|
-
isPrompt:
|
|
9548
|
+
isPrompt: z314.boolean().optional(),
|
|
10060
9549
|
/**
|
|
10061
9550
|
* Indicates if the sender requested agent to reply in a thread
|
|
10062
9551
|
*/
|
|
10063
|
-
startsNewThread:
|
|
9552
|
+
startsNewThread: z314.boolean().optional(),
|
|
10064
9553
|
/**
|
|
10065
9554
|
* If defined, this message is considered to be a reply in a thread under parent message id
|
|
10066
9555
|
*/
|
|
@@ -10074,23 +9563,23 @@ var DTOFeatureMessage = z321.object({
|
|
|
10074
9563
|
* If defined, this message is considered to be a reply to different message
|
|
10075
9564
|
*/
|
|
10076
9565
|
replyToMessageId: Id.optional(),
|
|
10077
|
-
createdAt:
|
|
10078
|
-
updatedAt:
|
|
9566
|
+
createdAt: z314.string(),
|
|
9567
|
+
updatedAt: z314.string().optional()
|
|
10079
9568
|
});
|
|
10080
|
-
var DTOFeatureAgentResponseTracker =
|
|
9569
|
+
var DTOFeatureAgentResponseTracker = z314.object({
|
|
10081
9570
|
id: Id,
|
|
10082
|
-
currentBody:
|
|
9571
|
+
currentBody: z314.string().default("")
|
|
10083
9572
|
});
|
|
10084
|
-
var DTOFeatureArtifact =
|
|
9573
|
+
var DTOFeatureArtifact = z314.object({
|
|
10085
9574
|
id: Id,
|
|
10086
9575
|
/**
|
|
10087
9576
|
* Key of the artifact, can include path like `src/components/button.tsx`
|
|
10088
9577
|
*/
|
|
10089
|
-
key:
|
|
9578
|
+
key: z314.string(),
|
|
10090
9579
|
/**
|
|
10091
9580
|
* Id of the project file that holds content of this artifact
|
|
10092
9581
|
*/
|
|
10093
|
-
fileId:
|
|
9582
|
+
fileId: z314.string().optional(),
|
|
10094
9583
|
/**
|
|
10095
9584
|
* Id of the Iteration that this artifact belongs to
|
|
10096
9585
|
*/
|
|
@@ -10098,44 +9587,44 @@ var DTOFeatureArtifact = z321.object({
|
|
|
10098
9587
|
/**
|
|
10099
9588
|
* URL of the feature artifact's contents
|
|
10100
9589
|
*/
|
|
10101
|
-
url:
|
|
9590
|
+
url: z314.string(),
|
|
10102
9591
|
/**
|
|
10103
9592
|
* Relative file path of the artifact (without domain/base URL)
|
|
10104
9593
|
*/
|
|
10105
|
-
filePath:
|
|
10106
|
-
createdAt:
|
|
10107
|
-
updatedAt:
|
|
10108
|
-
});
|
|
10109
|
-
var DTOFeatureIterationArtifactsDiff =
|
|
10110
|
-
created:
|
|
10111
|
-
updated:
|
|
10112
|
-
deleted:
|
|
10113
|
-
});
|
|
10114
|
-
var DTOFeatureIterationState =
|
|
10115
|
-
var DTOFeatureIterationErrorType =
|
|
10116
|
-
var DTOFeatureIterationError =
|
|
10117
|
-
description:
|
|
9594
|
+
filePath: z314.string().optional(),
|
|
9595
|
+
createdAt: z314.string(),
|
|
9596
|
+
updatedAt: z314.string()
|
|
9597
|
+
});
|
|
9598
|
+
var DTOFeatureIterationArtifactsDiff = z314.object({
|
|
9599
|
+
created: z314.array(DTOFeatureArtifact.shape.key).optional().default([]),
|
|
9600
|
+
updated: z314.array(DTOFeatureArtifact.shape.key).optional().default([]),
|
|
9601
|
+
deleted: z314.array(DTOFeatureArtifact.shape.key).optional().default([])
|
|
9602
|
+
});
|
|
9603
|
+
var DTOFeatureIterationState = z314.enum(["InProgress", "Success", "Error", "Timeout"]);
|
|
9604
|
+
var DTOFeatureIterationErrorType = z314.enum(["PackageInstall", "Build", "Compile", "Unknown", "Runtime"]);
|
|
9605
|
+
var DTOFeatureIterationError = z314.object({
|
|
9606
|
+
description: z314.string(),
|
|
10118
9607
|
type: DTOFeatureIterationErrorType
|
|
10119
9608
|
});
|
|
10120
|
-
var DTOFeatureIteration =
|
|
9609
|
+
var DTOFeatureIteration = z314.object({
|
|
10121
9610
|
id: Id,
|
|
10122
9611
|
/**
|
|
10123
9612
|
* Name of the iteration
|
|
10124
9613
|
*/
|
|
10125
|
-
name:
|
|
9614
|
+
name: z314.string(),
|
|
10126
9615
|
/**
|
|
10127
9616
|
* ID of the iteration that this iteration is based on
|
|
10128
9617
|
*/
|
|
10129
|
-
baseIterationId:
|
|
9618
|
+
baseIterationId: z314.string().optional(),
|
|
10130
9619
|
/**
|
|
10131
9620
|
* Message ID that triggered creation of the iteration
|
|
10132
9621
|
*/
|
|
10133
|
-
startedFromMessageId:
|
|
9622
|
+
startedFromMessageId: z314.string(),
|
|
10134
9623
|
/**
|
|
10135
9624
|
* Indicates whether the iteration is currently being generated by an agent
|
|
10136
9625
|
* @deprecated use `state`
|
|
10137
9626
|
*/
|
|
10138
|
-
isInProgress:
|
|
9627
|
+
isInProgress: z314.boolean().optional(),
|
|
10139
9628
|
/**
|
|
10140
9629
|
* Indicates current processing (creation) state of this iteration.
|
|
10141
9630
|
* This property is optional only for backward compatibility with data stored in Liveblocks rooms.
|
|
@@ -10153,7 +9642,7 @@ var DTOFeatureIteration = z321.object({
|
|
|
10153
9642
|
*
|
|
10154
9643
|
* @deprecated use `error.description` instead
|
|
10155
9644
|
*/
|
|
10156
|
-
errorDescription:
|
|
9645
|
+
errorDescription: z314.string().nullish(),
|
|
10157
9646
|
/**
|
|
10158
9647
|
* Description of a sandbox error if there were any (such as during `npm i` or `npm run build`).
|
|
10159
9648
|
* To be used for "fix with AI"
|
|
@@ -10162,26 +9651,26 @@ var DTOFeatureIteration = z321.object({
|
|
|
10162
9651
|
/**
|
|
10163
9652
|
* The cost in credits to generate this iteration
|
|
10164
9653
|
*/
|
|
10165
|
-
creditsCost:
|
|
9654
|
+
creditsCost: z314.number().optional(),
|
|
10166
9655
|
/**
|
|
10167
9656
|
* URL of a static preview of the feature
|
|
10168
9657
|
*/
|
|
10169
|
-
staticPreviewUrl:
|
|
9658
|
+
staticPreviewUrl: z314.string().optional(),
|
|
10170
9659
|
/**
|
|
10171
9660
|
* Indicates whether the iteration is bookmarked by user
|
|
10172
9661
|
*/
|
|
10173
|
-
isBookmarked:
|
|
9662
|
+
isBookmarked: z314.boolean().optional(),
|
|
10174
9663
|
/**
|
|
10175
9664
|
* @deprecated use thumbnail.fileUrl
|
|
10176
9665
|
* URL of a static thumbnail of the feature iteration
|
|
10177
9666
|
*/
|
|
10178
|
-
thumbnailUrl:
|
|
9667
|
+
thumbnailUrl: z314.string().optional(),
|
|
10179
9668
|
thumbnail: DTOFileReference.optional(),
|
|
10180
|
-
createdAt:
|
|
10181
|
-
updatedAt:
|
|
9669
|
+
createdAt: z314.string(),
|
|
9670
|
+
updatedAt: z314.string().optional(),
|
|
10182
9671
|
artifactsDiff: DTOFeatureIterationArtifactsDiff.optional().nullable()
|
|
10183
9672
|
});
|
|
10184
|
-
var DTOFeatureIterationTag =
|
|
9673
|
+
var DTOFeatureIterationTag = z314.object({
|
|
10185
9674
|
id: Id,
|
|
10186
9675
|
featureId: Id,
|
|
10187
9676
|
/**
|
|
@@ -10194,18 +9683,18 @@ var DTOFeatureIterationTag = z321.object({
|
|
|
10194
9683
|
*/
|
|
10195
9684
|
iterationId: Id
|
|
10196
9685
|
});
|
|
10197
|
-
var DTOSandboxError =
|
|
9686
|
+
var DTOSandboxError = z314.object({
|
|
10198
9687
|
/** At what stage the error has occured */
|
|
10199
|
-
stage:
|
|
9688
|
+
stage: z314.enum(["PackageInstall", "HealthCheck", "Build", "Unknown"]),
|
|
10200
9689
|
/** We will use this in "fix with AI" */
|
|
10201
|
-
errorDescription:
|
|
9690
|
+
errorDescription: z314.string()
|
|
10202
9691
|
});
|
|
10203
|
-
var DTOFeatureSandbox =
|
|
10204
|
-
id:
|
|
10205
|
-
url:
|
|
9692
|
+
var DTOFeatureSandbox = z314.object({
|
|
9693
|
+
id: z314.string(),
|
|
9694
|
+
url: z314.string(),
|
|
10206
9695
|
parentMessageId: Id.optional(),
|
|
10207
9696
|
currentIterationId: Id,
|
|
10208
|
-
expiresAt:
|
|
9697
|
+
expiresAt: z314.string().optional(),
|
|
10209
9698
|
error: DTOSandboxError.optional()
|
|
10210
9699
|
});
|
|
10211
9700
|
var DTOFeatureMessageCreateInput = DTOFeatureMessage.pick({
|
|
@@ -10217,34 +9706,34 @@ var DTOFeatureMessageCreateInput = DTOFeatureMessage.pick({
|
|
|
10217
9706
|
attachments: true
|
|
10218
9707
|
});
|
|
10219
9708
|
var DTOFeatureMessageUpdateInput = DTOFeatureMessageCreateInput.omit({ id: true }).merge(DTOFeatureMessage.pick({ agentResponseTrackerId: true })).partial();
|
|
10220
|
-
var DTOFeatureMessageReactionCreateInput =
|
|
9709
|
+
var DTOFeatureMessageReactionCreateInput = z314.object({
|
|
10221
9710
|
messageId: Id,
|
|
10222
|
-
emoji:
|
|
9711
|
+
emoji: z314.string()
|
|
10223
9712
|
});
|
|
10224
|
-
var DTOFeatureMessageReactionDeleteInput =
|
|
9713
|
+
var DTOFeatureMessageReactionDeleteInput = z314.object({
|
|
10225
9714
|
messageId: Id,
|
|
10226
|
-
emoji:
|
|
9715
|
+
emoji: z314.string()
|
|
10227
9716
|
});
|
|
10228
|
-
var DTOFeatureArtifactCreateInput =
|
|
9717
|
+
var DTOFeatureArtifactCreateInput = z314.object({
|
|
10229
9718
|
id: Id,
|
|
10230
|
-
key:
|
|
10231
|
-
fileId:
|
|
9719
|
+
key: z314.string(),
|
|
9720
|
+
fileId: z314.string(),
|
|
10232
9721
|
iterationId: Id.optional()
|
|
10233
9722
|
});
|
|
10234
|
-
var DTOFeatureArtifactDeleteInput =
|
|
9723
|
+
var DTOFeatureArtifactDeleteInput = z314.object({
|
|
10235
9724
|
id: Id
|
|
10236
9725
|
});
|
|
10237
9726
|
var DTOFeatureIterationCreateInput = DTOFeatureIteration.pick({
|
|
10238
9727
|
id: true,
|
|
10239
9728
|
startedFromMessageId: true
|
|
10240
9729
|
});
|
|
10241
|
-
var DTOFeatureIterationPromoteInput =
|
|
9730
|
+
var DTOFeatureIterationPromoteInput = z314.object({
|
|
10242
9731
|
id: Id
|
|
10243
9732
|
});
|
|
10244
|
-
var DTOFeatureArtifactGetByIdParam =
|
|
9733
|
+
var DTOFeatureArtifactGetByIdParam = z314.object({
|
|
10245
9734
|
id: Id
|
|
10246
9735
|
});
|
|
10247
|
-
var DTOFeatureIterationSetLatestInput =
|
|
9736
|
+
var DTOFeatureIterationSetLatestInput = z314.object({
|
|
10248
9737
|
id: Id,
|
|
10249
9738
|
/**
|
|
10250
9739
|
* Optional message ID to determine the context for setting this iteration as latest.
|
|
@@ -10254,128 +9743,128 @@ var DTOFeatureIterationSetLatestInput = z321.object({
|
|
|
10254
9743
|
*/
|
|
10255
9744
|
contextMessageId: Id.nullish()
|
|
10256
9745
|
});
|
|
10257
|
-
var DTOFeatureIterationUpdateInput =
|
|
9746
|
+
var DTOFeatureIterationUpdateInput = z314.object({
|
|
10258
9747
|
id: Id,
|
|
10259
|
-
isBookmarked:
|
|
9748
|
+
isBookmarked: z314.boolean().optional()
|
|
10260
9749
|
});
|
|
10261
|
-
var DTOFeatureIterationTagCreateInput =
|
|
9750
|
+
var DTOFeatureIterationTagCreateInput = z314.object({
|
|
10262
9751
|
featureId: Id,
|
|
10263
9752
|
iterationId: Id,
|
|
10264
9753
|
messageId: Id.optional()
|
|
10265
9754
|
});
|
|
10266
|
-
var DTOFeatureIterationArtifactDiff =
|
|
9755
|
+
var DTOFeatureIterationArtifactDiff = z314.object({
|
|
10267
9756
|
/**
|
|
10268
9757
|
* Map of artifact key -> new key that describes artifacts that will be moved in this iteration
|
|
10269
9758
|
*/
|
|
10270
|
-
move:
|
|
10271
|
-
|
|
10272
|
-
newKey:
|
|
9759
|
+
move: z314.record(
|
|
9760
|
+
z314.object({
|
|
9761
|
+
newKey: z314.string()
|
|
10273
9762
|
})
|
|
10274
9763
|
),
|
|
10275
9764
|
/**
|
|
10276
9765
|
* Map of artifact key -> artifact content that describes artifacts that will be
|
|
10277
9766
|
* create or updated in this iteration
|
|
10278
9767
|
*/
|
|
10279
|
-
upsert:
|
|
10280
|
-
|
|
10281
|
-
artifactContent:
|
|
9768
|
+
upsert: z314.record(
|
|
9769
|
+
z314.object({
|
|
9770
|
+
artifactContent: z314.string()
|
|
10282
9771
|
})
|
|
10283
9772
|
),
|
|
10284
9773
|
/**
|
|
10285
9774
|
* List artifact keys to remove from this iteration
|
|
10286
9775
|
*/
|
|
10287
|
-
remove:
|
|
9776
|
+
remove: z314.array(z314.string())
|
|
10288
9777
|
});
|
|
10289
|
-
var DTOFeatureIterationUpdateArtifactsInput =
|
|
9778
|
+
var DTOFeatureIterationUpdateArtifactsInput = z314.object({
|
|
10290
9779
|
id: Id,
|
|
10291
|
-
name:
|
|
9780
|
+
name: z314.string().optional(),
|
|
10292
9781
|
artifactDiff: DTOFeatureIterationArtifactDiff
|
|
10293
9782
|
});
|
|
10294
|
-
var DTOFeatureIterationValidateInput =
|
|
9783
|
+
var DTOFeatureIterationValidateInput = z314.object({
|
|
10295
9784
|
id: Id,
|
|
10296
9785
|
messageId: Id
|
|
10297
9786
|
});
|
|
10298
|
-
var DTOFeatureIterationUpdateArtifactsByMessageInput =
|
|
9787
|
+
var DTOFeatureIterationUpdateArtifactsByMessageInput = z314.object({
|
|
10299
9788
|
messageId: Id,
|
|
10300
|
-
name:
|
|
9789
|
+
name: z314.string().optional(),
|
|
10301
9790
|
artifactDiff: DTOFeatureIterationArtifactDiff
|
|
10302
9791
|
});
|
|
10303
|
-
var DTOFeatureAgentWorkFinalizeInput =
|
|
9792
|
+
var DTOFeatureAgentWorkFinalizeInput = z314.object({
|
|
10304
9793
|
messageId: Id
|
|
10305
9794
|
});
|
|
10306
|
-
var DTOFeatureUpdateThemeInput =
|
|
10307
|
-
parentMessageId:
|
|
10308
|
-
themeCss:
|
|
9795
|
+
var DTOFeatureUpdateThemeInput = z314.object({
|
|
9796
|
+
parentMessageId: z314.string().optional(),
|
|
9797
|
+
themeCss: z314.string()
|
|
10309
9798
|
});
|
|
10310
|
-
var DTOFeatureMessageResponse =
|
|
9799
|
+
var DTOFeatureMessageResponse = z314.object({
|
|
10311
9800
|
message: DTOFeatureMessage
|
|
10312
9801
|
});
|
|
10313
|
-
var DTOFeatureMessageReactionResponse =
|
|
9802
|
+
var DTOFeatureMessageReactionResponse = z314.object({
|
|
10314
9803
|
reaction: DTOFeatureMessageReaction
|
|
10315
9804
|
});
|
|
10316
|
-
var DTOFeatureMessageListResponse =
|
|
9805
|
+
var DTOFeatureMessageListResponse = z314.object({
|
|
10317
9806
|
messages: DTOFeatureMessage.array(),
|
|
10318
9807
|
reactions: DTOFeatureMessageReaction.array(),
|
|
10319
|
-
lastSeenMessageId:
|
|
9808
|
+
lastSeenMessageId: z314.string().optional()
|
|
10320
9809
|
});
|
|
10321
|
-
var DTOFeatureArtifactResponse =
|
|
9810
|
+
var DTOFeatureArtifactResponse = z314.object({
|
|
10322
9811
|
artifact: DTOFeatureArtifact
|
|
10323
9812
|
});
|
|
10324
|
-
var DTOFeatureArtifactListResponse =
|
|
9813
|
+
var DTOFeatureArtifactListResponse = z314.object({
|
|
10325
9814
|
artifacts: DTOFeatureArtifact.array()
|
|
10326
9815
|
});
|
|
10327
|
-
var DTOFeatureArtifactWithContentResponse =
|
|
9816
|
+
var DTOFeatureArtifactWithContentResponse = z314.object({
|
|
10328
9817
|
artifact: DTOFeatureArtifact,
|
|
10329
|
-
content:
|
|
9818
|
+
content: z314.string()
|
|
10330
9819
|
});
|
|
10331
|
-
var DTOFeatureIterationResponse =
|
|
9820
|
+
var DTOFeatureIterationResponse = z314.object({
|
|
10332
9821
|
iteration: DTOFeatureIteration
|
|
10333
9822
|
});
|
|
10334
|
-
var DTOFeatureIterationListResponse =
|
|
9823
|
+
var DTOFeatureIterationListResponse = z314.object({
|
|
10335
9824
|
iterations: DTOFeatureIteration.array()
|
|
10336
9825
|
});
|
|
10337
|
-
var DTOFeatureIterationValidateResponse =
|
|
10338
|
-
|
|
10339
|
-
|
|
9826
|
+
var DTOFeatureIterationValidateResponse = z314.discriminatedUnion("success", [
|
|
9827
|
+
z314.object({ success: z314.literal(true) }),
|
|
9828
|
+
z314.object({ success: z314.literal(false), error: DTOFeatureIterationError })
|
|
10340
9829
|
]);
|
|
10341
|
-
var DTOFeatureIterationTagResponse =
|
|
9830
|
+
var DTOFeatureIterationTagResponse = z314.object({
|
|
10342
9831
|
tag: DTOFeatureIterationTag
|
|
10343
9832
|
});
|
|
10344
|
-
var DTOFeatureIterationTagListResponse =
|
|
9833
|
+
var DTOFeatureIterationTagListResponse = z314.object({
|
|
10345
9834
|
tags: DTOFeatureIterationTag.array()
|
|
10346
9835
|
});
|
|
10347
|
-
var DTOFeatureEventMessagesSent =
|
|
10348
|
-
type:
|
|
9836
|
+
var DTOFeatureEventMessagesSent = z314.object({
|
|
9837
|
+
type: z314.literal("MessagesSent"),
|
|
10349
9838
|
data: DTOFeatureMessage.array()
|
|
10350
9839
|
});
|
|
10351
|
-
var DTOFeatureEventReactionsSent =
|
|
10352
|
-
type:
|
|
9840
|
+
var DTOFeatureEventReactionsSent = z314.object({
|
|
9841
|
+
type: z314.literal("ReactionsSent"),
|
|
10353
9842
|
data: DTOFeatureMessageReaction.array()
|
|
10354
9843
|
});
|
|
10355
|
-
var DTOFeatureEventReactionsDeleted =
|
|
10356
|
-
type:
|
|
9844
|
+
var DTOFeatureEventReactionsDeleted = z314.object({
|
|
9845
|
+
type: z314.literal("ReactionsDeleted"),
|
|
10357
9846
|
data: DTOFeatureMessageReaction
|
|
10358
9847
|
});
|
|
10359
|
-
var DTOFeatureEvent =
|
|
9848
|
+
var DTOFeatureEvent = z314.discriminatedUnion("type", [
|
|
10360
9849
|
DTOFeatureEventMessagesSent,
|
|
10361
9850
|
DTOFeatureEventReactionsSent,
|
|
10362
9851
|
DTOFeatureEventReactionsDeleted
|
|
10363
9852
|
]);
|
|
10364
9853
|
|
|
10365
9854
|
// src/api/dto/forge/feature-room.ts
|
|
10366
|
-
import { z as
|
|
10367
|
-
var DTOForgeFeatureRoom =
|
|
10368
|
-
id:
|
|
9855
|
+
import { z as z315 } from "zod";
|
|
9856
|
+
var DTOForgeFeatureRoom = z315.object({
|
|
9857
|
+
id: z315.string()
|
|
10369
9858
|
});
|
|
10370
|
-
var DTOForgeFeatureRoomResponse =
|
|
9859
|
+
var DTOForgeFeatureRoomResponse = z315.object({
|
|
10371
9860
|
room: DTOForgeFeatureRoom
|
|
10372
9861
|
});
|
|
10373
9862
|
|
|
10374
9863
|
// src/api/dto/forge/iteration-message-old.ts
|
|
10375
|
-
import { z as
|
|
9864
|
+
import { z as z317 } from "zod";
|
|
10376
9865
|
|
|
10377
9866
|
// src/api/dto/forge/participant.ts
|
|
10378
|
-
import { z as
|
|
9867
|
+
import { z as z316 } from "zod";
|
|
10379
9868
|
var DTOForgeParticipant = ForgeParticipant.omit({ agent: true, user: true }).extend({
|
|
10380
9869
|
agent: DTOForgeAgent.optional(),
|
|
10381
9870
|
user: DTOUser.optional()
|
|
@@ -10385,20 +9874,20 @@ var DTOCreateForgeParticipant = DTOForgeParticipant.omit({
|
|
|
10385
9874
|
agent: true,
|
|
10386
9875
|
user: true
|
|
10387
9876
|
});
|
|
10388
|
-
var DTOUpdateForgeParticipant = DTOCreateForgeParticipant.extend({ id:
|
|
10389
|
-
var DTOCreateForgeParticipantResponse =
|
|
9877
|
+
var DTOUpdateForgeParticipant = DTOCreateForgeParticipant.extend({ id: z316.string() });
|
|
9878
|
+
var DTOCreateForgeParticipantResponse = z316.object({
|
|
10390
9879
|
participant: DTOForgeParticipant
|
|
10391
9880
|
});
|
|
10392
|
-
var DTOUpdateForgeParticipantResponse =
|
|
9881
|
+
var DTOUpdateForgeParticipantResponse = z316.object({
|
|
10393
9882
|
participant: DTOForgeParticipant.nullable()
|
|
10394
9883
|
});
|
|
10395
|
-
var DTODeleteForgeParticipantResponse =
|
|
10396
|
-
ok:
|
|
9884
|
+
var DTODeleteForgeParticipantResponse = z316.object({
|
|
9885
|
+
ok: z316.literal(true)
|
|
10397
9886
|
});
|
|
10398
|
-
var DTOForgeParticipantsListResponse =
|
|
10399
|
-
participants:
|
|
9887
|
+
var DTOForgeParticipantsListResponse = z316.object({
|
|
9888
|
+
participants: z316.array(DTOForgeParticipant)
|
|
10400
9889
|
});
|
|
10401
|
-
var DTOForgeParticipantGetResponse =
|
|
9890
|
+
var DTOForgeParticipantGetResponse = z316.object({
|
|
10402
9891
|
participant: DTOForgeParticipant.nullable()
|
|
10403
9892
|
});
|
|
10404
9893
|
|
|
@@ -10410,109 +9899,109 @@ var DTOCreateForgeIterationMessage = DTOForgeIterationMessage.omit({
|
|
|
10410
9899
|
projectIterationId: true,
|
|
10411
9900
|
participant: true
|
|
10412
9901
|
});
|
|
10413
|
-
var DTOGetForgeIterationMessageResponse =
|
|
9902
|
+
var DTOGetForgeIterationMessageResponse = z317.object({
|
|
10414
9903
|
message: DTOForgeIterationMessage.nullable()
|
|
10415
9904
|
});
|
|
10416
|
-
var DTOForgeIterationMessagesListResponse =
|
|
10417
|
-
messages:
|
|
9905
|
+
var DTOForgeIterationMessagesListResponse = z317.object({
|
|
9906
|
+
messages: z317.array(DTOForgeIterationMessage)
|
|
10418
9907
|
});
|
|
10419
|
-
var DTOUpdateForgeIterationMessage = DTOCreateForgeIterationMessage.extend({ id:
|
|
10420
|
-
var DTOCreateForgeIterationMessageResponse =
|
|
9908
|
+
var DTOUpdateForgeIterationMessage = DTOCreateForgeIterationMessage.extend({ id: z317.string() });
|
|
9909
|
+
var DTOCreateForgeIterationMessageResponse = z317.object({
|
|
10421
9910
|
message: DTOForgeIterationMessage
|
|
10422
9911
|
});
|
|
10423
|
-
var DTOUpdateForgeIterationMessageResponse =
|
|
9912
|
+
var DTOUpdateForgeIterationMessageResponse = z317.object({
|
|
10424
9913
|
message: DTOForgeIterationMessage.nullable()
|
|
10425
9914
|
});
|
|
10426
|
-
var DTODeleteForgeIterationMessageResponse =
|
|
10427
|
-
ok:
|
|
9915
|
+
var DTODeleteForgeIterationMessageResponse = z317.object({
|
|
9916
|
+
ok: z317.literal(true)
|
|
10428
9917
|
});
|
|
10429
9918
|
|
|
10430
9919
|
// src/api/dto/forge/memory.ts
|
|
10431
|
-
import
|
|
10432
|
-
var DTOForgeMemoryEntry =
|
|
10433
|
-
id:
|
|
10434
|
-
projectId:
|
|
10435
|
-
text:
|
|
10436
|
-
category:
|
|
10437
|
-
createdAt:
|
|
10438
|
-
updatedAt:
|
|
10439
|
-
metadata:
|
|
10440
|
-
});
|
|
10441
|
-
var DTOForgeMemoryCreateInput =
|
|
10442
|
-
projectId:
|
|
10443
|
-
text:
|
|
10444
|
-
category:
|
|
10445
|
-
metadata:
|
|
10446
|
-
});
|
|
10447
|
-
var DTOForgeMemoryUpdateInput =
|
|
10448
|
-
id:
|
|
10449
|
-
text:
|
|
10450
|
-
category:
|
|
10451
|
-
metadata:
|
|
10452
|
-
});
|
|
10453
|
-
var DTOForgeMemoryDeleteInput =
|
|
10454
|
-
id:
|
|
10455
|
-
});
|
|
10456
|
-
var DTOForgeMemoryEntryListResponse =
|
|
9920
|
+
import z318 from "zod";
|
|
9921
|
+
var DTOForgeMemoryEntry = z318.object({
|
|
9922
|
+
id: z318.string().uuid(),
|
|
9923
|
+
projectId: z318.string(),
|
|
9924
|
+
text: z318.string(),
|
|
9925
|
+
category: z318.string(),
|
|
9926
|
+
createdAt: z318.string(),
|
|
9927
|
+
updatedAt: z318.string(),
|
|
9928
|
+
metadata: z318.record(z318.string()).optional()
|
|
9929
|
+
});
|
|
9930
|
+
var DTOForgeMemoryCreateInput = z318.object({
|
|
9931
|
+
projectId: z318.string(),
|
|
9932
|
+
text: z318.string(),
|
|
9933
|
+
category: z318.string(),
|
|
9934
|
+
metadata: z318.record(z318.string()).optional()
|
|
9935
|
+
});
|
|
9936
|
+
var DTOForgeMemoryUpdateInput = z318.object({
|
|
9937
|
+
id: z318.string().uuid(),
|
|
9938
|
+
text: z318.string().optional(),
|
|
9939
|
+
category: z318.string(),
|
|
9940
|
+
metadata: z318.record(z318.string()).nullish()
|
|
9941
|
+
});
|
|
9942
|
+
var DTOForgeMemoryDeleteInput = z318.object({
|
|
9943
|
+
id: z318.string().uuid()
|
|
9944
|
+
});
|
|
9945
|
+
var DTOForgeMemoryEntryListResponse = z318.object({
|
|
10457
9946
|
memoryEntries: DTOForgeMemoryEntry.array()
|
|
10458
9947
|
});
|
|
10459
|
-
var DTOForgeMemoryEntryResponse =
|
|
9948
|
+
var DTOForgeMemoryEntryResponse = z318.object({
|
|
10460
9949
|
memoryEntry: DTOForgeMemoryEntry
|
|
10461
9950
|
});
|
|
10462
|
-
var DTOForgeMemoryEntryListQuery =
|
|
10463
|
-
projectId:
|
|
9951
|
+
var DTOForgeMemoryEntryListQuery = z318.object({
|
|
9952
|
+
projectId: z318.string()
|
|
10464
9953
|
});
|
|
10465
9954
|
|
|
10466
9955
|
// src/api/dto/forge/project-action.ts
|
|
10467
|
-
import
|
|
9956
|
+
import z323 from "zod";
|
|
10468
9957
|
|
|
10469
9958
|
// src/api/dto/forge/project-artifact.ts
|
|
10470
|
-
import { z as
|
|
9959
|
+
import { z as z321 } from "zod";
|
|
10471
9960
|
|
|
10472
9961
|
// src/api/dto/threads/threads.ts
|
|
10473
|
-
import
|
|
10474
|
-
var DTOThreadSubjectType =
|
|
10475
|
-
var DTOThreadAgentType =
|
|
10476
|
-
var DTOThreadPromptState =
|
|
10477
|
-
var DTOThread =
|
|
10478
|
-
id:
|
|
10479
|
-
liveblocksRoomId:
|
|
9962
|
+
import z319 from "zod";
|
|
9963
|
+
var DTOThreadSubjectType = z319.enum(["ForgeDocument", "ForgeFeature"]);
|
|
9964
|
+
var DTOThreadAgentType = z319.enum(["Ask", "Document", "Prototype", "ReleaseNotes"]);
|
|
9965
|
+
var DTOThreadPromptState = z319.enum(["Success", "Timeout", "Error"]);
|
|
9966
|
+
var DTOThread = z319.object({
|
|
9967
|
+
id: z319.string(),
|
|
9968
|
+
liveblocksRoomId: z319.string(),
|
|
10480
9969
|
defaultAgentType: DTOThreadAgentType,
|
|
10481
|
-
subjectId:
|
|
9970
|
+
subjectId: z319.string(),
|
|
10482
9971
|
subjectType: DTOThreadSubjectType,
|
|
10483
|
-
createdAt:
|
|
10484
|
-
updatedAt:
|
|
9972
|
+
createdAt: z319.string(),
|
|
9973
|
+
updatedAt: z319.string()
|
|
10485
9974
|
});
|
|
10486
|
-
var DTOThreadMessageUserSender =
|
|
10487
|
-
type:
|
|
10488
|
-
userId:
|
|
9975
|
+
var DTOThreadMessageUserSender = z319.object({
|
|
9976
|
+
type: z319.literal("User"),
|
|
9977
|
+
userId: z319.string()
|
|
10489
9978
|
});
|
|
10490
|
-
var DTOThreadMessageAgentSender =
|
|
10491
|
-
type:
|
|
9979
|
+
var DTOThreadMessageAgentSender = z319.object({
|
|
9980
|
+
type: z319.literal("Agent"),
|
|
10492
9981
|
agentType: DTOThreadAgentType
|
|
10493
9982
|
});
|
|
10494
|
-
var DTOThreadMessageSystemSender =
|
|
10495
|
-
type:
|
|
10496
|
-
onBehalfOfUserId:
|
|
9983
|
+
var DTOThreadMessageSystemSender = z319.object({
|
|
9984
|
+
type: z319.literal("System"),
|
|
9985
|
+
onBehalfOfUserId: z319.string()
|
|
10497
9986
|
});
|
|
10498
|
-
var DTOThreadMessageSender =
|
|
9987
|
+
var DTOThreadMessageSender = z319.discriminatedUnion("type", [
|
|
10499
9988
|
DTOThreadMessageUserSender,
|
|
10500
9989
|
DTOThreadMessageAgentSender,
|
|
10501
9990
|
DTOThreadMessageSystemSender
|
|
10502
9991
|
]);
|
|
10503
|
-
var DTOThreadReaction =
|
|
9992
|
+
var DTOThreadReaction = z319.object({
|
|
10504
9993
|
messageId: Id,
|
|
10505
|
-
userId:
|
|
10506
|
-
emoji:
|
|
10507
|
-
createdAt:
|
|
9994
|
+
userId: z319.string(),
|
|
9995
|
+
emoji: z319.string(),
|
|
9996
|
+
createdAt: z319.string()
|
|
10508
9997
|
});
|
|
10509
|
-
var DTOThreadMessageAttachments =
|
|
9998
|
+
var DTOThreadMessageAttachments = z319.object({
|
|
10510
9999
|
iterationId: Id.optional(),
|
|
10511
10000
|
files: DTOFileReference.array().optional()
|
|
10512
10001
|
});
|
|
10513
|
-
var DTOThreadMessage =
|
|
10002
|
+
var DTOThreadMessage = z319.object({
|
|
10514
10003
|
id: Id,
|
|
10515
|
-
threadId:
|
|
10004
|
+
threadId: z319.string(),
|
|
10516
10005
|
/**
|
|
10517
10006
|
* Describes where the message came from
|
|
10518
10007
|
*/
|
|
@@ -10520,20 +10009,20 @@ var DTOThreadMessage = z326.object({
|
|
|
10520
10009
|
/**
|
|
10521
10010
|
* Content of the message
|
|
10522
10011
|
*/
|
|
10523
|
-
body:
|
|
10012
|
+
body: z319.string(),
|
|
10524
10013
|
/**
|
|
10525
10014
|
* Indicates if the message was sent in the agentic mode, if so this message will cause an
|
|
10526
10015
|
* AI agent to generate a response and perform an action within the feature
|
|
10527
10016
|
*/
|
|
10528
|
-
isPrompt:
|
|
10017
|
+
isPrompt: z319.boolean().optional(),
|
|
10529
10018
|
/**
|
|
10530
10019
|
* Indicates if the message is an attempt to retry agent message. Only available for agent messages.
|
|
10531
10020
|
*/
|
|
10532
|
-
isRetry:
|
|
10021
|
+
isRetry: z319.boolean().optional(),
|
|
10533
10022
|
/**
|
|
10534
10023
|
* Indicates if the sender requested agent to reply in a thread
|
|
10535
10024
|
*/
|
|
10536
|
-
startsNewThread:
|
|
10025
|
+
startsNewThread: z319.boolean().optional(),
|
|
10537
10026
|
/**
|
|
10538
10027
|
* If defined, this message is considered to be a reply in a thread under parent message id
|
|
10539
10028
|
*/
|
|
@@ -10547,17 +10036,17 @@ var DTOThreadMessage = z326.object({
|
|
|
10547
10036
|
* If defined, this message is considered to be a reply to different message
|
|
10548
10037
|
*/
|
|
10549
10038
|
replyToMessageId: Id.optional(),
|
|
10550
|
-
promptMetadata:
|
|
10551
|
-
createdAt:
|
|
10552
|
-
updatedAt:
|
|
10039
|
+
promptMetadata: z319.record(z319.string(), z319.any()).optional(),
|
|
10040
|
+
createdAt: z319.string(),
|
|
10041
|
+
updatedAt: z319.string().optional()
|
|
10553
10042
|
});
|
|
10554
|
-
var DTOThreadAgentResponseTracker =
|
|
10043
|
+
var DTOThreadAgentResponseTracker = z319.object({
|
|
10555
10044
|
id: Id,
|
|
10556
|
-
currentBody:
|
|
10045
|
+
currentBody: z319.string().default("")
|
|
10557
10046
|
});
|
|
10558
|
-
var DTOThreadMessageAttachmentsCreateInput =
|
|
10047
|
+
var DTOThreadMessageAttachmentsCreateInput = z319.object({
|
|
10559
10048
|
iterationId: Id.optional(),
|
|
10560
|
-
fileIds:
|
|
10049
|
+
fileIds: z319.string().array().optional()
|
|
10561
10050
|
});
|
|
10562
10051
|
var DTOThreadMessageCreateInput = DTOThreadMessage.pick({
|
|
10563
10052
|
id: true,
|
|
@@ -10569,485 +10058,882 @@ var DTOThreadMessageCreateInput = DTOThreadMessage.pick({
|
|
|
10569
10058
|
}).extend({
|
|
10570
10059
|
attachments: DTOThreadMessageAttachmentsCreateInput.optional()
|
|
10571
10060
|
});
|
|
10572
|
-
var DTOThreadMessageFinalizeInput =
|
|
10061
|
+
var DTOThreadMessageFinalizeInput = z319.object({
|
|
10573
10062
|
messageId: Id,
|
|
10574
|
-
agentMessageBody:
|
|
10063
|
+
agentMessageBody: z319.string().optional(),
|
|
10575
10064
|
promptState: DTOThreadPromptState.optional(),
|
|
10576
10065
|
creditsSpend: DTOBillingCreditsSpendInput.optional()
|
|
10577
10066
|
});
|
|
10578
|
-
var DTOThreadMessageRetryInput =
|
|
10067
|
+
var DTOThreadMessageRetryInput = z319.object({
|
|
10579
10068
|
agentMessageId: Id,
|
|
10580
|
-
runtimeError:
|
|
10069
|
+
runtimeError: z319.string().optional(),
|
|
10581
10070
|
/**
|
|
10582
10071
|
* When `true`, the retry message will be sent to a thread started by the user's message
|
|
10583
10072
|
* Useful when user retries a message created in the main thread, but expects the retry to be sent as a thread reply
|
|
10584
10073
|
*/
|
|
10585
|
-
shouldReplyInThread:
|
|
10074
|
+
shouldReplyInThread: z319.boolean().optional(),
|
|
10586
10075
|
message: DTOThreadMessage.pick({ id: true, body: true }).optional()
|
|
10587
10076
|
});
|
|
10588
10077
|
var DTOThreadMessageUpdateInput = DTOThreadMessage.pick({
|
|
10589
10078
|
id: true
|
|
10590
10079
|
}).merge(
|
|
10591
|
-
|
|
10080
|
+
z319.object({
|
|
10592
10081
|
body: DTOThreadMessage.shape.body,
|
|
10593
10082
|
attachments: DTOThreadMessage.shape.attachments,
|
|
10594
10083
|
agentResponseTrackerId: DTOThreadMessage.shape.agentResponseTrackerId.nullable()
|
|
10595
10084
|
}).partial()
|
|
10596
10085
|
);
|
|
10597
|
-
var DTOThreadReactionCreateInput =
|
|
10086
|
+
var DTOThreadReactionCreateInput = z319.object({
|
|
10598
10087
|
messageId: Id,
|
|
10599
|
-
emoji:
|
|
10088
|
+
emoji: z319.string()
|
|
10600
10089
|
});
|
|
10601
|
-
var DTOThreadReactionDeleteInput =
|
|
10090
|
+
var DTOThreadReactionDeleteInput = z319.object({
|
|
10602
10091
|
messageId: Id,
|
|
10603
|
-
emoji:
|
|
10092
|
+
emoji: z319.string()
|
|
10604
10093
|
});
|
|
10605
|
-
var DTOThreadMessageResponse =
|
|
10094
|
+
var DTOThreadMessageResponse = z319.object({
|
|
10606
10095
|
message: DTOThreadMessage
|
|
10607
10096
|
});
|
|
10608
|
-
var DTOThreadReactionResponse =
|
|
10097
|
+
var DTOThreadReactionResponse = z319.object({
|
|
10609
10098
|
reaction: DTOThreadReaction
|
|
10610
10099
|
});
|
|
10611
|
-
var DTOThreadMessageListResponse =
|
|
10100
|
+
var DTOThreadMessageListResponse = z319.object({
|
|
10612
10101
|
messages: DTOThreadMessage.array(),
|
|
10613
10102
|
reactions: DTOThreadReaction.array(),
|
|
10614
|
-
lastSeenMessageId:
|
|
10103
|
+
lastSeenMessageId: z319.string().optional()
|
|
10615
10104
|
});
|
|
10616
|
-
var DTOThreadEventMessagesSent =
|
|
10617
|
-
type:
|
|
10105
|
+
var DTOThreadEventMessagesSent = z319.object({
|
|
10106
|
+
type: z319.literal("MessagesSent"),
|
|
10618
10107
|
data: DTOThreadMessage.array()
|
|
10619
10108
|
});
|
|
10620
|
-
var DTOThreadEventMessagesUpdated =
|
|
10621
|
-
type:
|
|
10109
|
+
var DTOThreadEventMessagesUpdated = z319.object({
|
|
10110
|
+
type: z319.literal("MessagesUpdated"),
|
|
10622
10111
|
data: DTOThreadMessage.array()
|
|
10623
10112
|
});
|
|
10624
|
-
var DTOThreadEventReactionsSent =
|
|
10625
|
-
type:
|
|
10113
|
+
var DTOThreadEventReactionsSent = z319.object({
|
|
10114
|
+
type: z319.literal("ReactionsSent"),
|
|
10626
10115
|
data: DTOThreadReaction.array()
|
|
10627
10116
|
});
|
|
10628
|
-
var DTOThreadEventReactionsDeleted =
|
|
10629
|
-
type:
|
|
10117
|
+
var DTOThreadEventReactionsDeleted = z319.object({
|
|
10118
|
+
type: z319.literal("ReactionsDeleted"),
|
|
10630
10119
|
data: DTOThreadReaction.array()
|
|
10631
10120
|
});
|
|
10632
|
-
var DTOThreadEvent =
|
|
10633
|
-
DTOThreadEventMessagesSent,
|
|
10634
|
-
DTOThreadEventMessagesUpdated,
|
|
10635
|
-
DTOThreadEventReactionsSent,
|
|
10636
|
-
DTOThreadEventReactionsDeleted
|
|
10637
|
-
]);
|
|
10638
|
-
|
|
10639
|
-
// src/api/dto/forge/project-section.ts
|
|
10640
|
-
import
|
|
10641
|
-
var AfterSectionId =
|
|
10642
|
-
var DTOForgeSection = ForgeSection;
|
|
10643
|
-
var DTOForgeSectionCreateInput = DTOForgeSection.pick({
|
|
10121
|
+
var DTOThreadEvent = z319.discriminatedUnion("type", [
|
|
10122
|
+
DTOThreadEventMessagesSent,
|
|
10123
|
+
DTOThreadEventMessagesUpdated,
|
|
10124
|
+
DTOThreadEventReactionsSent,
|
|
10125
|
+
DTOThreadEventReactionsDeleted
|
|
10126
|
+
]);
|
|
10127
|
+
|
|
10128
|
+
// src/api/dto/forge/project-section.ts
|
|
10129
|
+
import z320 from "zod";
|
|
10130
|
+
var AfterSectionId = z320.string().uuid().nullish().optional();
|
|
10131
|
+
var DTOForgeSection = ForgeSection;
|
|
10132
|
+
var DTOForgeSectionCreateInput = DTOForgeSection.pick({
|
|
10133
|
+
id: true,
|
|
10134
|
+
name: true,
|
|
10135
|
+
childType: true
|
|
10136
|
+
}).extend({
|
|
10137
|
+
afterSectionId: AfterSectionId
|
|
10138
|
+
});
|
|
10139
|
+
var DTOForgeSectionUpdateInput = DTOForgeSection.pick({ id: true, name: true });
|
|
10140
|
+
var DTOForgeSectionDeleteInput = DTOForgeSection.pick({ id: true }).extend({
|
|
10141
|
+
deleteChildren: z320.boolean().default(false)
|
|
10142
|
+
});
|
|
10143
|
+
var DTOForgeSectionMoveInput = DTOForgeSection.pick({ id: true }).extend({
|
|
10144
|
+
afterSectionId: AfterSectionId
|
|
10145
|
+
});
|
|
10146
|
+
var DTOForgeSectionItemMoveInput = z320.object({
|
|
10147
|
+
id: Id,
|
|
10148
|
+
sectionId: Id.nullish().optional(),
|
|
10149
|
+
// undefined=stay, null=no section, string=move to section
|
|
10150
|
+
afterId: Id.nullish().optional()
|
|
10151
|
+
// undefined=end, null=beginning, string=after artifact
|
|
10152
|
+
});
|
|
10153
|
+
|
|
10154
|
+
// src/api/dto/forge/project-artifact.ts
|
|
10155
|
+
var DTOForgeProjectArtifact = ForgeProjectArtifact;
|
|
10156
|
+
var DTOForgeProjectArtifactUpdateInput = z321.object({
|
|
10157
|
+
id: z321.string(),
|
|
10158
|
+
title: z321.string().optional(),
|
|
10159
|
+
isArchived: z321.boolean().optional()
|
|
10160
|
+
});
|
|
10161
|
+
var DTOForgeProjectArtifactCreateInput = z321.object({
|
|
10162
|
+
id: z321.string(),
|
|
10163
|
+
title: z321.string(),
|
|
10164
|
+
sectionId: z321.string().optional(),
|
|
10165
|
+
afterArtifactId: z321.string().optional().nullable(),
|
|
10166
|
+
initialMessage: DTOThreadMessageCreateInput.optional()
|
|
10167
|
+
});
|
|
10168
|
+
var DTOForgeProjectArtifactDeleteInput = z321.object({
|
|
10169
|
+
id: Id
|
|
10170
|
+
});
|
|
10171
|
+
var DTOForgeProjectArtifactMoveInput = DTOForgeSectionItemMoveInput;
|
|
10172
|
+
var DTOForgeDocumentGetByIdParam = z321.object({
|
|
10173
|
+
id: Id
|
|
10174
|
+
});
|
|
10175
|
+
var DTOForgeProjectArtifactGetResponse = z321.object({
|
|
10176
|
+
artifact: DTOForgeProjectArtifact
|
|
10177
|
+
});
|
|
10178
|
+
var DTOForgeDocumentGetResponse = z321.object({
|
|
10179
|
+
document: DTOForgeProjectArtifact
|
|
10180
|
+
});
|
|
10181
|
+
var DTOForgeProjectArtifactCreateResponse = z321.object({
|
|
10182
|
+
artifact: DTOForgeProjectArtifact
|
|
10183
|
+
});
|
|
10184
|
+
var DTOForgeProjectArtifactUpdateResponse = z321.object({
|
|
10185
|
+
artifact: DTOForgeProjectArtifact
|
|
10186
|
+
});
|
|
10187
|
+
var DTOForgeProjectArtifactDeleteResponse = z321.object({
|
|
10188
|
+
ok: z321.literal(true)
|
|
10189
|
+
});
|
|
10190
|
+
var DTOForgeProjectArtifactMoveResponse = z321.object({
|
|
10191
|
+
artifact: DTOForgeProjectArtifact
|
|
10192
|
+
});
|
|
10193
|
+
var DTOForgeProjectArtifactsListResponse = z321.object({
|
|
10194
|
+
artifacts: z321.array(DTOForgeProjectArtifact)
|
|
10195
|
+
});
|
|
10196
|
+
var DTOForgeProjectArtifactContentResponse = z321.object({
|
|
10197
|
+
artifactId: z321.string(),
|
|
10198
|
+
content: ForgeProjectArtifactContentData
|
|
10199
|
+
});
|
|
10200
|
+
|
|
10201
|
+
// src/api/dto/forge/project-feature.ts
|
|
10202
|
+
import z322 from "zod";
|
|
10203
|
+
var DTOFeaturePublishedStateUpdateInput = FeaturePublishedState.pick({
|
|
10204
|
+
iterationId: true,
|
|
10205
|
+
hideSupernovaUI: true,
|
|
10206
|
+
visibility: true
|
|
10207
|
+
});
|
|
10208
|
+
var DTOForgeProjectFeature = ProjectFeature;
|
|
10209
|
+
var DTOForgeProjectPublishedFeature = z322.object({
|
|
10210
|
+
featureName: z322.string(),
|
|
10211
|
+
iterationName: z322.string(),
|
|
10212
|
+
hideSupernovaUI: z322.boolean(),
|
|
10213
|
+
thumbnailUrl: z322.string().optional(),
|
|
10214
|
+
staticPreviewUrl: z322.string(),
|
|
10215
|
+
// These are only included when authenticated user has access to the project (for both public & private published features)
|
|
10216
|
+
projectId: z322.string().optional(),
|
|
10217
|
+
projectName: z322.string().optional(),
|
|
10218
|
+
workspaceId: z322.string().optional()
|
|
10219
|
+
});
|
|
10220
|
+
var DTOForgeProjectPublishedFeatureGetResponse = z322.object({
|
|
10221
|
+
publishedFeature: DTOForgeProjectPublishedFeature
|
|
10222
|
+
});
|
|
10223
|
+
var DTOForgeProjectFeatureListResponse = z322.object({
|
|
10224
|
+
features: DTOForgeProjectFeature.array()
|
|
10225
|
+
});
|
|
10226
|
+
var DTOForgeProjectFeatureGetResponse = z322.object({
|
|
10227
|
+
feature: DTOForgeProjectFeature
|
|
10228
|
+
});
|
|
10229
|
+
var DTOForgeProjectFeatureCreateInput = z322.object({
|
|
10230
|
+
id: Id,
|
|
10231
|
+
name: z322.string().optional(),
|
|
10232
|
+
description: z322.string(),
|
|
10233
|
+
sectionId: Id.optional(),
|
|
10234
|
+
afterFeatureId: Id.nullable().optional(),
|
|
10235
|
+
initialMessage: DTOThreadMessageCreateInput
|
|
10236
|
+
});
|
|
10237
|
+
var DTOForgeProjectFeatureUpdateInput = z322.object({
|
|
10238
|
+
id: Id,
|
|
10239
|
+
name: z322.string().optional(),
|
|
10240
|
+
description: z322.string().optional(),
|
|
10241
|
+
isArchived: z322.boolean().optional(),
|
|
10242
|
+
status: ProjectFeatureStatus.optional(),
|
|
10243
|
+
/**
|
|
10244
|
+
* Sending null will result in feature unpublish
|
|
10245
|
+
*/
|
|
10246
|
+
publishedState: DTOFeaturePublishedStateUpdateInput.nullish()
|
|
10247
|
+
});
|
|
10248
|
+
var DTOForgeProjectFeatureDeleteInput = z322.object({
|
|
10249
|
+
id: Id
|
|
10250
|
+
});
|
|
10251
|
+
var DTOForgeProjectFeatureGetByIdParam = z322.object({
|
|
10252
|
+
id: Id
|
|
10253
|
+
});
|
|
10254
|
+
var DTOFeatureArtifactListQuery = z322.object({
|
|
10255
|
+
messageId: z322.string().optional(),
|
|
10256
|
+
iterationId: z322.string().optional()
|
|
10257
|
+
});
|
|
10258
|
+
var DTOForgeProjectFeatureMoveInput = DTOForgeSectionItemMoveInput;
|
|
10259
|
+
|
|
10260
|
+
// src/api/dto/forge/project-action.ts
|
|
10261
|
+
var DTOForgeProjectActionFeatureCreate = z323.object({
|
|
10262
|
+
type: z323.literal("FeatureCreate"),
|
|
10263
|
+
input: DTOForgeProjectFeatureCreateInput
|
|
10264
|
+
});
|
|
10265
|
+
var DTOForgeProjectActionFeatureUpdate = z323.object({
|
|
10266
|
+
type: z323.literal("FeatureUpdate"),
|
|
10267
|
+
input: DTOForgeProjectFeatureUpdateInput
|
|
10268
|
+
});
|
|
10269
|
+
var DTOForgeProjectActionFeatureMove = z323.object({
|
|
10270
|
+
type: z323.literal("FeatureMove"),
|
|
10271
|
+
input: DTOForgeProjectFeatureMoveInput
|
|
10272
|
+
});
|
|
10273
|
+
var DTOForgeProjectActionFeatureDelete = z323.object({
|
|
10274
|
+
type: z323.literal("FeatureDelete"),
|
|
10275
|
+
input: DTOForgeProjectFeatureDeleteInput
|
|
10276
|
+
});
|
|
10277
|
+
var DTOForgeProjectActionArtifactCreate = z323.object({
|
|
10278
|
+
type: z323.literal("ArtifactCreate"),
|
|
10279
|
+
input: DTOForgeProjectArtifactCreateInput
|
|
10280
|
+
});
|
|
10281
|
+
var DTOForgeProjectActionArtifactUpdate = z323.object({
|
|
10282
|
+
type: z323.literal("ArtifactUpdate"),
|
|
10283
|
+
input: DTOForgeProjectArtifactUpdateInput
|
|
10284
|
+
});
|
|
10285
|
+
var DTOForgeProjectActionArtifactDelete = z323.object({
|
|
10286
|
+
type: z323.literal("ArtifactDelete"),
|
|
10287
|
+
input: DTOForgeProjectArtifactDeleteInput
|
|
10288
|
+
});
|
|
10289
|
+
var DTOForgeProjectActionArtifactMove = z323.object({
|
|
10290
|
+
type: z323.literal("ArtifactMove"),
|
|
10291
|
+
input: DTOForgeProjectArtifactMoveInput
|
|
10292
|
+
});
|
|
10293
|
+
var DTOForgeProjectActionSectionCreate = z323.object({
|
|
10294
|
+
type: z323.literal("SectionCreate"),
|
|
10295
|
+
input: DTOForgeSectionCreateInput
|
|
10296
|
+
});
|
|
10297
|
+
var DTOForgeProjectActionSectionUpdate = z323.object({
|
|
10298
|
+
type: z323.literal("SectionUpdate"),
|
|
10299
|
+
input: DTOForgeSectionUpdateInput
|
|
10300
|
+
});
|
|
10301
|
+
var DTOForgeProjectActionSectionDelete = z323.object({
|
|
10302
|
+
type: z323.literal("SectionDelete"),
|
|
10303
|
+
input: DTOForgeSectionDeleteInput
|
|
10304
|
+
});
|
|
10305
|
+
var DTOForgeProjectActionSectionMove = z323.object({
|
|
10306
|
+
type: z323.literal("SectionMove"),
|
|
10307
|
+
input: DTOForgeSectionMoveInput
|
|
10308
|
+
});
|
|
10309
|
+
var DTOForgeProjectAction = z323.discriminatedUnion("type", [
|
|
10310
|
+
//features
|
|
10311
|
+
DTOForgeProjectActionFeatureCreate,
|
|
10312
|
+
DTOForgeProjectActionFeatureUpdate,
|
|
10313
|
+
DTOForgeProjectActionFeatureDelete,
|
|
10314
|
+
DTOForgeProjectActionFeatureMove,
|
|
10315
|
+
//artifacts
|
|
10316
|
+
DTOForgeProjectActionArtifactCreate,
|
|
10317
|
+
DTOForgeProjectActionArtifactUpdate,
|
|
10318
|
+
DTOForgeProjectActionArtifactDelete,
|
|
10319
|
+
DTOForgeProjectActionArtifactMove,
|
|
10320
|
+
//section
|
|
10321
|
+
DTOForgeProjectActionSectionCreate,
|
|
10322
|
+
DTOForgeProjectActionSectionUpdate,
|
|
10323
|
+
DTOForgeProjectActionSectionDelete,
|
|
10324
|
+
DTOForgeProjectActionSectionMove
|
|
10325
|
+
]).and(
|
|
10326
|
+
z323.object({
|
|
10327
|
+
tId: z323.string().optional()
|
|
10328
|
+
})
|
|
10329
|
+
);
|
|
10330
|
+
|
|
10331
|
+
// src/api/dto/forge/project-artifact-room.ts
|
|
10332
|
+
import { z as z324 } from "zod";
|
|
10333
|
+
var DTOForgeProjectArtifactRoom = z324.object({
|
|
10334
|
+
id: z324.string()
|
|
10335
|
+
});
|
|
10336
|
+
var DTOForgeProjectArtifactRoomResponse = z324.object({
|
|
10337
|
+
room: DTOForgeProjectArtifactRoom
|
|
10338
|
+
});
|
|
10339
|
+
|
|
10340
|
+
// src/api/dto/forge/project-context-override.ts
|
|
10341
|
+
import z326 from "zod";
|
|
10342
|
+
|
|
10343
|
+
// src/api/dto/forge/project-context-v2.ts
|
|
10344
|
+
import { z as z325 } from "zod";
|
|
10345
|
+
var DTOForgeComponentSetTypeV2 = z325.enum(["Shadcn"]);
|
|
10346
|
+
var DTOForgeComponentSet = z325.object({
|
|
10347
|
+
type: DTOForgeComponentSetTypeV2
|
|
10348
|
+
});
|
|
10349
|
+
var DTOForgeIconSetTypeV2 = z325.enum(["Phosphor", "Lucide", "Tabler"]);
|
|
10350
|
+
var DTOForgeThemeKnownPreset = z325.enum(["Default", "Airbnb", "Spotify", "Windows98"]);
|
|
10351
|
+
var DTOForgeIconSet = z325.object({
|
|
10352
|
+
type: DTOForgeIconSetTypeV2,
|
|
10353
|
+
variant: z325.string().optional()
|
|
10354
|
+
});
|
|
10355
|
+
var DTOForgeTokenThemeSet = z325.object({
|
|
10356
|
+
id: z325.string(),
|
|
10357
|
+
name: z325.string(),
|
|
10358
|
+
tokenThemeIds: z325.array(z325.string())
|
|
10359
|
+
});
|
|
10360
|
+
var DTOForgeProjectTheme = z325.object({
|
|
10361
|
+
// Colors
|
|
10362
|
+
background: ColorTokenData,
|
|
10363
|
+
foreground: ColorTokenData,
|
|
10364
|
+
card: ColorTokenData,
|
|
10365
|
+
cardForeground: ColorTokenData,
|
|
10366
|
+
popover: ColorTokenData,
|
|
10367
|
+
popoverForeground: ColorTokenData,
|
|
10368
|
+
primary: ColorTokenData,
|
|
10369
|
+
primaryForeground: ColorTokenData,
|
|
10370
|
+
secondary: ColorTokenData,
|
|
10371
|
+
secondaryForeground: ColorTokenData,
|
|
10372
|
+
muted: ColorTokenData,
|
|
10373
|
+
mutedForeground: ColorTokenData,
|
|
10374
|
+
accent: ColorTokenData,
|
|
10375
|
+
accentForeground: ColorTokenData,
|
|
10376
|
+
destructive: ColorTokenData,
|
|
10377
|
+
border: ColorTokenData,
|
|
10378
|
+
input: ColorTokenData,
|
|
10379
|
+
ring: ColorTokenData,
|
|
10380
|
+
chart1: ColorTokenData,
|
|
10381
|
+
chart2: ColorTokenData,
|
|
10382
|
+
chart3: ColorTokenData,
|
|
10383
|
+
chart4: ColorTokenData,
|
|
10384
|
+
chart5: ColorTokenData,
|
|
10385
|
+
sidebar: ColorTokenData,
|
|
10386
|
+
sidebarForeground: ColorTokenData,
|
|
10387
|
+
sidebarPrimary: ColorTokenData,
|
|
10388
|
+
sidebarPrimaryForeground: ColorTokenData,
|
|
10389
|
+
sidebarAccent: ColorTokenData,
|
|
10390
|
+
sidebarAccentForeground: ColorTokenData,
|
|
10391
|
+
sidebarBorder: ColorTokenData,
|
|
10392
|
+
sidebarRing: ColorTokenData,
|
|
10393
|
+
// Font family
|
|
10394
|
+
fontFamily: FontFamilyTokenData,
|
|
10395
|
+
// Font sizes
|
|
10396
|
+
textXs: FontSizeTokenData,
|
|
10397
|
+
textSm: FontSizeTokenData,
|
|
10398
|
+
textBase: FontSizeTokenData,
|
|
10399
|
+
textLg: FontSizeTokenData,
|
|
10400
|
+
textXl: FontSizeTokenData,
|
|
10401
|
+
text2xl: FontSizeTokenData,
|
|
10402
|
+
text3xl: FontSizeTokenData,
|
|
10403
|
+
text4xl: FontSizeTokenData,
|
|
10404
|
+
text5xl: FontSizeTokenData,
|
|
10405
|
+
text6xl: FontSizeTokenData,
|
|
10406
|
+
text7xl: FontSizeTokenData,
|
|
10407
|
+
text8xl: FontSizeTokenData,
|
|
10408
|
+
text9xl: FontSizeTokenData,
|
|
10409
|
+
// Line heights
|
|
10410
|
+
textXsLineHeight: LineHeightTokenData,
|
|
10411
|
+
textSmLineHeight: LineHeightTokenData,
|
|
10412
|
+
textBaseLineHeight: LineHeightTokenData,
|
|
10413
|
+
textLgLineHeight: LineHeightTokenData,
|
|
10414
|
+
textXlLineHeight: LineHeightTokenData,
|
|
10415
|
+
text2xlLineHeight: LineHeightTokenData,
|
|
10416
|
+
text3xlLineHeight: LineHeightTokenData,
|
|
10417
|
+
text4xlLineHeight: LineHeightTokenData,
|
|
10418
|
+
text5xlLineHeight: LineHeightTokenData,
|
|
10419
|
+
text6xlLineHeight: LineHeightTokenData,
|
|
10420
|
+
text7xlLineHeight: LineHeightTokenData,
|
|
10421
|
+
text8xlLineHeight: LineHeightTokenData,
|
|
10422
|
+
text9xlLineHeight: LineHeightTokenData,
|
|
10423
|
+
// Font weights
|
|
10424
|
+
fontWeightThin: FontWeightTokenData,
|
|
10425
|
+
fontWeightExtralight: FontWeightTokenData,
|
|
10426
|
+
fontWeightLight: FontWeightTokenData,
|
|
10427
|
+
fontWeightNormal: FontWeightTokenData,
|
|
10428
|
+
fontWeightMedium: FontWeightTokenData,
|
|
10429
|
+
fontWeightSemibold: FontWeightTokenData,
|
|
10430
|
+
fontWeightBold: FontWeightTokenData,
|
|
10431
|
+
fontWeightExtrabold: FontWeightTokenData,
|
|
10432
|
+
fontWeightBlack: FontWeightTokenData,
|
|
10433
|
+
// Other dimensions
|
|
10434
|
+
radius: BorderRadiusTokenData,
|
|
10435
|
+
spacing: SpaceTokenData,
|
|
10436
|
+
// Shadows
|
|
10437
|
+
shadow2xs: ShadowTokenData,
|
|
10438
|
+
shadowXs: ShadowTokenData,
|
|
10439
|
+
shadowSm: ShadowTokenData,
|
|
10440
|
+
shadowMd: ShadowTokenData,
|
|
10441
|
+
shadowLg: ShadowTokenData,
|
|
10442
|
+
shadowXl: ShadowTokenData,
|
|
10443
|
+
shadow2xl: ShadowTokenData
|
|
10444
|
+
});
|
|
10445
|
+
var DTOForgeProjectContextV2 = z325.object({
|
|
10446
|
+
id: z325.string(),
|
|
10447
|
+
name: z325.string(),
|
|
10448
|
+
workspaceId: z325.string(),
|
|
10449
|
+
designSystemId: z325.string().optional(),
|
|
10450
|
+
brandId: z325.string().optional(),
|
|
10451
|
+
defaultTokenThemeSetId: z325.string().optional(),
|
|
10452
|
+
description: z325.string().optional(),
|
|
10453
|
+
productContext: z325.string().optional(),
|
|
10454
|
+
additionalContext: z325.string().optional(),
|
|
10455
|
+
isArchived: z325.boolean(),
|
|
10456
|
+
themePreset: z325.string().optional(),
|
|
10457
|
+
tokenThemeSets: z325.array(DTOForgeTokenThemeSet).optional(),
|
|
10458
|
+
componentSet: DTOForgeComponentSet,
|
|
10459
|
+
iconSet: DTOForgeIconSet,
|
|
10460
|
+
theme: DTOForgeProjectTheme,
|
|
10461
|
+
createdAt: z325.coerce.date(),
|
|
10462
|
+
updatedAt: z325.coerce.date(),
|
|
10463
|
+
thumbnail: DTOFileReference.optional(),
|
|
10464
|
+
sandboxTemplate: z325.object({
|
|
10465
|
+
id: z325.string(),
|
|
10466
|
+
version: z325.string()
|
|
10467
|
+
}).optional()
|
|
10468
|
+
});
|
|
10469
|
+
var DTOForgeProjectContextCreateV2 = DTOForgeProjectContextV2.omit({
|
|
10644
10470
|
id: true,
|
|
10645
|
-
|
|
10646
|
-
|
|
10471
|
+
createdAt: true,
|
|
10472
|
+
updatedAt: true,
|
|
10473
|
+
isArchived: true,
|
|
10474
|
+
thumbnail: true
|
|
10647
10475
|
}).extend({
|
|
10648
|
-
|
|
10649
|
-
});
|
|
10650
|
-
var DTOForgeSectionUpdateInput = DTOForgeSection.pick({ id: true, name: true });
|
|
10651
|
-
var DTOForgeSectionDeleteInput = DTOForgeSection.pick({ id: true }).extend({
|
|
10652
|
-
deleteChildren: z327.boolean().default(false)
|
|
10476
|
+
thumbnailFileId: z325.string().optional()
|
|
10653
10477
|
});
|
|
10654
|
-
var
|
|
10655
|
-
|
|
10478
|
+
var DTOForgeProjectContextUpdateV2 = DTOForgeProjectContextV2.omit({
|
|
10479
|
+
id: true,
|
|
10480
|
+
workspaceId: true,
|
|
10481
|
+
createdAt: true,
|
|
10482
|
+
updatedAt: true,
|
|
10483
|
+
thumbnail: true
|
|
10484
|
+
}).partial().extend({
|
|
10485
|
+
thumbnailFileId: z325.string().optional()
|
|
10656
10486
|
});
|
|
10657
|
-
var
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
afterId: Id.nullish().optional()
|
|
10662
|
-
// undefined=end, null=beginning, string=after artifact
|
|
10487
|
+
var DTOForgeProjectContextResponseV2 = z325.object({ context: DTOForgeProjectContextV2 });
|
|
10488
|
+
var DTOForgeProjectContextListQueryV2 = z325.object({
|
|
10489
|
+
workspaceId: z325.string(),
|
|
10490
|
+
isArchived: zodQueryBoolean()
|
|
10663
10491
|
});
|
|
10492
|
+
var DTOForgeProjectContextListResponseV2 = z325.object({ contexts: z325.array(DTOForgeProjectContextV2) });
|
|
10664
10493
|
|
|
10665
|
-
// src/api/dto/forge/project-
|
|
10666
|
-
var
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
isArchived: z328.boolean().optional()
|
|
10671
|
-
});
|
|
10672
|
-
var DTOForgeProjectArtifactCreateInput = z328.object({
|
|
10673
|
-
id: z328.string(),
|
|
10674
|
-
title: z328.string(),
|
|
10675
|
-
sectionId: z328.string().optional(),
|
|
10676
|
-
afterArtifactId: z328.string().optional().nullable(),
|
|
10677
|
-
initialMessage: DTOThreadMessageCreateInput.optional()
|
|
10678
|
-
});
|
|
10679
|
-
var DTOForgeProjectArtifactDeleteInput = z328.object({
|
|
10680
|
-
id: Id
|
|
10681
|
-
});
|
|
10682
|
-
var DTOForgeProjectArtifactMoveInput = DTOForgeSectionItemMoveInput;
|
|
10683
|
-
var DTOForgeDocumentGetByIdParam = z328.object({
|
|
10684
|
-
id: Id
|
|
10685
|
-
});
|
|
10686
|
-
var DTOForgeProjectArtifactGetResponse = z328.object({
|
|
10687
|
-
artifact: DTOForgeProjectArtifact
|
|
10688
|
-
});
|
|
10689
|
-
var DTOForgeDocumentGetResponse = z328.object({
|
|
10690
|
-
document: DTOForgeProjectArtifact
|
|
10691
|
-
});
|
|
10692
|
-
var DTOForgeProjectArtifactCreateResponse = z328.object({
|
|
10693
|
-
artifact: DTOForgeProjectArtifact
|
|
10694
|
-
});
|
|
10695
|
-
var DTOForgeProjectArtifactUpdateResponse = z328.object({
|
|
10696
|
-
artifact: DTOForgeProjectArtifact
|
|
10494
|
+
// src/api/dto/forge/project-context-override.ts
|
|
10495
|
+
var DTOProjectContextOverride = z326.object({
|
|
10496
|
+
projectId: z326.string(),
|
|
10497
|
+
theme: DTOForgeProjectTheme.partial(),
|
|
10498
|
+
themePreset: z326.string().optional()
|
|
10697
10499
|
});
|
|
10698
|
-
var
|
|
10699
|
-
|
|
10500
|
+
var DTOProjectContextOverrideInput = z326.object({
|
|
10501
|
+
updateSharedContext: z326.boolean().optional(),
|
|
10502
|
+
theme: DTOForgeProjectTheme.partial(),
|
|
10503
|
+
themePreset: z326.string().optional()
|
|
10700
10504
|
});
|
|
10701
|
-
var
|
|
10702
|
-
|
|
10505
|
+
var DTOProjectContextOverrideResponse = z326.object({
|
|
10506
|
+
override: DTOProjectContextOverride,
|
|
10507
|
+
originalContext: DTOForgeProjectContextV2,
|
|
10508
|
+
resolvedContext: DTOForgeProjectContextV2
|
|
10703
10509
|
});
|
|
10704
|
-
|
|
10705
|
-
|
|
10510
|
+
|
|
10511
|
+
// src/api/dto/forge/project-context.ts
|
|
10512
|
+
import { z as z327 } from "zod";
|
|
10513
|
+
var DTOForgeProjectContext = z327.object({
|
|
10514
|
+
definition: z327.string(),
|
|
10515
|
+
dependencies: z327.array(
|
|
10516
|
+
z327.object({
|
|
10517
|
+
packageName: z327.string(),
|
|
10518
|
+
type: z327.literal("npm"),
|
|
10519
|
+
version: z327.string().default("latest")
|
|
10520
|
+
})
|
|
10521
|
+
),
|
|
10522
|
+
designSystemId: z327.string(),
|
|
10523
|
+
id: z327.string(),
|
|
10524
|
+
meta: z327.object({
|
|
10525
|
+
name: z327.string(),
|
|
10526
|
+
description: z327.string().optional()
|
|
10527
|
+
}),
|
|
10528
|
+
name: z327.string(),
|
|
10529
|
+
npmProxySettings: DTONpmRegistryConfig.optional(),
|
|
10530
|
+
platform: z327.enum(["React", "Vue", "Angular"]),
|
|
10531
|
+
styling: z327.enum(["CSS", "Tailwind"]),
|
|
10532
|
+
tailwindConfig: z327.object({
|
|
10533
|
+
content: z327.string(),
|
|
10534
|
+
version: z327.string()
|
|
10535
|
+
}).optional(),
|
|
10536
|
+
createdAt: z327.coerce.date(),
|
|
10537
|
+
updatedAt: z327.coerce.date(),
|
|
10538
|
+
workspaceId: z327.string()
|
|
10706
10539
|
});
|
|
10707
|
-
var
|
|
10708
|
-
|
|
10709
|
-
|
|
10540
|
+
var DTOCreateForgeProjectContext = DTOForgeProjectContext.pick({
|
|
10541
|
+
definition: true,
|
|
10542
|
+
name: true,
|
|
10543
|
+
meta: true,
|
|
10544
|
+
designSystemId: true,
|
|
10545
|
+
platform: true,
|
|
10546
|
+
dependencies: true,
|
|
10547
|
+
tailwindConfig: true,
|
|
10548
|
+
styling: true
|
|
10549
|
+
}).extend({ npmProxySettings: DTONpmRegistryConfig });
|
|
10550
|
+
var DTOUpdateForgeProjectContext = DTOCreateForgeProjectContext.partial().extend({ id: z327.string() });
|
|
10551
|
+
var DTOForgeProjectContextGetResponse = z327.object({ context: DTOForgeProjectContext });
|
|
10552
|
+
var DTOForgeProjectContextListResponse = z327.object({ contexts: z327.array(DTOForgeProjectContext) });
|
|
10553
|
+
var DTOForgeProjectContextCreateResponse = z327.object({ context: DTOForgeProjectContext });
|
|
10554
|
+
var DTOForgeProjectContextUpdateResponse = z327.object({ context: DTOForgeProjectContext });
|
|
10555
|
+
var DTOForgeProjectContextRemoveResponse = z327.object({
|
|
10556
|
+
ok: z327.literal(true)
|
|
10710
10557
|
});
|
|
10711
10558
|
|
|
10712
|
-
// src/api/dto/forge/project-
|
|
10713
|
-
|
|
10714
|
-
var
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10559
|
+
// src/api/dto/forge/project-figma-node.ts
|
|
10560
|
+
var DTOForgeProjectFigmaNode = ForgeProjectFigmaNode;
|
|
10561
|
+
var DTOForgeProjectFigmaNodeRenderInput = ForgeProjectFigmaNodeRenderInput;
|
|
10562
|
+
|
|
10563
|
+
// src/api/dto/forge/project-file.ts
|
|
10564
|
+
import { z as z328 } from "zod";
|
|
10565
|
+
var DTOForgeProjectFile = z328.object({
|
|
10566
|
+
id: z328.string(),
|
|
10567
|
+
name: z328.string(),
|
|
10568
|
+
checksum: z328.string(),
|
|
10569
|
+
pendingUpload: z328.boolean().optional(),
|
|
10570
|
+
url: z328.string(),
|
|
10571
|
+
size: z328.number()
|
|
10572
|
+
});
|
|
10573
|
+
var DTOForgeProjectFileListResponse = z328.object({
|
|
10574
|
+
files: z328.array(DTOForgeProjectFile)
|
|
10575
|
+
});
|
|
10576
|
+
var DTOForgeProjectFileUploadPayloadItem = z328.object({
|
|
10577
|
+
size: z328.number(),
|
|
10578
|
+
name: z328.string(),
|
|
10579
|
+
checksum: z328.string()
|
|
10580
|
+
});
|
|
10581
|
+
var DTOForgeProjectFileUploadPayload = z328.object({
|
|
10582
|
+
files: z328.array(DTOForgeProjectFileUploadPayloadItem)
|
|
10583
|
+
});
|
|
10584
|
+
var DTOForgeProjectFileUploadResponse = z328.object({
|
|
10585
|
+
files: z328.array(DTOForgeProjectFile),
|
|
10586
|
+
uploadUrls: z328.array(
|
|
10587
|
+
z328.object({
|
|
10588
|
+
fileId: z328.string(),
|
|
10589
|
+
uploadUrl: z328.string()
|
|
10590
|
+
})
|
|
10591
|
+
)
|
|
10730
10592
|
});
|
|
10731
|
-
var
|
|
10732
|
-
|
|
10593
|
+
var DTOForgeProjectFileUploadFinalizePayload = z328.object({
|
|
10594
|
+
fileIds: z328.array(z328.string())
|
|
10733
10595
|
});
|
|
10734
|
-
var
|
|
10735
|
-
|
|
10596
|
+
var DTOForgeProjectFileUploadFinalizeResponse = z328.object({ ok: z328.literal(true) });
|
|
10597
|
+
|
|
10598
|
+
// src/api/dto/forge/project-invitation.ts
|
|
10599
|
+
import { z as z329 } from "zod";
|
|
10600
|
+
var DTOForgeProjectInvitation = ForgeProjectInvitation;
|
|
10601
|
+
var DTOCreateForgeProjectInvitation = DTOForgeProjectInvitation.pick({
|
|
10602
|
+
email: true,
|
|
10603
|
+
role: true
|
|
10736
10604
|
});
|
|
10737
|
-
var
|
|
10738
|
-
|
|
10605
|
+
var DTOUpdateForgeProjectInvitation = DTOCreateForgeProjectInvitation;
|
|
10606
|
+
var DTORemoveForgeProjectInvitation = DTOCreateForgeProjectInvitation.pick({
|
|
10607
|
+
email: true
|
|
10739
10608
|
});
|
|
10740
|
-
var
|
|
10741
|
-
|
|
10742
|
-
name: z329.string().optional(),
|
|
10743
|
-
description: z329.string(),
|
|
10744
|
-
sectionId: Id.optional(),
|
|
10745
|
-
afterFeatureId: Id.nullable().optional(),
|
|
10746
|
-
initialMessage: DTOThreadMessageCreateInput
|
|
10609
|
+
var DTOForgeProjectInvitationsListResponse = z329.object({
|
|
10610
|
+
invitations: z329.array(DTOForgeProjectInvitation)
|
|
10747
10611
|
});
|
|
10748
|
-
var
|
|
10749
|
-
|
|
10750
|
-
name: z329.string().optional(),
|
|
10751
|
-
description: z329.string().optional(),
|
|
10752
|
-
isArchived: z329.boolean().optional(),
|
|
10753
|
-
status: ProjectFeatureStatus.optional(),
|
|
10754
|
-
/**
|
|
10755
|
-
* Sending null will result in feature unpublish
|
|
10756
|
-
*/
|
|
10757
|
-
publishedState: DTOFeaturePublishedStateUpdateInput.nullish()
|
|
10612
|
+
var DTOForgeProjectInvitationGetResponse = z329.object({
|
|
10613
|
+
invitation: DTOForgeProjectInvitation
|
|
10758
10614
|
});
|
|
10759
|
-
var
|
|
10760
|
-
|
|
10615
|
+
var DTOForgeProjectInvitationCreateResponse = z329.object({
|
|
10616
|
+
invitation: DTOForgeProjectInvitation
|
|
10761
10617
|
});
|
|
10762
|
-
var
|
|
10763
|
-
|
|
10618
|
+
var DTOForgeProjectInvitationUpdateResponse = z329.object({
|
|
10619
|
+
invitation: DTOForgeProjectInvitation.nullable()
|
|
10764
10620
|
});
|
|
10765
|
-
var
|
|
10766
|
-
|
|
10767
|
-
iterationId: z329.string().optional()
|
|
10621
|
+
var DTOForgeProjectInvitationRemoveResponse = z329.object({
|
|
10622
|
+
ok: z329.literal(true)
|
|
10768
10623
|
});
|
|
10769
|
-
var DTOForgeProjectFeatureMoveInput = DTOForgeSectionItemMoveInput;
|
|
10770
10624
|
|
|
10771
|
-
// src/api/dto/forge/project-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
input: DTOForgeProjectFeatureMoveInput
|
|
10783
|
-
});
|
|
10784
|
-
var DTOForgeProjectActionFeatureDelete = z330.object({
|
|
10785
|
-
type: z330.literal("FeatureDelete"),
|
|
10786
|
-
input: DTOForgeProjectFeatureDeleteInput
|
|
10787
|
-
});
|
|
10788
|
-
var DTOForgeProjectActionArtifactCreate = z330.object({
|
|
10789
|
-
type: z330.literal("ArtifactCreate"),
|
|
10790
|
-
input: DTOForgeProjectArtifactCreateInput
|
|
10791
|
-
});
|
|
10792
|
-
var DTOForgeProjectActionArtifactUpdate = z330.object({
|
|
10793
|
-
type: z330.literal("ArtifactUpdate"),
|
|
10794
|
-
input: DTOForgeProjectArtifactUpdateInput
|
|
10795
|
-
});
|
|
10796
|
-
var DTOForgeProjectActionArtifactDelete = z330.object({
|
|
10797
|
-
type: z330.literal("ArtifactDelete"),
|
|
10798
|
-
input: DTOForgeProjectArtifactDeleteInput
|
|
10625
|
+
// src/api/dto/forge/project-iteration-old.ts
|
|
10626
|
+
import { z as z330 } from "zod";
|
|
10627
|
+
var DTOForgeProjectIterationMergeMeta = ForgeProjectIterationMergeMeta;
|
|
10628
|
+
var DTOForgeProjectIteration = ForgeProjectIteration.omit({
|
|
10629
|
+
artifacts: true,
|
|
10630
|
+
messages: true,
|
|
10631
|
+
mergeMeta: true
|
|
10632
|
+
}).extend({
|
|
10633
|
+
artifacts: DTOForgeArtifact.array(),
|
|
10634
|
+
messages: DTOForgeIterationMessage.array(),
|
|
10635
|
+
mergeMeta: DTOForgeProjectIterationMergeMeta.optional()
|
|
10799
10636
|
});
|
|
10800
|
-
var
|
|
10801
|
-
|
|
10802
|
-
input: DTOForgeProjectArtifactMoveInput
|
|
10637
|
+
var DTOGetForgeProjectIterationResponse = z330.object({
|
|
10638
|
+
iteration: DTOForgeProjectIteration.nullable()
|
|
10803
10639
|
});
|
|
10804
|
-
var
|
|
10805
|
-
|
|
10806
|
-
|
|
10640
|
+
var DTOCreateForgeProjectIteration = DTOForgeProjectIteration.omit({
|
|
10641
|
+
forgeProjectId: true,
|
|
10642
|
+
artifacts: true,
|
|
10643
|
+
messages: true,
|
|
10644
|
+
mergeMeta: true,
|
|
10645
|
+
createdAt: true
|
|
10807
10646
|
});
|
|
10808
|
-
var
|
|
10809
|
-
|
|
10810
|
-
|
|
10647
|
+
var DTOUpdateForgeProjectIteration = DTOCreateForgeProjectIteration.extend({ id: z330.string() });
|
|
10648
|
+
var DTOCreateForgeProjectIterationResponse = z330.object({
|
|
10649
|
+
iteration: DTOForgeProjectIteration
|
|
10811
10650
|
});
|
|
10812
|
-
var
|
|
10813
|
-
|
|
10814
|
-
input: DTOForgeSectionDeleteInput
|
|
10651
|
+
var DTOUpdateForgeProjectIterationResponse = z330.object({
|
|
10652
|
+
iteration: DTOForgeProjectIteration.nullable()
|
|
10815
10653
|
});
|
|
10816
|
-
var
|
|
10817
|
-
|
|
10818
|
-
input: DTOForgeSectionMoveInput
|
|
10654
|
+
var DTODeleteForgeProjectIterationResponse = z330.object({
|
|
10655
|
+
ok: z330.literal(true)
|
|
10819
10656
|
});
|
|
10820
|
-
var
|
|
10821
|
-
//features
|
|
10822
|
-
DTOForgeProjectActionFeatureCreate,
|
|
10823
|
-
DTOForgeProjectActionFeatureUpdate,
|
|
10824
|
-
DTOForgeProjectActionFeatureDelete,
|
|
10825
|
-
DTOForgeProjectActionFeatureMove,
|
|
10826
|
-
//artifacts
|
|
10827
|
-
DTOForgeProjectActionArtifactCreate,
|
|
10828
|
-
DTOForgeProjectActionArtifactUpdate,
|
|
10829
|
-
DTOForgeProjectActionArtifactDelete,
|
|
10830
|
-
DTOForgeProjectActionArtifactMove,
|
|
10831
|
-
//section
|
|
10832
|
-
DTOForgeProjectActionSectionCreate,
|
|
10833
|
-
DTOForgeProjectActionSectionUpdate,
|
|
10834
|
-
DTOForgeProjectActionSectionDelete,
|
|
10835
|
-
DTOForgeProjectActionSectionMove
|
|
10836
|
-
]).and(
|
|
10837
|
-
z330.object({
|
|
10838
|
-
tId: z330.string().optional()
|
|
10839
|
-
})
|
|
10840
|
-
);
|
|
10657
|
+
var DTOForgeProjectIterationListResponse = z330.object({ iterations: z330.array(DTOForgeProjectIteration) });
|
|
10841
10658
|
|
|
10842
|
-
// src/api/dto/forge/project-
|
|
10659
|
+
// src/api/dto/forge/project-member.ts
|
|
10843
10660
|
import { z as z331 } from "zod";
|
|
10844
|
-
var DTOForgeProjectArtifactRoom = z331.object({
|
|
10845
|
-
id: z331.string()
|
|
10846
|
-
});
|
|
10847
|
-
var DTOForgeProjectArtifactRoomResponse = z331.object({
|
|
10848
|
-
room: DTOForgeProjectArtifactRoom
|
|
10849
|
-
});
|
|
10850
10661
|
|
|
10851
|
-
// src/
|
|
10852
|
-
|
|
10853
|
-
var
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
}
|
|
10662
|
+
// src/utils/figma.ts
|
|
10663
|
+
var figmaFileIdRegex = /^[0-9a-zA-Z]{22,128}$/;
|
|
10664
|
+
var nodeIdRegex = /^\d+-\d+$/;
|
|
10665
|
+
var nodeTypeRegex = /^[0-9a-zA-Z]^/;
|
|
10666
|
+
var ParsedFigmaFileURLError = /* @__PURE__ */ ((ParsedFigmaFileURLError2) => {
|
|
10667
|
+
ParsedFigmaFileURLError2["InvalidUrl"] = "InvalidUrl";
|
|
10668
|
+
ParsedFigmaFileURLError2["InvalidFigmaFileId"] = "InvalidFigmaFileId";
|
|
10669
|
+
return ParsedFigmaFileURLError2;
|
|
10670
|
+
})(ParsedFigmaFileURLError || {});
|
|
10671
|
+
var FigmaUtils = {
|
|
10672
|
+
tryParseFigmaFileURL(urlString) {
|
|
10673
|
+
if (!URL.canParse(urlString)) {
|
|
10674
|
+
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
10675
|
+
}
|
|
10676
|
+
const url = new URL(urlString);
|
|
10677
|
+
if (!url.hostname.endsWith("figma.com")) {
|
|
10678
|
+
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
10679
|
+
}
|
|
10680
|
+
const pathSegments = url.pathname.split("/");
|
|
10681
|
+
if (pathSegments[1] !== "design" && pathSegments[1] !== "file") {
|
|
10682
|
+
return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
|
|
10683
|
+
}
|
|
10684
|
+
const fileId = pathSegments[2];
|
|
10685
|
+
if (!fileId || !fileId.match(figmaFileIdRegex)) {
|
|
10686
|
+
return { status: "Error", error: "InvalidFigmaFileId" /* InvalidFigmaFileId */ };
|
|
10687
|
+
}
|
|
10688
|
+
let fileName = null;
|
|
10689
|
+
const rawFileName = pathSegments[3];
|
|
10690
|
+
if (rawFileName) {
|
|
10691
|
+
fileName = rawFileName.replaceAll("-", " ");
|
|
10692
|
+
}
|
|
10693
|
+
let nodeId = null;
|
|
10694
|
+
const nodeIdRaw = url.searchParams.get("node-id");
|
|
10695
|
+
if (nodeIdRaw && nodeIdRaw.match(nodeIdRegex)) {
|
|
10696
|
+
nodeId = nodeIdRaw.replace("-", ":");
|
|
10697
|
+
}
|
|
10698
|
+
let nodeType = null;
|
|
10699
|
+
const nodeTypeRaw = url.searchParams.get("node-type");
|
|
10700
|
+
if (nodeTypeRaw && nodeTypeRaw.match(nodeTypeRegex)) {
|
|
10701
|
+
nodeType = nodeTypeRaw;
|
|
10702
|
+
}
|
|
10703
|
+
return { status: "Success", fileId, fileName, nodeId, nodeType };
|
|
10704
|
+
}
|
|
10705
|
+
};
|
|
10706
|
+
|
|
10707
|
+
// src/utils/hash.ts
|
|
10708
|
+
function hash(input) {
|
|
10709
|
+
return farmhash(input).toString(16);
|
|
10710
|
+
}
|
|
10711
|
+
function farmhash(input) {
|
|
10712
|
+
const seed = 2654435769;
|
|
10713
|
+
let hash2 = seed;
|
|
10714
|
+
for (let i = 0; i < input.length; i++) {
|
|
10715
|
+
const charCode = input.charCodeAt(i);
|
|
10716
|
+
hash2 ^= charCode;
|
|
10717
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
10718
|
+
hash2 ^= hash2 >>> 15;
|
|
10719
|
+
}
|
|
10720
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
10721
|
+
hash2 ^= hash2 >>> 13;
|
|
10722
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
10723
|
+
hash2 ^= hash2 >>> 15;
|
|
10724
|
+
return hash2 >>> 0;
|
|
10725
|
+
}
|
|
10726
|
+
function prepareObject(obj) {
|
|
10727
|
+
if (obj === null || typeof obj !== "object") {
|
|
10728
|
+
return obj;
|
|
10729
|
+
}
|
|
10730
|
+
if (Array.isArray(obj)) {
|
|
10731
|
+
return obj.map(prepareObject);
|
|
10732
|
+
}
|
|
10733
|
+
const sortedObj = {};
|
|
10734
|
+
for (const key of Object.keys(obj).sort()) {
|
|
10735
|
+
if (obj[key] === null || obj[key] === void 0) {
|
|
10736
|
+
continue;
|
|
10737
|
+
}
|
|
10738
|
+
sortedObj[key] = prepareObject(obj[key]);
|
|
10739
|
+
}
|
|
10740
|
+
return sortedObj;
|
|
10741
|
+
}
|
|
10742
|
+
function generateHash(input, debug = false) {
|
|
10743
|
+
if (typeof input === "object") {
|
|
10744
|
+
const sanitized = JSON.stringify(prepareObject(input));
|
|
10745
|
+
if (debug) {
|
|
10746
|
+
console.log("Hashing sanitized string:");
|
|
10747
|
+
console.log(sanitized);
|
|
10748
|
+
}
|
|
10749
|
+
return hash(sanitized);
|
|
10750
|
+
} else {
|
|
10751
|
+
try {
|
|
10752
|
+
const obj = JSON.parse(input);
|
|
10753
|
+
const sanitized = JSON.stringify(prepareObject(obj));
|
|
10754
|
+
if (debug) {
|
|
10755
|
+
console.log("Hashing sanitized string:");
|
|
10756
|
+
console.log(sanitized);
|
|
10757
|
+
}
|
|
10758
|
+
return hash(sanitized);
|
|
10759
|
+
} catch {
|
|
10760
|
+
return hash(input);
|
|
10761
|
+
}
|
|
10762
|
+
}
|
|
10763
|
+
}
|
|
10764
|
+
|
|
10765
|
+
// src/utils/redirect-validation.ts
|
|
10766
|
+
var exhaustiveInvalidUriPaths = {
|
|
10767
|
+
emptyPath: "",
|
|
10768
|
+
spacesInPath: "/invalid path/with spaces",
|
|
10769
|
+
specialCharacter1: "/path/with|invalid>characters",
|
|
10770
|
+
specialCharacter2: "/path/with<invalid*characters",
|
|
10771
|
+
specialCharacter3: "/path/{invalid}?characters",
|
|
10772
|
+
consecutiveSlashes: "/path//with///too/many/slashes",
|
|
10773
|
+
unencodedPercent: "/path/with/unencoded%percent",
|
|
10774
|
+
unencodedSpaces: "/path/with unencoded spaces",
|
|
10775
|
+
fragmentIdentifier: "/path/with#fragment",
|
|
10776
|
+
queryParameters: "/path/with?query=parameter",
|
|
10777
|
+
nullCharacter: "/path/with/\0nullcharacter",
|
|
10778
|
+
onlySlash: "/",
|
|
10779
|
+
controlCharacter: "/path/with/control\0character",
|
|
10780
|
+
extremelyLongPath: "/" + "a".repeat(2047),
|
|
10781
|
+
invalidStartCharacter: "///path/starting/with/slashes",
|
|
10782
|
+
invalidStartCharacterColon: ":/path/starting/with/colon",
|
|
10783
|
+
invalidTrailingDot: "/path/ending/with/dot.",
|
|
10784
|
+
invalidPercentEncoding1: "/path/with/%2",
|
|
10785
|
+
invalidPercentEncoding2: "/path/with/%ZZ",
|
|
10786
|
+
invalidPercentEncoding3: "/path/with/%G1",
|
|
10787
|
+
reservedCharacter1: "/path/with?<reserved>",
|
|
10788
|
+
reservedCharacter2: '/path/with/"quotes"',
|
|
10789
|
+
reservedCharacter3: "/path/with/[brackets]",
|
|
10790
|
+
reservedCharacter4: "/path/with/\\backslashes",
|
|
10791
|
+
nonAscii1: "/path/with/\u4F60\u597D",
|
|
10792
|
+
nonAscii2: "/path/with/emoji/\u{1F603}",
|
|
10793
|
+
mixedEncodingPath: "/path/%41A%42B%C3%28",
|
|
10794
|
+
directoryTraversal1: "/path/../../etc/passwd",
|
|
10795
|
+
directoryTraversal2: "/path/./././"
|
|
10796
|
+
};
|
|
10797
|
+
function isValidRedirectPath(path) {
|
|
10798
|
+
const trimmedPath = path.toLowerCase().trim();
|
|
10799
|
+
const url = "https://www.example.com" + trimmedPath;
|
|
10800
|
+
if (url.length > 2048) {
|
|
10801
|
+
return {
|
|
10802
|
+
isValid: false,
|
|
10803
|
+
reason: "TooLong"
|
|
10804
|
+
};
|
|
10805
|
+
}
|
|
10806
|
+
if (trimmedPath === "") {
|
|
10807
|
+
return {
|
|
10808
|
+
isValid: false,
|
|
10809
|
+
reason: "Empty"
|
|
10810
|
+
};
|
|
10811
|
+
}
|
|
10812
|
+
if (url === "/") {
|
|
10813
|
+
return {
|
|
10814
|
+
isValid: false,
|
|
10815
|
+
reason: "Empty"
|
|
10816
|
+
};
|
|
10817
|
+
}
|
|
10818
|
+
if (url.includes("?")) {
|
|
10819
|
+
return {
|
|
10820
|
+
isValid: false,
|
|
10821
|
+
reason: "ContainsQuery"
|
|
10822
|
+
};
|
|
10823
|
+
}
|
|
10824
|
+
if (url.includes("#")) {
|
|
10825
|
+
return {
|
|
10826
|
+
isValid: false,
|
|
10827
|
+
reason: "ContainsFragment"
|
|
10828
|
+
};
|
|
10829
|
+
}
|
|
10830
|
+
const regex = /^\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*$/;
|
|
10831
|
+
const isValid = regex.test(trimmedPath);
|
|
10832
|
+
return {
|
|
10833
|
+
isValid: regex.test(trimmedPath),
|
|
10834
|
+
reason: !isValid ? "InvalidURI" : void 0
|
|
10835
|
+
};
|
|
10836
|
+
}
|
|
10868
10837
|
|
|
10869
|
-
// src/api/dto/forge/project-
|
|
10870
|
-
|
|
10871
|
-
var
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
packageName: z333.string(),
|
|
10876
|
-
type: z333.literal("npm"),
|
|
10877
|
-
version: z333.string().default("latest")
|
|
10878
|
-
})
|
|
10879
|
-
),
|
|
10880
|
-
designSystemId: z333.string(),
|
|
10881
|
-
id: z333.string(),
|
|
10882
|
-
meta: z333.object({
|
|
10883
|
-
name: z333.string(),
|
|
10884
|
-
description: z333.string().optional()
|
|
10885
|
-
}),
|
|
10886
|
-
name: z333.string(),
|
|
10887
|
-
npmProxySettings: DTONpmRegistryConfig.optional(),
|
|
10888
|
-
platform: z333.enum(["React", "Vue", "Angular"]),
|
|
10889
|
-
styling: z333.enum(["CSS", "Tailwind"]),
|
|
10890
|
-
tailwindConfig: z333.object({
|
|
10891
|
-
content: z333.string(),
|
|
10892
|
-
version: z333.string()
|
|
10893
|
-
}).optional(),
|
|
10894
|
-
createdAt: z333.coerce.date(),
|
|
10895
|
-
updatedAt: z333.coerce.date(),
|
|
10896
|
-
workspaceId: z333.string()
|
|
10838
|
+
// src/api/dto/forge/project-member.ts
|
|
10839
|
+
var DTOForgeProjectMemberRole = ForgeProjectRole;
|
|
10840
|
+
var DTOForgeProjectMember = ForgeProjectMembership.extend({
|
|
10841
|
+
user: DTOUser,
|
|
10842
|
+
effectiveRole: DTOForgeProjectMemberRole,
|
|
10843
|
+
isDeactivated: z331.boolean()
|
|
10897
10844
|
});
|
|
10898
|
-
var
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
meta: true,
|
|
10902
|
-
designSystemId: true,
|
|
10903
|
-
platform: true,
|
|
10904
|
-
dependencies: true,
|
|
10905
|
-
tailwindConfig: true,
|
|
10906
|
-
styling: true
|
|
10907
|
-
}).extend({ npmProxySettings: DTONpmRegistryConfig });
|
|
10908
|
-
var DTOUpdateForgeProjectContext = DTOCreateForgeProjectContext.partial().extend({ id: z333.string() });
|
|
10909
|
-
var DTOForgeProjectContextGetResponse = z333.object({ context: DTOForgeProjectContext });
|
|
10910
|
-
var DTOForgeProjectContextListResponse = z333.object({ contexts: z333.array(DTOForgeProjectContext) });
|
|
10911
|
-
var DTOForgeProjectContextCreateResponse = z333.object({ context: DTOForgeProjectContext });
|
|
10912
|
-
var DTOForgeProjectContextUpdateResponse = z333.object({ context: DTOForgeProjectContext });
|
|
10913
|
-
var DTOForgeProjectContextRemoveResponse = z333.object({
|
|
10914
|
-
ok: z333.literal(true)
|
|
10845
|
+
var DTOCreateForgeProjectMember = DTOForgeProjectMember.pick({
|
|
10846
|
+
userId: true,
|
|
10847
|
+
role: true
|
|
10915
10848
|
});
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
var DTOForgeProjectFigmaNodeRenderInput = ForgeProjectFigmaNodeRenderInput;
|
|
10920
|
-
|
|
10921
|
-
// src/api/dto/forge/project-file.ts
|
|
10922
|
-
import { z as z334 } from "zod";
|
|
10923
|
-
var DTOForgeProjectFile = z334.object({
|
|
10924
|
-
id: z334.string(),
|
|
10925
|
-
name: z334.string(),
|
|
10926
|
-
checksum: z334.string(),
|
|
10927
|
-
pendingUpload: z334.boolean().optional(),
|
|
10928
|
-
url: z334.string(),
|
|
10929
|
-
size: z334.number()
|
|
10930
|
-
});
|
|
10931
|
-
var DTOForgeProjectFileListResponse = z334.object({
|
|
10932
|
-
files: z334.array(DTOForgeProjectFile)
|
|
10933
|
-
});
|
|
10934
|
-
var DTOForgeProjectFileUploadPayloadItem = z334.object({
|
|
10935
|
-
size: z334.number(),
|
|
10936
|
-
name: z334.string(),
|
|
10937
|
-
checksum: z334.string()
|
|
10938
|
-
});
|
|
10939
|
-
var DTOForgeProjectFileUploadPayload = z334.object({
|
|
10940
|
-
files: z334.array(DTOForgeProjectFileUploadPayloadItem)
|
|
10941
|
-
});
|
|
10942
|
-
var DTOForgeProjectFileUploadResponse = z334.object({
|
|
10943
|
-
files: z334.array(DTOForgeProjectFile),
|
|
10944
|
-
uploadUrls: z334.array(
|
|
10945
|
-
z334.object({
|
|
10946
|
-
fileId: z334.string(),
|
|
10947
|
-
uploadUrl: z334.string()
|
|
10948
|
-
})
|
|
10949
|
-
)
|
|
10849
|
+
var DTOUpdateForgeProjectMember = DTOCreateForgeProjectMember;
|
|
10850
|
+
var DTORemoveForgeProjectMember = DTOForgeProjectMember.pick({
|
|
10851
|
+
userId: true
|
|
10950
10852
|
});
|
|
10951
|
-
var
|
|
10952
|
-
|
|
10853
|
+
var DTOForgeProjectMemberListQuery = z331.object({
|
|
10854
|
+
includeImplicitMembers: zodQueryBoolean().optional()
|
|
10953
10855
|
});
|
|
10954
|
-
var
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
import { z as z335 } from "zod";
|
|
10958
|
-
var DTOForgeProjectIterationMergeMeta = ForgeProjectIterationMergeMeta;
|
|
10959
|
-
var DTOForgeProjectIteration = ForgeProjectIteration.omit({
|
|
10960
|
-
artifacts: true,
|
|
10961
|
-
messages: true,
|
|
10962
|
-
mergeMeta: true
|
|
10963
|
-
}).extend({
|
|
10964
|
-
artifacts: DTOForgeArtifact.array(),
|
|
10965
|
-
messages: DTOForgeIterationMessage.array(),
|
|
10966
|
-
mergeMeta: DTOForgeProjectIterationMergeMeta.optional()
|
|
10856
|
+
var DTOForgeProjectMembersListResponse = z331.object({
|
|
10857
|
+
members: z331.array(DTOForgeProjectMember),
|
|
10858
|
+
invitations: z331.array(DTOForgeProjectInvitation)
|
|
10967
10859
|
});
|
|
10968
|
-
var
|
|
10969
|
-
|
|
10860
|
+
var DTOForgeProjectMemberGetResponse = z331.object({
|
|
10861
|
+
member: DTOForgeProjectMember
|
|
10970
10862
|
});
|
|
10971
|
-
var
|
|
10972
|
-
|
|
10973
|
-
artifacts: true,
|
|
10974
|
-
messages: true,
|
|
10975
|
-
mergeMeta: true,
|
|
10976
|
-
createdAt: true
|
|
10863
|
+
var DTOForgeProjectMemberCreateResponse = z331.object({
|
|
10864
|
+
member: DTOForgeProjectMember
|
|
10977
10865
|
});
|
|
10978
|
-
var
|
|
10979
|
-
|
|
10980
|
-
iteration: DTOForgeProjectIteration
|
|
10866
|
+
var DTOForgeProjectMemberUpdateResponse = z331.object({
|
|
10867
|
+
member: DTOForgeProjectMember.nullable()
|
|
10981
10868
|
});
|
|
10982
|
-
var
|
|
10983
|
-
|
|
10869
|
+
var DTOForgeProjectMemberRemoveResponse = z331.object({
|
|
10870
|
+
ok: z331.literal(true)
|
|
10984
10871
|
});
|
|
10985
|
-
var
|
|
10986
|
-
|
|
10872
|
+
var DTOAddMembersToForgeProject = z331.object({
|
|
10873
|
+
membersToInvite: DTOCreateForgeProjectInvitation.array().min(1)
|
|
10987
10874
|
});
|
|
10988
|
-
var DTOForgeProjectIterationListResponse = z335.object({ iterations: z335.array(DTOForgeProjectIteration) });
|
|
10989
10875
|
|
|
10990
10876
|
// src/api/dto/forge/project-room.ts
|
|
10991
|
-
import { z as
|
|
10992
|
-
var DTOForgeProjectRoom =
|
|
10993
|
-
id:
|
|
10877
|
+
import { z as z332 } from "zod";
|
|
10878
|
+
var DTOForgeProjectRoom = z332.object({
|
|
10879
|
+
id: z332.string()
|
|
10994
10880
|
});
|
|
10995
|
-
var DTOForgeProjectRoomResponse =
|
|
10881
|
+
var DTOForgeProjectRoomResponse = z332.object({
|
|
10996
10882
|
room: DTOForgeProjectRoom
|
|
10997
10883
|
});
|
|
10998
10884
|
|
|
10999
10885
|
// src/api/dto/forge/project.ts
|
|
11000
|
-
import { z as
|
|
10886
|
+
import { z as z333 } from "zod";
|
|
11001
10887
|
var DTOForgeProjectRole = ForgeProjectRole;
|
|
11002
10888
|
var DTOForgeProjectAccessMode = ForgeProjectAccessMode;
|
|
11003
10889
|
var DTOForgeProjectDefaultRole = ForgeDefaultProjectRole;
|
|
11004
|
-
var DTOForgeProjectDocumentPreview =
|
|
11005
|
-
id:
|
|
11006
|
-
title:
|
|
10890
|
+
var DTOForgeProjectDocumentPreview = z333.object({
|
|
10891
|
+
id: z333.string(),
|
|
10892
|
+
title: z333.string(),
|
|
11007
10893
|
thumbnail: DTOFileReference.optional(),
|
|
11008
|
-
createdAt:
|
|
11009
|
-
updatedAt:
|
|
10894
|
+
createdAt: z333.string(),
|
|
10895
|
+
updatedAt: z333.string()
|
|
11010
10896
|
});
|
|
11011
|
-
var DTOForgeProjectFeaturePreview =
|
|
11012
|
-
id:
|
|
11013
|
-
name:
|
|
10897
|
+
var DTOForgeProjectFeaturePreview = z333.object({
|
|
10898
|
+
id: z333.string(),
|
|
10899
|
+
name: z333.string(),
|
|
11014
10900
|
thumbnail: DTOFileReference.optional(),
|
|
11015
|
-
createdAt:
|
|
11016
|
-
updatedAt:
|
|
11017
|
-
});
|
|
11018
|
-
var DTOForgeProject =
|
|
11019
|
-
id:
|
|
11020
|
-
workspaceId:
|
|
11021
|
-
projectContextId:
|
|
11022
|
-
name:
|
|
11023
|
-
description:
|
|
11024
|
-
instruction:
|
|
11025
|
-
tags:
|
|
10901
|
+
createdAt: z333.string(),
|
|
10902
|
+
updatedAt: z333.string()
|
|
10903
|
+
});
|
|
10904
|
+
var DTOForgeProject = z333.object({
|
|
10905
|
+
id: z333.string(),
|
|
10906
|
+
workspaceId: z333.string(),
|
|
10907
|
+
projectContextId: z333.string(),
|
|
10908
|
+
name: z333.string(),
|
|
10909
|
+
description: z333.string().optional(),
|
|
10910
|
+
instruction: z333.string().nullable(),
|
|
10911
|
+
tags: z333.array(z333.string()).default([]),
|
|
11026
10912
|
accessMode: DTOForgeProjectAccessMode,
|
|
11027
10913
|
defaultRole: DTOForgeProjectDefaultRole,
|
|
11028
|
-
isArchived:
|
|
11029
|
-
emoji:
|
|
11030
|
-
tokenThemeSetId:
|
|
11031
|
-
createdAt:
|
|
11032
|
-
createdByUserId:
|
|
11033
|
-
lastUserActivityAt:
|
|
11034
|
-
updatedAt:
|
|
10914
|
+
isArchived: z333.boolean(),
|
|
10915
|
+
emoji: z333.string().optional(),
|
|
10916
|
+
tokenThemeSetId: z333.string().optional(),
|
|
10917
|
+
createdAt: z333.coerce.date(),
|
|
10918
|
+
createdByUserId: z333.string().optional(),
|
|
10919
|
+
lastUserActivityAt: z333.coerce.date().optional(),
|
|
10920
|
+
updatedAt: z333.coerce.date(),
|
|
11035
10921
|
documents: DTOForgeProjectDocumentPreview.array(),
|
|
11036
10922
|
features: DTOForgeProjectFeaturePreview.array(),
|
|
11037
10923
|
/** @deprecated use `projectContextId` */
|
|
11038
|
-
fpContextId:
|
|
10924
|
+
fpContextId: z333.string(),
|
|
11039
10925
|
/** @deprecated use `name` and `description` properties on project */
|
|
11040
|
-
meta:
|
|
11041
|
-
name:
|
|
11042
|
-
description:
|
|
10926
|
+
meta: z333.object({
|
|
10927
|
+
name: z333.string(),
|
|
10928
|
+
description: z333.string().optional()
|
|
11043
10929
|
}),
|
|
11044
10930
|
/** @deprecated use features.length */
|
|
11045
|
-
numberOfFeatures:
|
|
10931
|
+
numberOfFeatures: z333.number().int().nonnegative(),
|
|
11046
10932
|
/** @deprecated use documents.length */
|
|
11047
|
-
numberOfDocuments:
|
|
10933
|
+
numberOfDocuments: z333.number().int().nonnegative().optional(),
|
|
11048
10934
|
/** @deprecated prefer fetching from project contexts endpoint separately */
|
|
11049
10935
|
context: DTOForgeProjectContextV2.optional(),
|
|
11050
|
-
liveblocksRoomId:
|
|
10936
|
+
liveblocksRoomId: z333.string().optional()
|
|
11051
10937
|
});
|
|
11052
10938
|
var DTOForgeProjectCreate = DTOForgeProject.pick({
|
|
11053
10939
|
name: true,
|
|
@@ -11060,8 +10946,8 @@ var DTOForgeProjectCreate = DTOForgeProject.pick({
|
|
|
11060
10946
|
/** @deprecated use `name` and `description` properties on project */
|
|
11061
10947
|
meta: DTOForgeProject.shape.meta.optional(),
|
|
11062
10948
|
/** @deprecated use `projectContextId` */
|
|
11063
|
-
fpContextId:
|
|
11064
|
-
projectContextId:
|
|
10949
|
+
fpContextId: z333.string().optional(),
|
|
10950
|
+
projectContextId: z333.string().optional(),
|
|
11065
10951
|
membersToInvite: DTOCreateForgeProjectInvitation.array().min(1).optional(),
|
|
11066
10952
|
initialFeature: DTOForgeProjectFeatureCreateInput.optional(),
|
|
11067
10953
|
initialArtifact: DTOForgeProjectArtifactCreateInput.optional(),
|
|
@@ -11069,110 +10955,229 @@ var DTOForgeProjectCreate = DTOForgeProject.pick({
|
|
|
11069
10955
|
defaultRole: DTOForgeProjectDefaultRole.optional()
|
|
11070
10956
|
});
|
|
11071
10957
|
var DTOForgeProjectUpdate = DTOForgeProjectCreate.omit({ membersToInvite: true }).partial().extend({
|
|
11072
|
-
id:
|
|
11073
|
-
isArchived:
|
|
10958
|
+
id: z333.string(),
|
|
10959
|
+
isArchived: z333.boolean().optional()
|
|
11074
10960
|
});
|
|
11075
|
-
var DTOForgeProjectListResponse =
|
|
11076
|
-
projects:
|
|
10961
|
+
var DTOForgeProjectListResponse = z333.object({
|
|
10962
|
+
projects: z333.array(
|
|
11077
10963
|
DTOForgeProject.extend({
|
|
11078
10964
|
effectiveRole: DTOForgeProjectRole
|
|
11079
10965
|
})
|
|
11080
10966
|
)
|
|
11081
10967
|
});
|
|
11082
|
-
var DTOForgeProjectResponse =
|
|
10968
|
+
var DTOForgeProjectResponse = z333.object({
|
|
11083
10969
|
project: DTOForgeProject.extend({
|
|
11084
10970
|
effectiveRole: DTOForgeProjectRole
|
|
11085
10971
|
})
|
|
11086
10972
|
});
|
|
11087
10973
|
|
|
11088
10974
|
// src/api/dto/forge/relation.ts
|
|
11089
|
-
import
|
|
10975
|
+
import z334 from "zod";
|
|
11090
10976
|
var DTOForgeRelationType = ForgeRelationType;
|
|
11091
10977
|
var DTOForgeRelation = ForgeRelation;
|
|
11092
10978
|
var DTOForgeRelationCreate = DTOForgeRelation.omit({ id: true, createdAt: true });
|
|
11093
|
-
var DTOForgeRelationDelete =
|
|
11094
|
-
sourceItemId:
|
|
11095
|
-
targetItemId:
|
|
10979
|
+
var DTOForgeRelationDelete = z334.object({
|
|
10980
|
+
sourceItemId: z334.string().uuid(),
|
|
10981
|
+
targetItemId: z334.string().uuid()
|
|
11096
10982
|
});
|
|
11097
|
-
var DTOForgeRelationListInput =
|
|
11098
|
-
projectId:
|
|
10983
|
+
var DTOForgeRelationListInput = z334.object({
|
|
10984
|
+
projectId: z334.string()
|
|
11099
10985
|
});
|
|
11100
|
-
var DTOForgeRelationListResponse =
|
|
11101
|
-
relations:
|
|
10986
|
+
var DTOForgeRelationListResponse = z334.object({
|
|
10987
|
+
relations: z334.array(DTOForgeRelation)
|
|
11102
10988
|
});
|
|
11103
|
-
var DTOForgeEntity =
|
|
11104
|
-
id:
|
|
10989
|
+
var DTOForgeEntity = z334.object({
|
|
10990
|
+
id: z334.string().uuid(),
|
|
11105
10991
|
type: DTOForgeRelationType
|
|
11106
10992
|
});
|
|
11107
10993
|
|
|
11108
10994
|
// src/api/dto/forge/threads.ts
|
|
11109
|
-
import { z as
|
|
10995
|
+
import { z as z335 } from "zod";
|
|
11110
10996
|
var DTOForgeChatMessage = ForgeChatMessage;
|
|
11111
10997
|
var DTOForgeChatThread = ForgeChatThread;
|
|
11112
10998
|
var DTOForgeChatMessageSenderType = ForgeChatMessageSenderType;
|
|
11113
10999
|
var DTOForgeChatMessageSender = ForgeChatMessageSender;
|
|
11114
|
-
var DTOForgeChatThreadCreateInput =
|
|
11115
|
-
title:
|
|
11000
|
+
var DTOForgeChatThreadCreateInput = z335.object({
|
|
11001
|
+
title: z335.string().optional()
|
|
11116
11002
|
});
|
|
11117
|
-
var DTOForgeChatThreadCreateResponse =
|
|
11003
|
+
var DTOForgeChatThreadCreateResponse = z335.object({
|
|
11118
11004
|
thread: DTOForgeChatThread
|
|
11119
11005
|
});
|
|
11120
|
-
var DTOForgeChatThreadUpdateInput =
|
|
11121
|
-
title:
|
|
11006
|
+
var DTOForgeChatThreadUpdateInput = z335.object({
|
|
11007
|
+
title: z335.string()
|
|
11122
11008
|
});
|
|
11123
|
-
var DTOForgeChatThreadUpdateResponse =
|
|
11009
|
+
var DTOForgeChatThreadUpdateResponse = z335.object({
|
|
11124
11010
|
thread: DTOForgeChatThread
|
|
11125
11011
|
});
|
|
11126
|
-
var DTOForgeChatThreadDeleteResponse =
|
|
11127
|
-
success:
|
|
11012
|
+
var DTOForgeChatThreadDeleteResponse = z335.object({
|
|
11013
|
+
success: z335.boolean()
|
|
11128
11014
|
});
|
|
11129
|
-
var DTOForgeChatThreadListQuery =
|
|
11130
|
-
limit:
|
|
11131
|
-
offset:
|
|
11015
|
+
var DTOForgeChatThreadListQuery = z335.object({
|
|
11016
|
+
limit: z335.number().optional(),
|
|
11017
|
+
offset: z335.number().optional()
|
|
11132
11018
|
});
|
|
11133
|
-
var DTOForgeChatThreadListResponse =
|
|
11134
|
-
threads:
|
|
11135
|
-
pagination:
|
|
11136
|
-
offset:
|
|
11137
|
-
limit:
|
|
11138
|
-
total:
|
|
11019
|
+
var DTOForgeChatThreadListResponse = z335.object({
|
|
11020
|
+
threads: z335.array(DTOForgeChatThread),
|
|
11021
|
+
pagination: z335.object({
|
|
11022
|
+
offset: z335.number(),
|
|
11023
|
+
limit: z335.number(),
|
|
11024
|
+
total: z335.number()
|
|
11139
11025
|
})
|
|
11140
11026
|
});
|
|
11141
|
-
var DTOForgeChatMessageCreateInput =
|
|
11142
|
-
payload:
|
|
11027
|
+
var DTOForgeChatMessageCreateInput = z335.object({
|
|
11028
|
+
payload: z335.string(),
|
|
11143
11029
|
sender: DTOForgeChatMessageSender.optional()
|
|
11144
11030
|
});
|
|
11145
|
-
var DTOForgeChatMessageCreateResponse =
|
|
11031
|
+
var DTOForgeChatMessageCreateResponse = z335.object({
|
|
11146
11032
|
message: DTOForgeChatMessage
|
|
11147
11033
|
});
|
|
11148
|
-
var DTOForgeChatMessageListQuery =
|
|
11149
|
-
limit:
|
|
11150
|
-
offset:
|
|
11034
|
+
var DTOForgeChatMessageListQuery = z335.object({
|
|
11035
|
+
limit: z335.string().optional().transform((val) => val ? parseInt(val, 10) : void 0),
|
|
11036
|
+
offset: z335.string().optional().transform((val) => val ? parseInt(val, 10) : void 0)
|
|
11151
11037
|
});
|
|
11152
|
-
var DTOForgeChatMessageListResponse =
|
|
11153
|
-
messages:
|
|
11154
|
-
totalCount:
|
|
11155
|
-
hasMore:
|
|
11038
|
+
var DTOForgeChatMessageListResponse = z335.object({
|
|
11039
|
+
messages: z335.array(DTOForgeChatMessage),
|
|
11040
|
+
totalCount: z335.number(),
|
|
11041
|
+
hasMore: z335.boolean()
|
|
11156
11042
|
});
|
|
11157
|
-
var DTOForgeChatExportResponse =
|
|
11158
|
-
csvDownloadUrl:
|
|
11043
|
+
var DTOForgeChatExportResponse = z335.object({
|
|
11044
|
+
csvDownloadUrl: z335.string().nullable()
|
|
11159
11045
|
});
|
|
11160
|
-
var DTOForgeChatMessageScoreInput =
|
|
11161
|
-
messageId:
|
|
11162
|
-
name:
|
|
11163
|
-
value:
|
|
11164
|
-
categoryName:
|
|
11165
|
-
reason:
|
|
11046
|
+
var DTOForgeChatMessageScoreInput = z335.object({
|
|
11047
|
+
messageId: z335.string(),
|
|
11048
|
+
name: z335.string(),
|
|
11049
|
+
value: z335.number(),
|
|
11050
|
+
categoryName: z335.string().optional(),
|
|
11051
|
+
reason: z335.string().optional()
|
|
11166
11052
|
});
|
|
11167
|
-
var DTOForgeChatMessageTagInput =
|
|
11168
|
-
messageId:
|
|
11169
|
-
tags:
|
|
11053
|
+
var DTOForgeChatMessageTagInput = z335.object({
|
|
11054
|
+
messageId: z335.string(),
|
|
11055
|
+
tags: z335.array(z335.string())
|
|
11170
11056
|
});
|
|
11171
|
-
var DTOForgeChatMessageScoreRequest =
|
|
11057
|
+
var DTOForgeChatMessageScoreRequest = z335.object({
|
|
11172
11058
|
scores: DTOForgeChatMessageScoreInput.array(),
|
|
11173
11059
|
tags: DTOForgeChatMessageTagInput.array().optional().default([])
|
|
11174
11060
|
});
|
|
11175
11061
|
|
|
11062
|
+
// src/api/dto/events/forge-project.ts
|
|
11063
|
+
var DTOForgeProjectMembersCreated = z336.object({
|
|
11064
|
+
type: z336.literal("ProjectMembersCreated"),
|
|
11065
|
+
data: z336.array(DTOForgeProjectMember)
|
|
11066
|
+
});
|
|
11067
|
+
var DTOForgeProjectMemberUpdated = z336.object({
|
|
11068
|
+
type: z336.literal("ProjectMemberUpdated"),
|
|
11069
|
+
data: DTOForgeProjectMember
|
|
11070
|
+
});
|
|
11071
|
+
var DTOForgeProjectMemberDeleted = z336.object({
|
|
11072
|
+
type: z336.literal("ProjectMemberDeleted"),
|
|
11073
|
+
data: DTOForgeProjectMember.pick({ userId: true })
|
|
11074
|
+
});
|
|
11075
|
+
var DTOForgeProjectIterationTagSet = z336.object({
|
|
11076
|
+
type: z336.literal("ProjectIterationTagSet"),
|
|
11077
|
+
data: DTOFeatureIterationTag
|
|
11078
|
+
});
|
|
11079
|
+
var DTOForgeProjectRoomEvent = z336.discriminatedUnion("type", [
|
|
11080
|
+
DTOForgeProjectMembersCreated,
|
|
11081
|
+
DTOForgeProjectMemberUpdated,
|
|
11082
|
+
DTOForgeProjectMemberDeleted,
|
|
11083
|
+
DTOForgeProjectIterationTagSet
|
|
11084
|
+
]);
|
|
11085
|
+
|
|
11086
|
+
// src/api/dto/events/workspace.ts
|
|
11087
|
+
import z337 from "zod";
|
|
11088
|
+
var DTOForgeProjectCreated = z337.object({
|
|
11089
|
+
type: z337.literal("ProjectCreated"),
|
|
11090
|
+
data: z337.object({ id: z337.string() })
|
|
11091
|
+
});
|
|
11092
|
+
var DTOForgeProjectUpdated = z337.object({
|
|
11093
|
+
type: z337.literal("ProjectUpdated"),
|
|
11094
|
+
data: z337.object({ id: z337.string() })
|
|
11095
|
+
});
|
|
11096
|
+
var DTOForgeProjectContextCreated = z337.object({
|
|
11097
|
+
type: z337.literal("ProjectContextCreated"),
|
|
11098
|
+
data: DTOForgeProjectContextV2
|
|
11099
|
+
});
|
|
11100
|
+
var DTOForgeProjectContextUpdated = z337.object({
|
|
11101
|
+
type: z337.literal("ProjectContextUpdated"),
|
|
11102
|
+
data: DTOForgeProjectContextV2
|
|
11103
|
+
});
|
|
11104
|
+
var DTOForgeProjectContextDeleted = z337.object({
|
|
11105
|
+
type: z337.literal("ProjectContextDeleted"),
|
|
11106
|
+
data: DTOForgeProjectContextV2.pick({ id: true })
|
|
11107
|
+
});
|
|
11108
|
+
var DTOSandboxTemplateVersionCreated = z337.object({
|
|
11109
|
+
type: z337.literal("SandboxTemplateVersionCreated"),
|
|
11110
|
+
data: z337.object({
|
|
11111
|
+
templateId: z337.string(),
|
|
11112
|
+
version: z337.string()
|
|
11113
|
+
})
|
|
11114
|
+
});
|
|
11115
|
+
var DTOSandboxTemplateBuildCreated = z337.object({
|
|
11116
|
+
type: z337.literal("SandboxTemplateBuildCreated"),
|
|
11117
|
+
data: z337.object({
|
|
11118
|
+
buildId: z337.string(),
|
|
11119
|
+
templateId: z337.string().optional()
|
|
11120
|
+
})
|
|
11121
|
+
});
|
|
11122
|
+
var DTOSandboxTemplateBuildFinished = z337.object({
|
|
11123
|
+
type: z337.literal("SandboxTemplateBuildFinished"),
|
|
11124
|
+
data: z337.object({
|
|
11125
|
+
buildId: z337.string(),
|
|
11126
|
+
templateId: z337.string().optional()
|
|
11127
|
+
})
|
|
11128
|
+
});
|
|
11129
|
+
var DTOWorkspaceRoomEvent = z337.discriminatedUnion("type", [
|
|
11130
|
+
DTOForgeProjectUpdated,
|
|
11131
|
+
DTOForgeProjectCreated,
|
|
11132
|
+
DTOForgeProjectContextCreated,
|
|
11133
|
+
DTOForgeProjectContextUpdated,
|
|
11134
|
+
DTOForgeProjectContextDeleted,
|
|
11135
|
+
DTOSandboxTemplateVersionCreated,
|
|
11136
|
+
DTOSandboxTemplateBuildCreated,
|
|
11137
|
+
DTOSandboxTemplateBuildFinished
|
|
11138
|
+
]);
|
|
11139
|
+
|
|
11140
|
+
// src/api/dto/figma-components/assets/download.ts
|
|
11141
|
+
import { z as z338 } from "zod";
|
|
11142
|
+
var DTOAssetRenderConfiguration = z338.object({
|
|
11143
|
+
prefix: z338.string().optional(),
|
|
11144
|
+
suffix: z338.string().optional(),
|
|
11145
|
+
scale: z338.enum(["x1", "x2", "x3", "x4"]),
|
|
11146
|
+
format: z338.enum(["png", "pdf", "svg"])
|
|
11147
|
+
});
|
|
11148
|
+
var DTORenderedAssetFile = z338.object({
|
|
11149
|
+
assetId: z338.string(),
|
|
11150
|
+
fileName: z338.string(),
|
|
11151
|
+
sourceUrl: z338.string(),
|
|
11152
|
+
settings: DTOAssetRenderConfiguration,
|
|
11153
|
+
originalName: z338.string()
|
|
11154
|
+
});
|
|
11155
|
+
var DTODownloadAssetsRequest = z338.object({
|
|
11156
|
+
persistentIds: z338.array(z338.string().uuid()).optional(),
|
|
11157
|
+
settings: DTOAssetRenderConfiguration.array()
|
|
11158
|
+
});
|
|
11159
|
+
var DTODownloadAssetsResponse = z338.object({
|
|
11160
|
+
items: DTORenderedAssetFile.array()
|
|
11161
|
+
});
|
|
11162
|
+
|
|
11163
|
+
// src/api/dto/figma-exporter/figma-node.ts
|
|
11164
|
+
import { z as z339 } from "zod";
|
|
11165
|
+
var DTOFigmaExportNodeFormat = z339.enum(["HTML", "JSON"]);
|
|
11166
|
+
var DTOFigmaExportNodeConfiguration = z339.object({
|
|
11167
|
+
format: DTOFigmaExportNodeFormat,
|
|
11168
|
+
minifyOutput: z339.boolean().optional(),
|
|
11169
|
+
customFontUrls: z339.string().array().optional()
|
|
11170
|
+
});
|
|
11171
|
+
var DTOFigmaExportNodePayload = z339.object({
|
|
11172
|
+
designSystemId: z339.string(),
|
|
11173
|
+
versionId: z339.string().optional(),
|
|
11174
|
+
figmaUrl: z339.string(),
|
|
11175
|
+
configuration: DTOFigmaExportNodeConfiguration
|
|
11176
|
+
});
|
|
11177
|
+
var DTOFigmaExportNodeResponse = z339.object({
|
|
11178
|
+
file: DTOFile
|
|
11179
|
+
});
|
|
11180
|
+
|
|
11176
11181
|
// src/api/dto/liveblocks/auth-response.ts
|
|
11177
11182
|
import { z as z340 } from "zod";
|
|
11178
11183
|
var DTOLiveblocksAuthResponse = z340.object({
|
|
@@ -19765,13 +19770,23 @@ var LocalProjectActionExecutor = class {
|
|
|
19765
19770
|
if (!existingFeature) {
|
|
19766
19771
|
throw new Error(`Cannot update feature: feature ${id} was not found in local storage`);
|
|
19767
19772
|
}
|
|
19773
|
+
let publishedState = existingFeature.publishedState;
|
|
19774
|
+
if (input.publishedState === null) {
|
|
19775
|
+
publishedState = void 0;
|
|
19776
|
+
} else if (input.publishedState) {
|
|
19777
|
+
publishedState = {
|
|
19778
|
+
...input.publishedState,
|
|
19779
|
+
lastPublishedAt: /* @__PURE__ */ new Date()
|
|
19780
|
+
};
|
|
19781
|
+
}
|
|
19768
19782
|
const mergedFeature = {
|
|
19769
19783
|
...existingFeature,
|
|
19770
19784
|
name: input.name ?? existingFeature.name,
|
|
19771
19785
|
description: input.description ?? existingFeature.description,
|
|
19772
19786
|
isArchived: input.isArchived ?? existingFeature.isArchived,
|
|
19773
19787
|
status: input.status ?? existingFeature.status,
|
|
19774
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
19788
|
+
updatedAt: /* @__PURE__ */ new Date(),
|
|
19789
|
+
publishedState
|
|
19775
19790
|
};
|
|
19776
19791
|
this.features.set(id, mergedFeature);
|
|
19777
19792
|
}
|
|
@@ -20510,6 +20525,7 @@ export {
|
|
|
20510
20525
|
DTOForgeProjectIteration,
|
|
20511
20526
|
DTOForgeProjectIterationListResponse,
|
|
20512
20527
|
DTOForgeProjectIterationMergeMeta,
|
|
20528
|
+
DTOForgeProjectIterationTagSet,
|
|
20513
20529
|
DTOForgeProjectListResponse,
|
|
20514
20530
|
DTOForgeProjectMember,
|
|
20515
20531
|
DTOForgeProjectMemberCreateResponse,
|