@supernova-studio/client 0.58.8 → 0.58.10
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 +2484 -290
- package/dist/index.d.ts +2484 -290
- package/dist/index.js +314 -105
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +745 -536
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/design-systems/data-source.ts +28 -3
- package/src/api/dto/design-systems/index.ts +0 -1
- package/src/api/dto/elements/components/figma-component-group.ts +19 -0
- package/src/api/dto/elements/components/index.ts +1 -0
- package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +17 -0
- package/src/api/dto/elements/frame-node-structures/index.ts +1 -0
- package/src/api/dto/elements/index.ts +1 -0
- package/src/api/dto/export/exporter-property.ts +95 -0
- package/src/api/dto/export/exporter.ts +2 -0
- package/src/api/dto/export/index.ts +1 -0
- package/src/api/dto/export/job.ts +3 -0
- package/src/api/dto/export/pipeline.ts +3 -0
- package/src/api/endpoints/codegen/exporters.ts +2 -7
- package/src/api/endpoints/design-system/sources.ts +21 -1
- package/src/api/endpoints/design-system/versions/elements-action.ts +17 -62
- package/src/api/endpoints/design-system/versions/elements.ts +13 -0
- package/src/api/endpoints/design-system/versions/figma-component-groups.ts +13 -0
- package/src/api/endpoints/design-system/versions/figma-components.ts +13 -0
- package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +13 -0
- package/src/api/endpoints/design-system/versions/index.ts +5 -2
- package/src/api/endpoints/design-system/versions/versions.ts +16 -4
- package/src/api/payloads/export/pipeline.ts +3 -0
- package/src/api/transport/request-executor.ts +2 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/query.ts +18 -0
- package/src/api/dto/design-systems/exporter-property.ts +0 -8
- package/src/api/endpoints/design-system/versions/elements-actions.ts +0 -20
- /package/src/api/endpoints/design-system/versions/{components.ts → ds-components.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -571,7 +571,8 @@ var FigmaFileDownloadScope = z22.object({
|
|
|
571
571
|
maxFileDepth: z22.number().optional()
|
|
572
572
|
});
|
|
573
573
|
var FigmaFileAccessData = z22.object({
|
|
574
|
-
accessToken: z22.string()
|
|
574
|
+
accessToken: z22.string(),
|
|
575
|
+
accessTokenType: z22.enum(["OAuth2", "PAT"]).default("OAuth2")
|
|
575
576
|
});
|
|
576
577
|
var ImportWarningType = z23.enum([
|
|
577
578
|
"NoVersionFound",
|
|
@@ -4325,7 +4326,7 @@ var IntegrationDesignSystem = z154.object({
|
|
|
4325
4326
|
userId: z154.string().optional(),
|
|
4326
4327
|
date: z154.coerce.date().optional()
|
|
4327
4328
|
});
|
|
4328
|
-
var IntegrationCredentialsType = z154.enum(["OAuth2", "PAT"
|
|
4329
|
+
var IntegrationCredentialsType = z154.enum(["OAuth2", "PAT"]);
|
|
4329
4330
|
var IntegrationCredentialsState = z154.enum(["Active", "Inactive"]);
|
|
4330
4331
|
var IntegrationCredentialsProfile = z154.object({
|
|
4331
4332
|
id: nullishToOptional(z154.string()),
|
|
@@ -5245,6 +5246,7 @@ var DTODesignSystemContactsResponse = z185.object({
|
|
|
5245
5246
|
|
|
5246
5247
|
// src/api/dto/design-systems/data-source.ts
|
|
5247
5248
|
import { z as z186 } from "zod";
|
|
5249
|
+
var DTODataSourceFigmaScope = DataSourceFigmaScope;
|
|
5248
5250
|
var DTODataSourceFigmaFileVersion = z186.object({
|
|
5249
5251
|
id: z186.string(),
|
|
5250
5252
|
created_at: z186.coerce.date(),
|
|
@@ -5269,7 +5271,7 @@ var DTODataSourceFigma = z186.object({
|
|
|
5269
5271
|
id: z186.string(),
|
|
5270
5272
|
type: z186.literal(DataSourceRemoteType.Enum.Figma),
|
|
5271
5273
|
fileName: z186.string(),
|
|
5272
|
-
scope:
|
|
5274
|
+
scope: DTODataSourceFigmaScope,
|
|
5273
5275
|
brandId: z186.string(),
|
|
5274
5276
|
themeId: z186.string().nullish(),
|
|
5275
5277
|
cloud: DTODataSourceFigmaCloud.nullish()
|
|
@@ -5331,9 +5333,18 @@ var DTODataSource = z186.discriminatedUnion("type", [
|
|
|
5331
5333
|
var DTODataSourcesListResponse = z186.object({
|
|
5332
5334
|
sources: z186.array(DTODataSource)
|
|
5333
5335
|
});
|
|
5334
|
-
var
|
|
5336
|
+
var DTODataSourceResponse = z186.object({
|
|
5335
5337
|
source: DTODataSource
|
|
5336
5338
|
});
|
|
5339
|
+
var DTODataSourceFigmaCreatePayload = z186.object({
|
|
5340
|
+
brandPersistentId: z186.string(),
|
|
5341
|
+
figmaFileUrl: z186.string(),
|
|
5342
|
+
scope: DTODataSourceFigmaScope,
|
|
5343
|
+
autoImportMode: DataSourceAutoImportMode
|
|
5344
|
+
});
|
|
5345
|
+
var DTODataSourceFigmaImportPayload = z186.object({
|
|
5346
|
+
sourceIds: z186.array(z186.string())
|
|
5347
|
+
});
|
|
5337
5348
|
|
|
5338
5349
|
// src/api/dto/design-systems/design-system.ts
|
|
5339
5350
|
import { z as z189 } from "zod";
|
|
@@ -5433,14 +5444,9 @@ var DTODesignElementsDataDiffResponse = z190.object({
|
|
|
5433
5444
|
assets: DTODiffCountBase
|
|
5434
5445
|
});
|
|
5435
5446
|
|
|
5436
|
-
// src/api/dto/design-systems/exporter-property.ts
|
|
5437
|
-
import { z as z191 } from "zod";
|
|
5438
|
-
var DTOExporterProperty = z191.any({});
|
|
5439
|
-
var DTOExporterPropertyListResponse = z191.object({ items: z191.array(DTOExporterProperty) });
|
|
5440
|
-
|
|
5441
5447
|
// src/api/dto/design-systems/figma-variables.ts
|
|
5442
|
-
import { z as
|
|
5443
|
-
var DimensionsVariableScopeSchema =
|
|
5448
|
+
import { z as z191 } from "zod";
|
|
5449
|
+
var DimensionsVariableScopeSchema = z191.enum([
|
|
5444
5450
|
"CORNER_RADIUS",
|
|
5445
5451
|
"WIDTH_HEIGHT",
|
|
5446
5452
|
"GAP",
|
|
@@ -5454,130 +5460,130 @@ var DimensionsVariableScopeSchema = z192.enum([
|
|
|
5454
5460
|
"PARAGRAPH_INDENT",
|
|
5455
5461
|
"FONT_WEIGHT"
|
|
5456
5462
|
]);
|
|
5457
|
-
var StringVariableScopeSchema =
|
|
5463
|
+
var StringVariableScopeSchema = z191.enum(["TEXT_CONTENT", "FONT_FAMILY", "FONT_STYLE"]);
|
|
5458
5464
|
var DimensionsVariableScopeType = DimensionsVariableScopeSchema.enum;
|
|
5459
5465
|
var StringVariableScopeType = StringVariableScopeSchema.enum;
|
|
5460
|
-
var VariableScope =
|
|
5461
|
-
var ReferencedVariableOrigin =
|
|
5462
|
-
name:
|
|
5463
|
-
remote:
|
|
5466
|
+
var VariableScope = z191.string();
|
|
5467
|
+
var ReferencedVariableOrigin = z191.object({
|
|
5468
|
+
name: z191.string(),
|
|
5469
|
+
remote: z191.boolean()
|
|
5464
5470
|
});
|
|
5465
|
-
var RGB =
|
|
5466
|
-
r:
|
|
5467
|
-
g:
|
|
5468
|
-
b:
|
|
5471
|
+
var RGB = z191.object({
|
|
5472
|
+
r: z191.number(),
|
|
5473
|
+
g: z191.number(),
|
|
5474
|
+
b: z191.number()
|
|
5469
5475
|
});
|
|
5470
5476
|
var RGBA = RGB.extend({
|
|
5471
|
-
a:
|
|
5472
|
-
});
|
|
5473
|
-
var VariableAlias =
|
|
5474
|
-
type:
|
|
5475
|
-
id:
|
|
5476
|
-
resolvedValue:
|
|
5477
|
-
referenceOrigin: ReferencedVariableOrigin.optional().or(
|
|
5478
|
-
});
|
|
5479
|
-
var VariableValue =
|
|
5480
|
-
var ResolvedVariableType =
|
|
5481
|
-
var Variable =
|
|
5482
|
-
id:
|
|
5483
|
-
name:
|
|
5484
|
-
key:
|
|
5485
|
-
variableCollectionId:
|
|
5477
|
+
a: z191.number()
|
|
5478
|
+
});
|
|
5479
|
+
var VariableAlias = z191.object({
|
|
5480
|
+
type: z191.literal("VARIABLE_ALIAS"),
|
|
5481
|
+
id: z191.string(),
|
|
5482
|
+
resolvedValue: z191.boolean().or(z191.number()).or(z191.string()).or(RGBA).or(RGB).optional(),
|
|
5483
|
+
referenceOrigin: ReferencedVariableOrigin.optional().or(z191.null())
|
|
5484
|
+
});
|
|
5485
|
+
var VariableValue = z191.boolean().or(z191.number()).or(z191.string()).or(RGBA).or(RGB).or(VariableAlias);
|
|
5486
|
+
var ResolvedVariableType = z191.enum(["BOOLEAN", "FLOAT", "STRING", "COLOR"]);
|
|
5487
|
+
var Variable = z191.object({
|
|
5488
|
+
id: z191.string(),
|
|
5489
|
+
name: z191.string(),
|
|
5490
|
+
key: z191.string(),
|
|
5491
|
+
variableCollectionId: z191.string(),
|
|
5486
5492
|
resolvedType: ResolvedVariableType,
|
|
5487
|
-
valuesByMode:
|
|
5488
|
-
remote:
|
|
5489
|
-
description:
|
|
5490
|
-
hiddenFromPublishing:
|
|
5491
|
-
scopes:
|
|
5492
|
-
codeSyntax:
|
|
5493
|
-
});
|
|
5494
|
-
var VariableMode =
|
|
5495
|
-
modeId:
|
|
5496
|
-
name:
|
|
5497
|
-
});
|
|
5498
|
-
var Collection2 =
|
|
5499
|
-
id:
|
|
5500
|
-
name:
|
|
5501
|
-
modes:
|
|
5502
|
-
defaultModeId:
|
|
5503
|
-
remote:
|
|
5504
|
-
hiddenFromPublishing:
|
|
5505
|
-
});
|
|
5506
|
-
var VariablesMapping =
|
|
5507
|
-
variableCollections:
|
|
5508
|
-
variableMode:
|
|
5509
|
-
supernovaBrand:
|
|
5510
|
-
supernovaTheme:
|
|
5511
|
-
});
|
|
5512
|
-
var FormattedCollections =
|
|
5513
|
-
variables:
|
|
5514
|
-
variableCollections:
|
|
5515
|
-
mappings:
|
|
5516
|
-
variablesOrder:
|
|
5493
|
+
valuesByMode: z191.record(VariableValue),
|
|
5494
|
+
remote: z191.boolean(),
|
|
5495
|
+
description: z191.string(),
|
|
5496
|
+
hiddenFromPublishing: z191.boolean(),
|
|
5497
|
+
scopes: z191.array(VariableScope),
|
|
5498
|
+
codeSyntax: z191.record(z191.any()).optional()
|
|
5499
|
+
});
|
|
5500
|
+
var VariableMode = z191.object({
|
|
5501
|
+
modeId: z191.string(),
|
|
5502
|
+
name: z191.string()
|
|
5503
|
+
});
|
|
5504
|
+
var Collection2 = z191.object({
|
|
5505
|
+
id: z191.string(),
|
|
5506
|
+
name: z191.string(),
|
|
5507
|
+
modes: z191.array(VariableMode),
|
|
5508
|
+
defaultModeId: z191.string(),
|
|
5509
|
+
remote: z191.boolean(),
|
|
5510
|
+
hiddenFromPublishing: z191.boolean()
|
|
5511
|
+
});
|
|
5512
|
+
var VariablesMapping = z191.object({
|
|
5513
|
+
variableCollections: z191.array(z191.string()).min(1),
|
|
5514
|
+
variableMode: z191.string().min(1),
|
|
5515
|
+
supernovaBrand: z191.string().min(1),
|
|
5516
|
+
supernovaTheme: z191.string().min(1).optional().or(z191.null())
|
|
5517
|
+
});
|
|
5518
|
+
var FormattedCollections = z191.object({
|
|
5519
|
+
variables: z191.record(z191.string(), Variable),
|
|
5520
|
+
variableCollections: z191.record(z191.string(), Collection2),
|
|
5521
|
+
mappings: z191.array(VariablesMapping).optional(),
|
|
5522
|
+
variablesOrder: z191.string().array().optional()
|
|
5517
5523
|
});
|
|
5518
5524
|
|
|
5519
5525
|
// src/api/dto/design-systems/import-job.ts
|
|
5520
|
-
import { z as
|
|
5521
|
-
var DTOImportJob =
|
|
5522
|
-
id:
|
|
5523
|
-
designSystemId:
|
|
5524
|
-
designSystemVersionId:
|
|
5525
|
-
operation:
|
|
5526
|
-
createdAt:
|
|
5527
|
-
stateChangedAt:
|
|
5526
|
+
import { z as z192 } from "zod";
|
|
5527
|
+
var DTOImportJob = z192.object({
|
|
5528
|
+
id: z192.string(),
|
|
5529
|
+
designSystemId: z192.string(),
|
|
5530
|
+
designSystemVersionId: z192.string(),
|
|
5531
|
+
operation: z192.literal("Import"),
|
|
5532
|
+
createdAt: z192.coerce.date(),
|
|
5533
|
+
stateChangedAt: z192.coerce.date(),
|
|
5528
5534
|
state: ImportJobState,
|
|
5529
|
-
sourceIds:
|
|
5535
|
+
sourceIds: z192.string().array()
|
|
5530
5536
|
});
|
|
5531
|
-
var DTOImportJobResponse =
|
|
5537
|
+
var DTOImportJobResponse = z192.object({
|
|
5532
5538
|
job: DTOImportJob
|
|
5533
5539
|
});
|
|
5534
|
-
var DTOBffFigmaImportRequestBody =
|
|
5535
|
-
type:
|
|
5536
|
-
brandPersistentId:
|
|
5537
|
-
fileId:
|
|
5540
|
+
var DTOBffFigmaImportRequestBody = z192.object({
|
|
5541
|
+
type: z192.literal(DataSourceRemoteType.Enum.Figma),
|
|
5542
|
+
brandPersistentId: z192.string().optional(),
|
|
5543
|
+
fileId: z192.string(),
|
|
5538
5544
|
scope: DataSourceFigmaScope,
|
|
5539
5545
|
autoImportMode: DataSourceAutoImportMode
|
|
5540
5546
|
});
|
|
5541
|
-
var DTOBffUploadImportRequestBody =
|
|
5542
|
-
type:
|
|
5543
|
-
brandPersistentId:
|
|
5544
|
-
sourceName:
|
|
5545
|
-
remoteId:
|
|
5546
|
-
isTokenTypeSplitEnabled:
|
|
5547
|
-
payload:
|
|
5547
|
+
var DTOBffUploadImportRequestBody = z192.object({
|
|
5548
|
+
type: z192.enum([DataSourceRemoteType.Enum.FigmaVariablesPlugin, "Upload"]).transform((v) => DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
5549
|
+
brandPersistentId: z192.string().optional(),
|
|
5550
|
+
sourceName: z192.string().optional(),
|
|
5551
|
+
remoteId: z192.string(),
|
|
5552
|
+
isTokenTypeSplitEnabled: z192.boolean().optional(),
|
|
5553
|
+
payload: z192.any()
|
|
5548
5554
|
});
|
|
5549
|
-
var DTOBffImportRequestBody =
|
|
5555
|
+
var DTOBffImportRequestBody = z192.discriminatedUnion("type", [
|
|
5550
5556
|
DTOBffFigmaImportRequestBody,
|
|
5551
5557
|
DTOBffUploadImportRequestBody
|
|
5552
5558
|
]);
|
|
5553
5559
|
|
|
5554
5560
|
// src/api/dto/design-systems/stats.ts
|
|
5555
|
-
import { z as
|
|
5556
|
-
var DTODesignSystemVersionStats =
|
|
5557
|
-
tokens:
|
|
5558
|
-
designSystemComponents:
|
|
5559
|
-
assets:
|
|
5560
|
-
documentationPages:
|
|
5561
|
+
import { z as z193 } from "zod";
|
|
5562
|
+
var DTODesignSystemVersionStats = z193.object({
|
|
5563
|
+
tokens: z193.number(),
|
|
5564
|
+
designSystemComponents: z193.number(),
|
|
5565
|
+
assets: z193.number(),
|
|
5566
|
+
documentationPages: z193.number()
|
|
5561
5567
|
});
|
|
5562
|
-
var DTODesignSystemVersionStatsQuery =
|
|
5563
|
-
brandId:
|
|
5568
|
+
var DTODesignSystemVersionStatsQuery = z193.object({
|
|
5569
|
+
brandId: z193.string().optional()
|
|
5564
5570
|
});
|
|
5565
5571
|
|
|
5566
5572
|
// src/api/dto/design-systems/version.ts
|
|
5567
5573
|
import { z as z206 } from "zod";
|
|
5568
5574
|
|
|
5569
5575
|
// src/api/payloads/design-systems/brand.ts
|
|
5570
|
-
import { z as
|
|
5571
|
-
var DTOCreateBrandInput =
|
|
5572
|
-
persistentId:
|
|
5573
|
-
meta:
|
|
5574
|
-
name:
|
|
5575
|
-
description:
|
|
5576
|
+
import { z as z194 } from "zod";
|
|
5577
|
+
var DTOCreateBrandInput = z194.object({
|
|
5578
|
+
persistentId: z194.string().uuid(),
|
|
5579
|
+
meta: z194.object({
|
|
5580
|
+
name: z194.string(),
|
|
5581
|
+
description: z194.string()
|
|
5576
5582
|
})
|
|
5577
5583
|
});
|
|
5578
5584
|
|
|
5579
5585
|
// src/api/payloads/design-systems/update-design-system.ts
|
|
5580
|
-
import { z as
|
|
5586
|
+
import { z as z195 } from "zod";
|
|
5581
5587
|
var DTODesignSystemUpdateInput = DesignSystem.partial().omit({
|
|
5582
5588
|
id: true,
|
|
5583
5589
|
workspaceId: true,
|
|
@@ -5589,40 +5595,40 @@ var DTODesignSystemUpdateInput = DesignSystem.partial().omit({
|
|
|
5589
5595
|
}).extend({
|
|
5590
5596
|
meta: ObjectMeta.partial().optional()
|
|
5591
5597
|
});
|
|
5592
|
-
var DTODesignSystemUpdateAccessModeInput =
|
|
5598
|
+
var DTODesignSystemUpdateAccessModeInput = z195.object({
|
|
5593
5599
|
accessMode: DesignSystemAccessMode,
|
|
5594
|
-
retain:
|
|
5595
|
-
userIds:
|
|
5596
|
-
inviteIds:
|
|
5600
|
+
retain: z195.object({
|
|
5601
|
+
userIds: z195.string().array(),
|
|
5602
|
+
inviteIds: z195.string().array()
|
|
5597
5603
|
}).optional()
|
|
5598
5604
|
});
|
|
5599
5605
|
|
|
5600
5606
|
// src/api/payloads/design-systems/version.ts
|
|
5601
|
-
import { z as
|
|
5602
|
-
var ObjectMeta2 =
|
|
5603
|
-
name:
|
|
5604
|
-
description:
|
|
5607
|
+
import { z as z196 } from "zod";
|
|
5608
|
+
var ObjectMeta2 = z196.object({
|
|
5609
|
+
name: z196.string().max(150).optional(),
|
|
5610
|
+
description: z196.string().max(2e3).optional()
|
|
5605
5611
|
});
|
|
5606
5612
|
function validateDesignSystemVersion(version) {
|
|
5607
5613
|
const urlCompliantRegex = /^[a-zA-Z0-9+.-]+$/;
|
|
5608
5614
|
return urlCompliantRegex.test(version);
|
|
5609
5615
|
}
|
|
5610
|
-
var DTOCreateVersionInput =
|
|
5616
|
+
var DTOCreateVersionInput = z196.object({
|
|
5611
5617
|
meta: ObjectMeta2,
|
|
5612
|
-
version:
|
|
5618
|
+
version: z196.string().refine(validateDesignSystemVersion, {
|
|
5613
5619
|
message: "Invalid semantic versioning format"
|
|
5614
5620
|
}),
|
|
5615
|
-
changeLog:
|
|
5621
|
+
changeLog: z196.string().optional()
|
|
5616
5622
|
});
|
|
5617
|
-
var DTOUpdateVersionInput =
|
|
5623
|
+
var DTOUpdateVersionInput = z196.object({
|
|
5618
5624
|
meta: ObjectMeta2,
|
|
5619
|
-
version:
|
|
5625
|
+
version: z196.string(),
|
|
5620
5626
|
// required for PUT, but not editable
|
|
5621
|
-
changeLog:
|
|
5627
|
+
changeLog: z196.string()
|
|
5622
5628
|
});
|
|
5623
5629
|
|
|
5624
5630
|
// src/api/payloads/documentation/block-definitions.ts
|
|
5625
|
-
import { z as
|
|
5631
|
+
import { z as z197 } from "zod";
|
|
5626
5632
|
|
|
5627
5633
|
// src/api/dto/documentation/block-definition.ts
|
|
5628
5634
|
var DTOPageBlockDefinitionBehavior = PageBlockDefinitionBehavior;
|
|
@@ -5634,18 +5640,76 @@ var DTOPageBlockColorV2 = PageBlockColorV2;
|
|
|
5634
5640
|
var DTOPageBlockDefinition = PageBlockDefinition;
|
|
5635
5641
|
|
|
5636
5642
|
// src/api/payloads/documentation/block-definitions.ts
|
|
5637
|
-
var DTOGetBlockDefinitionsOutput =
|
|
5638
|
-
definitions:
|
|
5643
|
+
var DTOGetBlockDefinitionsOutput = z197.object({
|
|
5644
|
+
definitions: z197.array(DTOPageBlockDefinition)
|
|
5639
5645
|
});
|
|
5640
5646
|
|
|
5641
5647
|
// src/api/payloads/documentation/design-data-doc-diff.ts
|
|
5642
|
-
import { z as
|
|
5643
|
-
var DTODocumentationPublishTypeQueryParams =
|
|
5644
|
-
environment:
|
|
5648
|
+
import { z as z198 } from "zod";
|
|
5649
|
+
var DTODocumentationPublishTypeQueryParams = z198.object({
|
|
5650
|
+
environment: z198.enum(["Live", "Preview"])
|
|
5645
5651
|
});
|
|
5646
5652
|
|
|
5647
5653
|
// src/api/payloads/export/pipeline.ts
|
|
5648
5654
|
import { z as z200 } from "zod";
|
|
5655
|
+
|
|
5656
|
+
// src/api/dto/export/exporter-property.ts
|
|
5657
|
+
import { z as z199 } from "zod";
|
|
5658
|
+
var PrimitiveValue = z199.number().or(z199.boolean()).or(z199.string());
|
|
5659
|
+
var ArrayValue = z199.array(z199.string());
|
|
5660
|
+
var ObjectValue = z199.record(z199.string());
|
|
5661
|
+
var DTOExporterPropertyDefinitionValue = PrimitiveValue.or(ArrayValue).or(ObjectValue);
|
|
5662
|
+
var DTOExporterPropertyType = z199.enum(["Enum", "Boolean", "String", "Number", "Array", "Object"]);
|
|
5663
|
+
var PropertyDefinitionBase = z199.object({
|
|
5664
|
+
key: z199.string(),
|
|
5665
|
+
title: z199.string(),
|
|
5666
|
+
description: z199.string()
|
|
5667
|
+
});
|
|
5668
|
+
var DTOExporterPropertyDefinitionEnum = PropertyDefinitionBase.extend({
|
|
5669
|
+
type: z199.literal(DTOExporterPropertyType.Enum.Enum),
|
|
5670
|
+
options: z199.string().array(),
|
|
5671
|
+
default: z199.string()
|
|
5672
|
+
});
|
|
5673
|
+
var DTOExporterPropertyDefinitionBoolean = PropertyDefinitionBase.extend({
|
|
5674
|
+
type: z199.literal(DTOExporterPropertyType.Enum.Boolean),
|
|
5675
|
+
default: z199.boolean()
|
|
5676
|
+
});
|
|
5677
|
+
var DTOExporterPropertyDefinitionString = PropertyDefinitionBase.extend({
|
|
5678
|
+
type: z199.literal(DTOExporterPropertyType.Enum.String),
|
|
5679
|
+
default: z199.string()
|
|
5680
|
+
});
|
|
5681
|
+
var DTOExporterPropertyDefinitionNumber = PropertyDefinitionBase.extend({
|
|
5682
|
+
type: z199.literal(DTOExporterPropertyType.Enum.Number),
|
|
5683
|
+
default: z199.number()
|
|
5684
|
+
});
|
|
5685
|
+
var DTOExporterPropertyDefinitionArray = PropertyDefinitionBase.extend({
|
|
5686
|
+
type: z199.literal(DTOExporterPropertyType.Enum.Array),
|
|
5687
|
+
default: ArrayValue
|
|
5688
|
+
});
|
|
5689
|
+
var DTOExporterPropertyDefinitionObject = PropertyDefinitionBase.extend({
|
|
5690
|
+
type: z199.literal(DTOExporterPropertyType.Enum.Object),
|
|
5691
|
+
default: ObjectValue,
|
|
5692
|
+
allowedKeys: z199.object({
|
|
5693
|
+
options: z199.string().array()
|
|
5694
|
+
}).optional(),
|
|
5695
|
+
allowedValues: z199.object({
|
|
5696
|
+
options: z199.string().array()
|
|
5697
|
+
}).optional()
|
|
5698
|
+
});
|
|
5699
|
+
var DTOExporterPropertyDefinition = z199.discriminatedUnion("type", [
|
|
5700
|
+
DTOExporterPropertyDefinitionEnum,
|
|
5701
|
+
DTOExporterPropertyDefinitionBoolean,
|
|
5702
|
+
DTOExporterPropertyDefinitionString,
|
|
5703
|
+
DTOExporterPropertyDefinitionNumber,
|
|
5704
|
+
DTOExporterPropertyDefinitionArray,
|
|
5705
|
+
DTOExporterPropertyDefinitionObject
|
|
5706
|
+
]);
|
|
5707
|
+
var DTOExporterPropertyDefinitionsResponse = z199.object({
|
|
5708
|
+
properties: DTOExporterPropertyDefinition.array()
|
|
5709
|
+
});
|
|
5710
|
+
var DTOExporterPropertyDefinitionValueMap = z199.record(DTOExporterPropertyDefinitionValue);
|
|
5711
|
+
|
|
5712
|
+
// src/api/payloads/export/pipeline.ts
|
|
5649
5713
|
var DTOPipelineCreateBody = z200.object({
|
|
5650
5714
|
name: z200.string(),
|
|
5651
5715
|
exporterId: z200.string(),
|
|
@@ -5655,6 +5719,7 @@ var DTOPipelineCreateBody = z200.object({
|
|
|
5655
5719
|
brandPersistentId: z200.string().optional(),
|
|
5656
5720
|
themePersistentId: z200.string().optional(),
|
|
5657
5721
|
themePersistentIds: z200.string().array().optional(),
|
|
5722
|
+
exporterConfiguration: DTOExporterPropertyDefinitionValueMap.optional(),
|
|
5658
5723
|
destination: PipelineDestinationType.optional(),
|
|
5659
5724
|
gitQuery: GitObjectsQuery,
|
|
5660
5725
|
destinations: z200.object({
|
|
@@ -6244,6 +6309,7 @@ var DTOExporter = z225.object({
|
|
|
6244
6309
|
isDefaultDocumentationExporter: z225.boolean(),
|
|
6245
6310
|
iconURL: z225.string().optional(),
|
|
6246
6311
|
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
6312
|
+
properties: DTOExporterPropertyDefinition.array().optional(),
|
|
6247
6313
|
customBlocks: PulsarCustomBlock.array(),
|
|
6248
6314
|
blockVariants: z225.record(z225.string(), PulsarContributionVariant.array()),
|
|
6249
6315
|
usesBrands: z225.boolean(),
|
|
@@ -6324,7 +6390,8 @@ var DTOExportJob = z226.object({
|
|
|
6324
6390
|
result: DTOExportJobResult.optional(),
|
|
6325
6391
|
brandPersistentId: z226.string().optional(),
|
|
6326
6392
|
themePersistentId: z226.string().optional(),
|
|
6327
|
-
themePersistentIds: z226.string().array().optional()
|
|
6393
|
+
themePersistentIds: z226.string().array().optional(),
|
|
6394
|
+
exporterConfiguration: DTOExporterPropertyDefinitionValueMap.optional()
|
|
6328
6395
|
});
|
|
6329
6396
|
var DTOExportJobResponse = z226.object({
|
|
6330
6397
|
job: DTOExportJob
|
|
@@ -6348,6 +6415,7 @@ var DTOPipeline = z227.object({
|
|
|
6348
6415
|
brandPersistentId: z227.string().optional(),
|
|
6349
6416
|
themePersistentId: z227.string().optional(),
|
|
6350
6417
|
themePersistentIds: z227.string().array().optional(),
|
|
6418
|
+
exporterConfiguration: DTOExporterPropertyDefinitionValueMap.optional(),
|
|
6351
6419
|
...ExportDestinationsMap.shape,
|
|
6352
6420
|
latestJobs: DTOExportJob.array()
|
|
6353
6421
|
});
|
|
@@ -6372,38 +6440,53 @@ var DTOPublishDocumentationResponse = z228.object({
|
|
|
6372
6440
|
job: DTOExportJob
|
|
6373
6441
|
});
|
|
6374
6442
|
|
|
6375
|
-
// src/api/dto/elements/components/figma-component.ts
|
|
6376
|
-
import
|
|
6377
|
-
var
|
|
6378
|
-
var DTOFigmaComponentPropertyMap = z229.record(DTOFigmaComponentProperty);
|
|
6379
|
-
var DTOFigmaComponent = z229.object({
|
|
6443
|
+
// src/api/dto/elements/components/figma-component-group.ts
|
|
6444
|
+
import z229 from "zod";
|
|
6445
|
+
var DTOFigmaComponentGroup = z229.object({
|
|
6380
6446
|
id: z229.string(),
|
|
6381
|
-
persistentId: z229.string(),
|
|
6382
6447
|
designSystemVersionId: z229.string(),
|
|
6448
|
+
persistentId: z229.string(),
|
|
6449
|
+
isRoot: z229.boolean(),
|
|
6383
6450
|
brandId: z229.string(),
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6451
|
+
meta: DTOObjectMeta,
|
|
6452
|
+
childrenIds: z229.string().array()
|
|
6453
|
+
});
|
|
6454
|
+
var DTOFigmaComponentGroupListResponse = z229.object({
|
|
6455
|
+
groups: DTOFigmaComponentGroup.array()
|
|
6456
|
+
});
|
|
6457
|
+
|
|
6458
|
+
// src/api/dto/elements/components/figma-component.ts
|
|
6459
|
+
import { z as z230 } from "zod";
|
|
6460
|
+
var DTOFigmaComponentProperty = FigmaComponentProperty;
|
|
6461
|
+
var DTOFigmaComponentPropertyMap = z230.record(DTOFigmaComponentProperty);
|
|
6462
|
+
var DTOFigmaComponent = z230.object({
|
|
6463
|
+
id: z230.string(),
|
|
6464
|
+
persistentId: z230.string(),
|
|
6465
|
+
designSystemVersionId: z230.string(),
|
|
6466
|
+
brandId: z230.string(),
|
|
6467
|
+
thumbnailUrl: z230.string().optional(),
|
|
6468
|
+
svgUrl: z230.string().optional(),
|
|
6469
|
+
exportProperties: z230.object({
|
|
6470
|
+
isAsset: z230.boolean()
|
|
6388
6471
|
}),
|
|
6389
|
-
createdAt:
|
|
6390
|
-
updatedAt:
|
|
6472
|
+
createdAt: z230.coerce.date(),
|
|
6473
|
+
updatedAt: z230.coerce.date(),
|
|
6391
6474
|
meta: ObjectMeta,
|
|
6392
6475
|
originComponent: FigmaComponentOrigin.optional(),
|
|
6393
|
-
parentComponentPersistentId:
|
|
6394
|
-
childrenPersistentIds:
|
|
6476
|
+
parentComponentPersistentId: z230.string().optional(),
|
|
6477
|
+
childrenPersistentIds: z230.string().array().optional(),
|
|
6395
6478
|
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
6396
|
-
variantPropertyValues:
|
|
6479
|
+
variantPropertyValues: z230.record(z230.string()).optional()
|
|
6397
6480
|
});
|
|
6398
|
-
var DTOFigmaComponentListResponse =
|
|
6481
|
+
var DTOFigmaComponentListResponse = z230.object({
|
|
6399
6482
|
components: DTOFigmaComponent.array()
|
|
6400
6483
|
});
|
|
6401
6484
|
|
|
6402
6485
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6403
|
-
import { z as
|
|
6486
|
+
import { z as z232 } from "zod";
|
|
6404
6487
|
|
|
6405
6488
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
6406
|
-
import { z as
|
|
6489
|
+
import { z as z231 } from "zod";
|
|
6407
6490
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
6408
6491
|
sortOrder: true,
|
|
6409
6492
|
parentPersistentId: true,
|
|
@@ -6413,13 +6496,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6413
6496
|
data: true,
|
|
6414
6497
|
shortPersistentId: true
|
|
6415
6498
|
}).extend({
|
|
6416
|
-
title:
|
|
6417
|
-
isRoot:
|
|
6418
|
-
childrenIds:
|
|
6499
|
+
title: z231.string(),
|
|
6500
|
+
isRoot: z231.boolean(),
|
|
6501
|
+
childrenIds: z231.array(z231.string()),
|
|
6419
6502
|
groupBehavior: DocumentationGroupBehavior,
|
|
6420
|
-
shortPersistentId:
|
|
6503
|
+
shortPersistentId: z231.string(),
|
|
6421
6504
|
configuration: DTODocumentationItemConfigurationV2,
|
|
6422
|
-
type:
|
|
6505
|
+
type: z231.literal("Group"),
|
|
6423
6506
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
6424
6507
|
draftState: DTODocumentationDraftState.optional(),
|
|
6425
6508
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -6427,127 +6510,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6427
6510
|
//** An approval state for frontend to utilize. */
|
|
6428
6511
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
6429
6512
|
});
|
|
6430
|
-
var DTOCreateDocumentationGroupInput =
|
|
6513
|
+
var DTOCreateDocumentationGroupInput = z231.object({
|
|
6431
6514
|
// Identifier
|
|
6432
|
-
persistentId:
|
|
6515
|
+
persistentId: z231.string(),
|
|
6433
6516
|
// Group properties
|
|
6434
|
-
title:
|
|
6517
|
+
title: z231.string(),
|
|
6435
6518
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
6436
6519
|
// Group placement properties
|
|
6437
|
-
afterPersistentId:
|
|
6438
|
-
parentPersistentId:
|
|
6520
|
+
afterPersistentId: z231.string().nullish(),
|
|
6521
|
+
parentPersistentId: z231.string()
|
|
6439
6522
|
});
|
|
6440
|
-
var DTOUpdateDocumentationGroupInput =
|
|
6523
|
+
var DTOUpdateDocumentationGroupInput = z231.object({
|
|
6441
6524
|
// Identifier of the group to update
|
|
6442
|
-
id:
|
|
6525
|
+
id: z231.string(),
|
|
6443
6526
|
// Group properties
|
|
6444
|
-
title:
|
|
6527
|
+
title: z231.string().optional(),
|
|
6445
6528
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
6446
6529
|
});
|
|
6447
|
-
var DTOMoveDocumentationGroupInput =
|
|
6530
|
+
var DTOMoveDocumentationGroupInput = z231.object({
|
|
6448
6531
|
// Identifier of the group to update
|
|
6449
|
-
id:
|
|
6532
|
+
id: z231.string(),
|
|
6450
6533
|
// Group placement properties
|
|
6451
|
-
parentPersistentId:
|
|
6452
|
-
afterPersistentId:
|
|
6534
|
+
parentPersistentId: z231.string(),
|
|
6535
|
+
afterPersistentId: z231.string().nullish()
|
|
6453
6536
|
});
|
|
6454
|
-
var DTODuplicateDocumentationGroupInput =
|
|
6537
|
+
var DTODuplicateDocumentationGroupInput = z231.object({
|
|
6455
6538
|
// Identifier of the group to duplicate from
|
|
6456
|
-
id:
|
|
6539
|
+
id: z231.string(),
|
|
6457
6540
|
// New group persistent id
|
|
6458
|
-
persistentId:
|
|
6541
|
+
persistentId: z231.string(),
|
|
6459
6542
|
// Group placement properties
|
|
6460
|
-
afterPersistentId:
|
|
6461
|
-
parentPersistentId:
|
|
6543
|
+
afterPersistentId: z231.string().nullish(),
|
|
6544
|
+
parentPersistentId: z231.string()
|
|
6462
6545
|
});
|
|
6463
|
-
var DTOCreateDocumentationTabInput =
|
|
6546
|
+
var DTOCreateDocumentationTabInput = z231.object({
|
|
6464
6547
|
// New group persistent id
|
|
6465
|
-
persistentId:
|
|
6548
|
+
persistentId: z231.string(),
|
|
6466
6549
|
// If this is page, we will attempt to convert it to tab
|
|
6467
6550
|
// If this is tab group, we will add a new tab to it
|
|
6468
|
-
fromItemPersistentId:
|
|
6469
|
-
tabName:
|
|
6551
|
+
fromItemPersistentId: z231.string(),
|
|
6552
|
+
tabName: z231.string()
|
|
6470
6553
|
});
|
|
6471
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
6554
|
+
var DTODeleteDocumentationTabGroupInput = z231.object({
|
|
6472
6555
|
// Deleted group id
|
|
6473
|
-
id:
|
|
6556
|
+
id: z231.string()
|
|
6474
6557
|
});
|
|
6475
|
-
var DTODeleteDocumentationGroupInput =
|
|
6558
|
+
var DTODeleteDocumentationGroupInput = z231.object({
|
|
6476
6559
|
// Identifier
|
|
6477
|
-
id:
|
|
6560
|
+
id: z231.string(),
|
|
6478
6561
|
// Deletion options
|
|
6479
|
-
deleteSubtree:
|
|
6562
|
+
deleteSubtree: z231.boolean().default(false)
|
|
6480
6563
|
});
|
|
6481
6564
|
|
|
6482
6565
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6483
|
-
var SuccessPayload =
|
|
6484
|
-
success:
|
|
6566
|
+
var SuccessPayload = z232.object({
|
|
6567
|
+
success: z232.literal(true)
|
|
6485
6568
|
});
|
|
6486
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
6487
|
-
type:
|
|
6569
|
+
var DTODocumentationGroupCreateActionOutputV2 = z232.object({
|
|
6570
|
+
type: z232.literal("DocumentationGroupCreate"),
|
|
6488
6571
|
output: SuccessPayload
|
|
6489
6572
|
});
|
|
6490
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
6491
|
-
type:
|
|
6573
|
+
var DTODocumentationTabCreateActionOutputV2 = z232.object({
|
|
6574
|
+
type: z232.literal("DocumentationTabCreate"),
|
|
6492
6575
|
output: SuccessPayload
|
|
6493
6576
|
});
|
|
6494
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
6495
|
-
type:
|
|
6577
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z232.object({
|
|
6578
|
+
type: z232.literal("DocumentationGroupUpdate"),
|
|
6496
6579
|
output: SuccessPayload
|
|
6497
6580
|
});
|
|
6498
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
6499
|
-
type:
|
|
6581
|
+
var DTODocumentationGroupMoveActionOutputV2 = z232.object({
|
|
6582
|
+
type: z232.literal("DocumentationGroupMove"),
|
|
6500
6583
|
output: SuccessPayload
|
|
6501
6584
|
});
|
|
6502
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
6503
|
-
type:
|
|
6585
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z232.object({
|
|
6586
|
+
type: z232.literal("DocumentationGroupDuplicate"),
|
|
6504
6587
|
output: SuccessPayload
|
|
6505
6588
|
});
|
|
6506
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
6507
|
-
type:
|
|
6589
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z232.object({
|
|
6590
|
+
type: z232.literal("DocumentationGroupDelete"),
|
|
6508
6591
|
output: SuccessPayload
|
|
6509
6592
|
});
|
|
6510
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
6511
|
-
type:
|
|
6593
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z232.object({
|
|
6594
|
+
type: z232.literal("DocumentationTabGroupDelete"),
|
|
6512
6595
|
output: SuccessPayload
|
|
6513
6596
|
});
|
|
6514
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
6515
|
-
type:
|
|
6597
|
+
var DTODocumentationGroupCreateActionInputV2 = z232.object({
|
|
6598
|
+
type: z232.literal("DocumentationGroupCreate"),
|
|
6516
6599
|
input: DTOCreateDocumentationGroupInput
|
|
6517
6600
|
});
|
|
6518
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
6519
|
-
type:
|
|
6601
|
+
var DTODocumentationTabCreateActionInputV2 = z232.object({
|
|
6602
|
+
type: z232.literal("DocumentationTabCreate"),
|
|
6520
6603
|
input: DTOCreateDocumentationTabInput
|
|
6521
6604
|
});
|
|
6522
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
6523
|
-
type:
|
|
6605
|
+
var DTODocumentationGroupUpdateActionInputV2 = z232.object({
|
|
6606
|
+
type: z232.literal("DocumentationGroupUpdate"),
|
|
6524
6607
|
input: DTOUpdateDocumentationGroupInput
|
|
6525
6608
|
});
|
|
6526
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
6527
|
-
type:
|
|
6609
|
+
var DTODocumentationGroupMoveActionInputV2 = z232.object({
|
|
6610
|
+
type: z232.literal("DocumentationGroupMove"),
|
|
6528
6611
|
input: DTOMoveDocumentationGroupInput
|
|
6529
6612
|
});
|
|
6530
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
6531
|
-
type:
|
|
6613
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z232.object({
|
|
6614
|
+
type: z232.literal("DocumentationGroupDuplicate"),
|
|
6532
6615
|
input: DTODuplicateDocumentationGroupInput
|
|
6533
6616
|
});
|
|
6534
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
6535
|
-
type:
|
|
6617
|
+
var DTODocumentationGroupDeleteActionInputV2 = z232.object({
|
|
6618
|
+
type: z232.literal("DocumentationGroupDelete"),
|
|
6536
6619
|
input: DTODeleteDocumentationGroupInput
|
|
6537
6620
|
});
|
|
6538
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
6539
|
-
type:
|
|
6621
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z232.object({
|
|
6622
|
+
type: z232.literal("DocumentationTabGroupDelete"),
|
|
6540
6623
|
input: DTODeleteDocumentationTabGroupInput
|
|
6541
6624
|
});
|
|
6542
6625
|
|
|
6543
6626
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
6544
|
-
import { z as
|
|
6627
|
+
import { z as z234 } from "zod";
|
|
6545
6628
|
|
|
6546
6629
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
6547
|
-
import { z as
|
|
6548
|
-
var DocumentationColorV1 =
|
|
6549
|
-
aliasTo:
|
|
6550
|
-
value:
|
|
6630
|
+
import { z as z233 } from "zod";
|
|
6631
|
+
var DocumentationColorV1 = z233.object({
|
|
6632
|
+
aliasTo: z233.string().optional(),
|
|
6633
|
+
value: z233.string().optional()
|
|
6551
6634
|
});
|
|
6552
6635
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
6553
6636
|
foregroundColor: true,
|
|
@@ -6556,10 +6639,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
6556
6639
|
foregroundColor: DocumentationColorV1.optional(),
|
|
6557
6640
|
backgroundColor: DocumentationColorV1.optional()
|
|
6558
6641
|
});
|
|
6559
|
-
var DTODocumentationItemConfigurationV1 =
|
|
6560
|
-
showSidebar:
|
|
6561
|
-
isPrivate:
|
|
6562
|
-
isHidden:
|
|
6642
|
+
var DTODocumentationItemConfigurationV1 = z233.object({
|
|
6643
|
+
showSidebar: z233.boolean(),
|
|
6644
|
+
isPrivate: z233.boolean(),
|
|
6645
|
+
isHidden: z233.boolean(),
|
|
6563
6646
|
header: DTODocumentationItemHeaderV1
|
|
6564
6647
|
});
|
|
6565
6648
|
|
|
@@ -6573,27 +6656,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
6573
6656
|
data: true,
|
|
6574
6657
|
shortPersistentId: true
|
|
6575
6658
|
}).extend({
|
|
6576
|
-
title:
|
|
6577
|
-
isRoot:
|
|
6578
|
-
childrenIds:
|
|
6659
|
+
title: z234.string(),
|
|
6660
|
+
isRoot: z234.boolean(),
|
|
6661
|
+
childrenIds: z234.array(z234.string()),
|
|
6579
6662
|
groupBehavior: DocumentationGroupBehavior,
|
|
6580
|
-
shortPersistentId:
|
|
6581
|
-
type:
|
|
6663
|
+
shortPersistentId: z234.string(),
|
|
6664
|
+
type: z234.literal("Group")
|
|
6582
6665
|
});
|
|
6583
6666
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
6584
6667
|
configuration: DTODocumentationItemConfigurationV1
|
|
6585
6668
|
});
|
|
6586
6669
|
|
|
6587
6670
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
6588
|
-
import { z as
|
|
6589
|
-
var DTODocumentationHierarchyV2 =
|
|
6590
|
-
pages:
|
|
6671
|
+
import { z as z235 } from "zod";
|
|
6672
|
+
var DTODocumentationHierarchyV2 = z235.object({
|
|
6673
|
+
pages: z235.array(
|
|
6591
6674
|
DTODocumentationPageV2.extend({
|
|
6592
6675
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6593
6676
|
draftState: DTODocumentationDraftState.optional()
|
|
6594
6677
|
})
|
|
6595
6678
|
),
|
|
6596
|
-
groups:
|
|
6679
|
+
groups: z235.array(
|
|
6597
6680
|
DTODocumentationGroupV2.extend({
|
|
6598
6681
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6599
6682
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -6602,84 +6685,84 @@ var DTODocumentationHierarchyV2 = z234.object({
|
|
|
6602
6685
|
});
|
|
6603
6686
|
|
|
6604
6687
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
6605
|
-
import { z as
|
|
6606
|
-
var SuccessPayload2 =
|
|
6607
|
-
success:
|
|
6688
|
+
import { z as z236 } from "zod";
|
|
6689
|
+
var SuccessPayload2 = z236.object({
|
|
6690
|
+
success: z236.literal(true)
|
|
6608
6691
|
});
|
|
6609
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
6610
|
-
type:
|
|
6692
|
+
var DTODocumentationPageCreateActionOutputV2 = z236.object({
|
|
6693
|
+
type: z236.literal("DocumentationPageCreate"),
|
|
6611
6694
|
output: SuccessPayload2
|
|
6612
6695
|
});
|
|
6613
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
6614
|
-
type:
|
|
6696
|
+
var DTODocumentationPageUpdateActionOutputV2 = z236.object({
|
|
6697
|
+
type: z236.literal("DocumentationPageUpdate"),
|
|
6615
6698
|
output: SuccessPayload2
|
|
6616
6699
|
});
|
|
6617
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
6618
|
-
type:
|
|
6700
|
+
var DTODocumentationPageMoveActionOutputV2 = z236.object({
|
|
6701
|
+
type: z236.literal("DocumentationPageMove"),
|
|
6619
6702
|
output: SuccessPayload2
|
|
6620
6703
|
});
|
|
6621
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
6622
|
-
type:
|
|
6704
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z236.object({
|
|
6705
|
+
type: z236.literal("DocumentationPageDuplicate"),
|
|
6623
6706
|
output: SuccessPayload2
|
|
6624
6707
|
});
|
|
6625
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
6626
|
-
type:
|
|
6708
|
+
var DTODocumentationPageDeleteActionOutputV2 = z236.object({
|
|
6709
|
+
type: z236.literal("DocumentationPageDelete"),
|
|
6627
6710
|
output: SuccessPayload2
|
|
6628
6711
|
});
|
|
6629
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
6630
|
-
type:
|
|
6712
|
+
var DTODocumentationPageRestoreActionOutput = z236.object({
|
|
6713
|
+
type: z236.literal("DocumentationPageRestore"),
|
|
6631
6714
|
output: SuccessPayload2
|
|
6632
6715
|
});
|
|
6633
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
6634
|
-
type:
|
|
6716
|
+
var DTODocumentationGroupRestoreActionOutput = z236.object({
|
|
6717
|
+
type: z236.literal("DocumentationGroupRestore"),
|
|
6635
6718
|
output: SuccessPayload2
|
|
6636
6719
|
});
|
|
6637
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
6638
|
-
type:
|
|
6720
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z236.object({
|
|
6721
|
+
type: z236.literal("DocumentationPageApprovalStateChange"),
|
|
6639
6722
|
output: SuccessPayload2
|
|
6640
6723
|
});
|
|
6641
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
6642
|
-
type:
|
|
6724
|
+
var DTODocumentationPageCreateActionInputV2 = z236.object({
|
|
6725
|
+
type: z236.literal("DocumentationPageCreate"),
|
|
6643
6726
|
input: DTOCreateDocumentationPageInputV2
|
|
6644
6727
|
});
|
|
6645
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
6646
|
-
type:
|
|
6728
|
+
var DTODocumentationPageUpdateActionInputV2 = z236.object({
|
|
6729
|
+
type: z236.literal("DocumentationPageUpdate"),
|
|
6647
6730
|
input: DTOUpdateDocumentationPageInputV2
|
|
6648
6731
|
});
|
|
6649
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
6650
|
-
type:
|
|
6732
|
+
var DTODocumentationPageMoveActionInputV2 = z236.object({
|
|
6733
|
+
type: z236.literal("DocumentationPageMove"),
|
|
6651
6734
|
input: DTOMoveDocumentationPageInputV2
|
|
6652
6735
|
});
|
|
6653
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
6654
|
-
type:
|
|
6736
|
+
var DTODocumentationPageDuplicateActionInputV2 = z236.object({
|
|
6737
|
+
type: z236.literal("DocumentationPageDuplicate"),
|
|
6655
6738
|
input: DTODuplicateDocumentationPageInputV2
|
|
6656
6739
|
});
|
|
6657
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
6658
|
-
type:
|
|
6740
|
+
var DTODocumentationPageDeleteActionInputV2 = z236.object({
|
|
6741
|
+
type: z236.literal("DocumentationPageDelete"),
|
|
6659
6742
|
input: DTODeleteDocumentationPageInputV2
|
|
6660
6743
|
});
|
|
6661
|
-
var DTODocumentationPageRestoreActionInput =
|
|
6662
|
-
type:
|
|
6744
|
+
var DTODocumentationPageRestoreActionInput = z236.object({
|
|
6745
|
+
type: z236.literal("DocumentationPageRestore"),
|
|
6663
6746
|
input: DTORestoreDocumentationPageInput
|
|
6664
6747
|
});
|
|
6665
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
6666
|
-
type:
|
|
6748
|
+
var DTODocumentationGroupRestoreActionInput = z236.object({
|
|
6749
|
+
type: z236.literal("DocumentationGroupRestore"),
|
|
6667
6750
|
input: DTORestoreDocumentationGroupInput
|
|
6668
6751
|
});
|
|
6669
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
6670
|
-
type:
|
|
6752
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z236.object({
|
|
6753
|
+
type: z236.literal("DocumentationPageApprovalStateChange"),
|
|
6671
6754
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
6672
6755
|
});
|
|
6673
6756
|
|
|
6674
6757
|
// src/api/dto/elements/documentation/page-content.ts
|
|
6675
|
-
import { z as
|
|
6758
|
+
import { z as z237 } from "zod";
|
|
6676
6759
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
6677
|
-
var DTODocumentationPageContentGetResponse =
|
|
6760
|
+
var DTODocumentationPageContentGetResponse = z237.object({
|
|
6678
6761
|
pageContent: DTODocumentationPageContent
|
|
6679
6762
|
});
|
|
6680
6763
|
|
|
6681
6764
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
6682
|
-
import { z as
|
|
6765
|
+
import { z as z238 } from "zod";
|
|
6683
6766
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
6684
6767
|
data: true,
|
|
6685
6768
|
meta: true,
|
|
@@ -6687,63 +6770,63 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
6687
6770
|
sortOrder: true
|
|
6688
6771
|
}).extend({
|
|
6689
6772
|
configuration: DTODocumentationItemConfigurationV1,
|
|
6690
|
-
blocks:
|
|
6691
|
-
title:
|
|
6692
|
-
path:
|
|
6773
|
+
blocks: z238.array(PageBlockV1),
|
|
6774
|
+
title: z238.string(),
|
|
6775
|
+
path: z238.string()
|
|
6693
6776
|
});
|
|
6694
6777
|
|
|
6695
6778
|
// src/api/dto/elements/documentation/structure.ts
|
|
6696
|
-
import { z as
|
|
6697
|
-
var DTODocumentationStructureItemType =
|
|
6698
|
-
var DTODocumentationStructureItemBase =
|
|
6779
|
+
import { z as z239 } from "zod";
|
|
6780
|
+
var DTODocumentationStructureItemType = z239.enum(["Group", "Page"]);
|
|
6781
|
+
var DTODocumentationStructureItemBase = z239.object({
|
|
6699
6782
|
type: DTODocumentationStructureItemType,
|
|
6700
|
-
id:
|
|
6701
|
-
designSystemVersionId:
|
|
6702
|
-
shortPersistentId:
|
|
6703
|
-
persistentId:
|
|
6704
|
-
title:
|
|
6705
|
-
createdAt:
|
|
6706
|
-
updatedAt:
|
|
6783
|
+
id: z239.string(),
|
|
6784
|
+
designSystemVersionId: z239.string(),
|
|
6785
|
+
shortPersistentId: z239.string(),
|
|
6786
|
+
persistentId: z239.string(),
|
|
6787
|
+
title: z239.string(),
|
|
6788
|
+
createdAt: z239.coerce.date(),
|
|
6789
|
+
updatedAt: z239.coerce.date()
|
|
6707
6790
|
});
|
|
6708
6791
|
var DTODocumentationStructureGroupItem = DTODocumentationStructureItemBase.extend({
|
|
6709
|
-
type:
|
|
6710
|
-
groupBehavior:
|
|
6711
|
-
childrenIds:
|
|
6712
|
-
isRoot:
|
|
6792
|
+
type: z239.literal(DTODocumentationStructureItemType.enum.Group),
|
|
6793
|
+
groupBehavior: z239.string(),
|
|
6794
|
+
childrenIds: z239.string().array(),
|
|
6795
|
+
isRoot: z239.boolean()
|
|
6713
6796
|
});
|
|
6714
6797
|
var DTODocumentationStructurePageItem = DTODocumentationStructureItemBase.extend({
|
|
6715
|
-
type:
|
|
6716
|
-
path:
|
|
6798
|
+
type: z239.literal(DTODocumentationStructureItemType.enum.Page),
|
|
6799
|
+
path: z239.string()
|
|
6717
6800
|
});
|
|
6718
|
-
var DTODocumentationStructureItem =
|
|
6801
|
+
var DTODocumentationStructureItem = z239.discriminatedUnion("type", [
|
|
6719
6802
|
DTODocumentationStructureGroupItem,
|
|
6720
6803
|
DTODocumentationStructurePageItem
|
|
6721
6804
|
]);
|
|
6722
|
-
var DTODocumentationStructure =
|
|
6723
|
-
items:
|
|
6805
|
+
var DTODocumentationStructure = z239.object({
|
|
6806
|
+
items: z239.array(DTODocumentationStructureItem)
|
|
6724
6807
|
});
|
|
6725
6808
|
|
|
6726
6809
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
6727
|
-
import { z as
|
|
6810
|
+
import { z as z240 } from "zod";
|
|
6728
6811
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
6729
|
-
var DTOFigmaNodeOrigin =
|
|
6730
|
-
sourceId:
|
|
6731
|
-
fileId:
|
|
6732
|
-
parentName:
|
|
6812
|
+
var DTOFigmaNodeOrigin = z240.object({
|
|
6813
|
+
sourceId: z240.string(),
|
|
6814
|
+
fileId: z240.string().optional(),
|
|
6815
|
+
parentName: z240.string().optional()
|
|
6733
6816
|
});
|
|
6734
|
-
var DTOFigmaNodeData =
|
|
6817
|
+
var DTOFigmaNodeData = z240.object({
|
|
6735
6818
|
// Id of the node in the Figma file
|
|
6736
|
-
figmaNodeId:
|
|
6819
|
+
figmaNodeId: z240.string(),
|
|
6737
6820
|
// Validity
|
|
6738
|
-
isValid:
|
|
6821
|
+
isValid: z240.boolean(),
|
|
6739
6822
|
// Asset data
|
|
6740
|
-
assetId:
|
|
6741
|
-
assetUrl:
|
|
6823
|
+
assetId: z240.string(),
|
|
6824
|
+
assetUrl: z240.string(),
|
|
6742
6825
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
6743
6826
|
// Asset metadata
|
|
6744
|
-
assetScale:
|
|
6745
|
-
assetWidth:
|
|
6746
|
-
assetHeight:
|
|
6827
|
+
assetScale: z240.number(),
|
|
6828
|
+
assetWidth: z240.number().optional(),
|
|
6829
|
+
assetHeight: z240.number().optional()
|
|
6747
6830
|
});
|
|
6748
6831
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
6749
6832
|
data: true,
|
|
@@ -6752,15 +6835,15 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
6752
6835
|
data: DTOFigmaNodeData,
|
|
6753
6836
|
origin: DTOFigmaNodeOrigin
|
|
6754
6837
|
});
|
|
6755
|
-
var DTOFigmaNodeRenderInput =
|
|
6838
|
+
var DTOFigmaNodeRenderInput = z240.object({
|
|
6756
6839
|
/**
|
|
6757
6840
|
* Id of a design system's data source representing a linked Figma file
|
|
6758
6841
|
*/
|
|
6759
|
-
sourceId:
|
|
6842
|
+
sourceId: z240.string(),
|
|
6760
6843
|
/**
|
|
6761
6844
|
* Id of a node within the Figma file
|
|
6762
6845
|
*/
|
|
6763
|
-
figmaFileNodeId:
|
|
6846
|
+
figmaFileNodeId: z240.string(),
|
|
6764
6847
|
/**
|
|
6765
6848
|
* Format in which the node must be rendered, png by default.
|
|
6766
6849
|
*/
|
|
@@ -6768,84 +6851,97 @@ var DTOFigmaNodeRenderInput = z239.object({
|
|
|
6768
6851
|
});
|
|
6769
6852
|
|
|
6770
6853
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
6771
|
-
import { z as
|
|
6772
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
6773
|
-
type:
|
|
6774
|
-
figmaNodes:
|
|
6854
|
+
import { z as z241 } from "zod";
|
|
6855
|
+
var DTOFigmaNodeRenderActionOutput = z241.object({
|
|
6856
|
+
type: z241.literal("FigmaNodeRender"),
|
|
6857
|
+
figmaNodes: z241.array(DTOFigmaNode)
|
|
6775
6858
|
});
|
|
6776
|
-
var DTOFigmaNodeRenderActionInput =
|
|
6777
|
-
type:
|
|
6859
|
+
var DTOFigmaNodeRenderActionInput = z241.object({
|
|
6860
|
+
type: z241.literal("FigmaNodeRender"),
|
|
6778
6861
|
input: DTOFigmaNodeRenderInput.array()
|
|
6779
6862
|
});
|
|
6780
6863
|
|
|
6864
|
+
// src/api/dto/elements/frame-node-structures/frame-node-structure.ts
|
|
6865
|
+
import { z as z242 } from "zod";
|
|
6866
|
+
var DTOFrameNodeStructure = z242.object({
|
|
6867
|
+
id: z242.string(),
|
|
6868
|
+
persistentId: z242.string(),
|
|
6869
|
+
designSystemVersionId: z242.string(),
|
|
6870
|
+
origin: FigmaFileStructureOrigin,
|
|
6871
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
6872
|
+
});
|
|
6873
|
+
var DTOFrameNodeStructureListResponse = z242.object({
|
|
6874
|
+
structures: DTOFrameNodeStructure.array()
|
|
6875
|
+
});
|
|
6876
|
+
|
|
6781
6877
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
6782
|
-
import { z as
|
|
6878
|
+
import { z as z243 } from "zod";
|
|
6783
6879
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
6784
|
-
var DTOElementPropertyDefinitionOption =
|
|
6785
|
-
id:
|
|
6786
|
-
name:
|
|
6880
|
+
var DTOElementPropertyDefinitionOption = z243.object({
|
|
6881
|
+
id: z243.string(),
|
|
6882
|
+
name: z243.string(),
|
|
6787
6883
|
backgroundColor: DTOColorTokenInlineData.optional()
|
|
6788
6884
|
});
|
|
6789
|
-
var DTOElementPropertyDefinition =
|
|
6790
|
-
id:
|
|
6791
|
-
designSystemVersionId:
|
|
6885
|
+
var DTOElementPropertyDefinition = z243.object({
|
|
6886
|
+
id: z243.string(),
|
|
6887
|
+
designSystemVersionId: z243.string(),
|
|
6792
6888
|
meta: DTOObjectMeta,
|
|
6793
|
-
persistentId:
|
|
6889
|
+
persistentId: z243.string(),
|
|
6794
6890
|
type: ElementPropertyTypeSchema,
|
|
6795
6891
|
targetElementType: ElementPropertyTargetType,
|
|
6796
|
-
codeName:
|
|
6797
|
-
options: nullishToOptional(
|
|
6892
|
+
codeName: z243.string().regex(CODE_NAME_REGEX2),
|
|
6893
|
+
options: nullishToOptional(z243.array(DTOElementPropertyDefinitionOption)),
|
|
6798
6894
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6799
|
-
isImmutable:
|
|
6895
|
+
isImmutable: z243.boolean(),
|
|
6800
6896
|
immutablePropertyType: ElementPropertyImmutableType.optional()
|
|
6801
6897
|
});
|
|
6802
|
-
var DTOElementPropertyDefinitionListResponse =
|
|
6803
|
-
definitions:
|
|
6898
|
+
var DTOElementPropertyDefinitionListResponse = z243.object({
|
|
6899
|
+
definitions: z243.array(DTOElementPropertyDefinition)
|
|
6804
6900
|
});
|
|
6805
|
-
var DTOElementPropertyDefinitionResponse =
|
|
6901
|
+
var DTOElementPropertyDefinitionResponse = z243.object({
|
|
6806
6902
|
definition: DTOElementPropertyDefinition
|
|
6807
6903
|
});
|
|
6808
|
-
var DTOElementPropertyDefinitionCreatePayload =
|
|
6904
|
+
var DTOElementPropertyDefinitionCreatePayload = z243.object({
|
|
6809
6905
|
meta: DTOObjectMeta,
|
|
6810
|
-
persistentId:
|
|
6906
|
+
persistentId: z243.string(),
|
|
6811
6907
|
type: ElementPropertyTypeSchema,
|
|
6812
6908
|
targetElementType: ElementPropertyTargetType,
|
|
6813
|
-
codeName:
|
|
6814
|
-
options: nullishToOptional(
|
|
6909
|
+
codeName: z243.string().regex(CODE_NAME_REGEX2),
|
|
6910
|
+
options: nullishToOptional(z243.array(DTOElementPropertyDefinitionOption)),
|
|
6815
6911
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6816
|
-
columnWidth:
|
|
6912
|
+
columnWidth: z243.number().max(1024).optional()
|
|
6817
6913
|
});
|
|
6818
|
-
var DTOElementPropertyDefinitionUpdatePayload =
|
|
6914
|
+
var DTOElementPropertyDefinitionUpdatePayload = z243.object({
|
|
6819
6915
|
meta: DTOObjectMeta.optional(),
|
|
6820
|
-
codeName:
|
|
6821
|
-
options:
|
|
6916
|
+
codeName: z243.string().regex(CODE_NAME_REGEX2).optional(),
|
|
6917
|
+
options: z243.array(DTOElementPropertyDefinitionOption).optional()
|
|
6822
6918
|
});
|
|
6823
6919
|
|
|
6824
6920
|
// src/api/dto/elements/properties/property-values.ts
|
|
6825
|
-
import { z as
|
|
6826
|
-
var DTOElementPropertyValue =
|
|
6827
|
-
id:
|
|
6828
|
-
designSystemVersionId:
|
|
6829
|
-
definitionId:
|
|
6830
|
-
targetElementId:
|
|
6831
|
-
value:
|
|
6832
|
-
valuePreview:
|
|
6833
|
-
});
|
|
6834
|
-
var DTOElementPropertyValueListResponse =
|
|
6835
|
-
values:
|
|
6836
|
-
});
|
|
6837
|
-
var DTOElementPropertyValueResponse =
|
|
6921
|
+
import { z as z244 } from "zod";
|
|
6922
|
+
var DTOElementPropertyValue = z244.object({
|
|
6923
|
+
id: z244.string(),
|
|
6924
|
+
designSystemVersionId: z244.string(),
|
|
6925
|
+
definitionId: z244.string(),
|
|
6926
|
+
targetElementId: z244.string(),
|
|
6927
|
+
value: z244.union([z244.string(), z244.number(), z244.boolean()]).optional(),
|
|
6928
|
+
valuePreview: z244.string().optional()
|
|
6929
|
+
});
|
|
6930
|
+
var DTOElementPropertyValueListResponse = z244.object({
|
|
6931
|
+
values: z244.array(DTOElementPropertyValue)
|
|
6932
|
+
});
|
|
6933
|
+
var DTOElementPropertyValueResponse = z244.object({
|
|
6838
6934
|
value: DTOElementPropertyValue
|
|
6839
6935
|
});
|
|
6840
|
-
var DTOElementPropertyValueUpsertPaylod =
|
|
6841
|
-
definitionId:
|
|
6842
|
-
targetElementId:
|
|
6843
|
-
value:
|
|
6936
|
+
var DTOElementPropertyValueUpsertPaylod = z244.object({
|
|
6937
|
+
definitionId: z244.string(),
|
|
6938
|
+
targetElementId: z244.string(),
|
|
6939
|
+
value: z244.string().or(z244.number()).or(z244.boolean())
|
|
6844
6940
|
});
|
|
6845
6941
|
|
|
6846
6942
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6847
|
-
import { z as
|
|
6848
|
-
var DTOElementActionOutput =
|
|
6943
|
+
import { z as z245 } from "zod";
|
|
6944
|
+
var DTOElementActionOutput = z245.discriminatedUnion("type", [
|
|
6849
6945
|
// Documentation pages
|
|
6850
6946
|
DTODocumentationPageCreateActionOutputV2,
|
|
6851
6947
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -6868,7 +6964,7 @@ var DTOElementActionOutput = z243.discriminatedUnion("type", [
|
|
|
6868
6964
|
// Approvals
|
|
6869
6965
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
6870
6966
|
]);
|
|
6871
|
-
var DTOElementActionInput =
|
|
6967
|
+
var DTOElementActionInput = z245.discriminatedUnion("type", [
|
|
6872
6968
|
// Documentation pages
|
|
6873
6969
|
DTODocumentationPageCreateActionInputV2,
|
|
6874
6970
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -6893,94 +6989,163 @@ var DTOElementActionInput = z243.discriminatedUnion("type", [
|
|
|
6893
6989
|
]);
|
|
6894
6990
|
|
|
6895
6991
|
// src/api/dto/elements/get-elements-v2.ts
|
|
6896
|
-
import { z as
|
|
6897
|
-
var DTOElementsGetTypeFilter =
|
|
6898
|
-
var DTOElementsGetQuerySchema =
|
|
6899
|
-
types:
|
|
6992
|
+
import { z as z246 } from "zod";
|
|
6993
|
+
var DTOElementsGetTypeFilter = z246.enum(["FigmaNode"]);
|
|
6994
|
+
var DTOElementsGetQuerySchema = z246.object({
|
|
6995
|
+
types: z246.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
6900
6996
|
});
|
|
6901
|
-
var DTOElementsGetOutput =
|
|
6902
|
-
figmaNodes:
|
|
6997
|
+
var DTOElementsGetOutput = z246.object({
|
|
6998
|
+
figmaNodes: z246.array(DTOFigmaNode).optional()
|
|
6903
6999
|
});
|
|
6904
7000
|
|
|
6905
7001
|
// src/api/dto/figma-components/assets/download.ts
|
|
6906
|
-
import { z as
|
|
6907
|
-
var DTOAssetRenderConfiguration =
|
|
6908
|
-
prefix:
|
|
6909
|
-
suffix:
|
|
6910
|
-
scale:
|
|
6911
|
-
format:
|
|
6912
|
-
});
|
|
6913
|
-
var DTORenderedAssetFile =
|
|
6914
|
-
assetId:
|
|
6915
|
-
fileName:
|
|
6916
|
-
sourceUrl:
|
|
7002
|
+
import { z as z247 } from "zod";
|
|
7003
|
+
var DTOAssetRenderConfiguration = z247.object({
|
|
7004
|
+
prefix: z247.string().optional(),
|
|
7005
|
+
suffix: z247.string().optional(),
|
|
7006
|
+
scale: z247.enum(["x1", "x2", "x3", "x4"]),
|
|
7007
|
+
format: z247.enum(["png", "pdf", "svg"])
|
|
7008
|
+
});
|
|
7009
|
+
var DTORenderedAssetFile = z247.object({
|
|
7010
|
+
assetId: z247.string(),
|
|
7011
|
+
fileName: z247.string(),
|
|
7012
|
+
sourceUrl: z247.string(),
|
|
6917
7013
|
settings: DTOAssetRenderConfiguration,
|
|
6918
|
-
originalName:
|
|
7014
|
+
originalName: z247.string()
|
|
6919
7015
|
});
|
|
6920
|
-
var DTODownloadAssetsRequest =
|
|
6921
|
-
persistentIds:
|
|
7016
|
+
var DTODownloadAssetsRequest = z247.object({
|
|
7017
|
+
persistentIds: z247.array(z247.string().uuid()).optional(),
|
|
6922
7018
|
settings: DTOAssetRenderConfiguration.array()
|
|
6923
7019
|
});
|
|
6924
|
-
var DTODownloadAssetsResponse =
|
|
7020
|
+
var DTODownloadAssetsResponse = z247.object({
|
|
6925
7021
|
items: DTORenderedAssetFile.array()
|
|
6926
7022
|
});
|
|
6927
7023
|
|
|
6928
7024
|
// src/api/dto/liveblocks/auth-response.ts
|
|
6929
|
-
import { z as
|
|
6930
|
-
var DTOLiveblocksAuthResponse =
|
|
6931
|
-
token:
|
|
7025
|
+
import { z as z248 } from "zod";
|
|
7026
|
+
var DTOLiveblocksAuthResponse = z248.object({
|
|
7027
|
+
token: z248.string()
|
|
6932
7028
|
});
|
|
6933
7029
|
|
|
6934
7030
|
// src/api/dto/themes/override.ts
|
|
6935
|
-
import { z as
|
|
7031
|
+
import { z as z249 } from "zod";
|
|
6936
7032
|
var DTOThemeOverride = DesignTokenTypedData.and(
|
|
6937
|
-
|
|
6938
|
-
tokenPersistentId:
|
|
7033
|
+
z249.object({
|
|
7034
|
+
tokenPersistentId: z249.string(),
|
|
6939
7035
|
origin: ThemeOverrideOrigin.optional()
|
|
6940
7036
|
})
|
|
6941
7037
|
);
|
|
6942
7038
|
var DTOThemeOverrideCreatePayload = DesignTokenTypedData.and(
|
|
6943
|
-
|
|
6944
|
-
tokenPersistentId:
|
|
7039
|
+
z249.object({
|
|
7040
|
+
tokenPersistentId: z249.string()
|
|
6945
7041
|
})
|
|
6946
7042
|
);
|
|
6947
7043
|
|
|
6948
7044
|
// src/api/dto/themes/theme.ts
|
|
6949
|
-
import { z as
|
|
6950
|
-
var DTOTheme =
|
|
6951
|
-
id:
|
|
6952
|
-
persistentId:
|
|
6953
|
-
designSystemVersionId:
|
|
6954
|
-
brandId:
|
|
7045
|
+
import { z as z250 } from "zod";
|
|
7046
|
+
var DTOTheme = z250.object({
|
|
7047
|
+
id: z250.string(),
|
|
7048
|
+
persistentId: z250.string(),
|
|
7049
|
+
designSystemVersionId: z250.string(),
|
|
7050
|
+
brandId: z250.string(),
|
|
6955
7051
|
meta: ObjectMeta,
|
|
6956
|
-
codeName:
|
|
7052
|
+
codeName: z250.string(),
|
|
6957
7053
|
overrides: DTOThemeOverride.array()
|
|
6958
7054
|
});
|
|
6959
|
-
var DTOThemeResponse =
|
|
7055
|
+
var DTOThemeResponse = z250.object({
|
|
6960
7056
|
theme: DTOTheme
|
|
6961
7057
|
});
|
|
6962
|
-
var DTOThemeListResponse =
|
|
7058
|
+
var DTOThemeListResponse = z250.object({
|
|
6963
7059
|
themes: DTOTheme.array()
|
|
6964
7060
|
});
|
|
6965
|
-
var DTOThemeCreatePayload =
|
|
7061
|
+
var DTOThemeCreatePayload = z250.object({
|
|
6966
7062
|
meta: ObjectMeta,
|
|
6967
|
-
persistentId:
|
|
6968
|
-
brandId:
|
|
6969
|
-
codeName:
|
|
7063
|
+
persistentId: z250.string(),
|
|
7064
|
+
brandId: z250.string(),
|
|
7065
|
+
codeName: z250.string(),
|
|
6970
7066
|
overrides: DTOThemeOverride.array()
|
|
6971
7067
|
});
|
|
6972
7068
|
|
|
7069
|
+
// src/utils/hash.ts
|
|
7070
|
+
function hash(input) {
|
|
7071
|
+
return farmhash(input).toString(16);
|
|
7072
|
+
}
|
|
7073
|
+
function farmhash(input) {
|
|
7074
|
+
const seed = 2654435769;
|
|
7075
|
+
let hash2 = seed;
|
|
7076
|
+
for (let i = 0; i < input.length; i++) {
|
|
7077
|
+
const charCode = input.charCodeAt(i);
|
|
7078
|
+
hash2 ^= charCode;
|
|
7079
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
7080
|
+
hash2 ^= hash2 >>> 15;
|
|
7081
|
+
}
|
|
7082
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
7083
|
+
hash2 ^= hash2 >>> 13;
|
|
7084
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
7085
|
+
hash2 ^= hash2 >>> 15;
|
|
7086
|
+
return hash2 >>> 0;
|
|
7087
|
+
}
|
|
7088
|
+
function prepareObject(obj) {
|
|
7089
|
+
if (obj === null || typeof obj !== "object") {
|
|
7090
|
+
return obj;
|
|
7091
|
+
}
|
|
7092
|
+
if (Array.isArray(obj)) {
|
|
7093
|
+
return obj.map(prepareObject);
|
|
7094
|
+
}
|
|
7095
|
+
const sortedObj = {};
|
|
7096
|
+
for (const key of Object.keys(obj).sort()) {
|
|
7097
|
+
if (obj[key] === null || obj[key] === void 0) {
|
|
7098
|
+
continue;
|
|
7099
|
+
}
|
|
7100
|
+
sortedObj[key] = prepareObject(obj[key]);
|
|
7101
|
+
}
|
|
7102
|
+
return sortedObj;
|
|
7103
|
+
}
|
|
7104
|
+
function generateHash(input, debug = false) {
|
|
7105
|
+
if (typeof input === "object") {
|
|
7106
|
+
const sanitized = JSON.stringify(prepareObject(input));
|
|
7107
|
+
if (debug) {
|
|
7108
|
+
console.log("Hashing sanitized string:");
|
|
7109
|
+
console.log(sanitized);
|
|
7110
|
+
}
|
|
7111
|
+
return hash(sanitized);
|
|
7112
|
+
} else {
|
|
7113
|
+
try {
|
|
7114
|
+
const obj = JSON.parse(input);
|
|
7115
|
+
const sanitized = JSON.stringify(prepareObject(obj));
|
|
7116
|
+
if (debug) {
|
|
7117
|
+
console.log("Hashing sanitized string:");
|
|
7118
|
+
console.log(sanitized);
|
|
7119
|
+
}
|
|
7120
|
+
return hash(sanitized);
|
|
7121
|
+
} catch {
|
|
7122
|
+
return hash(input);
|
|
7123
|
+
}
|
|
7124
|
+
}
|
|
7125
|
+
}
|
|
7126
|
+
|
|
7127
|
+
// src/utils/query.ts
|
|
7128
|
+
function serializeQuery(query) {
|
|
7129
|
+
const queryWithStrings = Object.fromEntries(
|
|
7130
|
+
Object.entries(query).filter((e) => !!e[1]).map(([k, v]) => {
|
|
7131
|
+
if (Array.isArray(v)) {
|
|
7132
|
+
return [k, v.join(", ")];
|
|
7133
|
+
} else {
|
|
7134
|
+
return [k, v.toString()];
|
|
7135
|
+
}
|
|
7136
|
+
})
|
|
7137
|
+
);
|
|
7138
|
+
return new URLSearchParams(queryWithStrings);
|
|
7139
|
+
}
|
|
7140
|
+
|
|
6973
7141
|
// src/api/endpoints/codegen/exporters.ts
|
|
6974
7142
|
var ExportersEndpoint = class {
|
|
6975
7143
|
constructor(requestExecutor) {
|
|
6976
7144
|
this.requestExecutor = requestExecutor;
|
|
6977
7145
|
}
|
|
6978
7146
|
list(workspaceId, query) {
|
|
6979
|
-
const queryWithStrings = Object.fromEntries(
|
|
6980
|
-
Object.entries(query).filter((e) => !!e[1]).map(([k, v]) => [k, v.toString()])
|
|
6981
|
-
);
|
|
6982
7147
|
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterListResponse, {
|
|
6983
|
-
query:
|
|
7148
|
+
query: serializeQuery(query)
|
|
6984
7149
|
});
|
|
6985
7150
|
}
|
|
6986
7151
|
};
|
|
@@ -7056,40 +7221,131 @@ var BrandsEndpoint = class {
|
|
|
7056
7221
|
}
|
|
7057
7222
|
};
|
|
7058
7223
|
|
|
7059
|
-
// src/api/endpoints/design-system/versions/
|
|
7060
|
-
|
|
7224
|
+
// src/api/endpoints/design-system/versions/documentation.ts
|
|
7225
|
+
var DocumentationEndpoint = class {
|
|
7226
|
+
constructor(requestExecutor) {
|
|
7227
|
+
this.requestExecutor = requestExecutor;
|
|
7228
|
+
}
|
|
7229
|
+
getStructure(designSystemId, versionId) {
|
|
7230
|
+
return this.requestExecutor.json(
|
|
7231
|
+
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7232
|
+
DTODocumentationStructure
|
|
7233
|
+
);
|
|
7234
|
+
}
|
|
7235
|
+
async getDocStructure(dsId, vId) {
|
|
7236
|
+
return await this.requestExecutor.json(
|
|
7237
|
+
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7238
|
+
DTODocumentationStructure,
|
|
7239
|
+
{
|
|
7240
|
+
method: "GET"
|
|
7241
|
+
}
|
|
7242
|
+
);
|
|
7243
|
+
}
|
|
7244
|
+
};
|
|
7245
|
+
|
|
7246
|
+
// src/api/endpoints/design-system/versions/ds-components.ts
|
|
7247
|
+
import { z as z251 } from "zod";
|
|
7061
7248
|
var DesignSystemComponentEndpoint = class {
|
|
7062
7249
|
constructor(requestExecutor) {
|
|
7063
7250
|
this.requestExecutor = requestExecutor;
|
|
7064
7251
|
}
|
|
7065
7252
|
async create(dsId, vId, body) {
|
|
7066
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/design-system-components`,
|
|
7253
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/design-system-components`, z251.any(), {
|
|
7067
7254
|
body,
|
|
7068
7255
|
method: "POST"
|
|
7069
7256
|
});
|
|
7070
7257
|
}
|
|
7071
7258
|
};
|
|
7072
7259
|
|
|
7073
|
-
// src/api/endpoints/design-system/versions/elements-
|
|
7074
|
-
var
|
|
7260
|
+
// src/api/endpoints/design-system/versions/elements-action.ts
|
|
7261
|
+
var ElementsActionEndpoint = class {
|
|
7075
7262
|
constructor(requestExecutor) {
|
|
7076
7263
|
this.requestExecutor = requestExecutor;
|
|
7077
7264
|
}
|
|
7078
7265
|
async createDocPage(dsId, vId, input) {
|
|
7266
|
+
return this.action(dsId, vId, { type: "DocumentationPageCreate", input });
|
|
7267
|
+
}
|
|
7268
|
+
async createDocGroup(dsId, vId, input) {
|
|
7269
|
+
return this.action(dsId, vId, { type: "DocumentationGroupCreate", input });
|
|
7270
|
+
}
|
|
7271
|
+
async moveDocGroup(dsId, vId, input) {
|
|
7272
|
+
return this.action(dsId, vId, { type: "DocumentationGroupMove", input });
|
|
7273
|
+
}
|
|
7274
|
+
async updateDocPage(dsId, vId, input) {
|
|
7275
|
+
return this.action(dsId, vId, { type: "DocumentationPageUpdate", input });
|
|
7276
|
+
}
|
|
7277
|
+
async updateDocGroup(dsId, vId, input) {
|
|
7278
|
+
return this.action(dsId, vId, { type: "DocumentationGroupUpdate", input });
|
|
7279
|
+
}
|
|
7280
|
+
async createDocTab(dsId, vId, input) {
|
|
7281
|
+
return this.action(dsId, vId, { type: "DocumentationTabCreate", input });
|
|
7282
|
+
}
|
|
7283
|
+
async renderNodes(dsId, vId, input) {
|
|
7284
|
+
return this.action(dsId, vId, { type: "FigmaNodeRender", input });
|
|
7285
|
+
}
|
|
7286
|
+
async action(dsId, vId, input) {
|
|
7079
7287
|
return this.requestExecutor.json(
|
|
7080
7288
|
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7081
7289
|
DTOElementActionOutput,
|
|
7082
7290
|
{
|
|
7083
|
-
body:
|
|
7084
|
-
type: "DocumentationPageCreate",
|
|
7085
|
-
input
|
|
7086
|
-
},
|
|
7291
|
+
body: input,
|
|
7087
7292
|
method: "POST"
|
|
7088
7293
|
}
|
|
7089
7294
|
);
|
|
7090
7295
|
}
|
|
7091
7296
|
};
|
|
7092
7297
|
|
|
7298
|
+
// src/api/endpoints/design-system/versions/elements.ts
|
|
7299
|
+
var ElementsEndpoint = class {
|
|
7300
|
+
constructor(requestExecutor) {
|
|
7301
|
+
this.requestExecutor = requestExecutor;
|
|
7302
|
+
}
|
|
7303
|
+
getElements(dsId, vId, query) {
|
|
7304
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/elements`, DTOElementsGetOutput, {
|
|
7305
|
+
query: serializeQuery(query)
|
|
7306
|
+
});
|
|
7307
|
+
}
|
|
7308
|
+
};
|
|
7309
|
+
|
|
7310
|
+
// src/api/endpoints/design-system/versions/figma-component-groups.ts
|
|
7311
|
+
var FigmaComponentGroupsEndpoint = class {
|
|
7312
|
+
constructor(requestExecutor) {
|
|
7313
|
+
this.requestExecutor = requestExecutor;
|
|
7314
|
+
}
|
|
7315
|
+
async list(dsId, vId) {
|
|
7316
|
+
return this.requestExecutor.json(
|
|
7317
|
+
`/design-systems/${dsId}/versions/${vId}/component-groups`,
|
|
7318
|
+
DTOFigmaComponentGroupListResponse
|
|
7319
|
+
);
|
|
7320
|
+
}
|
|
7321
|
+
};
|
|
7322
|
+
|
|
7323
|
+
// src/api/endpoints/design-system/versions/figma-components.ts
|
|
7324
|
+
var FigmaComponentsEndpoint = class {
|
|
7325
|
+
constructor(requestExecutor) {
|
|
7326
|
+
this.requestExecutor = requestExecutor;
|
|
7327
|
+
}
|
|
7328
|
+
async list(dsId, vId) {
|
|
7329
|
+
return this.requestExecutor.json(
|
|
7330
|
+
`/design-systems/${dsId}/versions/${vId}/components`,
|
|
7331
|
+
DTOFigmaComponentListResponse
|
|
7332
|
+
);
|
|
7333
|
+
}
|
|
7334
|
+
};
|
|
7335
|
+
|
|
7336
|
+
// src/api/endpoints/design-system/versions/figma-frame-structures.ts
|
|
7337
|
+
var FigmaFrameStructuresEndpoint = class {
|
|
7338
|
+
constructor(requestExecutor) {
|
|
7339
|
+
this.requestExecutor = requestExecutor;
|
|
7340
|
+
}
|
|
7341
|
+
list(dsId, vId) {
|
|
7342
|
+
return this.requestExecutor.json(
|
|
7343
|
+
`/design-systems/${dsId}/versions/${vId}/figma-frames/node-structures`,
|
|
7344
|
+
DTOFrameNodeStructureListResponse
|
|
7345
|
+
);
|
|
7346
|
+
}
|
|
7347
|
+
};
|
|
7348
|
+
|
|
7093
7349
|
// src/api/endpoints/design-system/versions/import-jobs.ts
|
|
7094
7350
|
var ImportJobsEndpoint = class {
|
|
7095
7351
|
constructor(requestExecutor) {
|
|
@@ -7104,7 +7360,7 @@ var ImportJobsEndpoint = class {
|
|
|
7104
7360
|
};
|
|
7105
7361
|
|
|
7106
7362
|
// src/api/endpoints/design-system/versions/overrides.ts
|
|
7107
|
-
import { z as
|
|
7363
|
+
import { z as z252 } from "zod";
|
|
7108
7364
|
var OverridesEndpoint = class {
|
|
7109
7365
|
constructor(requestExecutor) {
|
|
7110
7366
|
this.requestExecutor = requestExecutor;
|
|
@@ -7112,7 +7368,7 @@ var OverridesEndpoint = class {
|
|
|
7112
7368
|
create(dsId, versionId, themeId, body) {
|
|
7113
7369
|
return this.requestExecutor.json(
|
|
7114
7370
|
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}/overrides`,
|
|
7115
|
-
|
|
7371
|
+
z252.any(),
|
|
7116
7372
|
{
|
|
7117
7373
|
method: "POST",
|
|
7118
7374
|
body
|
|
@@ -7122,7 +7378,7 @@ var OverridesEndpoint = class {
|
|
|
7122
7378
|
};
|
|
7123
7379
|
|
|
7124
7380
|
// src/api/endpoints/design-system/versions/property-definitions.ts
|
|
7125
|
-
import { z as
|
|
7381
|
+
import { z as z253 } from "zod";
|
|
7126
7382
|
var ElementPropertyDefinitionsEndpoint = class {
|
|
7127
7383
|
constructor(requestExecutor) {
|
|
7128
7384
|
this.requestExecutor = requestExecutor;
|
|
@@ -7150,7 +7406,7 @@ var ElementPropertyDefinitionsEndpoint = class {
|
|
|
7150
7406
|
delete(designSystemId, versionId, defId) {
|
|
7151
7407
|
return this.requestExecutor.json(
|
|
7152
7408
|
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
7153
|
-
|
|
7409
|
+
z253.any(),
|
|
7154
7410
|
{ method: "DELETE" }
|
|
7155
7411
|
);
|
|
7156
7412
|
}
|
|
@@ -7189,7 +7445,7 @@ var VersionStatsEndpoint = class {
|
|
|
7189
7445
|
};
|
|
7190
7446
|
|
|
7191
7447
|
// src/api/endpoints/design-system/versions/themes.ts
|
|
7192
|
-
import { z as
|
|
7448
|
+
import { z as z254 } from "zod";
|
|
7193
7449
|
var ThemesEndpoint = class {
|
|
7194
7450
|
constructor(requestExecutor) {
|
|
7195
7451
|
this.requestExecutor = requestExecutor;
|
|
@@ -7212,7 +7468,7 @@ var ThemesEndpoint = class {
|
|
|
7212
7468
|
});
|
|
7213
7469
|
}
|
|
7214
7470
|
delete(dsId, versionId, themeId) {
|
|
7215
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`,
|
|
7471
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`, z254.any(), {
|
|
7216
7472
|
method: "DELETE"
|
|
7217
7473
|
});
|
|
7218
7474
|
}
|
|
@@ -7279,28 +7535,6 @@ var TokensEndpoint = class {
|
|
|
7279
7535
|
}
|
|
7280
7536
|
};
|
|
7281
7537
|
|
|
7282
|
-
// src/api/endpoints/design-system/versions/documentation.ts
|
|
7283
|
-
var DocumentationEndpoint = class {
|
|
7284
|
-
constructor(requestExecutor) {
|
|
7285
|
-
this.requestExecutor = requestExecutor;
|
|
7286
|
-
}
|
|
7287
|
-
getStructure(designSystemId, versionId) {
|
|
7288
|
-
return this.requestExecutor.json(
|
|
7289
|
-
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7290
|
-
DTODocumentationStructure
|
|
7291
|
-
);
|
|
7292
|
-
}
|
|
7293
|
-
async getDocStructure(dsId, vId) {
|
|
7294
|
-
return await this.requestExecutor.json(
|
|
7295
|
-
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7296
|
-
DTODocumentationStructure,
|
|
7297
|
-
{
|
|
7298
|
-
method: "GET"
|
|
7299
|
-
}
|
|
7300
|
-
);
|
|
7301
|
-
}
|
|
7302
|
-
};
|
|
7303
|
-
|
|
7304
7538
|
// src/api/endpoints/design-system/versions/versions.ts
|
|
7305
7539
|
var DesignSystemVersionsEndpoint = class {
|
|
7306
7540
|
constructor(requestExecutor) {
|
|
@@ -7311,10 +7545,14 @@ var DesignSystemVersionsEndpoint = class {
|
|
|
7311
7545
|
__publicField(this, "importJobs");
|
|
7312
7546
|
__publicField(this, "tokens");
|
|
7313
7547
|
__publicField(this, "tokenGroups");
|
|
7548
|
+
__publicField(this, "figmaComponents");
|
|
7549
|
+
__publicField(this, "figmaComponentGroups");
|
|
7550
|
+
__publicField(this, "figmaFrameStructures");
|
|
7314
7551
|
__publicField(this, "stats");
|
|
7315
7552
|
__publicField(this, "elementPropertyDefinitions");
|
|
7316
7553
|
__publicField(this, "elementPropertyValues");
|
|
7317
|
-
__publicField(this, "
|
|
7554
|
+
__publicField(this, "elementsAction");
|
|
7555
|
+
__publicField(this, "elements");
|
|
7318
7556
|
__publicField(this, "designSystemComponents");
|
|
7319
7557
|
__publicField(this, "documentation");
|
|
7320
7558
|
this.themes = new ThemesEndpoint(requestExecutor);
|
|
@@ -7323,10 +7561,14 @@ var DesignSystemVersionsEndpoint = class {
|
|
|
7323
7561
|
this.importJobs = new ImportJobsEndpoint(requestExecutor);
|
|
7324
7562
|
this.tokens = new TokensEndpoint(requestExecutor);
|
|
7325
7563
|
this.tokenGroups = new TokenGroupsEndpoint(requestExecutor);
|
|
7564
|
+
this.figmaComponents = new FigmaComponentsEndpoint(requestExecutor);
|
|
7565
|
+
this.figmaComponentGroups = new FigmaComponentGroupsEndpoint(requestExecutor);
|
|
7566
|
+
this.figmaFrameStructures = new FigmaFrameStructuresEndpoint(requestExecutor);
|
|
7326
7567
|
this.stats = new VersionStatsEndpoint(requestExecutor);
|
|
7327
7568
|
this.elementPropertyDefinitions = new ElementPropertyDefinitionsEndpoint(requestExecutor);
|
|
7328
7569
|
this.elementPropertyValues = new ElementPropertyValuesEndpoint(requestExecutor);
|
|
7329
|
-
this.
|
|
7570
|
+
this.elementsAction = new ElementsActionEndpoint(requestExecutor);
|
|
7571
|
+
this.elements = new ElementsEndpoint(requestExecutor);
|
|
7330
7572
|
this.designSystemComponents = new DesignSystemComponentEndpoint(requestExecutor);
|
|
7331
7573
|
this.documentation = new DocumentationEndpoint(requestExecutor);
|
|
7332
7574
|
}
|
|
@@ -7373,7 +7615,7 @@ var DesignSystemContactsEndpoint = class {
|
|
|
7373
7615
|
};
|
|
7374
7616
|
|
|
7375
7617
|
// src/api/endpoints/design-system/design-systems.ts
|
|
7376
|
-
import { z as
|
|
7618
|
+
import { z as z256 } from "zod";
|
|
7377
7619
|
|
|
7378
7620
|
// src/api/endpoints/design-system/members.ts
|
|
7379
7621
|
var DesignSystemMembersEndpoint = class {
|
|
@@ -7394,16 +7636,28 @@ var DesignSystemMembersEndpoint = class {
|
|
|
7394
7636
|
};
|
|
7395
7637
|
|
|
7396
7638
|
// src/api/endpoints/design-system/sources.ts
|
|
7397
|
-
import { z as
|
|
7639
|
+
import { z as z255 } from "zod";
|
|
7398
7640
|
var DesignSystemSourcesEndpoint = class {
|
|
7399
7641
|
constructor(requestExecutor) {
|
|
7400
7642
|
this.requestExecutor = requestExecutor;
|
|
7401
7643
|
}
|
|
7644
|
+
create(dsId, payload) {
|
|
7645
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourceResponse, {
|
|
7646
|
+
method: "POST",
|
|
7647
|
+
body: payload
|
|
7648
|
+
});
|
|
7649
|
+
}
|
|
7402
7650
|
list(dsId) {
|
|
7403
7651
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
7404
7652
|
}
|
|
7405
7653
|
delete(dsId, sourceId) {
|
|
7406
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`,
|
|
7654
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z255.any(), { method: "DELETE" });
|
|
7655
|
+
}
|
|
7656
|
+
figmaImport(dsId, payload) {
|
|
7657
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
7658
|
+
method: "POST",
|
|
7659
|
+
body: payload
|
|
7660
|
+
});
|
|
7407
7661
|
}
|
|
7408
7662
|
};
|
|
7409
7663
|
|
|
@@ -7432,7 +7686,7 @@ var DesignSystemsEndpoint = class {
|
|
|
7432
7686
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
|
|
7433
7687
|
}
|
|
7434
7688
|
delete(dsId) {
|
|
7435
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
7689
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z256.any(), { method: "DELETE" });
|
|
7436
7690
|
}
|
|
7437
7691
|
update(dsId, body) {
|
|
7438
7692
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
@@ -7476,7 +7730,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
7476
7730
|
};
|
|
7477
7731
|
|
|
7478
7732
|
// src/api/endpoints/workspaces/workspace-members.ts
|
|
7479
|
-
import { z as
|
|
7733
|
+
import { z as z257 } from "zod";
|
|
7480
7734
|
var WorkspaceMembersEndpoint = class {
|
|
7481
7735
|
constructor(requestExecutor) {
|
|
7482
7736
|
this.requestExecutor = requestExecutor;
|
|
@@ -7493,7 +7747,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7493
7747
|
});
|
|
7494
7748
|
}
|
|
7495
7749
|
invite(workspaceId, body) {
|
|
7496
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
7750
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z257.any(), { method: "POST", body });
|
|
7497
7751
|
}
|
|
7498
7752
|
delete(workspaceId, userId) {
|
|
7499
7753
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -7503,7 +7757,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7503
7757
|
};
|
|
7504
7758
|
|
|
7505
7759
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
7506
|
-
import { z as
|
|
7760
|
+
import { z as z258 } from "zod";
|
|
7507
7761
|
var WorkspacesEndpoint = class {
|
|
7508
7762
|
constructor(requestExecutor) {
|
|
7509
7763
|
this.requestExecutor = requestExecutor;
|
|
@@ -7526,10 +7780,10 @@ var WorkspacesEndpoint = class {
|
|
|
7526
7780
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
7527
7781
|
}
|
|
7528
7782
|
delete(workspaceId) {
|
|
7529
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
7783
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z258.any(), { method: "DELETE" });
|
|
7530
7784
|
}
|
|
7531
7785
|
subscription(workspaceId) {
|
|
7532
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
7786
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z258.any(), { method: "GET" });
|
|
7533
7787
|
}
|
|
7534
7788
|
transferOwnership(workspaceId, body) {
|
|
7535
7789
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/ownership`, DTOWorkspaceResponse, {
|
|
@@ -7616,9 +7870,9 @@ ${bodyText}`,
|
|
|
7616
7870
|
|
|
7617
7871
|
// src/api/transport/request-executor.ts
|
|
7618
7872
|
import fetch from "node-fetch";
|
|
7619
|
-
import { z as
|
|
7620
|
-
var ResponseWrapper =
|
|
7621
|
-
result:
|
|
7873
|
+
import { z as z259 } from "zod";
|
|
7874
|
+
var ResponseWrapper = z259.object({
|
|
7875
|
+
result: z259.record(z259.any())
|
|
7622
7876
|
});
|
|
7623
7877
|
var RequestExecutor = class {
|
|
7624
7878
|
constructor(testServerConfig) {
|
|
@@ -7659,6 +7913,8 @@ var RequestExecutor = class {
|
|
|
7659
7913
|
}
|
|
7660
7914
|
const responseParseResult = schema.safeParse(wrapperParseResult.data.result);
|
|
7661
7915
|
if (!responseParseResult.success) {
|
|
7916
|
+
console.error(`Response was:`);
|
|
7917
|
+
console.error(wrapperParseResult.data.result);
|
|
7662
7918
|
throw RequestExecutorError.responseParsingError(endpoint, responseParseResult.error);
|
|
7663
7919
|
}
|
|
7664
7920
|
return responseParseResult.data;
|
|
@@ -7690,66 +7946,8 @@ var SupernovaApiClient = class {
|
|
|
7690
7946
|
}
|
|
7691
7947
|
};
|
|
7692
7948
|
|
|
7693
|
-
// src/utils/hash.ts
|
|
7694
|
-
function hash(input) {
|
|
7695
|
-
return farmhash(input).toString(16);
|
|
7696
|
-
}
|
|
7697
|
-
function farmhash(input) {
|
|
7698
|
-
const seed = 2654435769;
|
|
7699
|
-
let hash2 = seed;
|
|
7700
|
-
for (let i = 0; i < input.length; i++) {
|
|
7701
|
-
const charCode = input.charCodeAt(i);
|
|
7702
|
-
hash2 ^= charCode;
|
|
7703
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
7704
|
-
hash2 ^= hash2 >>> 15;
|
|
7705
|
-
}
|
|
7706
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
7707
|
-
hash2 ^= hash2 >>> 13;
|
|
7708
|
-
hash2 = Math.imul(hash2, 1540483477);
|
|
7709
|
-
hash2 ^= hash2 >>> 15;
|
|
7710
|
-
return hash2 >>> 0;
|
|
7711
|
-
}
|
|
7712
|
-
function prepareObject(obj) {
|
|
7713
|
-
if (obj === null || typeof obj !== "object") {
|
|
7714
|
-
return obj;
|
|
7715
|
-
}
|
|
7716
|
-
if (Array.isArray(obj)) {
|
|
7717
|
-
return obj.map(prepareObject);
|
|
7718
|
-
}
|
|
7719
|
-
const sortedObj = {};
|
|
7720
|
-
for (const key of Object.keys(obj).sort()) {
|
|
7721
|
-
if (obj[key] === null || obj[key] === void 0) {
|
|
7722
|
-
continue;
|
|
7723
|
-
}
|
|
7724
|
-
sortedObj[key] = prepareObject(obj[key]);
|
|
7725
|
-
}
|
|
7726
|
-
return sortedObj;
|
|
7727
|
-
}
|
|
7728
|
-
function generateHash(input, debug = false) {
|
|
7729
|
-
if (typeof input === "object") {
|
|
7730
|
-
const sanitized = JSON.stringify(prepareObject(input));
|
|
7731
|
-
if (debug) {
|
|
7732
|
-
console.log("Hashing sanitized string:");
|
|
7733
|
-
console.log(sanitized);
|
|
7734
|
-
}
|
|
7735
|
-
return hash(sanitized);
|
|
7736
|
-
} else {
|
|
7737
|
-
try {
|
|
7738
|
-
const obj = JSON.parse(input);
|
|
7739
|
-
const sanitized = JSON.stringify(prepareObject(obj));
|
|
7740
|
-
if (debug) {
|
|
7741
|
-
console.log("Hashing sanitized string:");
|
|
7742
|
-
console.log(sanitized);
|
|
7743
|
-
}
|
|
7744
|
-
return hash(sanitized);
|
|
7745
|
-
} catch {
|
|
7746
|
-
return hash(input);
|
|
7747
|
-
}
|
|
7748
|
-
}
|
|
7749
|
-
}
|
|
7750
|
-
|
|
7751
7949
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
7752
|
-
import { z as
|
|
7950
|
+
import { z as z260 } from "zod";
|
|
7753
7951
|
|
|
7754
7952
|
// src/yjs/version-room/base.ts
|
|
7755
7953
|
var VersionRoomBaseYDoc = class {
|
|
@@ -8279,24 +8477,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
8279
8477
|
};
|
|
8280
8478
|
|
|
8281
8479
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8282
|
-
var DocumentationHierarchySettings =
|
|
8283
|
-
routingVersion:
|
|
8284
|
-
isDraftFeatureAdopted:
|
|
8285
|
-
isApprovalFeatureEnabled:
|
|
8286
|
-
approvalRequiredForPublishing:
|
|
8480
|
+
var DocumentationHierarchySettings = z260.object({
|
|
8481
|
+
routingVersion: z260.string(),
|
|
8482
|
+
isDraftFeatureAdopted: z260.boolean(),
|
|
8483
|
+
isApprovalFeatureEnabled: z260.boolean(),
|
|
8484
|
+
approvalRequiredForPublishing: z260.boolean()
|
|
8287
8485
|
});
|
|
8288
8486
|
function yjsToDocumentationHierarchy(doc) {
|
|
8289
8487
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
8290
8488
|
}
|
|
8291
8489
|
|
|
8292
8490
|
// src/yjs/design-system-content/item-configuration.ts
|
|
8293
|
-
import { z as
|
|
8294
|
-
var DTODocumentationPageRoomHeaderData =
|
|
8295
|
-
title:
|
|
8491
|
+
import { z as z261 } from "zod";
|
|
8492
|
+
var DTODocumentationPageRoomHeaderData = z261.object({
|
|
8493
|
+
title: z261.string(),
|
|
8296
8494
|
configuration: DTODocumentationItemConfigurationV2
|
|
8297
8495
|
});
|
|
8298
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
8299
|
-
title:
|
|
8496
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z261.object({
|
|
8497
|
+
title: z261.string().optional(),
|
|
8300
8498
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
8301
8499
|
});
|
|
8302
8500
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -8347,7 +8545,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
8347
8545
|
header: rawHeader
|
|
8348
8546
|
};
|
|
8349
8547
|
return {
|
|
8350
|
-
title:
|
|
8548
|
+
title: z261.string().parse(title),
|
|
8351
8549
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
8352
8550
|
};
|
|
8353
8551
|
}
|
|
@@ -8357,9 +8555,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
8357
8555
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
8358
8556
|
|
|
8359
8557
|
// src/yjs/docs-editor/model/page.ts
|
|
8360
|
-
import { z as
|
|
8361
|
-
var DocumentationPageEditorModel =
|
|
8362
|
-
blocks:
|
|
8558
|
+
import { z as z262 } from "zod";
|
|
8559
|
+
var DocumentationPageEditorModel = z262.object({
|
|
8560
|
+
blocks: z262.array(DocumentationPageContentItem)
|
|
8363
8561
|
});
|
|
8364
8562
|
|
|
8365
8563
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -11880,7 +12078,7 @@ var blocks = [
|
|
|
11880
12078
|
|
|
11881
12079
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
11882
12080
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
11883
|
-
import { z as
|
|
12081
|
+
import { z as z263 } from "zod";
|
|
11884
12082
|
function yDocToPage(yDoc, definitions) {
|
|
11885
12083
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
11886
12084
|
}
|
|
@@ -11960,7 +12158,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
11960
12158
|
return null;
|
|
11961
12159
|
return {
|
|
11962
12160
|
id,
|
|
11963
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
12161
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z263.string()) ?? "",
|
|
11964
12162
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
11965
12163
|
};
|
|
11966
12164
|
}
|
|
@@ -11995,7 +12193,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
11995
12193
|
});
|
|
11996
12194
|
}
|
|
11997
12195
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
11998
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
12196
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z263.string());
|
|
11999
12197
|
if (!definitionId) {
|
|
12000
12198
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
12001
12199
|
return [];
|
|
@@ -12037,7 +12235,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
12037
12235
|
if (!id)
|
|
12038
12236
|
return null;
|
|
12039
12237
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12040
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
12238
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z263.string().optional()));
|
|
12041
12239
|
return {
|
|
12042
12240
|
id,
|
|
12043
12241
|
type: "Block",
|
|
@@ -12165,10 +12363,10 @@ function parseRichTextAttribute(mark) {
|
|
|
12165
12363
|
return null;
|
|
12166
12364
|
}
|
|
12167
12365
|
function parseProsemirrorLink(mark) {
|
|
12168
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
12366
|
+
const href = getProsemirrorAttribute(mark, "href", z263.string().optional());
|
|
12169
12367
|
if (!href)
|
|
12170
12368
|
return null;
|
|
12171
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
12369
|
+
const target = getProsemirrorAttribute(mark, "target", z263.string().optional());
|
|
12172
12370
|
const openInNewTab = target === "_blank";
|
|
12173
12371
|
if (href.startsWith("@")) {
|
|
12174
12372
|
return {
|
|
@@ -12187,10 +12385,10 @@ function parseProsemirrorLink(mark) {
|
|
|
12187
12385
|
}
|
|
12188
12386
|
}
|
|
12189
12387
|
function parseProsemirrorCommentHighlight(mark) {
|
|
12190
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
12388
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z263.string().optional());
|
|
12191
12389
|
if (!highlightId)
|
|
12192
12390
|
return null;
|
|
12193
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
12391
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z263.boolean().optional()) ?? false;
|
|
12194
12392
|
return {
|
|
12195
12393
|
type: "Comment",
|
|
12196
12394
|
commentHighlightId: highlightId,
|
|
@@ -12202,7 +12400,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
12202
12400
|
if (!id)
|
|
12203
12401
|
return null;
|
|
12204
12402
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12205
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
12403
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z263.boolean().optional()) !== false;
|
|
12206
12404
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
12207
12405
|
if (!tableChild) {
|
|
12208
12406
|
return emptyTable(id, variantId, 0);
|
|
@@ -12249,9 +12447,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
12249
12447
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
12250
12448
|
if (!id)
|
|
12251
12449
|
return null;
|
|
12252
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
12450
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z263.string().optional());
|
|
12253
12451
|
let columnWidth;
|
|
12254
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
12452
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z263.array(z263.number()).nullish());
|
|
12255
12453
|
if (columnWidthArray) {
|
|
12256
12454
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
12257
12455
|
}
|
|
@@ -12289,7 +12487,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
12289
12487
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
12290
12488
|
};
|
|
12291
12489
|
case "image":
|
|
12292
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12490
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z263.string());
|
|
12293
12491
|
if (!items)
|
|
12294
12492
|
return null;
|
|
12295
12493
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -12409,7 +12607,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
12409
12607
|
);
|
|
12410
12608
|
}
|
|
12411
12609
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
12412
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12610
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z263.string());
|
|
12413
12611
|
if (!itemsString)
|
|
12414
12612
|
return null;
|
|
12415
12613
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -12421,18 +12619,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
12421
12619
|
}
|
|
12422
12620
|
function parseAppearance(prosemirrorNode) {
|
|
12423
12621
|
let appearance = {};
|
|
12424
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
12622
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z263.string().optional());
|
|
12425
12623
|
if (rawAppearanceString) {
|
|
12426
12624
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
12427
12625
|
if (parsedAppearance.success) {
|
|
12428
12626
|
appearance = parsedAppearance.data;
|
|
12429
12627
|
}
|
|
12430
12628
|
}
|
|
12431
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
12629
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z263.number().optional());
|
|
12432
12630
|
if (columns) {
|
|
12433
12631
|
appearance.numberOfColumns = columns;
|
|
12434
12632
|
}
|
|
12435
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
12633
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z263.string().optional());
|
|
12436
12634
|
if (backgroundColor) {
|
|
12437
12635
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
12438
12636
|
if (parsedColor.success) {
|
|
@@ -12527,13 +12725,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
12527
12725
|
}
|
|
12528
12726
|
}
|
|
12529
12727
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
12530
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
12728
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z263.string());
|
|
12531
12729
|
if (!id)
|
|
12532
12730
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
12533
12731
|
return id;
|
|
12534
12732
|
}
|
|
12535
12733
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
12536
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
12734
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z263.string()));
|
|
12537
12735
|
}
|
|
12538
12736
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
12539
12737
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -12617,10 +12815,13 @@ export {
|
|
|
12617
12815
|
DTOCreateDocumentationTabInput,
|
|
12618
12816
|
DTOCreateVersionInput,
|
|
12619
12817
|
DTODataSource,
|
|
12620
|
-
DTODataSourceCreationResponse,
|
|
12621
12818
|
DTODataSourceFigma,
|
|
12622
12819
|
DTODataSourceFigmaCloud,
|
|
12820
|
+
DTODataSourceFigmaCreatePayload,
|
|
12821
|
+
DTODataSourceFigmaImportPayload,
|
|
12822
|
+
DTODataSourceFigmaScope,
|
|
12623
12823
|
DTODataSourceFigmaVariablesPlugin,
|
|
12824
|
+
DTODataSourceResponse,
|
|
12624
12825
|
DTODataSourceTokenStudio,
|
|
12625
12826
|
DTODataSourcesListResponse,
|
|
12626
12827
|
DTODeleteDocumentationGroupInput,
|
|
@@ -12760,12 +12961,12 @@ export {
|
|
|
12760
12961
|
DTOExporterListResponse,
|
|
12761
12962
|
DTOExporterMembership,
|
|
12762
12963
|
DTOExporterMembershipRole,
|
|
12763
|
-
DTOExporterProperty,
|
|
12764
|
-
DTOExporterPropertyListResponse,
|
|
12765
12964
|
DTOExporterSource,
|
|
12766
12965
|
DTOExporterType,
|
|
12767
12966
|
DTOExporterUpdateInput,
|
|
12768
12967
|
DTOFigmaComponent,
|
|
12968
|
+
DTOFigmaComponentGroup,
|
|
12969
|
+
DTOFigmaComponentGroupListResponse,
|
|
12769
12970
|
DTOFigmaComponentListResponse,
|
|
12770
12971
|
DTOFigmaNode,
|
|
12771
12972
|
DTOFigmaNodeData,
|
|
@@ -12774,6 +12975,8 @@ export {
|
|
|
12774
12975
|
DTOFigmaNodeRenderActionOutput,
|
|
12775
12976
|
DTOFigmaNodeRenderFormat,
|
|
12776
12977
|
DTOFigmaNodeRenderInput,
|
|
12978
|
+
DTOFrameNodeStructure,
|
|
12979
|
+
DTOFrameNodeStructureListResponse,
|
|
12777
12980
|
DTOGetBlockDefinitionsOutput,
|
|
12778
12981
|
DTOGetDocumentationPageAnchorsResponse,
|
|
12779
12982
|
DTOGitBranch,
|
|
@@ -12865,13 +13068,18 @@ export {
|
|
|
12865
13068
|
DesignSystemVersionsEndpoint,
|
|
12866
13069
|
DesignSystemsEndpoint,
|
|
12867
13070
|
DimensionsVariableScopeType,
|
|
13071
|
+
DocumentationEndpoint,
|
|
12868
13072
|
DocumentationHierarchySettings,
|
|
12869
13073
|
DocumentationPageEditorModel,
|
|
12870
13074
|
DocumentationPageV1DTO,
|
|
12871
13075
|
ElementPropertyDefinitionsEndpoint,
|
|
12872
13076
|
ElementPropertyValuesEndpoint,
|
|
12873
|
-
|
|
13077
|
+
ElementsActionEndpoint,
|
|
13078
|
+
ElementsEndpoint,
|
|
12874
13079
|
ExportersEndpoint,
|
|
13080
|
+
FigmaComponentGroupsEndpoint,
|
|
13081
|
+
FigmaComponentsEndpoint,
|
|
13082
|
+
FigmaFrameStructuresEndpoint,
|
|
12875
13083
|
FormattedCollections,
|
|
12876
13084
|
FrontendVersionRoomYDoc,
|
|
12877
13085
|
ImportJobsEndpoint,
|
|
@@ -12946,6 +13154,7 @@ export {
|
|
|
12946
13154
|
prosemirrorNodesToBlocks,
|
|
12947
13155
|
richTextPropertyValueToProsemirror,
|
|
12948
13156
|
serializeAsCustomBlock,
|
|
13157
|
+
serializeQuery,
|
|
12949
13158
|
shallowProsemirrorNodeToBlock,
|
|
12950
13159
|
validateDesignSystemVersion,
|
|
12951
13160
|
validateSsoPayload,
|