@supernova-studio/client 0.47.16 → 0.47.17
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 +780 -97
- package/dist/index.d.ts +780 -97
- package/dist/index.js +51 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +152 -104
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/export/exporter.ts +68 -0
- package/src/api/dto/export/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -2949,7 +2949,7 @@ var PulsarCustomBlock = z139.object({
|
|
|
2949
2949
|
var ExporterType = z140.enum(["code", "documentation"]);
|
|
2950
2950
|
var ExporterSource = z140.enum(["git", "upload"]);
|
|
2951
2951
|
var ExporterTag = z140.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2952
|
-
var
|
|
2952
|
+
var ExporterPulsarDetails = z140.object({
|
|
2953
2953
|
description: z140.string(),
|
|
2954
2954
|
version: z140.string(),
|
|
2955
2955
|
routingVersion: nullishToOptional(z140.string()),
|
|
@@ -2964,7 +2964,9 @@ var ExporterDetails = z140.object({
|
|
|
2964
2964
|
customBlocks: nullishToOptional(z140.array(PulsarCustomBlock)).default([]),
|
|
2965
2965
|
blockVariants: nullishToOptional(z140.record(z140.string(), z140.array(PulsarContributionVariant))).default({}),
|
|
2966
2966
|
usesBrands: nullishToOptional(z140.boolean()).default(false),
|
|
2967
|
-
usesThemes: nullishToOptional(z140.boolean()).default(false)
|
|
2967
|
+
usesThemes: nullishToOptional(z140.boolean()).default(false)
|
|
2968
|
+
});
|
|
2969
|
+
var ExporterDetails = ExporterPulsarDetails.extend({
|
|
2968
2970
|
source: ExporterSource,
|
|
2969
2971
|
gitProvider: nullishToOptional(GitProvider),
|
|
2970
2972
|
gitUrl: nullishToOptional(z140.string()),
|
|
@@ -3068,6 +3070,7 @@ var ExtendedIntegrationType = z145.enum([
|
|
|
3068
3070
|
"FigmaVariablesPlugin"
|
|
3069
3071
|
]);
|
|
3070
3072
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
3073
|
+
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
3071
3074
|
var Integration = z145.object({
|
|
3072
3075
|
id: z145.string(),
|
|
3073
3076
|
workspaceId: z145.string(),
|
|
@@ -5172,143 +5175,180 @@ var DTOElementsGetOutput = z186.object({
|
|
|
5172
5175
|
figmaNodes: z186.array(DTOFigmaNode).optional()
|
|
5173
5176
|
});
|
|
5174
5177
|
|
|
5175
|
-
// src/api/dto/export/
|
|
5178
|
+
// src/api/dto/export/exporter.ts
|
|
5176
5179
|
import { z as z187 } from "zod";
|
|
5177
|
-
var
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
var DTOExportJobDesignSystemPreview = z187.object({
|
|
5180
|
+
var DTOExporterType = z187.enum(["documentation", "code"]);
|
|
5181
|
+
var DTOExporterSource = z187.enum(["git", "upload"]);
|
|
5182
|
+
var DTOExporterMembershipRole = z187.enum(["Owner", "OwnerArchived", "User"]);
|
|
5183
|
+
var DTOExporter = z187.object({
|
|
5182
5184
|
id: z187.string(),
|
|
5185
|
+
name: z187.string(),
|
|
5186
|
+
isPrivate: z187.boolean(),
|
|
5187
|
+
exporterType: DTOExporterType,
|
|
5188
|
+
isDefaultDocumentationExporter: z187.boolean(),
|
|
5189
|
+
iconURL: z187.string().optional(),
|
|
5190
|
+
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
5191
|
+
customBlocks: PulsarCustomBlock.array(),
|
|
5192
|
+
blockVariants: PulsarContributionVariant.array(),
|
|
5193
|
+
usesBrands: z187.boolean(),
|
|
5194
|
+
usesThemes: z187.boolean(),
|
|
5195
|
+
source: DTOExporterSource,
|
|
5196
|
+
gitUrl: z187.string().optional(),
|
|
5197
|
+
gitBranch: z187.string().optional(),
|
|
5198
|
+
gitDirectory: z187.string().optional()
|
|
5199
|
+
});
|
|
5200
|
+
var DTOExporterMembership = z187.object({
|
|
5201
|
+
workspaceId: z187.string(),
|
|
5202
|
+
exporterId: z187.string(),
|
|
5203
|
+
role: DTOExporterMembershipRole
|
|
5204
|
+
});
|
|
5205
|
+
var DTOExporterCreateOutput = z187.object({
|
|
5206
|
+
exporter: DTOExporter,
|
|
5207
|
+
membership: DTOExporterMembership
|
|
5208
|
+
});
|
|
5209
|
+
var DTOExporterGitProviderEnum = z187.enum(["github", "gitlab", "bitbucket", "azure"]);
|
|
5210
|
+
var DTOExporterCreateInput = z187.object({
|
|
5211
|
+
url: z187.string(),
|
|
5212
|
+
provider: DTOExporterGitProviderEnum.optional()
|
|
5213
|
+
});
|
|
5214
|
+
|
|
5215
|
+
// src/api/dto/export/job.ts
|
|
5216
|
+
import { z as z188 } from "zod";
|
|
5217
|
+
var DTOExportJobCreatedBy = z188.object({
|
|
5218
|
+
userId: z188.string(),
|
|
5219
|
+
userName: z188.string()
|
|
5220
|
+
});
|
|
5221
|
+
var DTOExportJobDesignSystemPreview = z188.object({
|
|
5222
|
+
id: z188.string(),
|
|
5183
5223
|
meta: ObjectMeta
|
|
5184
5224
|
});
|
|
5185
|
-
var DTOExportJobDesignSystemVersionPreview =
|
|
5186
|
-
id:
|
|
5225
|
+
var DTOExportJobDesignSystemVersionPreview = z188.object({
|
|
5226
|
+
id: z188.string(),
|
|
5187
5227
|
meta: ObjectMeta,
|
|
5188
|
-
version:
|
|
5189
|
-
isReadonly:
|
|
5228
|
+
version: z188.string(),
|
|
5229
|
+
isReadonly: z188.boolean()
|
|
5190
5230
|
});
|
|
5191
|
-
var DTOExportJobDestinations =
|
|
5231
|
+
var DTOExportJobDestinations = z188.object({
|
|
5192
5232
|
s3: ExporterDestinationS3.optional(),
|
|
5193
5233
|
azure: ExporterDestinationAzure.optional(),
|
|
5194
5234
|
bitbucket: ExporterDestinationBitbucket.optional(),
|
|
5195
5235
|
github: ExporterDestinationGithub.optional(),
|
|
5196
5236
|
gitlab: ExporterDestinationGitlab.optional(),
|
|
5197
5237
|
documentation: ExporterDestinationDocs.optional(),
|
|
5198
|
-
webhookUrl:
|
|
5238
|
+
webhookUrl: z188.string().optional()
|
|
5199
5239
|
});
|
|
5200
|
-
var DTOExportJob =
|
|
5201
|
-
id:
|
|
5202
|
-
createdAt:
|
|
5203
|
-
finishedAt:
|
|
5204
|
-
index:
|
|
5240
|
+
var DTOExportJob = z188.object({
|
|
5241
|
+
id: z188.string(),
|
|
5242
|
+
createdAt: z188.date(),
|
|
5243
|
+
finishedAt: z188.date().optional(),
|
|
5244
|
+
index: z188.number().optional(),
|
|
5205
5245
|
status: ExportJobStatus,
|
|
5206
|
-
estimatedExecutionTime:
|
|
5246
|
+
estimatedExecutionTime: z188.number().optional(),
|
|
5207
5247
|
createdBy: DTOExportJobCreatedBy,
|
|
5208
5248
|
designSystem: DTOExportJobDesignSystemPreview,
|
|
5209
5249
|
designSystemVersion: DTOExportJobDesignSystemVersionPreview,
|
|
5210
5250
|
destinations: DTOExportJobDestinations,
|
|
5211
|
-
exporterId:
|
|
5212
|
-
scheduleId:
|
|
5251
|
+
exporterId: z188.string(),
|
|
5252
|
+
scheduleId: z188.string(),
|
|
5213
5253
|
result: ExportJobResult.optional()
|
|
5214
5254
|
});
|
|
5215
5255
|
|
|
5216
5256
|
// src/api/dto/liveblocks/auth-response.ts
|
|
5217
|
-
import { z as
|
|
5218
|
-
var DTOLiveblocksAuthResponse =
|
|
5219
|
-
token:
|
|
5257
|
+
import { z as z189 } from "zod";
|
|
5258
|
+
var DTOLiveblocksAuthResponse = z189.object({
|
|
5259
|
+
token: z189.string()
|
|
5220
5260
|
});
|
|
5221
5261
|
|
|
5222
5262
|
// src/api/dto/users/profile/update.ts
|
|
5223
|
-
import { z as
|
|
5224
|
-
var DTOUserProfileUpdateResponse =
|
|
5263
|
+
import { z as z190 } from "zod";
|
|
5264
|
+
var DTOUserProfileUpdateResponse = z190.object({
|
|
5225
5265
|
user: User
|
|
5226
5266
|
});
|
|
5227
5267
|
|
|
5228
5268
|
// src/api/dto/workspaces/git.ts
|
|
5229
|
-
import { z as
|
|
5230
|
-
var DTOGitOrganization =
|
|
5231
|
-
id:
|
|
5232
|
-
name:
|
|
5233
|
-
url:
|
|
5234
|
-
});
|
|
5235
|
-
var DTOGitProject =
|
|
5236
|
-
id:
|
|
5237
|
-
name:
|
|
5238
|
-
url:
|
|
5239
|
-
});
|
|
5240
|
-
var DTOGitRepository =
|
|
5241
|
-
id:
|
|
5242
|
-
name:
|
|
5243
|
-
url:
|
|
5244
|
-
defaultBranch:
|
|
5245
|
-
});
|
|
5246
|
-
var DTOGitBranch =
|
|
5247
|
-
name:
|
|
5248
|
-
lastCommitId:
|
|
5269
|
+
import { z as z191 } from "zod";
|
|
5270
|
+
var DTOGitOrganization = z191.object({
|
|
5271
|
+
id: z191.string(),
|
|
5272
|
+
name: z191.string(),
|
|
5273
|
+
url: z191.string()
|
|
5274
|
+
});
|
|
5275
|
+
var DTOGitProject = z191.object({
|
|
5276
|
+
id: z191.string(),
|
|
5277
|
+
name: z191.string(),
|
|
5278
|
+
url: z191.string()
|
|
5279
|
+
});
|
|
5280
|
+
var DTOGitRepository = z191.object({
|
|
5281
|
+
id: z191.string(),
|
|
5282
|
+
name: z191.string(),
|
|
5283
|
+
url: z191.string(),
|
|
5284
|
+
defaultBranch: z191.string()
|
|
5285
|
+
});
|
|
5286
|
+
var DTOGitBranch = z191.object({
|
|
5287
|
+
name: z191.string(),
|
|
5288
|
+
lastCommitId: z191.string()
|
|
5249
5289
|
});
|
|
5250
5290
|
|
|
5251
5291
|
// src/api/dto/workspaces/integrations.ts
|
|
5252
|
-
import { z as
|
|
5253
|
-
var DTOIntegration =
|
|
5254
|
-
id:
|
|
5255
|
-
workspaceId:
|
|
5292
|
+
import { z as z192 } from "zod";
|
|
5293
|
+
var DTOIntegration = z192.object({
|
|
5294
|
+
id: z192.string(),
|
|
5295
|
+
workspaceId: z192.string(),
|
|
5256
5296
|
type: ExtendedIntegrationType,
|
|
5257
|
-
createdAt:
|
|
5258
|
-
integrationCredentials:
|
|
5259
|
-
integrationDesignSystems:
|
|
5297
|
+
createdAt: z192.coerce.date(),
|
|
5298
|
+
integrationCredentials: z192.array(IntegrationCredentials).optional(),
|
|
5299
|
+
integrationDesignSystems: z192.array(IntegrationDesignSystem).optional()
|
|
5260
5300
|
});
|
|
5261
|
-
var DTOIntegrationOAuthGetResponse =
|
|
5262
|
-
url:
|
|
5301
|
+
var DTOIntegrationOAuthGetResponse = z192.object({
|
|
5302
|
+
url: z192.string()
|
|
5263
5303
|
});
|
|
5264
|
-
var DTOIntegrationPostResponse =
|
|
5304
|
+
var DTOIntegrationPostResponse = z192.object({
|
|
5265
5305
|
integration: DTOIntegration
|
|
5266
5306
|
});
|
|
5267
|
-
var DTOIntegrationsGetListResponse =
|
|
5307
|
+
var DTOIntegrationsGetListResponse = z192.object({
|
|
5268
5308
|
integrations: DTOIntegration.array()
|
|
5269
5309
|
});
|
|
5270
5310
|
|
|
5271
5311
|
// src/api/dto/workspaces/membership.ts
|
|
5272
|
-
import { z as
|
|
5312
|
+
import { z as z195 } from "zod";
|
|
5273
5313
|
|
|
5274
5314
|
// src/api/dto/workspaces/workspace.ts
|
|
5275
|
-
import { z as
|
|
5315
|
+
import { z as z194 } from "zod";
|
|
5276
5316
|
|
|
5277
5317
|
// src/api/dto/workspaces/npm-registry.ts
|
|
5278
|
-
import { z as
|
|
5318
|
+
import { z as z193 } from "zod";
|
|
5279
5319
|
var DTONpmRegistryConfigConstants = {
|
|
5280
5320
|
passwordPlaceholder: "redacted"
|
|
5281
5321
|
};
|
|
5282
|
-
var DTONpmRegistryConfig =
|
|
5322
|
+
var DTONpmRegistryConfig = z193.object({
|
|
5283
5323
|
// Registry basic configuration
|
|
5284
5324
|
registryType: NpmRegistryType,
|
|
5285
|
-
registryUrl:
|
|
5286
|
-
customRegistryUrl:
|
|
5325
|
+
registryUrl: z193.string(),
|
|
5326
|
+
customRegistryUrl: z193.string().optional(),
|
|
5287
5327
|
// URL of Supernova NPM packages proxy
|
|
5288
|
-
proxyUrl:
|
|
5328
|
+
proxyUrl: z193.string(),
|
|
5289
5329
|
// Auth configuration
|
|
5290
5330
|
authType: NpmRegistryAuthType,
|
|
5291
|
-
accessToken:
|
|
5292
|
-
username:
|
|
5293
|
-
password:
|
|
5331
|
+
accessToken: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5332
|
+
username: z193.string().optional(),
|
|
5333
|
+
password: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5294
5334
|
// NPM package scopes for whih the proxy should be enabled
|
|
5295
|
-
enabledScopes:
|
|
5335
|
+
enabledScopes: z193.array(z193.string()),
|
|
5296
5336
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
5297
5337
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
5298
|
-
bypassProxy:
|
|
5338
|
+
bypassProxy: z193.boolean()
|
|
5299
5339
|
});
|
|
5300
5340
|
|
|
5301
5341
|
// src/api/dto/workspaces/workspace.ts
|
|
5302
|
-
var DTOWorkspace =
|
|
5303
|
-
id:
|
|
5342
|
+
var DTOWorkspace = z194.object({
|
|
5343
|
+
id: z194.string(),
|
|
5304
5344
|
profile: WorkspaceProfile,
|
|
5305
5345
|
subscription: Subscription,
|
|
5306
5346
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
5307
5347
|
});
|
|
5308
5348
|
|
|
5309
5349
|
// src/api/dto/workspaces/membership.ts
|
|
5310
|
-
var DTOWorkspaceRole =
|
|
5311
|
-
var DTOUserWorkspaceMembership =
|
|
5350
|
+
var DTOWorkspaceRole = z195.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
5351
|
+
var DTOUserWorkspaceMembership = z195.object({
|
|
5312
5352
|
// Workspace the user is a member of
|
|
5313
5353
|
workspace: DTOWorkspace,
|
|
5314
5354
|
// Assigned role the user has in the workspace
|
|
@@ -5318,14 +5358,14 @@ var DTOUserWorkspaceMembership = z194.object({
|
|
|
5318
5358
|
// when a workspace's subscription is downgraded to free tier
|
|
5319
5359
|
effectiveRole: DTOWorkspaceRole
|
|
5320
5360
|
});
|
|
5321
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
5322
|
-
membership:
|
|
5361
|
+
var DTOUserWorkspaceMembershipsResponse = z195.object({
|
|
5362
|
+
membership: z195.array(DTOUserWorkspaceMembership)
|
|
5323
5363
|
});
|
|
5324
5364
|
|
|
5325
5365
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
5326
|
-
import { z as
|
|
5327
|
-
var DocumentationHierarchySettings =
|
|
5328
|
-
routingVersion:
|
|
5366
|
+
import { z as z196 } from "zod";
|
|
5367
|
+
var DocumentationHierarchySettings = z196.object({
|
|
5368
|
+
routingVersion: z196.string()
|
|
5329
5369
|
});
|
|
5330
5370
|
function documentationHierarchyToYjs(doc, transaction) {
|
|
5331
5371
|
doc.transact((trx) => {
|
|
@@ -5396,13 +5436,13 @@ function getInternalSettingsYMap(doc) {
|
|
|
5396
5436
|
}
|
|
5397
5437
|
|
|
5398
5438
|
// src/yjs/design-system-content/item-configuration.ts
|
|
5399
|
-
import { z as
|
|
5400
|
-
var DTODocumentationPageRoomHeaderData =
|
|
5401
|
-
title:
|
|
5439
|
+
import { z as z197 } from "zod";
|
|
5440
|
+
var DTODocumentationPageRoomHeaderData = z197.object({
|
|
5441
|
+
title: z197.string(),
|
|
5402
5442
|
configuration: DTODocumentationItemConfigurationV2
|
|
5403
5443
|
});
|
|
5404
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
5405
|
-
title:
|
|
5444
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z197.object({
|
|
5445
|
+
title: z197.string().optional(),
|
|
5406
5446
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
5407
5447
|
});
|
|
5408
5448
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -5453,7 +5493,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
5453
5493
|
header: rawHeader
|
|
5454
5494
|
};
|
|
5455
5495
|
return {
|
|
5456
|
-
title:
|
|
5496
|
+
title: z197.string().parse(title),
|
|
5457
5497
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
5458
5498
|
};
|
|
5459
5499
|
}
|
|
@@ -5463,9 +5503,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
5463
5503
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
5464
5504
|
|
|
5465
5505
|
// src/yjs/docs-editor/model/page.ts
|
|
5466
|
-
import { z as
|
|
5467
|
-
var DocumentationPageEditorModel =
|
|
5468
|
-
blocks:
|
|
5506
|
+
import { z as z198 } from "zod";
|
|
5507
|
+
var DocumentationPageEditorModel = z198.object({
|
|
5508
|
+
blocks: z198.array(PageBlockEditorModel.or(PageSectionEditorModel))
|
|
5469
5509
|
});
|
|
5470
5510
|
|
|
5471
5511
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -8437,7 +8477,7 @@ var blocks = [
|
|
|
8437
8477
|
|
|
8438
8478
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
8439
8479
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
8440
|
-
import { z as
|
|
8480
|
+
import { z as z199 } from "zod";
|
|
8441
8481
|
function yDocToPage(yDoc, definitions) {
|
|
8442
8482
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
8443
8483
|
}
|
|
@@ -8480,7 +8520,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
8480
8520
|
return null;
|
|
8481
8521
|
return {
|
|
8482
8522
|
id,
|
|
8483
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
8523
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z199.string()) ?? "",
|
|
8484
8524
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
8485
8525
|
};
|
|
8486
8526
|
}
|
|
@@ -8515,7 +8555,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
8515
8555
|
});
|
|
8516
8556
|
}
|
|
8517
8557
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
8518
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
8558
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z199.string());
|
|
8519
8559
|
if (!definitionId) {
|
|
8520
8560
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
8521
8561
|
return [];
|
|
@@ -8557,7 +8597,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
8557
8597
|
if (!id)
|
|
8558
8598
|
return null;
|
|
8559
8599
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8560
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
8600
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z199.string().optional()));
|
|
8561
8601
|
return {
|
|
8562
8602
|
// TODO Artem: indent
|
|
8563
8603
|
id,
|
|
@@ -8684,10 +8724,10 @@ function parseRichTextAttribute(mark) {
|
|
|
8684
8724
|
return null;
|
|
8685
8725
|
}
|
|
8686
8726
|
function parseProsemirrorLink(mark) {
|
|
8687
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
8727
|
+
const href = getProsemirrorAttribute(mark, "href", z199.string().optional());
|
|
8688
8728
|
if (!href)
|
|
8689
8729
|
return null;
|
|
8690
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
8730
|
+
const target = getProsemirrorAttribute(mark, "target", z199.string().optional());
|
|
8691
8731
|
const openInNewTab = target === "_blank";
|
|
8692
8732
|
if (href.startsWith("@")) {
|
|
8693
8733
|
return {
|
|
@@ -8710,7 +8750,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
8710
8750
|
if (!id)
|
|
8711
8751
|
return null;
|
|
8712
8752
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8713
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
8753
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z199.boolean().optional()) !== false;
|
|
8714
8754
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
8715
8755
|
if (!tableChild) {
|
|
8716
8756
|
return emptyTable(id, variantId, 0);
|
|
@@ -8757,9 +8797,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
8757
8797
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8758
8798
|
if (!id)
|
|
8759
8799
|
return null;
|
|
8760
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
8800
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z199.string().optional());
|
|
8761
8801
|
let columnWidth;
|
|
8762
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
8802
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z199.array(z199.number()).optional());
|
|
8763
8803
|
if (columnWidthArray) {
|
|
8764
8804
|
columnWidth = columnWidthArray[0];
|
|
8765
8805
|
}
|
|
@@ -8797,7 +8837,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
8797
8837
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
8798
8838
|
};
|
|
8799
8839
|
case "image":
|
|
8800
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8840
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z199.string());
|
|
8801
8841
|
if (!items)
|
|
8802
8842
|
return null;
|
|
8803
8843
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -8902,7 +8942,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8902
8942
|
};
|
|
8903
8943
|
}
|
|
8904
8944
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
8905
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8945
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z199.string());
|
|
8906
8946
|
if (!itemsString)
|
|
8907
8947
|
return null;
|
|
8908
8948
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -8914,18 +8954,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
8914
8954
|
}
|
|
8915
8955
|
function parseAppearance(prosemirrorNode) {
|
|
8916
8956
|
let appearance = {};
|
|
8917
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
8957
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z199.string().optional());
|
|
8918
8958
|
if (rawAppearanceString) {
|
|
8919
8959
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
8920
8960
|
if (parsedAppearance.success) {
|
|
8921
8961
|
appearance = parsedAppearance.data;
|
|
8922
8962
|
}
|
|
8923
8963
|
}
|
|
8924
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
8964
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z199.number().optional());
|
|
8925
8965
|
if (columns) {
|
|
8926
8966
|
appearance.numberOfColumns = columns;
|
|
8927
8967
|
}
|
|
8928
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
8968
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z199.string().optional());
|
|
8929
8969
|
if (backgroundColor) {
|
|
8930
8970
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
8931
8971
|
if (parsedColor.success) {
|
|
@@ -9016,13 +9056,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
9016
9056
|
}
|
|
9017
9057
|
}
|
|
9018
9058
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
9019
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
9059
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z199.string());
|
|
9020
9060
|
if (!id)
|
|
9021
9061
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
9022
9062
|
return id;
|
|
9023
9063
|
}
|
|
9024
9064
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
9025
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
9065
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z199.string()));
|
|
9026
9066
|
}
|
|
9027
9067
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
9028
9068
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -9139,8 +9179,16 @@ export {
|
|
|
9139
9179
|
DTOExportJobDesignSystemPreview,
|
|
9140
9180
|
DTOExportJobDesignSystemVersionPreview,
|
|
9141
9181
|
DTOExportJobDestinations,
|
|
9182
|
+
DTOExporter,
|
|
9183
|
+
DTOExporterCreateInput,
|
|
9184
|
+
DTOExporterCreateOutput,
|
|
9185
|
+
DTOExporterGitProviderEnum,
|
|
9186
|
+
DTOExporterMembership,
|
|
9187
|
+
DTOExporterMembershipRole,
|
|
9142
9188
|
DTOExporterProperty,
|
|
9143
9189
|
DTOExporterPropertyListResponse,
|
|
9190
|
+
DTOExporterSource,
|
|
9191
|
+
DTOExporterType,
|
|
9144
9192
|
DTOFigmaNode,
|
|
9145
9193
|
DTOFigmaNodeData,
|
|
9146
9194
|
DTOFigmaNodeOrigin,
|