@supernova-studio/model 0.47.9 → 0.47.11
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 +22047 -23694
- package/dist/index.d.ts +22047 -23694
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1768 -1771
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/export/export-destinations.ts +3 -4
- package/src/export/export-jobs.ts +0 -1
- package/src/export/export-runner/export-context.ts +1 -0
- package/src/export/export-runner/exporter-payload.ts +1 -0
- package/src/helpers/db.ts +40 -54
- package/src/utils/errors.ts +2 -1
package/dist/index.mjs
CHANGED
|
@@ -55,12 +55,9 @@ var PostStripeCheckoutOutputSchema = z4.object({
|
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
// src/billing/customer.ts
|
|
58
|
-
import { z as
|
|
58
|
+
import { z as z5 } from "zod";
|
|
59
59
|
|
|
60
60
|
// src/helpers/db.ts
|
|
61
|
-
import {
|
|
62
|
-
z as z5
|
|
63
|
-
} from "zod";
|
|
64
61
|
function zodCreateInputOmit() {
|
|
65
62
|
return {
|
|
66
63
|
id: true,
|
|
@@ -83,44 +80,44 @@ function nullishToOptional(type) {
|
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
// src/billing/customer.ts
|
|
86
|
-
var Customer =
|
|
87
|
-
id:
|
|
88
|
-
});
|
|
89
|
-
var Address =
|
|
90
|
-
street1: nullishToOptional(
|
|
91
|
-
street2: nullishToOptional(
|
|
92
|
-
city: nullishToOptional(
|
|
93
|
-
postal: nullishToOptional(
|
|
94
|
-
country: nullishToOptional(
|
|
95
|
-
state: nullishToOptional(
|
|
96
|
-
});
|
|
97
|
-
var BillingDetails =
|
|
83
|
+
var Customer = z5.object({
|
|
84
|
+
id: z5.string()
|
|
85
|
+
});
|
|
86
|
+
var Address = z5.object({
|
|
87
|
+
street1: nullishToOptional(z5.string()),
|
|
88
|
+
street2: nullishToOptional(z5.string()),
|
|
89
|
+
city: nullishToOptional(z5.string()),
|
|
90
|
+
postal: nullishToOptional(z5.string()),
|
|
91
|
+
country: nullishToOptional(z5.string()),
|
|
92
|
+
state: nullishToOptional(z5.string())
|
|
93
|
+
});
|
|
94
|
+
var BillingDetails = z5.object({
|
|
98
95
|
address: nullishToOptional(Address),
|
|
99
|
-
email: nullishToOptional(
|
|
100
|
-
companyName: nullishToOptional(
|
|
101
|
-
companyId: nullishToOptional(
|
|
102
|
-
notes: nullishToOptional(
|
|
103
|
-
vat: nullishToOptional(
|
|
104
|
-
poNumber: nullishToOptional(
|
|
96
|
+
email: nullishToOptional(z5.string()),
|
|
97
|
+
companyName: nullishToOptional(z5.string()),
|
|
98
|
+
companyId: nullishToOptional(z5.string()),
|
|
99
|
+
notes: nullishToOptional(z5.string()),
|
|
100
|
+
vat: nullishToOptional(z5.string()),
|
|
101
|
+
poNumber: nullishToOptional(z5.string())
|
|
105
102
|
});
|
|
106
103
|
|
|
107
104
|
// src/billing/features.ts
|
|
108
|
-
import { z as
|
|
109
|
-
var featureLimitedSchema =
|
|
110
|
-
max:
|
|
111
|
-
errorMessage:
|
|
112
|
-
errorReason:
|
|
105
|
+
import { z as z6 } from "zod";
|
|
106
|
+
var featureLimitedSchema = z6.object({
|
|
107
|
+
max: z6.number(),
|
|
108
|
+
errorMessage: z6.string(),
|
|
109
|
+
errorReason: z6.string()
|
|
113
110
|
});
|
|
114
|
-
var featureToggleSchema =
|
|
115
|
-
enabled:
|
|
116
|
-
errorMessage:
|
|
117
|
-
errorReason:
|
|
111
|
+
var featureToggleSchema = z6.object({
|
|
112
|
+
enabled: z6.boolean(),
|
|
113
|
+
errorMessage: z6.string(),
|
|
114
|
+
errorReason: z6.string()
|
|
118
115
|
});
|
|
119
116
|
var featureWithImportJobsSchema = featureLimitedSchema.extend({
|
|
120
|
-
noImportJobsErrorMessage:
|
|
121
|
-
noImportJobsErrorReason:
|
|
117
|
+
noImportJobsErrorMessage: z6.string(),
|
|
118
|
+
noImportJobsErrorReason: z6.string()
|
|
122
119
|
});
|
|
123
|
-
var FeaturesSummary =
|
|
120
|
+
var FeaturesSummary = z6.object({
|
|
124
121
|
designSystems: featureLimitedSchema,
|
|
125
122
|
designSystemSources: featureWithImportJobsSchema,
|
|
126
123
|
designSystemVersions: featureLimitedSchema,
|
|
@@ -142,77 +139,77 @@ var FeaturesSummary = z7.object({
|
|
|
142
139
|
});
|
|
143
140
|
|
|
144
141
|
// src/billing/invoice.ts
|
|
145
|
-
import { z as
|
|
146
|
-
var InvoiceSchema =
|
|
147
|
-
id:
|
|
148
|
-
number:
|
|
149
|
-
amount_due:
|
|
150
|
-
date:
|
|
151
|
-
hostedUrl:
|
|
142
|
+
import { z as z7 } from "zod";
|
|
143
|
+
var InvoiceSchema = z7.object({
|
|
144
|
+
id: z7.string(),
|
|
145
|
+
number: z7.string(),
|
|
146
|
+
amount_due: z7.number(),
|
|
147
|
+
date: z7.coerce.date(),
|
|
148
|
+
hostedUrl: z7.string().url(),
|
|
152
149
|
card: CardSchema.nullish()
|
|
153
150
|
});
|
|
154
|
-
var PeriodSchema =
|
|
155
|
-
start:
|
|
156
|
-
end:
|
|
151
|
+
var PeriodSchema = z7.object({
|
|
152
|
+
start: z7.coerce.date(),
|
|
153
|
+
end: z7.coerce.date()
|
|
157
154
|
});
|
|
158
|
-
var InvoiceLineSchema =
|
|
159
|
-
amount:
|
|
155
|
+
var InvoiceLineSchema = z7.object({
|
|
156
|
+
amount: z7.number(),
|
|
160
157
|
period: PeriodSchema,
|
|
161
|
-
proration:
|
|
162
|
-
description:
|
|
163
|
-
type:
|
|
158
|
+
proration: z7.boolean(),
|
|
159
|
+
description: z7.string(),
|
|
160
|
+
type: z7.string()
|
|
164
161
|
});
|
|
165
|
-
var InvoiceCouponSchema =
|
|
166
|
-
amount_off:
|
|
167
|
-
percent_off:
|
|
168
|
-
name:
|
|
162
|
+
var InvoiceCouponSchema = z7.object({
|
|
163
|
+
amount_off: z7.number(),
|
|
164
|
+
percent_off: z7.number(),
|
|
165
|
+
name: z7.string()
|
|
169
166
|
});
|
|
170
167
|
|
|
171
168
|
// src/billing/portalSession.ts
|
|
172
|
-
import { z as
|
|
173
|
-
var PostStripePortalUpdateSessionBodyInputSchema =
|
|
174
|
-
priceId:
|
|
175
|
-
numberOfSeats:
|
|
169
|
+
import { z as z8 } from "zod";
|
|
170
|
+
var PostStripePortalUpdateSessionBodyInputSchema = z8.object({
|
|
171
|
+
priceId: z8.string(),
|
|
172
|
+
numberOfSeats: z8.number().int()
|
|
176
173
|
});
|
|
177
|
-
var PostStripePortalSessionBodyInputSchema =
|
|
178
|
-
returnUrl:
|
|
174
|
+
var PostStripePortalSessionBodyInputSchema = z8.object({
|
|
175
|
+
returnUrl: z8.string().url(),
|
|
179
176
|
update: PostStripePortalUpdateSessionBodyInputSchema.optional(),
|
|
180
|
-
cancel:
|
|
177
|
+
cancel: z8.boolean().optional()
|
|
181
178
|
});
|
|
182
|
-
var PostStripePortalSessionOutputSchema =
|
|
183
|
-
id:
|
|
184
|
-
url:
|
|
179
|
+
var PostStripePortalSessionOutputSchema = z8.object({
|
|
180
|
+
id: z8.string(),
|
|
181
|
+
url: z8.string().nullish()
|
|
185
182
|
});
|
|
186
183
|
|
|
187
184
|
// src/billing/price.ts
|
|
188
|
-
import { z as
|
|
189
|
-
var BillingIntervalSchema =
|
|
190
|
-
var PriceSchema =
|
|
191
|
-
stripePriceId:
|
|
192
|
-
stripeProductId:
|
|
193
|
-
stripeProductName:
|
|
194
|
-
stripeProductDescription:
|
|
195
|
-
active:
|
|
196
|
-
amount:
|
|
185
|
+
import { z as z9 } from "zod";
|
|
186
|
+
var BillingIntervalSchema = z9.enum(["daily", "monthly", "weekly", "yearly"]);
|
|
187
|
+
var PriceSchema = z9.object({
|
|
188
|
+
stripePriceId: z9.string(),
|
|
189
|
+
stripeProductId: z9.string(),
|
|
190
|
+
stripeProductName: z9.string().optional(),
|
|
191
|
+
stripeProductDescription: z9.string().optional(),
|
|
192
|
+
active: z9.boolean(),
|
|
193
|
+
amount: z9.number(),
|
|
197
194
|
interval: BillingIntervalSchema,
|
|
198
|
-
isPricePerCreator:
|
|
199
|
-
isTrial:
|
|
200
|
-
isHidden:
|
|
201
|
-
minimumSeats:
|
|
202
|
-
legacyVersion:
|
|
203
|
-
featuresSet:
|
|
204
|
-
stripeProductFeatures:
|
|
205
|
-
stripeProductAdditionalFeatures:
|
|
195
|
+
isPricePerCreator: z9.boolean().optional(),
|
|
196
|
+
isTrial: z9.boolean().optional(),
|
|
197
|
+
isHidden: z9.boolean().optional(),
|
|
198
|
+
minimumSeats: z9.number().optional(),
|
|
199
|
+
legacyVersion: z9.string().optional(),
|
|
200
|
+
featuresSet: z9.string().optional(),
|
|
201
|
+
stripeProductFeatures: z9.array(z9.string()).optional(),
|
|
202
|
+
stripeProductAdditionalFeatures: z9.array(z9.string()).optional()
|
|
206
203
|
});
|
|
207
204
|
|
|
208
205
|
// src/billing/product.ts
|
|
209
|
-
import { z as
|
|
210
|
-
var ProductCodeSchema =
|
|
206
|
+
import { z as z10 } from "zod";
|
|
207
|
+
var ProductCodeSchema = z10.enum(["free", "team", "company", "enterprise"]);
|
|
211
208
|
var ProductCode = ProductCodeSchema.enum;
|
|
212
209
|
|
|
213
210
|
// src/billing/subscription.ts
|
|
214
|
-
import { z as
|
|
215
|
-
var StripeSubscriptionStatusSchema =
|
|
211
|
+
import { z as z11 } from "zod";
|
|
212
|
+
var StripeSubscriptionStatusSchema = z11.enum([
|
|
216
213
|
"trialing",
|
|
217
214
|
"active",
|
|
218
215
|
"past_due",
|
|
@@ -222,14 +219,14 @@ var StripeSubscriptionStatusSchema = z12.enum([
|
|
|
222
219
|
"incomplete",
|
|
223
220
|
"unknown"
|
|
224
221
|
]);
|
|
225
|
-
var InternalStatusSchema =
|
|
226
|
-
var BillingTypeSchema =
|
|
222
|
+
var InternalStatusSchema = z11.enum(["active", "suspended", "gracePeriod", "cancelled", "downgraded_to_free"]);
|
|
223
|
+
var BillingTypeSchema = z11.enum(["Auto", "Invoice"]);
|
|
227
224
|
var StripeSubscriptionStatus = StripeSubscriptionStatusSchema.enum;
|
|
228
225
|
var InternalStatus = InternalStatusSchema.enum;
|
|
229
226
|
var BillingType = BillingTypeSchema.enum;
|
|
230
|
-
var Subscription =
|
|
231
|
-
stripeSubscriptionId:
|
|
232
|
-
stripeCustomerId:
|
|
227
|
+
var Subscription = z11.object({
|
|
228
|
+
stripeSubscriptionId: z11.string().nullish(),
|
|
229
|
+
stripeCustomerId: z11.string().nullish(),
|
|
233
230
|
status: InternalStatusSchema.optional(),
|
|
234
231
|
subscriptionStatus: StripeSubscriptionStatusSchema.optional(),
|
|
235
232
|
// the stripe API official status
|
|
@@ -237,77 +234,77 @@ var Subscription = z12.object({
|
|
|
237
234
|
// TODO: delete when create/get workspace will stop using it in the former API
|
|
238
235
|
product: ProductCodeSchema,
|
|
239
236
|
featuresSummary: FeaturesSummary.optional(),
|
|
240
|
-
stripeProductDescription:
|
|
241
|
-
stripeProductFeatures:
|
|
242
|
-
stripeProductAdditionalFeatures:
|
|
243
|
-
stripeSubscriptionMainItemId:
|
|
244
|
-
planPriceId:
|
|
237
|
+
stripeProductDescription: z11.string().optional(),
|
|
238
|
+
stripeProductFeatures: z11.array(z11.string()).optional(),
|
|
239
|
+
stripeProductAdditionalFeatures: z11.array(z11.string()).optional(),
|
|
240
|
+
stripeSubscriptionMainItemId: z11.string().optional(),
|
|
241
|
+
planPriceId: z11.string(),
|
|
245
242
|
planInterval: BillingIntervalSchema,
|
|
246
|
-
isPricePerCreator:
|
|
247
|
-
legacyVersion:
|
|
248
|
-
seats:
|
|
249
|
-
seatLimit:
|
|
250
|
-
currentPeriodStart:
|
|
251
|
-
currentPeriodEnd:
|
|
252
|
-
subscriptionStatusUpdatedAt:
|
|
253
|
-
cancelAt:
|
|
243
|
+
isPricePerCreator: z11.boolean().optional(),
|
|
244
|
+
legacyVersion: z11.string().optional(),
|
|
245
|
+
seats: z11.number(),
|
|
246
|
+
seatLimit: z11.number(),
|
|
247
|
+
currentPeriodStart: z11.string().optional(),
|
|
248
|
+
currentPeriodEnd: z11.string().optional(),
|
|
249
|
+
subscriptionStatusUpdatedAt: z11.string().optional(),
|
|
250
|
+
cancelAt: z11.string().nullish(),
|
|
254
251
|
card: CardSchema.optional(),
|
|
255
252
|
// New
|
|
256
|
-
amount:
|
|
257
|
-
isTrial:
|
|
253
|
+
amount: z11.number().nullish(),
|
|
254
|
+
isTrial: z11.boolean().optional(),
|
|
258
255
|
billingType: BillingTypeSchema.optional(),
|
|
259
|
-
daysUntilDue:
|
|
256
|
+
daysUntilDue: z11.number().optional()
|
|
260
257
|
});
|
|
261
258
|
|
|
262
259
|
// src/common/entity.ts
|
|
263
|
-
import { z as
|
|
264
|
-
var Entity =
|
|
265
|
-
id:
|
|
266
|
-
createdAt:
|
|
267
|
-
updatedAt:
|
|
260
|
+
import { z as z12 } from "zod";
|
|
261
|
+
var Entity = z12.object({
|
|
262
|
+
id: z12.string(),
|
|
263
|
+
createdAt: z12.coerce.date(),
|
|
264
|
+
updatedAt: z12.coerce.date()
|
|
268
265
|
});
|
|
269
266
|
|
|
270
267
|
// src/common/object-meta.ts
|
|
271
|
-
import { z as
|
|
272
|
-
var ObjectMeta =
|
|
273
|
-
name:
|
|
274
|
-
description:
|
|
268
|
+
import { z as z13 } from "zod";
|
|
269
|
+
var ObjectMeta = z13.object({
|
|
270
|
+
name: z13.string(),
|
|
271
|
+
description: z13.string().optional()
|
|
275
272
|
});
|
|
276
273
|
|
|
277
274
|
// src/custom-domains/custom-domains.ts
|
|
278
|
-
import { z as
|
|
279
|
-
var CustomDomain =
|
|
280
|
-
id:
|
|
281
|
-
designSystemId:
|
|
282
|
-
state:
|
|
283
|
-
supernovaDomain:
|
|
284
|
-
customerDomain:
|
|
285
|
-
error:
|
|
286
|
-
errorCode:
|
|
275
|
+
import { z as z14 } from "zod";
|
|
276
|
+
var CustomDomain = z14.object({
|
|
277
|
+
id: z14.string(),
|
|
278
|
+
designSystemId: z14.string(),
|
|
279
|
+
state: z14.string(),
|
|
280
|
+
supernovaDomain: z14.string(),
|
|
281
|
+
customerDomain: z14.string().nullish(),
|
|
282
|
+
error: z14.string().nullish(),
|
|
283
|
+
errorCode: z14.string().nullish()
|
|
287
284
|
});
|
|
288
285
|
|
|
289
286
|
// src/docs-server/session.ts
|
|
290
|
-
import { z as
|
|
287
|
+
import { z as z23 } from "zod";
|
|
291
288
|
|
|
292
289
|
// src/users/linked-integrations.ts
|
|
293
|
-
import { z as
|
|
294
|
-
var IntegrationAuthType =
|
|
295
|
-
var ExternalServiceType =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
290
|
+
import { z as z15 } from "zod";
|
|
291
|
+
var IntegrationAuthType = z15.union([z15.literal("OAuth2"), z15.literal("PAT")]);
|
|
292
|
+
var ExternalServiceType = z15.union([
|
|
293
|
+
z15.literal("figma"),
|
|
294
|
+
z15.literal("github"),
|
|
295
|
+
z15.literal("azure"),
|
|
296
|
+
z15.literal("gitlab"),
|
|
297
|
+
z15.literal("bitbucket")
|
|
301
298
|
]);
|
|
302
|
-
var IntegrationUserInfo =
|
|
303
|
-
id:
|
|
304
|
-
handle:
|
|
305
|
-
avatarUrl:
|
|
306
|
-
email:
|
|
299
|
+
var IntegrationUserInfo = z15.object({
|
|
300
|
+
id: z15.string(),
|
|
301
|
+
handle: z15.string().optional(),
|
|
302
|
+
avatarUrl: z15.string().optional(),
|
|
303
|
+
email: z15.string().optional(),
|
|
307
304
|
authType: IntegrationAuthType.optional(),
|
|
308
|
-
customUrl:
|
|
305
|
+
customUrl: z15.string().optional()
|
|
309
306
|
});
|
|
310
|
-
var UserLinkedIntegrations =
|
|
307
|
+
var UserLinkedIntegrations = z15.object({
|
|
311
308
|
figma: IntegrationUserInfo.optional(),
|
|
312
309
|
github: IntegrationUserInfo.array().optional(),
|
|
313
310
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -316,35 +313,35 @@ var UserLinkedIntegrations = z16.object({
|
|
|
316
313
|
});
|
|
317
314
|
|
|
318
315
|
// src/users/user-create.ts
|
|
319
|
-
import { z as
|
|
320
|
-
var CreateUserInput =
|
|
321
|
-
email:
|
|
322
|
-
name:
|
|
323
|
-
username:
|
|
316
|
+
import { z as z16 } from "zod";
|
|
317
|
+
var CreateUserInput = z16.object({
|
|
318
|
+
email: z16.string(),
|
|
319
|
+
name: z16.string(),
|
|
320
|
+
username: z16.string()
|
|
324
321
|
});
|
|
325
322
|
|
|
326
323
|
// src/users/user-identity.ts
|
|
327
|
-
import { z as
|
|
328
|
-
var UserIdentity =
|
|
329
|
-
id:
|
|
330
|
-
userId:
|
|
324
|
+
import { z as z17 } from "zod";
|
|
325
|
+
var UserIdentity = z17.object({
|
|
326
|
+
id: z17.string(),
|
|
327
|
+
userId: z17.string()
|
|
331
328
|
});
|
|
332
329
|
|
|
333
330
|
// src/users/user-minified.ts
|
|
334
|
-
import { z as
|
|
335
|
-
var UserMinified =
|
|
336
|
-
id:
|
|
337
|
-
name:
|
|
338
|
-
email:
|
|
339
|
-
avatar:
|
|
331
|
+
import { z as z18 } from "zod";
|
|
332
|
+
var UserMinified = z18.object({
|
|
333
|
+
id: z18.string(),
|
|
334
|
+
name: z18.string(),
|
|
335
|
+
email: z18.string(),
|
|
336
|
+
avatar: z18.string().optional()
|
|
340
337
|
});
|
|
341
338
|
|
|
342
339
|
// src/users/user-notification-settings.ts
|
|
343
|
-
import { z as
|
|
344
|
-
var LiveblocksNotificationSettings =
|
|
345
|
-
sendCommentNotificationEmails:
|
|
340
|
+
import { z as z19 } from "zod";
|
|
341
|
+
var LiveblocksNotificationSettings = z19.object({
|
|
342
|
+
sendCommentNotificationEmails: z19.boolean()
|
|
346
343
|
});
|
|
347
|
-
var UserNotificationSettings =
|
|
344
|
+
var UserNotificationSettings = z19.object({
|
|
348
345
|
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
349
346
|
});
|
|
350
347
|
var defaultNotificationSettings = {
|
|
@@ -354,25 +351,25 @@ var defaultNotificationSettings = {
|
|
|
354
351
|
};
|
|
355
352
|
|
|
356
353
|
// src/users/user-profile.ts
|
|
357
|
-
import { z as
|
|
358
|
-
var UserOnboardingDepartment =
|
|
359
|
-
var UserOnboardingJobLevel =
|
|
360
|
-
var UserOnboarding =
|
|
361
|
-
companyName:
|
|
362
|
-
numberOfPeopleInOrg:
|
|
363
|
-
numberOfPeopleInDesignTeam:
|
|
354
|
+
import { z as z20 } from "zod";
|
|
355
|
+
var UserOnboardingDepartment = z20.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
356
|
+
var UserOnboardingJobLevel = z20.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
357
|
+
var UserOnboarding = z20.object({
|
|
358
|
+
companyName: z20.string().optional(),
|
|
359
|
+
numberOfPeopleInOrg: z20.string().optional(),
|
|
360
|
+
numberOfPeopleInDesignTeam: z20.string().optional(),
|
|
364
361
|
department: UserOnboardingDepartment.optional(),
|
|
365
|
-
jobTitle:
|
|
366
|
-
phase:
|
|
362
|
+
jobTitle: z20.string().optional(),
|
|
363
|
+
phase: z20.string().optional(),
|
|
367
364
|
jobLevel: UserOnboardingJobLevel.optional(),
|
|
368
|
-
designSystemName:
|
|
369
|
-
defaultDestination:
|
|
370
|
-
figmaUrl:
|
|
371
|
-
});
|
|
372
|
-
var UserProfile =
|
|
373
|
-
name:
|
|
374
|
-
avatar:
|
|
375
|
-
nickname:
|
|
365
|
+
designSystemName: z20.string().optional(),
|
|
366
|
+
defaultDestination: z20.string().optional(),
|
|
367
|
+
figmaUrl: z20.string().optional()
|
|
368
|
+
});
|
|
369
|
+
var UserProfile = z20.object({
|
|
370
|
+
name: z20.string(),
|
|
371
|
+
avatar: z20.string().optional(),
|
|
372
|
+
nickname: z20.string().optional(),
|
|
376
373
|
onboarding: UserOnboarding.optional()
|
|
377
374
|
});
|
|
378
375
|
var UserProfileUpdate = UserProfile.partial().omit({
|
|
@@ -380,206 +377,206 @@ var UserProfileUpdate = UserProfile.partial().omit({
|
|
|
380
377
|
});
|
|
381
378
|
|
|
382
379
|
// src/users/user-test.ts
|
|
383
|
-
import { z as
|
|
384
|
-
var UserTest =
|
|
385
|
-
id:
|
|
386
|
-
email:
|
|
380
|
+
import { z as z21 } from "zod";
|
|
381
|
+
var UserTest = z21.object({
|
|
382
|
+
id: z21.string(),
|
|
383
|
+
email: z21.string()
|
|
387
384
|
});
|
|
388
385
|
|
|
389
386
|
// src/users/user.ts
|
|
390
|
-
import { z as
|
|
391
|
-
var User =
|
|
392
|
-
id:
|
|
393
|
-
email:
|
|
394
|
-
emailVerified:
|
|
395
|
-
createdAt:
|
|
396
|
-
trialExpiresAt:
|
|
387
|
+
import { z as z22 } from "zod";
|
|
388
|
+
var User = z22.object({
|
|
389
|
+
id: z22.string(),
|
|
390
|
+
email: z22.string(),
|
|
391
|
+
emailVerified: z22.boolean(),
|
|
392
|
+
createdAt: z22.coerce.date(),
|
|
393
|
+
trialExpiresAt: z22.coerce.date().optional(),
|
|
397
394
|
profile: UserProfile,
|
|
398
395
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
399
|
-
loggedOutAt:
|
|
400
|
-
isProtected:
|
|
396
|
+
loggedOutAt: z22.coerce.date().optional(),
|
|
397
|
+
isProtected: z22.boolean()
|
|
401
398
|
});
|
|
402
399
|
|
|
403
400
|
// src/docs-server/session.ts
|
|
404
|
-
var NpmProxyToken =
|
|
405
|
-
access:
|
|
406
|
-
expiresAt:
|
|
401
|
+
var NpmProxyToken = z23.object({
|
|
402
|
+
access: z23.string(),
|
|
403
|
+
expiresAt: z23.number()
|
|
407
404
|
});
|
|
408
|
-
var SessionData =
|
|
409
|
-
returnToUrl:
|
|
405
|
+
var SessionData = z23.object({
|
|
406
|
+
returnToUrl: z23.string().optional(),
|
|
410
407
|
npmProxyToken: NpmProxyToken.optional()
|
|
411
408
|
});
|
|
412
|
-
var Session =
|
|
413
|
-
id:
|
|
414
|
-
expiresAt:
|
|
415
|
-
userId:
|
|
409
|
+
var Session = z23.object({
|
|
410
|
+
id: z23.string(),
|
|
411
|
+
expiresAt: z23.coerce.date(),
|
|
412
|
+
userId: z23.string().nullable(),
|
|
416
413
|
data: SessionData
|
|
417
414
|
});
|
|
418
|
-
var AuthTokens =
|
|
419
|
-
access:
|
|
420
|
-
refresh:
|
|
415
|
+
var AuthTokens = z23.object({
|
|
416
|
+
access: z23.string(),
|
|
417
|
+
refresh: z23.string()
|
|
421
418
|
});
|
|
422
|
-
var UserSession =
|
|
419
|
+
var UserSession = z23.object({
|
|
423
420
|
session: Session,
|
|
424
421
|
user: User.nullable()
|
|
425
422
|
});
|
|
426
423
|
|
|
427
424
|
// src/dsm/assets/asset-dynamo-record.ts
|
|
428
|
-
import { z as
|
|
429
|
-
var AssetDynamoRecord =
|
|
430
|
-
path:
|
|
431
|
-
id:
|
|
432
|
-
designSystemId:
|
|
433
|
-
expiresAt:
|
|
425
|
+
import { z as z24 } from "zod";
|
|
426
|
+
var AssetDynamoRecord = z24.object({
|
|
427
|
+
path: z24.string(),
|
|
428
|
+
id: z24.string(),
|
|
429
|
+
designSystemId: z24.string(),
|
|
430
|
+
expiresAt: z24.number()
|
|
434
431
|
});
|
|
435
432
|
|
|
436
433
|
// src/dsm/assets/asset-reference.ts
|
|
437
|
-
import { z as
|
|
438
|
-
var AssetReference =
|
|
439
|
-
id:
|
|
440
|
-
designSystemVersionId:
|
|
441
|
-
assetId:
|
|
442
|
-
persistentId:
|
|
434
|
+
import { z as z25 } from "zod";
|
|
435
|
+
var AssetReference = z25.object({
|
|
436
|
+
id: z25.string(),
|
|
437
|
+
designSystemVersionId: z25.string(),
|
|
438
|
+
assetId: z25.string(),
|
|
439
|
+
persistentId: z25.string()
|
|
443
440
|
});
|
|
444
441
|
|
|
445
442
|
// src/dsm/assets/asset-value.ts
|
|
446
|
-
import { z as
|
|
447
|
-
var AssetValue =
|
|
443
|
+
import { z as z26 } from "zod";
|
|
444
|
+
var AssetValue = z26.object({});
|
|
448
445
|
|
|
449
446
|
// src/dsm/assets/asset.ts
|
|
450
|
-
import { z as
|
|
451
|
-
var AssetType =
|
|
452
|
-
var AssetScope =
|
|
453
|
-
var AssetFontProperties =
|
|
454
|
-
family:
|
|
455
|
-
subfamily:
|
|
456
|
-
});
|
|
457
|
-
var AssetProperties =
|
|
458
|
-
|
|
459
|
-
fontProperties:
|
|
447
|
+
import { z as z27 } from "zod";
|
|
448
|
+
var AssetType = z27.enum(["Image", "Font"]);
|
|
449
|
+
var AssetScope = z27.enum(["DocumentationFrame", "ComponentThumbnail", "DesignSystem", "Documentation"]);
|
|
450
|
+
var AssetFontProperties = z27.object({
|
|
451
|
+
family: z27.string(),
|
|
452
|
+
subfamily: z27.string()
|
|
453
|
+
});
|
|
454
|
+
var AssetProperties = z27.union([
|
|
455
|
+
z27.object({
|
|
456
|
+
fontProperties: z27.array(AssetFontProperties)
|
|
460
457
|
}),
|
|
461
|
-
|
|
462
|
-
width:
|
|
463
|
-
height:
|
|
458
|
+
z27.object({
|
|
459
|
+
width: z27.number(),
|
|
460
|
+
height: z27.number()
|
|
464
461
|
})
|
|
465
462
|
]);
|
|
466
|
-
var AssetOrigin =
|
|
467
|
-
originKey:
|
|
463
|
+
var AssetOrigin = z27.object({
|
|
464
|
+
originKey: z27.string()
|
|
468
465
|
});
|
|
469
|
-
var AssetProcessStatus =
|
|
470
|
-
var Asset =
|
|
471
|
-
id:
|
|
472
|
-
designSystemId:
|
|
466
|
+
var AssetProcessStatus = z27.enum(["Pending", "Uploaded", "Processed"]);
|
|
467
|
+
var Asset = z27.object({
|
|
468
|
+
id: z27.string(),
|
|
469
|
+
designSystemId: z27.string().nullish(),
|
|
473
470
|
type: AssetType,
|
|
474
|
-
originalFileName:
|
|
475
|
-
filePath:
|
|
471
|
+
originalFileName: z27.string().nullish(),
|
|
472
|
+
filePath: z27.string(),
|
|
476
473
|
scope: AssetScope,
|
|
477
474
|
properties: AssetProperties.nullish(),
|
|
478
475
|
state: AssetProcessStatus.optional(),
|
|
479
476
|
origin: AssetOrigin.optional(),
|
|
480
|
-
originKey:
|
|
477
|
+
originKey: z27.string().optional()
|
|
481
478
|
});
|
|
482
479
|
function isImportedAsset(asset) {
|
|
483
480
|
return !!asset.originKey;
|
|
484
481
|
}
|
|
485
482
|
|
|
486
483
|
// src/dsm/data-sources/data-source.ts
|
|
487
|
-
import { z as
|
|
488
|
-
var DataSourceRemoteType =
|
|
489
|
-
var DataSourceUploadRemoteSource =
|
|
490
|
-
var DataSourceFigmaState =
|
|
491
|
-
var DataSourceAutoImportMode =
|
|
492
|
-
var DataSourceStats =
|
|
484
|
+
import { z as z28 } from "zod";
|
|
485
|
+
var DataSourceRemoteType = z28.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
486
|
+
var DataSourceUploadRemoteSource = z28.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
487
|
+
var DataSourceFigmaState = z28.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
488
|
+
var DataSourceAutoImportMode = z28.enum(["Never", "Hourly"]);
|
|
489
|
+
var DataSourceStats = z28.object({
|
|
493
490
|
tokens: zeroNumberByDefault(),
|
|
494
491
|
components: zeroNumberByDefault(),
|
|
495
492
|
assets: zeroNumberByDefault(),
|
|
496
493
|
frames: zeroNumberByDefault()
|
|
497
494
|
});
|
|
498
|
-
var DataSourceFigmaFileData =
|
|
499
|
-
lastUpdatedAt:
|
|
500
|
-
});
|
|
501
|
-
var DataSourceFigmaFileVersionData = z29.object({
|
|
502
|
-
id: z29.string(),
|
|
503
|
-
label: z29.string().optional(),
|
|
504
|
-
description: z29.string().optional(),
|
|
505
|
-
createdAt: z29.coerce.date()
|
|
495
|
+
var DataSourceFigmaFileData = z28.object({
|
|
496
|
+
lastUpdatedAt: z28.coerce.date()
|
|
506
497
|
});
|
|
507
|
-
var
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
498
|
+
var DataSourceFigmaFileVersionData = z28.object({
|
|
499
|
+
id: z28.string(),
|
|
500
|
+
label: z28.string().optional(),
|
|
501
|
+
description: z28.string().optional(),
|
|
502
|
+
createdAt: z28.coerce.date()
|
|
503
|
+
});
|
|
504
|
+
var DataSourceFigmaScope = z28.object({
|
|
505
|
+
assets: z28.boolean(),
|
|
506
|
+
components: z28.boolean(),
|
|
507
|
+
documentationFrames: z28.boolean(),
|
|
508
|
+
tokens: z28.boolean(),
|
|
509
|
+
themePersistentId: z28.string().optional(),
|
|
510
|
+
isUnpublishedImportFallbackEnabled: z28.boolean()
|
|
511
|
+
});
|
|
512
|
+
var DataSourceFigmaImportMetadata = z28.object({
|
|
516
513
|
fileData: DataSourceFigmaFileData.optional(),
|
|
517
514
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
518
515
|
});
|
|
519
|
-
var DataSourceFigmaRemote =
|
|
520
|
-
type:
|
|
521
|
-
fileId:
|
|
522
|
-
preferredCredentialId:
|
|
523
|
-
ownerId:
|
|
516
|
+
var DataSourceFigmaRemote = z28.object({
|
|
517
|
+
type: z28.literal(DataSourceRemoteType.Enum.Figma),
|
|
518
|
+
fileId: z28.string(),
|
|
519
|
+
preferredCredentialId: z28.string().optional(),
|
|
520
|
+
ownerId: z28.string(),
|
|
524
521
|
// todo remove or keep to reference who created data source
|
|
525
|
-
ownerName:
|
|
522
|
+
ownerName: z28.string(),
|
|
526
523
|
// todo probably remove
|
|
527
524
|
scope: DataSourceFigmaScope,
|
|
528
525
|
state: DataSourceFigmaState,
|
|
529
|
-
requiresSync:
|
|
526
|
+
requiresSync: z28.boolean().optional().transform((v) => v ?? false),
|
|
530
527
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
531
|
-
downloadChunkSize:
|
|
532
|
-
figmaRenderChunkSize:
|
|
533
|
-
maxFileDepth:
|
|
528
|
+
downloadChunkSize: z28.number().optional(),
|
|
529
|
+
figmaRenderChunkSize: z28.number().optional(),
|
|
530
|
+
maxFileDepth: z28.number().optional()
|
|
534
531
|
});
|
|
535
|
-
var DataSourceTokenStudioRemote =
|
|
536
|
-
type:
|
|
532
|
+
var DataSourceTokenStudioRemote = z28.object({
|
|
533
|
+
type: z28.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
537
534
|
});
|
|
538
|
-
var DataSourceUploadImportMetadata =
|
|
539
|
-
var DataSourceUploadRemote =
|
|
540
|
-
type:
|
|
541
|
-
remoteId:
|
|
535
|
+
var DataSourceUploadImportMetadata = z28.record(z28.any());
|
|
536
|
+
var DataSourceUploadRemote = z28.object({
|
|
537
|
+
type: z28.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
538
|
+
remoteId: z28.string(),
|
|
542
539
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
543
540
|
lastImportMetadata: DataSourceUploadImportMetadata.optional()
|
|
544
541
|
});
|
|
545
|
-
var DataSourceRemote =
|
|
542
|
+
var DataSourceRemote = z28.discriminatedUnion("type", [
|
|
546
543
|
DataSourceFigmaRemote,
|
|
547
544
|
DataSourceUploadRemote,
|
|
548
545
|
DataSourceTokenStudioRemote
|
|
549
546
|
]);
|
|
550
|
-
var DataSourceVersion =
|
|
551
|
-
id:
|
|
552
|
-
createdAt:
|
|
553
|
-
label:
|
|
554
|
-
description:
|
|
547
|
+
var DataSourceVersion = z28.object({
|
|
548
|
+
id: z28.string(),
|
|
549
|
+
createdAt: z28.coerce.date(),
|
|
550
|
+
label: z28.string().nullish(),
|
|
551
|
+
description: z28.string().nullish()
|
|
555
552
|
});
|
|
556
553
|
function zeroNumberByDefault() {
|
|
557
|
-
return
|
|
554
|
+
return z28.number().nullish().transform((v) => v ?? 0);
|
|
558
555
|
}
|
|
559
556
|
|
|
560
557
|
// src/dsm/data-sources/import-job.ts
|
|
561
|
-
import { z as
|
|
562
|
-
var ImportJobState =
|
|
563
|
-
var ImportJobOperation =
|
|
558
|
+
import { z as z29 } from "zod";
|
|
559
|
+
var ImportJobState = z29.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
560
|
+
var ImportJobOperation = z29.enum(["Check", "Import"]);
|
|
564
561
|
var ImportJob = Entity.extend({
|
|
565
|
-
designSystemId:
|
|
566
|
-
designSystemVersionId:
|
|
567
|
-
sourceIds:
|
|
562
|
+
designSystemId: z29.string(),
|
|
563
|
+
designSystemVersionId: z29.string(),
|
|
564
|
+
sourceIds: z29.array(z29.string()),
|
|
568
565
|
state: ImportJobState,
|
|
569
|
-
createdByUserId:
|
|
570
|
-
importContextId:
|
|
571
|
-
error:
|
|
566
|
+
createdByUserId: z29.string().optional(),
|
|
567
|
+
importContextId: z29.string(),
|
|
568
|
+
error: z29.string().optional(),
|
|
572
569
|
sourceType: DataSourceRemoteType,
|
|
573
|
-
importContextCleanedUp:
|
|
570
|
+
importContextCleanedUp: z29.boolean()
|
|
574
571
|
});
|
|
575
572
|
|
|
576
573
|
// src/dsm/data-sources/import-summary.ts
|
|
577
|
-
import { z as
|
|
574
|
+
import { z as z98 } from "zod";
|
|
578
575
|
|
|
579
576
|
// src/dsm/elements/data/base.ts
|
|
580
|
-
import { z as
|
|
581
|
-
var TokenDataAliasSchema =
|
|
582
|
-
aliasTo:
|
|
577
|
+
import { z as z30 } from "zod";
|
|
578
|
+
var TokenDataAliasSchema = z30.object({
|
|
579
|
+
aliasTo: z30.string().optional().nullable().transform((v) => v ?? void 0)
|
|
583
580
|
});
|
|
584
581
|
function tokenAliasOrValue(value) {
|
|
585
582
|
return TokenDataAliasSchema.extend({
|
|
@@ -588,68 +585,68 @@ function tokenAliasOrValue(value) {
|
|
|
588
585
|
}
|
|
589
586
|
|
|
590
587
|
// src/dsm/elements/data/blur.ts
|
|
591
|
-
import { z as
|
|
588
|
+
import { z as z32 } from "zod";
|
|
592
589
|
|
|
593
590
|
// src/dsm/elements/data/dimension.ts
|
|
594
|
-
import { z as
|
|
595
|
-
var DimensionUnit =
|
|
596
|
-
var DimensionValue =
|
|
591
|
+
import { z as z31 } from "zod";
|
|
592
|
+
var DimensionUnit = z31.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
593
|
+
var DimensionValue = z31.object({
|
|
597
594
|
unit: DimensionUnit,
|
|
598
|
-
measure:
|
|
595
|
+
measure: z31.number()
|
|
599
596
|
});
|
|
600
597
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
601
598
|
|
|
602
599
|
// src/dsm/elements/data/blur.ts
|
|
603
|
-
var BlurType =
|
|
604
|
-
var BlurValue =
|
|
600
|
+
var BlurType = z32.enum(["Layer", "Background"]);
|
|
601
|
+
var BlurValue = z32.object({
|
|
605
602
|
type: BlurType,
|
|
606
603
|
radius: DimensionTokenData
|
|
607
604
|
});
|
|
608
605
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
609
606
|
|
|
610
607
|
// src/dsm/elements/data/border-radius.ts
|
|
611
|
-
import { z as
|
|
612
|
-
var BorderRadiusUnit =
|
|
613
|
-
var BorderRadiusValue =
|
|
608
|
+
import { z as z33 } from "zod";
|
|
609
|
+
var BorderRadiusUnit = z33.enum(["Pixels", "Rem", "Percent"]);
|
|
610
|
+
var BorderRadiusValue = z33.object({
|
|
614
611
|
unit: BorderRadiusUnit,
|
|
615
|
-
measure:
|
|
612
|
+
measure: z33.number()
|
|
616
613
|
});
|
|
617
614
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
618
615
|
|
|
619
616
|
// src/dsm/elements/data/border-width.ts
|
|
620
|
-
import { z as
|
|
621
|
-
var BorderWidthUnit =
|
|
622
|
-
var BorderWidthValue =
|
|
617
|
+
import { z as z34 } from "zod";
|
|
618
|
+
var BorderWidthUnit = z34.enum(["Pixels"]);
|
|
619
|
+
var BorderWidthValue = z34.object({
|
|
623
620
|
unit: BorderWidthUnit,
|
|
624
|
-
measure:
|
|
621
|
+
measure: z34.number()
|
|
625
622
|
});
|
|
626
623
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
627
624
|
|
|
628
625
|
// src/dsm/elements/data/border.ts
|
|
629
|
-
import { z as
|
|
626
|
+
import { z as z37 } from "zod";
|
|
630
627
|
|
|
631
628
|
// src/dsm/elements/data/color.ts
|
|
632
|
-
import { z as
|
|
629
|
+
import { z as z36 } from "zod";
|
|
633
630
|
|
|
634
631
|
// src/dsm/elements/data/opacity.ts
|
|
635
|
-
import { z as
|
|
636
|
-
var OpacityValue =
|
|
637
|
-
unit:
|
|
638
|
-
measure:
|
|
632
|
+
import { z as z35 } from "zod";
|
|
633
|
+
var OpacityValue = z35.object({
|
|
634
|
+
unit: z35.enum(["Raw", "Pixels"]),
|
|
635
|
+
measure: z35.number()
|
|
639
636
|
});
|
|
640
637
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
641
638
|
|
|
642
639
|
// src/dsm/elements/data/color.ts
|
|
643
|
-
var ColorValue =
|
|
640
|
+
var ColorValue = z36.object({
|
|
644
641
|
opacity: OpacityTokenData,
|
|
645
|
-
color:
|
|
642
|
+
color: z36.string().or(TokenDataAliasSchema)
|
|
646
643
|
});
|
|
647
644
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
648
645
|
|
|
649
646
|
// src/dsm/elements/data/border.ts
|
|
650
|
-
var BorderPosition =
|
|
651
|
-
var BorderStyle =
|
|
652
|
-
var BorderValue =
|
|
647
|
+
var BorderPosition = z37.enum(["Inside", "Center", "Outside"]);
|
|
648
|
+
var BorderStyle = z37.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
649
|
+
var BorderValue = z37.object({
|
|
653
650
|
color: ColorTokenData,
|
|
654
651
|
width: BorderWidthTokenData,
|
|
655
652
|
position: BorderPosition,
|
|
@@ -658,30 +655,30 @@ var BorderValue = z38.object({
|
|
|
658
655
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
659
656
|
|
|
660
657
|
// src/dsm/elements/data/component.ts
|
|
661
|
-
import { z as
|
|
662
|
-
var ComponentElementData =
|
|
663
|
-
value:
|
|
664
|
-
thumbnailImage:
|
|
665
|
-
value:
|
|
666
|
-
url:
|
|
667
|
-
assetId:
|
|
658
|
+
import { z as z38 } from "zod";
|
|
659
|
+
var ComponentElementData = z38.object({
|
|
660
|
+
value: z38.object({
|
|
661
|
+
thumbnailImage: z38.object({
|
|
662
|
+
value: z38.object({
|
|
663
|
+
url: z38.string(),
|
|
664
|
+
assetId: z38.string()
|
|
668
665
|
})
|
|
669
666
|
}),
|
|
670
|
-
svg:
|
|
671
|
-
value:
|
|
672
|
-
url:
|
|
673
|
-
assetId:
|
|
667
|
+
svg: z38.object({
|
|
668
|
+
value: z38.object({
|
|
669
|
+
url: z38.string(),
|
|
670
|
+
assetId: z38.string()
|
|
674
671
|
})
|
|
675
672
|
}).optional()
|
|
676
673
|
})
|
|
677
674
|
});
|
|
678
675
|
|
|
679
676
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
680
|
-
import { z as
|
|
677
|
+
import { z as z44 } from "zod";
|
|
681
678
|
|
|
682
679
|
// src/dsm/elements/raw-element.ts
|
|
683
|
-
import { z as
|
|
684
|
-
var DesignTokenType =
|
|
680
|
+
import { z as z39 } from "zod";
|
|
681
|
+
var DesignTokenType = z39.enum([
|
|
685
682
|
"Color",
|
|
686
683
|
"Border",
|
|
687
684
|
"Gradient",
|
|
@@ -713,7 +710,7 @@ var DesignTokenType = z40.enum([
|
|
|
713
710
|
]);
|
|
714
711
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
715
712
|
var DesignElementType = DesignTokenType.or(
|
|
716
|
-
|
|
713
|
+
z39.enum([
|
|
717
714
|
"Component",
|
|
718
715
|
"Theme",
|
|
719
716
|
"Documentation",
|
|
@@ -728,7 +725,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
728
725
|
function isTokenType(type) {
|
|
729
726
|
return DesignTokenType.safeParse(type).success;
|
|
730
727
|
}
|
|
731
|
-
var DesignElementCategory =
|
|
728
|
+
var DesignElementCategory = z39.enum([
|
|
732
729
|
"Token",
|
|
733
730
|
"Component",
|
|
734
731
|
"DesignSystemComponent",
|
|
@@ -736,94 +733,94 @@ var DesignElementCategory = z40.enum([
|
|
|
736
733
|
"Theme",
|
|
737
734
|
"PageBlock"
|
|
738
735
|
]);
|
|
739
|
-
var DesignSystemElementExportProps =
|
|
740
|
-
isAsset:
|
|
741
|
-
codeName:
|
|
742
|
-
});
|
|
743
|
-
var ShallowDesignElement =
|
|
744
|
-
id:
|
|
745
|
-
persistentId:
|
|
746
|
-
designSystemVersionId:
|
|
736
|
+
var DesignSystemElementExportProps = z39.object({
|
|
737
|
+
isAsset: z39.boolean().nullish().transform((v) => v ?? false),
|
|
738
|
+
codeName: z39.string().nullish()
|
|
739
|
+
});
|
|
740
|
+
var ShallowDesignElement = z39.object({
|
|
741
|
+
id: z39.string(),
|
|
742
|
+
persistentId: z39.string(),
|
|
743
|
+
designSystemVersionId: z39.string(),
|
|
747
744
|
type: DesignElementType,
|
|
748
|
-
brandPersistentId:
|
|
749
|
-
parentPersistentId:
|
|
750
|
-
shortPersistentId:
|
|
745
|
+
brandPersistentId: z39.string().optional(),
|
|
746
|
+
parentPersistentId: z39.string().optional(),
|
|
747
|
+
shortPersistentId: z39.string().optional(),
|
|
751
748
|
childType: DesignElementType.optional(),
|
|
752
|
-
sortOrder:
|
|
753
|
-
origin:
|
|
749
|
+
sortOrder: z39.number(),
|
|
750
|
+
origin: z39.record(z39.any()).optional()
|
|
754
751
|
});
|
|
755
752
|
var DesignElement = ShallowDesignElement.extend({
|
|
756
753
|
meta: ObjectMeta,
|
|
757
|
-
slug:
|
|
758
|
-
userSlug:
|
|
759
|
-
createdAt:
|
|
760
|
-
updatedAt:
|
|
754
|
+
slug: z39.string().optional(),
|
|
755
|
+
userSlug: z39.string().optional(),
|
|
756
|
+
createdAt: z39.coerce.date(),
|
|
757
|
+
updatedAt: z39.coerce.date(),
|
|
761
758
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
762
|
-
data:
|
|
763
|
-
origin:
|
|
759
|
+
data: z39.record(z39.any()),
|
|
760
|
+
origin: z39.record(z39.any()).optional()
|
|
764
761
|
});
|
|
765
762
|
var HierarchicalElements = DesignTokenType.or(
|
|
766
|
-
|
|
763
|
+
z39.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
767
764
|
);
|
|
768
765
|
|
|
769
766
|
// src/dsm/properties/property-definition.ts
|
|
770
|
-
import { z as
|
|
771
|
-
var ElementPropertyTypeSchema =
|
|
772
|
-
var ElementPropertyTargetType =
|
|
773
|
-
var ElementPropertyLinkType =
|
|
767
|
+
import { z as z40 } from "zod";
|
|
768
|
+
var ElementPropertyTypeSchema = z40.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
769
|
+
var ElementPropertyTargetType = z40.enum(["Token", "Component", "DocumentationPage"]);
|
|
770
|
+
var ElementPropertyLinkType = z40.enum(["FigmaComponent", "DocumentationPage"]);
|
|
774
771
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
775
|
-
var ColorTokenInlineData =
|
|
776
|
-
value:
|
|
772
|
+
var ColorTokenInlineData = z40.object({
|
|
773
|
+
value: z40.string()
|
|
777
774
|
});
|
|
778
|
-
var ElementPropertyDefinitionOption =
|
|
779
|
-
id:
|
|
780
|
-
name:
|
|
775
|
+
var ElementPropertyDefinitionOption = z40.object({
|
|
776
|
+
id: z40.string(),
|
|
777
|
+
name: z40.string(),
|
|
781
778
|
backgroundColor: ColorTokenInlineData.optional()
|
|
782
779
|
});
|
|
783
|
-
var ElementPropertyDefinition =
|
|
784
|
-
id:
|
|
785
|
-
designSystemVersionId:
|
|
786
|
-
persistentId:
|
|
787
|
-
name:
|
|
788
|
-
codeName:
|
|
789
|
-
description:
|
|
780
|
+
var ElementPropertyDefinition = z40.object({
|
|
781
|
+
id: z40.string(),
|
|
782
|
+
designSystemVersionId: z40.string(),
|
|
783
|
+
persistentId: z40.string(),
|
|
784
|
+
name: z40.string(),
|
|
785
|
+
codeName: z40.string().regex(CODE_NAME_REGEX),
|
|
786
|
+
description: z40.string(),
|
|
790
787
|
type: ElementPropertyTypeSchema,
|
|
791
788
|
targetElementType: ElementPropertyTargetType,
|
|
792
|
-
options:
|
|
789
|
+
options: z40.array(ElementPropertyDefinitionOption).optional(),
|
|
793
790
|
linkElementType: ElementPropertyLinkType.optional()
|
|
794
791
|
});
|
|
795
792
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
796
793
|
|
|
797
794
|
// src/dsm/properties/property-value.ts
|
|
798
|
-
import { z as
|
|
799
|
-
var ElementPropertyValue =
|
|
800
|
-
id:
|
|
801
|
-
designSystemVersionId:
|
|
802
|
-
targetElementPersistentId:
|
|
803
|
-
definitionPersistentId:
|
|
804
|
-
stringValue:
|
|
805
|
-
numberValue:
|
|
806
|
-
booleanValue:
|
|
807
|
-
referenceValue:
|
|
808
|
-
referenceValuePreview:
|
|
795
|
+
import { z as z41 } from "zod";
|
|
796
|
+
var ElementPropertyValue = z41.object({
|
|
797
|
+
id: z41.string(),
|
|
798
|
+
designSystemVersionId: z41.string(),
|
|
799
|
+
targetElementPersistentId: z41.string(),
|
|
800
|
+
definitionPersistentId: z41.string(),
|
|
801
|
+
stringValue: z41.string().nullish(),
|
|
802
|
+
numberValue: z41.number().nullish(),
|
|
803
|
+
booleanValue: z41.boolean().nullish(),
|
|
804
|
+
referenceValue: z41.string().nullish(),
|
|
805
|
+
referenceValuePreview: z41.string().optional()
|
|
809
806
|
});
|
|
810
807
|
|
|
811
808
|
// src/dsm/elements/primitives/point.ts
|
|
812
|
-
import { z as
|
|
813
|
-
var Point2D =
|
|
814
|
-
x:
|
|
815
|
-
y:
|
|
809
|
+
import { z as z42 } from "zod";
|
|
810
|
+
var Point2D = z42.object({
|
|
811
|
+
x: z42.number(),
|
|
812
|
+
y: z42.number()
|
|
816
813
|
});
|
|
817
814
|
|
|
818
815
|
// src/dsm/elements/primitives/size.ts
|
|
819
|
-
import { z as
|
|
816
|
+
import { z as z43 } from "zod";
|
|
820
817
|
var nullSize = { height: -1, width: -1 };
|
|
821
818
|
function isNullSize(size) {
|
|
822
819
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
823
820
|
}
|
|
824
|
-
var Size =
|
|
825
|
-
width:
|
|
826
|
-
height:
|
|
821
|
+
var Size = z43.object({
|
|
822
|
+
width: z43.number().nullish().transform((v) => v ?? nullSize.width),
|
|
823
|
+
height: z43.number().nullish().transform((v) => v ?? nullSize.height)
|
|
827
824
|
});
|
|
828
825
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
829
826
|
if (!v)
|
|
@@ -834,8 +831,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
834
831
|
});
|
|
835
832
|
|
|
836
833
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
837
|
-
var PageBlockCalloutType =
|
|
838
|
-
var PageBlockTypeV1 =
|
|
834
|
+
var PageBlockCalloutType = z44.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
835
|
+
var PageBlockTypeV1 = z44.enum([
|
|
839
836
|
"Text",
|
|
840
837
|
"Heading",
|
|
841
838
|
"Code",
|
|
@@ -868,7 +865,7 @@ var PageBlockTypeV1 = z45.enum([
|
|
|
868
865
|
"TableRow",
|
|
869
866
|
"TableCell"
|
|
870
867
|
]);
|
|
871
|
-
var PageBlockCodeLanguage =
|
|
868
|
+
var PageBlockCodeLanguage = z44.enum([
|
|
872
869
|
"Angular",
|
|
873
870
|
"Bash",
|
|
874
871
|
"C",
|
|
@@ -902,70 +899,70 @@ var PageBlockCodeLanguage = z45.enum([
|
|
|
902
899
|
"XML",
|
|
903
900
|
"YAML"
|
|
904
901
|
]);
|
|
905
|
-
var PageBlockAlignment =
|
|
906
|
-
var PageBlockThemeType =
|
|
907
|
-
var PageBlockAssetType =
|
|
908
|
-
var PageBlockTilesAlignment =
|
|
909
|
-
var PageBlockTilesLayout =
|
|
910
|
-
var PageBlockTheme =
|
|
911
|
-
themeIds:
|
|
902
|
+
var PageBlockAlignment = z44.enum(["Left", "Center", "Stretch", "Right"]);
|
|
903
|
+
var PageBlockThemeType = z44.enum(["Override", "Comparison"]);
|
|
904
|
+
var PageBlockAssetType = z44.enum(["image", "figmaFrame"]);
|
|
905
|
+
var PageBlockTilesAlignment = z44.enum(["Center", "FrameHeight"]);
|
|
906
|
+
var PageBlockTilesLayout = z44.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
907
|
+
var PageBlockTheme = z44.object({
|
|
908
|
+
themeIds: z44.array(z44.string()),
|
|
912
909
|
type: PageBlockThemeType
|
|
913
910
|
});
|
|
914
|
-
var PageBlockUrlPreview =
|
|
915
|
-
title: nullishToOptional(
|
|
916
|
-
description: nullishToOptional(
|
|
917
|
-
thumbnailUrl: nullishToOptional(
|
|
918
|
-
});
|
|
919
|
-
var PageBlockFrameOrigin =
|
|
920
|
-
sourceFileName: nullishToOptional(
|
|
921
|
-
title: nullishToOptional(
|
|
922
|
-
previewUrl: nullishToOptional(
|
|
923
|
-
valid: nullishToOptional(
|
|
924
|
-
referenceId: nullishToOptional(
|
|
925
|
-
assetId: nullishToOptional(
|
|
926
|
-
assetScale: nullishToOptional(
|
|
927
|
-
width: nullishToOptional(
|
|
928
|
-
height: nullishToOptional(
|
|
929
|
-
});
|
|
930
|
-
var PageBlockFrame =
|
|
931
|
-
persistentId:
|
|
932
|
-
sourceId:
|
|
933
|
-
sourceFrameId:
|
|
934
|
-
title: nullishToOptional(
|
|
935
|
-
description: nullishToOptional(
|
|
911
|
+
var PageBlockUrlPreview = z44.object({
|
|
912
|
+
title: nullishToOptional(z44.string()),
|
|
913
|
+
description: nullishToOptional(z44.string()),
|
|
914
|
+
thumbnailUrl: nullishToOptional(z44.string())
|
|
915
|
+
});
|
|
916
|
+
var PageBlockFrameOrigin = z44.object({
|
|
917
|
+
sourceFileName: nullishToOptional(z44.string()),
|
|
918
|
+
title: nullishToOptional(z44.string()),
|
|
919
|
+
previewUrl: nullishToOptional(z44.string()),
|
|
920
|
+
valid: nullishToOptional(z44.boolean()),
|
|
921
|
+
referenceId: nullishToOptional(z44.string()),
|
|
922
|
+
assetId: nullishToOptional(z44.string()),
|
|
923
|
+
assetScale: nullishToOptional(z44.number()),
|
|
924
|
+
width: nullishToOptional(z44.number()),
|
|
925
|
+
height: nullishToOptional(z44.number())
|
|
926
|
+
});
|
|
927
|
+
var PageBlockFrame = z44.object({
|
|
928
|
+
persistentId: z44.string(),
|
|
929
|
+
sourceId: z44.string(),
|
|
930
|
+
sourceFrameId: z44.string(),
|
|
931
|
+
title: nullishToOptional(z44.string()),
|
|
932
|
+
description: nullishToOptional(z44.string()),
|
|
936
933
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
937
934
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
938
935
|
});
|
|
939
|
-
var PageBlockAsset =
|
|
936
|
+
var PageBlockAsset = z44.object({
|
|
940
937
|
type: PageBlockAssetType,
|
|
941
|
-
id: nullishToOptional(
|
|
942
|
-
url: nullishToOptional(
|
|
938
|
+
id: nullishToOptional(z44.string()),
|
|
939
|
+
url: nullishToOptional(z44.string()),
|
|
943
940
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
944
941
|
});
|
|
945
|
-
var PageBlockLinkPreview =
|
|
946
|
-
title: nullishToOptional(
|
|
947
|
-
valid: nullishToOptional(
|
|
942
|
+
var PageBlockLinkPreview = z44.object({
|
|
943
|
+
title: nullishToOptional(z44.string()),
|
|
944
|
+
valid: nullishToOptional(z44.boolean())
|
|
948
945
|
});
|
|
949
|
-
var PageBlockShortcut =
|
|
950
|
-
persistentId:
|
|
951
|
-
title: nullishToOptional(
|
|
952
|
-
description: nullishToOptional(
|
|
946
|
+
var PageBlockShortcut = z44.object({
|
|
947
|
+
persistentId: z44.string(),
|
|
948
|
+
title: nullishToOptional(z44.string()),
|
|
949
|
+
description: nullishToOptional(z44.string()),
|
|
953
950
|
asset: nullishToOptional(PageBlockAsset),
|
|
954
|
-
documentationItemId: nullishToOptional(
|
|
955
|
-
pageHeadingId: nullishToOptional(
|
|
956
|
-
url: nullishToOptional(
|
|
957
|
-
openInNewTab: nullishToOptional(
|
|
951
|
+
documentationItemId: nullishToOptional(z44.string()),
|
|
952
|
+
pageHeadingId: nullishToOptional(z44.string()),
|
|
953
|
+
url: nullishToOptional(z44.string()),
|
|
954
|
+
openInNewTab: nullishToOptional(z44.boolean()),
|
|
958
955
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
959
956
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
960
957
|
});
|
|
961
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
958
|
+
var PageBlockCustomBlockPropertyImageValue = z44.object({
|
|
962
959
|
asset: nullishToOptional(PageBlockAsset),
|
|
963
|
-
assetId: nullishToOptional(
|
|
964
|
-
assetUrl: nullishToOptional(
|
|
960
|
+
assetId: nullishToOptional(z44.string()),
|
|
961
|
+
assetUrl: nullishToOptional(z44.string())
|
|
965
962
|
});
|
|
966
|
-
var PageBlockCustomBlockPropertyValue =
|
|
967
|
-
key:
|
|
968
|
-
value:
|
|
963
|
+
var PageBlockCustomBlockPropertyValue = z44.object({
|
|
964
|
+
key: z44.string(),
|
|
965
|
+
value: z44.any()
|
|
969
966
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
970
967
|
// e.g. element id 67451 in the dev db
|
|
971
968
|
// value: z
|
|
@@ -976,102 +973,102 @@ var PageBlockCustomBlockPropertyValue = z45.object({
|
|
|
976
973
|
// .or(TypographyTokenData)
|
|
977
974
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
978
975
|
});
|
|
979
|
-
var PageBlockFigmaFrameProperties =
|
|
976
|
+
var PageBlockFigmaFrameProperties = z44.object({
|
|
980
977
|
color: nullishToOptional(
|
|
981
|
-
|
|
982
|
-
value:
|
|
978
|
+
z44.object({
|
|
979
|
+
value: z44.string()
|
|
983
980
|
})
|
|
984
981
|
),
|
|
985
982
|
alignment: PageBlockTilesAlignment,
|
|
986
983
|
layout: PageBlockTilesLayout,
|
|
987
984
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
988
|
-
showTitles:
|
|
985
|
+
showTitles: z44.boolean()
|
|
989
986
|
});
|
|
990
|
-
var PageBlockRenderCodeProperties =
|
|
991
|
-
showCode:
|
|
992
|
-
showControls:
|
|
987
|
+
var PageBlockRenderCodeProperties = z44.object({
|
|
988
|
+
showCode: z44.boolean(),
|
|
989
|
+
showControls: z44.boolean().optional()
|
|
993
990
|
});
|
|
994
|
-
var PageBlockAssetComponent =
|
|
995
|
-
persistentId:
|
|
996
|
-
componentAssetId:
|
|
997
|
-
title: nullishToOptional(
|
|
998
|
-
description: nullishToOptional(
|
|
991
|
+
var PageBlockAssetComponent = z44.object({
|
|
992
|
+
persistentId: z44.string(),
|
|
993
|
+
componentAssetId: z44.string(),
|
|
994
|
+
title: nullishToOptional(z44.string()),
|
|
995
|
+
description: nullishToOptional(z44.string()),
|
|
999
996
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1000
997
|
});
|
|
1001
|
-
var PageBlockTableColumn =
|
|
1002
|
-
id:
|
|
998
|
+
var PageBlockTableColumn = z44.object({
|
|
999
|
+
id: z44.string(),
|
|
1003
1000
|
width: DimensionTokenData
|
|
1004
1001
|
});
|
|
1005
|
-
var PageBlockTableProperties =
|
|
1006
|
-
showBorders:
|
|
1007
|
-
showHeaderRow:
|
|
1008
|
-
showHeaderColumn:
|
|
1009
|
-
columns:
|
|
1002
|
+
var PageBlockTableProperties = z44.object({
|
|
1003
|
+
showBorders: z44.boolean(),
|
|
1004
|
+
showHeaderRow: z44.boolean(),
|
|
1005
|
+
showHeaderColumn: z44.boolean(),
|
|
1006
|
+
columns: z44.array(PageBlockTableColumn)
|
|
1010
1007
|
});
|
|
1011
|
-
var PageBlockTextSpanAttributeType =
|
|
1012
|
-
var PageBlockTextSpanAttribute =
|
|
1008
|
+
var PageBlockTextSpanAttributeType = z44.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
1009
|
+
var PageBlockTextSpanAttribute = z44.object({
|
|
1013
1010
|
type: PageBlockTextSpanAttributeType,
|
|
1014
|
-
link: nullishToOptional(
|
|
1015
|
-
documentationItemId: nullishToOptional(
|
|
1016
|
-
openInNewWindow: nullishToOptional(
|
|
1011
|
+
link: nullishToOptional(z44.string()),
|
|
1012
|
+
documentationItemId: nullishToOptional(z44.string()),
|
|
1013
|
+
openInNewWindow: nullishToOptional(z44.boolean()),
|
|
1017
1014
|
// deprecated. use openInNewTab
|
|
1018
|
-
openInNewTab: nullishToOptional(
|
|
1015
|
+
openInNewTab: nullishToOptional(z44.boolean())
|
|
1019
1016
|
});
|
|
1020
|
-
var PageBlockTextSpan =
|
|
1021
|
-
text:
|
|
1022
|
-
attributes:
|
|
1017
|
+
var PageBlockTextSpan = z44.object({
|
|
1018
|
+
text: z44.string(),
|
|
1019
|
+
attributes: z44.array(PageBlockTextSpanAttribute)
|
|
1023
1020
|
});
|
|
1024
|
-
var PageBlockText =
|
|
1025
|
-
spans:
|
|
1021
|
+
var PageBlockText = z44.object({
|
|
1022
|
+
spans: z44.array(PageBlockTextSpan)
|
|
1026
1023
|
});
|
|
1027
|
-
var PageBlockBaseV1 =
|
|
1028
|
-
persistentId:
|
|
1024
|
+
var PageBlockBaseV1 = z44.object({
|
|
1025
|
+
persistentId: z44.string(),
|
|
1029
1026
|
type: PageBlockTypeV1,
|
|
1030
1027
|
// Element linking
|
|
1031
|
-
designObjectId: nullishToOptional(
|
|
1032
|
-
designObjectIds: nullishToOptional(
|
|
1033
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
1034
|
-
showNestedGroups: nullishToOptional(
|
|
1035
|
-
brandId: nullishToOptional(
|
|
1028
|
+
designObjectId: nullishToOptional(z44.string()),
|
|
1029
|
+
designObjectIds: nullishToOptional(z44.array(z44.string())),
|
|
1030
|
+
tokenType: nullishToOptional(DesignTokenType.or(z44.literal("Font"))),
|
|
1031
|
+
showNestedGroups: nullishToOptional(z44.boolean()),
|
|
1032
|
+
brandId: nullishToOptional(z44.string()),
|
|
1036
1033
|
// Rich text
|
|
1037
1034
|
text: nullishToOptional(PageBlockText),
|
|
1038
|
-
caption: nullishToOptional(
|
|
1039
|
-
headingType: nullishToOptional(
|
|
1035
|
+
caption: nullishToOptional(z44.string()),
|
|
1036
|
+
headingType: nullishToOptional(z44.number().min(1).max(3)),
|
|
1040
1037
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1041
1038
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1042
|
-
urlInput: nullishToOptional(
|
|
1043
|
-
url: nullishToOptional(
|
|
1039
|
+
urlInput: nullishToOptional(z44.string()),
|
|
1040
|
+
url: nullishToOptional(z44.string()),
|
|
1044
1041
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1045
1042
|
// Image
|
|
1046
1043
|
asset: nullishToOptional(PageBlockAsset),
|
|
1047
1044
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1048
1045
|
// Shortcuts block
|
|
1049
|
-
shortcuts: nullishToOptional(
|
|
1046
|
+
shortcuts: nullishToOptional(z44.array(PageBlockShortcut)),
|
|
1050
1047
|
// Custom blocks
|
|
1051
|
-
customBlockKey: nullishToOptional(
|
|
1052
|
-
customBlockProperties: nullishToOptional(
|
|
1053
|
-
variantKey: nullishToOptional(
|
|
1048
|
+
customBlockKey: nullishToOptional(z44.string()),
|
|
1049
|
+
customBlockProperties: nullishToOptional(z44.array(PageBlockCustomBlockPropertyValue)),
|
|
1050
|
+
variantKey: nullishToOptional(z44.string()),
|
|
1054
1051
|
// Figma frames
|
|
1055
1052
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1056
|
-
figmaFrames: nullishToOptional(
|
|
1053
|
+
figmaFrames: nullishToOptional(z44.array(PageBlockFrame)),
|
|
1057
1054
|
// Generic
|
|
1058
1055
|
size: nullishToOptional(Size),
|
|
1059
1056
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1060
1057
|
// Render code
|
|
1061
1058
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1062
1059
|
// Component assets
|
|
1063
|
-
componentAssets: nullishToOptional(
|
|
1060
|
+
componentAssets: nullishToOptional(z44.array(PageBlockAssetComponent)),
|
|
1064
1061
|
// Tables
|
|
1065
1062
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1066
|
-
columnId: nullishToOptional(
|
|
1063
|
+
columnId: nullishToOptional(z44.string()),
|
|
1067
1064
|
// Token spreadsheet
|
|
1068
1065
|
theme: nullishToOptional(PageBlockTheme),
|
|
1069
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1066
|
+
blacklistedElementProperties: nullishToOptional(z44.array(z44.string())),
|
|
1070
1067
|
// Arbitrary
|
|
1071
|
-
userMetadata: nullishToOptional(
|
|
1068
|
+
userMetadata: nullishToOptional(z44.string())
|
|
1072
1069
|
});
|
|
1073
1070
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1074
|
-
children:
|
|
1071
|
+
children: z44.lazy(
|
|
1075
1072
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1076
1073
|
)
|
|
1077
1074
|
});
|
|
@@ -1083,256 +1080,256 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
1083
1080
|
}
|
|
1084
1081
|
|
|
1085
1082
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
1086
|
-
import { z as
|
|
1087
|
-
var PageBlockLinkType =
|
|
1088
|
-
var PageBlockImageType =
|
|
1089
|
-
var PageBlockImageAlignment =
|
|
1090
|
-
var PageBlockTableCellAlignment =
|
|
1091
|
-
var PageBlockPreviewContainerSize =
|
|
1092
|
-
var PageBlockThemeDisplayMode =
|
|
1093
|
-
var PageBlockImageResourceReference =
|
|
1094
|
-
resourceId:
|
|
1095
|
-
url:
|
|
1096
|
-
});
|
|
1097
|
-
var PageBlockResourceFrameNodeReference =
|
|
1098
|
-
sourceId:
|
|
1099
|
-
frameReferenceId:
|
|
1100
|
-
});
|
|
1101
|
-
var PageBlockImageReference =
|
|
1083
|
+
import { z as z45 } from "zod";
|
|
1084
|
+
var PageBlockLinkType = z45.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1085
|
+
var PageBlockImageType = z45.enum(["Resource", "FigmaNode"]);
|
|
1086
|
+
var PageBlockImageAlignment = z45.enum(["Left", "Center", "Stretch"]);
|
|
1087
|
+
var PageBlockTableCellAlignment = z45.enum(["Left", "Center", "Right"]);
|
|
1088
|
+
var PageBlockPreviewContainerSize = z45.enum(["Centered", "NaturalHeight"]);
|
|
1089
|
+
var PageBlockThemeDisplayMode = z45.enum(["Split", "Override"]);
|
|
1090
|
+
var PageBlockImageResourceReference = z45.object({
|
|
1091
|
+
resourceId: z45.string(),
|
|
1092
|
+
url: z45.string()
|
|
1093
|
+
});
|
|
1094
|
+
var PageBlockResourceFrameNodeReference = z45.object({
|
|
1095
|
+
sourceId: z45.string(),
|
|
1096
|
+
frameReferenceId: z45.string()
|
|
1097
|
+
});
|
|
1098
|
+
var PageBlockImageReference = z45.object({
|
|
1102
1099
|
type: PageBlockImageType,
|
|
1103
1100
|
resource: PageBlockImageResourceReference.optional(),
|
|
1104
1101
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1105
1102
|
});
|
|
1106
|
-
var PageBlockColorV2 =
|
|
1107
|
-
value:
|
|
1108
|
-
referencedTokenId:
|
|
1103
|
+
var PageBlockColorV2 = z45.object({
|
|
1104
|
+
value: z45.string(),
|
|
1105
|
+
referencedTokenId: z45.string().optional()
|
|
1109
1106
|
});
|
|
1110
|
-
var PageBlockAssetEntityMeta =
|
|
1111
|
-
title:
|
|
1112
|
-
description:
|
|
1107
|
+
var PageBlockAssetEntityMeta = z45.object({
|
|
1108
|
+
title: z45.string().optional(),
|
|
1109
|
+
description: z45.string().optional(),
|
|
1113
1110
|
backgroundColor: PageBlockColorV2.optional()
|
|
1114
1111
|
});
|
|
1115
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1116
|
-
title:
|
|
1117
|
-
description:
|
|
1112
|
+
var PageBlockFigmaNodeEntityMeta = z45.object({
|
|
1113
|
+
title: z45.string().optional(),
|
|
1114
|
+
description: z45.string().optional(),
|
|
1118
1115
|
backgroundColor: PageBlockColorV2.optional()
|
|
1119
1116
|
});
|
|
1120
|
-
var PageBlockAppearanceV2 =
|
|
1117
|
+
var PageBlockAppearanceV2 = z45.object({
|
|
1121
1118
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1122
|
-
numberOfColumns:
|
|
1119
|
+
numberOfColumns: z45.number().optional()
|
|
1123
1120
|
});
|
|
1124
|
-
var PageBlockItemUntypedValue =
|
|
1125
|
-
value:
|
|
1126
|
-
}).and(
|
|
1127
|
-
var PageBlockLinkV2 =
|
|
1121
|
+
var PageBlockItemUntypedValue = z45.object({
|
|
1122
|
+
value: z45.any()
|
|
1123
|
+
}).and(z45.record(z45.any()));
|
|
1124
|
+
var PageBlockLinkV2 = z45.object({
|
|
1128
1125
|
type: PageBlockLinkType,
|
|
1129
|
-
documentationItemId:
|
|
1130
|
-
pageHeadingId:
|
|
1131
|
-
url:
|
|
1132
|
-
openInNewTab:
|
|
1126
|
+
documentationItemId: z45.string().optional(),
|
|
1127
|
+
pageHeadingId: z45.string().optional(),
|
|
1128
|
+
url: z45.string().optional(),
|
|
1129
|
+
openInNewTab: z45.boolean().optional()
|
|
1133
1130
|
});
|
|
1134
|
-
var PageBlockItemV2 =
|
|
1135
|
-
id:
|
|
1131
|
+
var PageBlockItemV2 = z45.object({
|
|
1132
|
+
id: z45.string(),
|
|
1136
1133
|
linksTo: PageBlockLinkV2.optional(),
|
|
1137
|
-
props:
|
|
1134
|
+
props: z45.record(PageBlockItemUntypedValue)
|
|
1138
1135
|
});
|
|
1139
|
-
var PageBlockDataV2 =
|
|
1140
|
-
packageId:
|
|
1141
|
-
variantId:
|
|
1142
|
-
indentLevel:
|
|
1136
|
+
var PageBlockDataV2 = z45.object({
|
|
1137
|
+
packageId: z45.string(),
|
|
1138
|
+
variantId: z45.string().optional(),
|
|
1139
|
+
indentLevel: z45.number(),
|
|
1143
1140
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1144
|
-
items:
|
|
1141
|
+
items: z45.array(PageBlockItemV2)
|
|
1145
1142
|
});
|
|
1146
|
-
var PageBlockItemAssetValue =
|
|
1147
|
-
selectedPropertyIds:
|
|
1148
|
-
showSearch:
|
|
1143
|
+
var PageBlockItemAssetValue = z45.object({
|
|
1144
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1145
|
+
showSearch: z45.boolean().optional(),
|
|
1149
1146
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1150
1147
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1151
|
-
value:
|
|
1152
|
-
|
|
1153
|
-
entityId:
|
|
1154
|
-
entityType:
|
|
1148
|
+
value: z45.array(
|
|
1149
|
+
z45.object({
|
|
1150
|
+
entityId: z45.string(),
|
|
1151
|
+
entityType: z45.enum(["Asset", "AssetGroup"]),
|
|
1155
1152
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1156
1153
|
})
|
|
1157
1154
|
).default([])
|
|
1158
1155
|
});
|
|
1159
|
-
var PageBlockItemAssetPropertyValue =
|
|
1160
|
-
value:
|
|
1156
|
+
var PageBlockItemAssetPropertyValue = z45.object({
|
|
1157
|
+
value: z45.array(z45.string()).default([])
|
|
1161
1158
|
});
|
|
1162
|
-
var PageBlockItemBooleanValue =
|
|
1163
|
-
value:
|
|
1159
|
+
var PageBlockItemBooleanValue = z45.object({
|
|
1160
|
+
value: z45.boolean()
|
|
1164
1161
|
});
|
|
1165
|
-
var PageBlockItemCodeValue =
|
|
1162
|
+
var PageBlockItemCodeValue = z45.object({
|
|
1166
1163
|
format: PageBlockCodeLanguage.optional(),
|
|
1167
|
-
caption:
|
|
1168
|
-
value:
|
|
1169
|
-
});
|
|
1170
|
-
var PageBlockItemSandboxValue =
|
|
1171
|
-
showCode:
|
|
1172
|
-
showControls:
|
|
1173
|
-
backgroundColor:
|
|
1174
|
-
alignPreview:
|
|
1175
|
-
previewHeight:
|
|
1176
|
-
value:
|
|
1177
|
-
});
|
|
1178
|
-
var PageBlockItemColorValue =
|
|
1179
|
-
var PageBlockItemComponentValue =
|
|
1180
|
-
selectedPropertyIds:
|
|
1181
|
-
value:
|
|
1182
|
-
|
|
1183
|
-
entityId:
|
|
1184
|
-
entityType:
|
|
1164
|
+
caption: z45.string().optional(),
|
|
1165
|
+
value: z45.string()
|
|
1166
|
+
});
|
|
1167
|
+
var PageBlockItemSandboxValue = z45.object({
|
|
1168
|
+
showCode: z45.boolean().optional(),
|
|
1169
|
+
showControls: z45.boolean().optional(),
|
|
1170
|
+
backgroundColor: z45.string().optional(),
|
|
1171
|
+
alignPreview: z45.enum(["Left", "Center"]).optional(),
|
|
1172
|
+
previewHeight: z45.number().optional(),
|
|
1173
|
+
value: z45.string()
|
|
1174
|
+
});
|
|
1175
|
+
var PageBlockItemColorValue = z45.record(z45.any());
|
|
1176
|
+
var PageBlockItemComponentValue = z45.object({
|
|
1177
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1178
|
+
value: z45.array(
|
|
1179
|
+
z45.object({
|
|
1180
|
+
entityId: z45.string(),
|
|
1181
|
+
entityType: z45.enum(["Component", "ComponentGroup"])
|
|
1185
1182
|
})
|
|
1186
1183
|
).default([])
|
|
1187
1184
|
});
|
|
1188
|
-
var PageBlockItemComponentPropertyValue =
|
|
1189
|
-
value:
|
|
1190
|
-
});
|
|
1191
|
-
var PageBlockItemDividerValue =
|
|
1192
|
-
var PageBlockItemEmbedValue =
|
|
1193
|
-
value:
|
|
1194
|
-
caption:
|
|
1195
|
-
height:
|
|
1196
|
-
openGraph:
|
|
1197
|
-
title:
|
|
1198
|
-
description:
|
|
1199
|
-
imageUrl:
|
|
1185
|
+
var PageBlockItemComponentPropertyValue = z45.object({
|
|
1186
|
+
value: z45.string()
|
|
1187
|
+
});
|
|
1188
|
+
var PageBlockItemDividerValue = z45.object({});
|
|
1189
|
+
var PageBlockItemEmbedValue = z45.object({
|
|
1190
|
+
value: z45.string().optional(),
|
|
1191
|
+
caption: z45.string().optional(),
|
|
1192
|
+
height: z45.number().optional(),
|
|
1193
|
+
openGraph: z45.object({
|
|
1194
|
+
title: z45.string().optional(),
|
|
1195
|
+
description: z45.string().optional(),
|
|
1196
|
+
imageUrl: z45.string().optional()
|
|
1200
1197
|
}).optional()
|
|
1201
1198
|
});
|
|
1202
|
-
var PageBlockItemFigmaNodeValue =
|
|
1203
|
-
showSearch:
|
|
1199
|
+
var PageBlockItemFigmaNodeValue = z45.object({
|
|
1200
|
+
showSearch: z45.boolean().optional(),
|
|
1204
1201
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1205
1202
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1206
|
-
showFrameDetails:
|
|
1207
|
-
value:
|
|
1208
|
-
|
|
1209
|
-
entityId:
|
|
1203
|
+
showFrameDetails: z45.boolean().optional(),
|
|
1204
|
+
value: z45.array(
|
|
1205
|
+
z45.object({
|
|
1206
|
+
entityId: z45.string(),
|
|
1210
1207
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1211
1208
|
})
|
|
1212
1209
|
).default([])
|
|
1213
1210
|
});
|
|
1214
|
-
var PageBlockItemImageValue =
|
|
1215
|
-
alt:
|
|
1216
|
-
caption:
|
|
1211
|
+
var PageBlockItemImageValue = z45.object({
|
|
1212
|
+
alt: z45.string().optional(),
|
|
1213
|
+
caption: z45.string().optional(),
|
|
1217
1214
|
alignment: PageBlockImageAlignment.optional(),
|
|
1218
1215
|
value: PageBlockImageReference.optional()
|
|
1219
1216
|
});
|
|
1220
|
-
var PageBlockItemMarkdownValue =
|
|
1221
|
-
value:
|
|
1217
|
+
var PageBlockItemMarkdownValue = z45.object({
|
|
1218
|
+
value: z45.string()
|
|
1222
1219
|
});
|
|
1223
|
-
var PageBlockItemMultiRichTextValue =
|
|
1220
|
+
var PageBlockItemMultiRichTextValue = z45.object({
|
|
1224
1221
|
value: PageBlockText.array()
|
|
1225
1222
|
});
|
|
1226
|
-
var PageBlockItemMultiSelectValue =
|
|
1227
|
-
value:
|
|
1223
|
+
var PageBlockItemMultiSelectValue = z45.object({
|
|
1224
|
+
value: z45.array(z45.string()).default([])
|
|
1228
1225
|
});
|
|
1229
|
-
var PageBlockItemNumberValue =
|
|
1230
|
-
value:
|
|
1226
|
+
var PageBlockItemNumberValue = z45.object({
|
|
1227
|
+
value: z45.number()
|
|
1231
1228
|
});
|
|
1232
|
-
var PageBlockItemRichTextValue =
|
|
1229
|
+
var PageBlockItemRichTextValue = z45.object({
|
|
1233
1230
|
value: PageBlockText,
|
|
1234
1231
|
calloutType: PageBlockCalloutType.optional()
|
|
1235
1232
|
});
|
|
1236
|
-
var PageBlockItemSingleSelectValue =
|
|
1237
|
-
value:
|
|
1233
|
+
var PageBlockItemSingleSelectValue = z45.object({
|
|
1234
|
+
value: z45.string()
|
|
1238
1235
|
});
|
|
1239
|
-
var PageBlockItemStorybookValue =
|
|
1240
|
-
caption:
|
|
1241
|
-
height:
|
|
1242
|
-
embedUrl:
|
|
1243
|
-
value:
|
|
1236
|
+
var PageBlockItemStorybookValue = z45.object({
|
|
1237
|
+
caption: z45.string().optional(),
|
|
1238
|
+
height: z45.number().optional(),
|
|
1239
|
+
embedUrl: z45.string().optional(),
|
|
1240
|
+
value: z45.string().optional()
|
|
1244
1241
|
});
|
|
1245
|
-
var PageBlockItemTextValue =
|
|
1246
|
-
value:
|
|
1242
|
+
var PageBlockItemTextValue = z45.object({
|
|
1243
|
+
value: z45.string()
|
|
1247
1244
|
});
|
|
1248
|
-
var PageBlockItemTokenValue =
|
|
1249
|
-
selectedPropertyIds:
|
|
1250
|
-
selectedThemeIds:
|
|
1245
|
+
var PageBlockItemTokenValue = z45.object({
|
|
1246
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1247
|
+
selectedThemeIds: z45.array(z45.string()).optional(),
|
|
1251
1248
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1252
|
-
value:
|
|
1253
|
-
|
|
1254
|
-
entityId:
|
|
1255
|
-
entityType:
|
|
1256
|
-
entityMeta:
|
|
1257
|
-
showNestedGroups:
|
|
1249
|
+
value: z45.array(
|
|
1250
|
+
z45.object({
|
|
1251
|
+
entityId: z45.string(),
|
|
1252
|
+
entityType: z45.enum(["Token", "TokenGroup"]),
|
|
1253
|
+
entityMeta: z45.object({
|
|
1254
|
+
showNestedGroups: z45.boolean().optional()
|
|
1258
1255
|
}).optional()
|
|
1259
1256
|
})
|
|
1260
1257
|
).default([])
|
|
1261
1258
|
});
|
|
1262
|
-
var PageBlockItemTokenPropertyValue =
|
|
1263
|
-
selectedPropertyIds:
|
|
1264
|
-
selectedThemeIds:
|
|
1265
|
-
value:
|
|
1259
|
+
var PageBlockItemTokenPropertyValue = z45.object({
|
|
1260
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1261
|
+
selectedThemeIds: z45.array(z45.string()).optional(),
|
|
1262
|
+
value: z45.array(z45.string()).default([])
|
|
1266
1263
|
});
|
|
1267
|
-
var PageBlockItemTokenTypeValue =
|
|
1268
|
-
value:
|
|
1264
|
+
var PageBlockItemTokenTypeValue = z45.object({
|
|
1265
|
+
value: z45.array(DesignTokenType).default([])
|
|
1269
1266
|
});
|
|
1270
|
-
var PageBlockItemUrlValue =
|
|
1271
|
-
value:
|
|
1267
|
+
var PageBlockItemUrlValue = z45.object({
|
|
1268
|
+
value: z45.string()
|
|
1272
1269
|
});
|
|
1273
|
-
var PageBlockItemTableRichTextNode =
|
|
1274
|
-
type:
|
|
1275
|
-
id:
|
|
1270
|
+
var PageBlockItemTableRichTextNode = z45.object({
|
|
1271
|
+
type: z45.literal("RichText"),
|
|
1272
|
+
id: z45.string(),
|
|
1276
1273
|
value: PageBlockItemRichTextValue.shape.value
|
|
1277
1274
|
});
|
|
1278
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1279
|
-
type:
|
|
1275
|
+
var PageBlockItemTableMultiRichTextNode = z45.object({
|
|
1276
|
+
type: z45.literal("MultiRichText"),
|
|
1280
1277
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1281
1278
|
});
|
|
1282
|
-
var PageBlockItemTableImageNode =
|
|
1283
|
-
type:
|
|
1284
|
-
id:
|
|
1279
|
+
var PageBlockItemTableImageNode = z45.object({
|
|
1280
|
+
type: z45.literal("Image"),
|
|
1281
|
+
id: z45.string(),
|
|
1285
1282
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1286
1283
|
value: PageBlockItemImageValue.shape.value
|
|
1287
1284
|
});
|
|
1288
|
-
var PageBlockItemTableNode =
|
|
1285
|
+
var PageBlockItemTableNode = z45.discriminatedUnion("type", [
|
|
1289
1286
|
PageBlockItemTableRichTextNode,
|
|
1290
1287
|
// PageBlockItemTableMultiRichTextNode,
|
|
1291
1288
|
PageBlockItemTableImageNode
|
|
1292
1289
|
]);
|
|
1293
|
-
var PageBlockItemTableCell =
|
|
1294
|
-
id:
|
|
1295
|
-
nodes:
|
|
1296
|
-
columnWidth:
|
|
1290
|
+
var PageBlockItemTableCell = z45.object({
|
|
1291
|
+
id: z45.string(),
|
|
1292
|
+
nodes: z45.array(PageBlockItemTableNode),
|
|
1293
|
+
columnWidth: z45.number().optional(),
|
|
1297
1294
|
alignment: PageBlockTableCellAlignment
|
|
1298
1295
|
});
|
|
1299
|
-
var PageBlockItemTableRow =
|
|
1300
|
-
cells:
|
|
1296
|
+
var PageBlockItemTableRow = z45.object({
|
|
1297
|
+
cells: z45.array(PageBlockItemTableCell)
|
|
1301
1298
|
});
|
|
1302
|
-
var PageBlockItemTableValue =
|
|
1303
|
-
highlightHeaderColumn:
|
|
1304
|
-
highlightHeaderRow:
|
|
1305
|
-
showBorder:
|
|
1306
|
-
value:
|
|
1299
|
+
var PageBlockItemTableValue = z45.object({
|
|
1300
|
+
highlightHeaderColumn: z45.boolean().optional(),
|
|
1301
|
+
highlightHeaderRow: z45.boolean().optional(),
|
|
1302
|
+
showBorder: z45.boolean().optional(),
|
|
1303
|
+
value: z45.array(PageBlockItemTableRow).default([])
|
|
1307
1304
|
});
|
|
1308
1305
|
|
|
1309
1306
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1310
|
-
import { z as
|
|
1307
|
+
import { z as z49 } from "zod";
|
|
1311
1308
|
|
|
1312
1309
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1313
|
-
import { z as
|
|
1310
|
+
import { z as z48 } from "zod";
|
|
1314
1311
|
|
|
1315
1312
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1316
|
-
import { z as
|
|
1313
|
+
import { z as z47 } from "zod";
|
|
1317
1314
|
|
|
1318
1315
|
// src/dsm/elements/data/item-header.ts
|
|
1319
|
-
import { z as
|
|
1320
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1321
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1316
|
+
import { z as z46 } from "zod";
|
|
1317
|
+
var DocumentationItemHeaderAlignmentSchema = z46.enum(["Left", "Center"]);
|
|
1318
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z46.enum(["AspectFill", "AspectFit"]);
|
|
1322
1319
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1323
1320
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1324
1321
|
|
|
1325
1322
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1326
|
-
var DocumentationItemHeaderV1 =
|
|
1327
|
-
description:
|
|
1323
|
+
var DocumentationItemHeaderV1 = z47.object({
|
|
1324
|
+
description: z47.string(),
|
|
1328
1325
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1329
1326
|
foregroundColor: ColorTokenData.nullish(),
|
|
1330
1327
|
backgroundColor: ColorTokenData.nullish(),
|
|
1331
1328
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1332
1329
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1333
|
-
showBackgroundOverlay:
|
|
1334
|
-
showCoverText:
|
|
1335
|
-
minHeight:
|
|
1330
|
+
showBackgroundOverlay: z47.boolean(),
|
|
1331
|
+
showCoverText: z47.boolean(),
|
|
1332
|
+
minHeight: z47.number().nullish()
|
|
1336
1333
|
});
|
|
1337
1334
|
var defaultDocumentationItemHeaderV1 = {
|
|
1338
1335
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1343,10 +1340,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1343
1340
|
};
|
|
1344
1341
|
|
|
1345
1342
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1346
|
-
var DocumentationItemConfigurationV1 =
|
|
1347
|
-
showSidebar:
|
|
1348
|
-
isPrivate:
|
|
1349
|
-
isHidden:
|
|
1343
|
+
var DocumentationItemConfigurationV1 = z48.object({
|
|
1344
|
+
showSidebar: z48.boolean(),
|
|
1345
|
+
isPrivate: z48.boolean().optional(),
|
|
1346
|
+
isHidden: z48.boolean().optional(),
|
|
1350
1347
|
header: DocumentationItemHeaderV1
|
|
1351
1348
|
});
|
|
1352
1349
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1355,29 +1352,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
1355
1352
|
};
|
|
1356
1353
|
|
|
1357
1354
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1358
|
-
var DocumentationPageDataV1 =
|
|
1359
|
-
blocks:
|
|
1355
|
+
var DocumentationPageDataV1 = z49.object({
|
|
1356
|
+
blocks: z49.array(PageBlockV1),
|
|
1360
1357
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1361
1358
|
});
|
|
1362
1359
|
|
|
1363
1360
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1364
|
-
import { z as
|
|
1361
|
+
import { z as z52 } from "zod";
|
|
1365
1362
|
|
|
1366
1363
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1367
|
-
import { z as
|
|
1364
|
+
import { z as z51 } from "zod";
|
|
1368
1365
|
|
|
1369
1366
|
// src/dsm/elements/data/item-header-v2.ts
|
|
1370
|
-
import { z as
|
|
1371
|
-
var DocumentationItemHeaderV2 =
|
|
1372
|
-
description:
|
|
1367
|
+
import { z as z50 } from "zod";
|
|
1368
|
+
var DocumentationItemHeaderV2 = z50.object({
|
|
1369
|
+
description: z50.string(),
|
|
1373
1370
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1374
1371
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1375
1372
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1376
1373
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1377
1374
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1378
|
-
showBackgroundOverlay:
|
|
1379
|
-
showCoverText:
|
|
1380
|
-
minHeight:
|
|
1375
|
+
showBackgroundOverlay: z50.boolean(),
|
|
1376
|
+
showCoverText: z50.boolean(),
|
|
1377
|
+
minHeight: z50.number().nullish()
|
|
1381
1378
|
});
|
|
1382
1379
|
var defaultDocumentationItemHeaderV2 = {
|
|
1383
1380
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1388,10 +1385,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1388
1385
|
};
|
|
1389
1386
|
|
|
1390
1387
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1391
|
-
var DocumentationItemConfigurationV2 =
|
|
1392
|
-
showSidebar:
|
|
1393
|
-
isPrivate:
|
|
1394
|
-
isHidden:
|
|
1388
|
+
var DocumentationItemConfigurationV2 = z51.object({
|
|
1389
|
+
showSidebar: z51.boolean(),
|
|
1390
|
+
isPrivate: z51.boolean().optional(),
|
|
1391
|
+
isHidden: z51.boolean().optional(),
|
|
1395
1392
|
header: DocumentationItemHeaderV2
|
|
1396
1393
|
});
|
|
1397
1394
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -1402,122 +1399,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
1402
1399
|
};
|
|
1403
1400
|
|
|
1404
1401
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1405
|
-
var DocumentationPageDataV2 =
|
|
1402
|
+
var DocumentationPageDataV2 = z52.object({
|
|
1406
1403
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1407
1404
|
});
|
|
1408
1405
|
|
|
1409
1406
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1410
|
-
import { z as
|
|
1407
|
+
import { z as z55 } from "zod";
|
|
1411
1408
|
|
|
1412
1409
|
// src/dsm/elements/page-block-v2.ts
|
|
1413
|
-
import { z as
|
|
1410
|
+
import { z as z54 } from "zod";
|
|
1414
1411
|
|
|
1415
1412
|
// src/dsm/elements/base.ts
|
|
1416
|
-
import { z as
|
|
1417
|
-
var DesignElementOrigin =
|
|
1418
|
-
id:
|
|
1419
|
-
sourceId:
|
|
1420
|
-
name:
|
|
1421
|
-
});
|
|
1422
|
-
var DesignElementBase =
|
|
1423
|
-
id:
|
|
1424
|
-
persistentId:
|
|
1413
|
+
import { z as z53 } from "zod";
|
|
1414
|
+
var DesignElementOrigin = z53.object({
|
|
1415
|
+
id: z53.string(),
|
|
1416
|
+
sourceId: z53.string(),
|
|
1417
|
+
name: z53.string()
|
|
1418
|
+
});
|
|
1419
|
+
var DesignElementBase = z53.object({
|
|
1420
|
+
id: z53.string(),
|
|
1421
|
+
persistentId: z53.string(),
|
|
1425
1422
|
meta: ObjectMeta,
|
|
1426
|
-
designSystemVersionId:
|
|
1427
|
-
createdAt:
|
|
1428
|
-
updatedAt:
|
|
1423
|
+
designSystemVersionId: z53.string(),
|
|
1424
|
+
createdAt: z53.coerce.date(),
|
|
1425
|
+
updatedAt: z53.coerce.date()
|
|
1429
1426
|
});
|
|
1430
1427
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1431
1428
|
origin: DesignElementOrigin
|
|
1432
1429
|
});
|
|
1433
|
-
var DesignElementGroupablePart =
|
|
1434
|
-
parentPersistentId:
|
|
1435
|
-
sortOrder:
|
|
1430
|
+
var DesignElementGroupablePart = z53.object({
|
|
1431
|
+
parentPersistentId: z53.string().optional(),
|
|
1432
|
+
sortOrder: z53.number()
|
|
1436
1433
|
});
|
|
1437
1434
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1438
1435
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1439
|
-
parentPersistentId:
|
|
1436
|
+
parentPersistentId: z53.string()
|
|
1440
1437
|
});
|
|
1441
|
-
var DesignElementBrandedPart =
|
|
1442
|
-
brandPersistentId:
|
|
1438
|
+
var DesignElementBrandedPart = z53.object({
|
|
1439
|
+
brandPersistentId: z53.string()
|
|
1443
1440
|
});
|
|
1444
|
-
var DesignElementSlugPart =
|
|
1445
|
-
slug:
|
|
1446
|
-
userSlug:
|
|
1441
|
+
var DesignElementSlugPart = z53.object({
|
|
1442
|
+
slug: z53.string().optional(),
|
|
1443
|
+
userSlug: z53.string().optional()
|
|
1447
1444
|
});
|
|
1448
1445
|
|
|
1449
1446
|
// src/dsm/elements/page-block-v2.ts
|
|
1450
1447
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1451
1448
|
data: PageBlockDataV2
|
|
1452
1449
|
});
|
|
1453
|
-
var PageBlockEditorModelV2 =
|
|
1454
|
-
id:
|
|
1455
|
-
type:
|
|
1450
|
+
var PageBlockEditorModelV2 = z54.object({
|
|
1451
|
+
id: z54.string(),
|
|
1452
|
+
type: z54.literal("Block"),
|
|
1456
1453
|
data: PageBlockDataV2
|
|
1457
1454
|
});
|
|
1458
1455
|
|
|
1459
1456
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1460
|
-
var PageSectionTypeV2 =
|
|
1461
|
-
var PageSectionColumnV2 =
|
|
1462
|
-
id:
|
|
1463
|
-
blocks:
|
|
1464
|
-
});
|
|
1465
|
-
var PageSectionItemV2 =
|
|
1466
|
-
id:
|
|
1467
|
-
title:
|
|
1468
|
-
columns:
|
|
1469
|
-
});
|
|
1470
|
-
var PageSectionPaddingV2 =
|
|
1471
|
-
top:
|
|
1472
|
-
bottom:
|
|
1473
|
-
left:
|
|
1474
|
-
right:
|
|
1475
|
-
});
|
|
1476
|
-
var PageSectionAppearanceV2 =
|
|
1477
|
-
expandToEdges:
|
|
1478
|
-
contentExpandToEdges:
|
|
1457
|
+
var PageSectionTypeV2 = z55.enum(["Tabs"]);
|
|
1458
|
+
var PageSectionColumnV2 = z55.object({
|
|
1459
|
+
id: z55.string(),
|
|
1460
|
+
blocks: z55.array(PageBlockEditorModelV2)
|
|
1461
|
+
});
|
|
1462
|
+
var PageSectionItemV2 = z55.object({
|
|
1463
|
+
id: z55.string(),
|
|
1464
|
+
title: z55.string(),
|
|
1465
|
+
columns: z55.array(PageSectionColumnV2)
|
|
1466
|
+
});
|
|
1467
|
+
var PageSectionPaddingV2 = z55.object({
|
|
1468
|
+
top: z55.number().optional(),
|
|
1469
|
+
bottom: z55.number().optional(),
|
|
1470
|
+
left: z55.number().optional(),
|
|
1471
|
+
right: z55.number().optional()
|
|
1472
|
+
});
|
|
1473
|
+
var PageSectionAppearanceV2 = z55.object({
|
|
1474
|
+
expandToEdges: z55.boolean(),
|
|
1475
|
+
contentExpandToEdges: z55.boolean(),
|
|
1479
1476
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1480
1477
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1481
1478
|
padding: PageSectionPaddingV2.optional()
|
|
1482
1479
|
});
|
|
1483
|
-
var PageSectionEditorModelV2 =
|
|
1484
|
-
id:
|
|
1485
|
-
type:
|
|
1486
|
-
variantId:
|
|
1480
|
+
var PageSectionEditorModelV2 = z55.object({
|
|
1481
|
+
id: z55.string(),
|
|
1482
|
+
type: z55.literal("Section"),
|
|
1483
|
+
variantId: z55.string().optional(),
|
|
1487
1484
|
sectionType: PageSectionTypeV2,
|
|
1488
1485
|
appearance: PageSectionAppearanceV2,
|
|
1489
|
-
items:
|
|
1486
|
+
items: z55.array(PageSectionItemV2)
|
|
1490
1487
|
});
|
|
1491
1488
|
|
|
1492
1489
|
// src/dsm/elements/data/duration.ts
|
|
1493
|
-
import { z as
|
|
1494
|
-
var DurationUnit =
|
|
1495
|
-
var DurationValue =
|
|
1490
|
+
import { z as z56 } from "zod";
|
|
1491
|
+
var DurationUnit = z56.enum(["Ms"]);
|
|
1492
|
+
var DurationValue = z56.object({
|
|
1496
1493
|
unit: DurationUnit,
|
|
1497
|
-
measure:
|
|
1494
|
+
measure: z56.number()
|
|
1498
1495
|
});
|
|
1499
1496
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1500
1497
|
|
|
1501
1498
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1502
|
-
import { z as
|
|
1503
|
-
var FigmaFileStructureNodeType =
|
|
1504
|
-
var FigmaFileStructureNodeBase =
|
|
1505
|
-
id:
|
|
1506
|
-
name:
|
|
1499
|
+
import { z as z57 } from "zod";
|
|
1500
|
+
var FigmaFileStructureNodeType = z57.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1501
|
+
var FigmaFileStructureNodeBase = z57.object({
|
|
1502
|
+
id: z57.string(),
|
|
1503
|
+
name: z57.string(),
|
|
1507
1504
|
type: FigmaFileStructureNodeType,
|
|
1508
1505
|
size: SizeOrUndefined,
|
|
1509
|
-
parentComponentSetId:
|
|
1506
|
+
parentComponentSetId: z57.string().optional()
|
|
1510
1507
|
});
|
|
1511
1508
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1512
|
-
children:
|
|
1509
|
+
children: z57.lazy(() => FigmaFileStructureNode.array())
|
|
1513
1510
|
});
|
|
1514
|
-
var FigmaFileStructureStatistics =
|
|
1515
|
-
frames:
|
|
1516
|
-
components:
|
|
1517
|
-
componentSets:
|
|
1511
|
+
var FigmaFileStructureStatistics = z57.object({
|
|
1512
|
+
frames: z57.number().nullable().optional().transform((v) => v ?? 0),
|
|
1513
|
+
components: z57.number().nullable().optional().transform((v) => v ?? 0),
|
|
1514
|
+
componentSets: z57.number().nullable().optional().transform((v) => v ?? 0)
|
|
1518
1515
|
});
|
|
1519
|
-
var FigmaFileStructureElementData =
|
|
1520
|
-
value:
|
|
1516
|
+
var FigmaFileStructureElementData = z57.object({
|
|
1517
|
+
value: z57.object({
|
|
1521
1518
|
structure: FigmaFileStructureNode,
|
|
1522
1519
|
assetsInFile: FigmaFileStructureStatistics
|
|
1523
1520
|
})
|
|
@@ -1534,119 +1531,119 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1534
1531
|
}
|
|
1535
1532
|
|
|
1536
1533
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1537
|
-
import { z as
|
|
1538
|
-
var FigmaNodeReferenceData =
|
|
1539
|
-
structureElementId:
|
|
1540
|
-
nodeId:
|
|
1541
|
-
fileId:
|
|
1542
|
-
valid:
|
|
1534
|
+
import { z as z58 } from "zod";
|
|
1535
|
+
var FigmaNodeReferenceData = z58.object({
|
|
1536
|
+
structureElementId: z58.string(),
|
|
1537
|
+
nodeId: z58.string(),
|
|
1538
|
+
fileId: z58.string().optional(),
|
|
1539
|
+
valid: z58.boolean(),
|
|
1543
1540
|
// Asset data
|
|
1544
|
-
assetId:
|
|
1545
|
-
assetScale:
|
|
1546
|
-
assetWidth:
|
|
1547
|
-
assetHeight:
|
|
1548
|
-
assetUrl:
|
|
1549
|
-
assetOriginKey:
|
|
1550
|
-
});
|
|
1551
|
-
var FigmaNodeReferenceElementData =
|
|
1541
|
+
assetId: z58.string().optional(),
|
|
1542
|
+
assetScale: z58.number().optional(),
|
|
1543
|
+
assetWidth: z58.number().optional(),
|
|
1544
|
+
assetHeight: z58.number().optional(),
|
|
1545
|
+
assetUrl: z58.string().optional(),
|
|
1546
|
+
assetOriginKey: z58.string().optional()
|
|
1547
|
+
});
|
|
1548
|
+
var FigmaNodeReferenceElementData = z58.object({
|
|
1552
1549
|
value: FigmaNodeReferenceData
|
|
1553
1550
|
});
|
|
1554
1551
|
|
|
1555
1552
|
// src/dsm/elements/data/font-family.ts
|
|
1556
|
-
import { z as
|
|
1557
|
-
var FontFamilyValue =
|
|
1553
|
+
import { z as z59 } from "zod";
|
|
1554
|
+
var FontFamilyValue = z59.string();
|
|
1558
1555
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1559
1556
|
|
|
1560
1557
|
// src/dsm/elements/data/font-size.ts
|
|
1561
|
-
import { z as
|
|
1562
|
-
var FontSizeUnit =
|
|
1563
|
-
var FontSizeValue =
|
|
1558
|
+
import { z as z60 } from "zod";
|
|
1559
|
+
var FontSizeUnit = z60.enum(["Pixels", "Rem", "Percent"]);
|
|
1560
|
+
var FontSizeValue = z60.object({
|
|
1564
1561
|
unit: FontSizeUnit,
|
|
1565
|
-
measure:
|
|
1562
|
+
measure: z60.number()
|
|
1566
1563
|
});
|
|
1567
1564
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1568
1565
|
|
|
1569
1566
|
// src/dsm/elements/data/font-weight.ts
|
|
1570
|
-
import { z as
|
|
1571
|
-
var FontWeightValue =
|
|
1567
|
+
import { z as z61 } from "zod";
|
|
1568
|
+
var FontWeightValue = z61.string();
|
|
1572
1569
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1573
1570
|
|
|
1574
1571
|
// src/dsm/elements/data/gradient.ts
|
|
1575
|
-
import { z as
|
|
1576
|
-
var GradientType =
|
|
1577
|
-
var GradientStop =
|
|
1578
|
-
position:
|
|
1572
|
+
import { z as z62 } from "zod";
|
|
1573
|
+
var GradientType = z62.enum(["Linear", "Radial", "Angular"]);
|
|
1574
|
+
var GradientStop = z62.object({
|
|
1575
|
+
position: z62.number(),
|
|
1579
1576
|
color: ColorTokenData
|
|
1580
1577
|
});
|
|
1581
|
-
var GradientLayerValue =
|
|
1578
|
+
var GradientLayerValue = z62.object({
|
|
1582
1579
|
from: Point2D,
|
|
1583
1580
|
to: Point2D,
|
|
1584
1581
|
type: GradientType,
|
|
1585
|
-
aspectRatio: nullishToOptional(
|
|
1582
|
+
aspectRatio: nullishToOptional(z62.number()),
|
|
1586
1583
|
// z.number(),
|
|
1587
|
-
stops:
|
|
1584
|
+
stops: z62.array(GradientStop).min(2)
|
|
1588
1585
|
});
|
|
1589
1586
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1590
|
-
var GradientTokenValue =
|
|
1587
|
+
var GradientTokenValue = z62.array(GradientLayerData);
|
|
1591
1588
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1592
1589
|
|
|
1593
1590
|
// src/dsm/elements/data/group.ts
|
|
1594
|
-
import { z as
|
|
1595
|
-
var DocumentationGroupBehavior =
|
|
1596
|
-
var ElementGroupDataV1 =
|
|
1591
|
+
import { z as z63 } from "zod";
|
|
1592
|
+
var DocumentationGroupBehavior = z63.enum(["Group", "Tabs"]);
|
|
1593
|
+
var ElementGroupDataV1 = z63.object({
|
|
1597
1594
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1598
1595
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1599
1596
|
});
|
|
1600
|
-
var ElementGroupDataV2 =
|
|
1597
|
+
var ElementGroupDataV2 = z63.object({
|
|
1601
1598
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1602
1599
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1603
1600
|
});
|
|
1604
1601
|
|
|
1605
1602
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var LetterSpacingUnit =
|
|
1608
|
-
var LetterSpacingValue =
|
|
1603
|
+
import { z as z64 } from "zod";
|
|
1604
|
+
var LetterSpacingUnit = z64.enum(["Pixels", "Rem", "Percent"]);
|
|
1605
|
+
var LetterSpacingValue = z64.object({
|
|
1609
1606
|
unit: LetterSpacingUnit,
|
|
1610
|
-
measure:
|
|
1607
|
+
measure: z64.number()
|
|
1611
1608
|
});
|
|
1612
1609
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1613
1610
|
|
|
1614
1611
|
// src/dsm/elements/data/line-height.ts
|
|
1615
|
-
import { z as
|
|
1616
|
-
var LineHeightUnit =
|
|
1617
|
-
var LineHeightValue =
|
|
1612
|
+
import { z as z65 } from "zod";
|
|
1613
|
+
var LineHeightUnit = z65.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1614
|
+
var LineHeightValue = z65.object({
|
|
1618
1615
|
unit: LineHeightUnit,
|
|
1619
|
-
measure:
|
|
1616
|
+
measure: z65.number()
|
|
1620
1617
|
});
|
|
1621
1618
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1622
1619
|
|
|
1623
1620
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1624
|
-
import { z as
|
|
1625
|
-
var ParagraphIndentUnit =
|
|
1626
|
-
var ParagraphIndentValue =
|
|
1621
|
+
import { z as z66 } from "zod";
|
|
1622
|
+
var ParagraphIndentUnit = z66.enum(["Pixels", "Rem", "Percent"]);
|
|
1623
|
+
var ParagraphIndentValue = z66.object({
|
|
1627
1624
|
unit: ParagraphIndentUnit,
|
|
1628
|
-
measure:
|
|
1625
|
+
measure: z66.number()
|
|
1629
1626
|
});
|
|
1630
1627
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1631
1628
|
|
|
1632
1629
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1633
|
-
import { z as
|
|
1634
|
-
var ParagraphSpacingUnit =
|
|
1635
|
-
var ParagraphSpacingValue =
|
|
1630
|
+
import { z as z67 } from "zod";
|
|
1631
|
+
var ParagraphSpacingUnit = z67.enum(["Pixels", "Rem", "Percent"]);
|
|
1632
|
+
var ParagraphSpacingValue = z67.object({
|
|
1636
1633
|
unit: ParagraphSpacingUnit,
|
|
1637
|
-
measure:
|
|
1634
|
+
measure: z67.number()
|
|
1638
1635
|
});
|
|
1639
1636
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1640
1637
|
|
|
1641
1638
|
// src/dsm/elements/data/product-copy.ts
|
|
1642
|
-
import { z as
|
|
1643
|
-
var ProductCopyValue =
|
|
1639
|
+
import { z as z68 } from "zod";
|
|
1640
|
+
var ProductCopyValue = z68.string();
|
|
1644
1641
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1645
1642
|
|
|
1646
1643
|
// src/dsm/elements/data/safe-id.ts
|
|
1647
|
-
import { z as
|
|
1644
|
+
import { z as z69 } from "zod";
|
|
1648
1645
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1649
|
-
var SafeIdSchema =
|
|
1646
|
+
var SafeIdSchema = z69.string().refine(
|
|
1650
1647
|
(value) => {
|
|
1651
1648
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1652
1649
|
},
|
|
@@ -1656,58 +1653,58 @@ var SafeIdSchema = z70.string().refine(
|
|
|
1656
1653
|
);
|
|
1657
1654
|
|
|
1658
1655
|
// src/dsm/elements/data/shadow.ts
|
|
1659
|
-
import { z as
|
|
1660
|
-
var ShadowType =
|
|
1661
|
-
var ShadowLayerValue =
|
|
1656
|
+
import { z as z70 } from "zod";
|
|
1657
|
+
var ShadowType = z70.enum(["Drop", "Inner"]);
|
|
1658
|
+
var ShadowLayerValue = z70.object({
|
|
1662
1659
|
color: ColorTokenData,
|
|
1663
|
-
x:
|
|
1664
|
-
y:
|
|
1665
|
-
radius:
|
|
1666
|
-
spread:
|
|
1660
|
+
x: z70.number(),
|
|
1661
|
+
y: z70.number(),
|
|
1662
|
+
radius: z70.number(),
|
|
1663
|
+
spread: z70.number(),
|
|
1667
1664
|
opacity: OpacityTokenData.optional(),
|
|
1668
1665
|
type: ShadowType
|
|
1669
1666
|
});
|
|
1670
1667
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1671
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1668
|
+
var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
|
|
1672
1669
|
|
|
1673
1670
|
// src/dsm/elements/data/size.ts
|
|
1674
|
-
import { z as
|
|
1675
|
-
var SizeUnit =
|
|
1676
|
-
var SizeValue =
|
|
1671
|
+
import { z as z71 } from "zod";
|
|
1672
|
+
var SizeUnit = z71.enum(["Pixels", "Rem", "Percent"]);
|
|
1673
|
+
var SizeValue = z71.object({
|
|
1677
1674
|
unit: SizeUnit,
|
|
1678
|
-
measure:
|
|
1675
|
+
measure: z71.number()
|
|
1679
1676
|
});
|
|
1680
1677
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1681
1678
|
|
|
1682
1679
|
// src/dsm/elements/data/space.ts
|
|
1683
|
-
import { z as
|
|
1684
|
-
var SpaceUnit =
|
|
1685
|
-
var SpaceValue =
|
|
1680
|
+
import { z as z72 } from "zod";
|
|
1681
|
+
var SpaceUnit = z72.enum(["Pixels", "Rem", "Percent"]);
|
|
1682
|
+
var SpaceValue = z72.object({
|
|
1686
1683
|
unit: SpaceUnit,
|
|
1687
|
-
measure:
|
|
1684
|
+
measure: z72.number()
|
|
1688
1685
|
});
|
|
1689
1686
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1690
1687
|
|
|
1691
1688
|
// src/dsm/elements/data/string.ts
|
|
1692
|
-
import { z as
|
|
1693
|
-
var StringValue =
|
|
1689
|
+
import { z as z73 } from "zod";
|
|
1690
|
+
var StringValue = z73.string();
|
|
1694
1691
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1695
1692
|
|
|
1696
1693
|
// src/dsm/elements/data/text-case.ts
|
|
1697
|
-
import { z as
|
|
1698
|
-
var TextCase =
|
|
1694
|
+
import { z as z74 } from "zod";
|
|
1695
|
+
var TextCase = z74.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1699
1696
|
var TextCaseValue = TextCase;
|
|
1700
1697
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1701
1698
|
|
|
1702
1699
|
// src/dsm/elements/data/text-decoration.ts
|
|
1703
|
-
import { z as
|
|
1704
|
-
var TextDecoration =
|
|
1700
|
+
import { z as z75 } from "zod";
|
|
1701
|
+
var TextDecoration = z75.enum(["None", "Underline", "Strikethrough"]);
|
|
1705
1702
|
var TextDecorationValue = TextDecoration;
|
|
1706
1703
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1707
1704
|
|
|
1708
1705
|
// src/dsm/elements/data/typography.ts
|
|
1709
|
-
import { z as
|
|
1710
|
-
var TypographyValue =
|
|
1706
|
+
import { z as z76 } from "zod";
|
|
1707
|
+
var TypographyValue = z76.object({
|
|
1711
1708
|
fontSize: FontSizeTokenData,
|
|
1712
1709
|
fontFamily: FontFamilyTokenData,
|
|
1713
1710
|
fontWeight: FontWeightTokenData,
|
|
@@ -1721,49 +1718,49 @@ var TypographyValue = z77.object({
|
|
|
1721
1718
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1722
1719
|
|
|
1723
1720
|
// src/dsm/elements/data/visibility.ts
|
|
1724
|
-
import { z as
|
|
1725
|
-
var Visibility =
|
|
1721
|
+
import { z as z77 } from "zod";
|
|
1722
|
+
var Visibility = z77.enum(["Hidden", "Visible"]);
|
|
1726
1723
|
var VisibilityValue = Visibility;
|
|
1727
1724
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1728
1725
|
|
|
1729
1726
|
// src/dsm/elements/data/z-index.ts
|
|
1730
|
-
import { z as
|
|
1731
|
-
var ZIndexUnit =
|
|
1732
|
-
var ZIndexValue =
|
|
1727
|
+
import { z as z78 } from "zod";
|
|
1728
|
+
var ZIndexUnit = z78.enum(["Raw"]);
|
|
1729
|
+
var ZIndexValue = z78.object({
|
|
1733
1730
|
unit: ZIndexUnit,
|
|
1734
|
-
measure:
|
|
1731
|
+
measure: z78.number()
|
|
1735
1732
|
});
|
|
1736
1733
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1737
1734
|
|
|
1738
1735
|
// src/dsm/elements/component.ts
|
|
1739
|
-
import { z as
|
|
1740
|
-
var ComponentOriginPart =
|
|
1741
|
-
nodeId:
|
|
1742
|
-
width:
|
|
1743
|
-
height:
|
|
1736
|
+
import { z as z79 } from "zod";
|
|
1737
|
+
var ComponentOriginPart = z79.object({
|
|
1738
|
+
nodeId: z79.string().optional(),
|
|
1739
|
+
width: z79.number().optional(),
|
|
1740
|
+
height: z79.number().optional()
|
|
1744
1741
|
});
|
|
1745
|
-
var ComponentAsset =
|
|
1746
|
-
assetId:
|
|
1747
|
-
assetPath:
|
|
1742
|
+
var ComponentAsset = z79.object({
|
|
1743
|
+
assetId: z79.string(),
|
|
1744
|
+
assetPath: z79.string()
|
|
1748
1745
|
});
|
|
1749
1746
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1750
1747
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1751
1748
|
origin: ComponentOrigin.optional(),
|
|
1752
1749
|
thumbnail: ComponentAsset,
|
|
1753
1750
|
svg: ComponentAsset.optional(),
|
|
1754
|
-
isAsset:
|
|
1751
|
+
isAsset: z79.boolean()
|
|
1755
1752
|
});
|
|
1756
1753
|
function isImportedComponent(component) {
|
|
1757
1754
|
return !!component.origin;
|
|
1758
1755
|
}
|
|
1759
1756
|
|
|
1760
1757
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1761
|
-
import { z as
|
|
1758
|
+
import { z as z81 } from "zod";
|
|
1762
1759
|
|
|
1763
1760
|
// src/dsm/elements/group.ts
|
|
1764
|
-
import { z as
|
|
1761
|
+
import { z as z80 } from "zod";
|
|
1765
1762
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1766
|
-
shortPersistentId:
|
|
1763
|
+
shortPersistentId: z80.string().optional(),
|
|
1767
1764
|
childType: DesignElementType,
|
|
1768
1765
|
data: ElementGroupDataV2.optional()
|
|
1769
1766
|
});
|
|
@@ -1771,7 +1768,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1771
1768
|
|
|
1772
1769
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1773
1770
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1774
|
-
shortPersistentId:
|
|
1771
|
+
shortPersistentId: z81.string(),
|
|
1775
1772
|
data: DocumentationPageDataV1
|
|
1776
1773
|
});
|
|
1777
1774
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -1781,21 +1778,21 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
1781
1778
|
});
|
|
1782
1779
|
|
|
1783
1780
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1784
|
-
import { z as
|
|
1781
|
+
import { z as z82 } from "zod";
|
|
1785
1782
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1786
|
-
shortPersistentId:
|
|
1783
|
+
shortPersistentId: z82.string(),
|
|
1787
1784
|
data: DocumentationPageDataV2.extend({
|
|
1788
|
-
oldBlocks:
|
|
1785
|
+
oldBlocks: z82.array(PageBlockV1).optional()
|
|
1789
1786
|
})
|
|
1790
1787
|
});
|
|
1791
1788
|
|
|
1792
1789
|
// src/dsm/elements/figma-file-structures.ts
|
|
1793
|
-
import { z as
|
|
1794
|
-
var FigmaFileStructureOrigin =
|
|
1795
|
-
sourceId:
|
|
1796
|
-
fileId:
|
|
1790
|
+
import { z as z83 } from "zod";
|
|
1791
|
+
var FigmaFileStructureOrigin = z83.object({
|
|
1792
|
+
sourceId: z83.string(),
|
|
1793
|
+
fileId: z83.string().optional()
|
|
1797
1794
|
});
|
|
1798
|
-
var FigmaFileStructureData =
|
|
1795
|
+
var FigmaFileStructureData = z83.object({
|
|
1799
1796
|
rootNode: FigmaFileStructureNode,
|
|
1800
1797
|
assetsInFile: FigmaFileStructureStatistics
|
|
1801
1798
|
});
|
|
@@ -1811,10 +1808,10 @@ function traverseStructure(node, action) {
|
|
|
1811
1808
|
}
|
|
1812
1809
|
|
|
1813
1810
|
// src/dsm/elements/figma-node-reference.ts
|
|
1814
|
-
import { z as
|
|
1815
|
-
var FigmaNodeReferenceOrigin =
|
|
1816
|
-
sourceId:
|
|
1817
|
-
parentName:
|
|
1811
|
+
import { z as z84 } from "zod";
|
|
1812
|
+
var FigmaNodeReferenceOrigin = z84.object({
|
|
1813
|
+
sourceId: z84.string(),
|
|
1814
|
+
parentName: z84.string().optional()
|
|
1818
1815
|
});
|
|
1819
1816
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1820
1817
|
data: FigmaNodeReferenceData,
|
|
@@ -1822,13 +1819,13 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1822
1819
|
});
|
|
1823
1820
|
|
|
1824
1821
|
// src/dsm/elements/theme.ts
|
|
1825
|
-
import { z as
|
|
1822
|
+
import { z as z86 } from "zod";
|
|
1826
1823
|
|
|
1827
1824
|
// src/dsm/elements/tokens.ts
|
|
1828
|
-
import { z as
|
|
1829
|
-
var DesignTokenOriginPart =
|
|
1830
|
-
referenceOriginId:
|
|
1831
|
-
referencePersistentId:
|
|
1825
|
+
import { z as z85 } from "zod";
|
|
1826
|
+
var DesignTokenOriginPart = z85.object({
|
|
1827
|
+
referenceOriginId: z85.string().optional(),
|
|
1828
|
+
referencePersistentId: z85.string().optional()
|
|
1832
1829
|
});
|
|
1833
1830
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1834
1831
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1840,111 +1837,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1840
1837
|
brandPersistentId: true,
|
|
1841
1838
|
designSystemVersionId: true
|
|
1842
1839
|
});
|
|
1843
|
-
var BlurTokenTypedData =
|
|
1844
|
-
type:
|
|
1840
|
+
var BlurTokenTypedData = z85.object({
|
|
1841
|
+
type: z85.literal("Blur"),
|
|
1845
1842
|
data: BlurTokenData
|
|
1846
1843
|
});
|
|
1847
|
-
var ColorTokenTypedData =
|
|
1848
|
-
type:
|
|
1844
|
+
var ColorTokenTypedData = z85.object({
|
|
1845
|
+
type: z85.literal("Color"),
|
|
1849
1846
|
data: ColorTokenData
|
|
1850
1847
|
});
|
|
1851
|
-
var GradientTokenTypedData =
|
|
1852
|
-
type:
|
|
1848
|
+
var GradientTokenTypedData = z85.object({
|
|
1849
|
+
type: z85.literal("Gradient"),
|
|
1853
1850
|
data: GradientTokenData
|
|
1854
1851
|
});
|
|
1855
|
-
var OpacityTokenTypedData =
|
|
1856
|
-
type:
|
|
1852
|
+
var OpacityTokenTypedData = z85.object({
|
|
1853
|
+
type: z85.literal("Opacity"),
|
|
1857
1854
|
data: OpacityTokenData
|
|
1858
1855
|
});
|
|
1859
|
-
var ShadowTokenTypedData =
|
|
1860
|
-
type:
|
|
1856
|
+
var ShadowTokenTypedData = z85.object({
|
|
1857
|
+
type: z85.literal("Shadow"),
|
|
1861
1858
|
data: ShadowTokenData
|
|
1862
1859
|
});
|
|
1863
|
-
var TypographyTokenTypedData =
|
|
1864
|
-
type:
|
|
1860
|
+
var TypographyTokenTypedData = z85.object({
|
|
1861
|
+
type: z85.literal("Typography"),
|
|
1865
1862
|
data: TypographyTokenData
|
|
1866
1863
|
});
|
|
1867
|
-
var StringTokenTypedData =
|
|
1868
|
-
type:
|
|
1864
|
+
var StringTokenTypedData = z85.object({
|
|
1865
|
+
type: z85.literal("String"),
|
|
1869
1866
|
data: StringTokenData
|
|
1870
1867
|
});
|
|
1871
|
-
var DimensionTokenTypedData =
|
|
1872
|
-
type:
|
|
1868
|
+
var DimensionTokenTypedData = z85.object({
|
|
1869
|
+
type: z85.literal("Dimension"),
|
|
1873
1870
|
data: DimensionTokenData
|
|
1874
1871
|
});
|
|
1875
|
-
var FontSizeTokenTypedData =
|
|
1876
|
-
type:
|
|
1872
|
+
var FontSizeTokenTypedData = z85.object({
|
|
1873
|
+
type: z85.literal("FontSize"),
|
|
1877
1874
|
data: FontSizeTokenData
|
|
1878
1875
|
});
|
|
1879
|
-
var FontFamilyTokenTypedData =
|
|
1880
|
-
type:
|
|
1876
|
+
var FontFamilyTokenTypedData = z85.object({
|
|
1877
|
+
type: z85.literal("FontFamily"),
|
|
1881
1878
|
data: FontFamilyTokenData
|
|
1882
1879
|
});
|
|
1883
|
-
var FontWeightTokenTypedData =
|
|
1884
|
-
type:
|
|
1880
|
+
var FontWeightTokenTypedData = z85.object({
|
|
1881
|
+
type: z85.literal("FontWeight"),
|
|
1885
1882
|
data: FontWeightTokenData
|
|
1886
1883
|
});
|
|
1887
|
-
var LetterSpacingTokenTypedData =
|
|
1888
|
-
type:
|
|
1884
|
+
var LetterSpacingTokenTypedData = z85.object({
|
|
1885
|
+
type: z85.literal("LetterSpacing"),
|
|
1889
1886
|
data: LetterSpacingTokenData
|
|
1890
1887
|
});
|
|
1891
|
-
var LineHeightTokenTypedData =
|
|
1892
|
-
type:
|
|
1888
|
+
var LineHeightTokenTypedData = z85.object({
|
|
1889
|
+
type: z85.literal("LineHeight"),
|
|
1893
1890
|
data: LineHeightTokenData
|
|
1894
1891
|
});
|
|
1895
|
-
var ParagraphSpacingTokenTypedData =
|
|
1896
|
-
type:
|
|
1892
|
+
var ParagraphSpacingTokenTypedData = z85.object({
|
|
1893
|
+
type: z85.literal("ParagraphSpacing"),
|
|
1897
1894
|
data: ParagraphSpacingTokenData
|
|
1898
1895
|
});
|
|
1899
|
-
var TextCaseTokenTypedData =
|
|
1900
|
-
type:
|
|
1896
|
+
var TextCaseTokenTypedData = z85.object({
|
|
1897
|
+
type: z85.literal("TextCase"),
|
|
1901
1898
|
data: TextCaseTokenData
|
|
1902
1899
|
});
|
|
1903
|
-
var TextDecorationTokenTypedData =
|
|
1904
|
-
type:
|
|
1900
|
+
var TextDecorationTokenTypedData = z85.object({
|
|
1901
|
+
type: z85.literal("TextDecoration"),
|
|
1905
1902
|
data: TextDecorationTokenData
|
|
1906
1903
|
});
|
|
1907
|
-
var BorderRadiusTokenTypedData =
|
|
1908
|
-
type:
|
|
1904
|
+
var BorderRadiusTokenTypedData = z85.object({
|
|
1905
|
+
type: z85.literal("BorderRadius"),
|
|
1909
1906
|
data: BorderRadiusTokenData
|
|
1910
1907
|
});
|
|
1911
|
-
var BorderWidthTokenTypedData =
|
|
1912
|
-
type:
|
|
1908
|
+
var BorderWidthTokenTypedData = z85.object({
|
|
1909
|
+
type: z85.literal("BorderWidth"),
|
|
1913
1910
|
data: BorderWidthTokenData
|
|
1914
1911
|
});
|
|
1915
|
-
var BorderTypedData =
|
|
1916
|
-
type:
|
|
1912
|
+
var BorderTypedData = z85.object({
|
|
1913
|
+
type: z85.literal("Border"),
|
|
1917
1914
|
data: BorderTokenData
|
|
1918
1915
|
});
|
|
1919
|
-
var ProductCopyTypedData =
|
|
1920
|
-
type:
|
|
1916
|
+
var ProductCopyTypedData = z85.object({
|
|
1917
|
+
type: z85.literal("ProductCopy"),
|
|
1921
1918
|
data: ProductCopyTokenData
|
|
1922
1919
|
});
|
|
1923
|
-
var SizeTypedData =
|
|
1924
|
-
type:
|
|
1920
|
+
var SizeTypedData = z85.object({
|
|
1921
|
+
type: z85.literal("Size"),
|
|
1925
1922
|
data: SizeTokenData
|
|
1926
1923
|
});
|
|
1927
|
-
var SpaceTypedData =
|
|
1928
|
-
type:
|
|
1924
|
+
var SpaceTypedData = z85.object({
|
|
1925
|
+
type: z85.literal("Space"),
|
|
1929
1926
|
data: SpaceTokenData
|
|
1930
1927
|
});
|
|
1931
|
-
var VisibilityTypedData =
|
|
1932
|
-
type:
|
|
1928
|
+
var VisibilityTypedData = z85.object({
|
|
1929
|
+
type: z85.literal("Visibility"),
|
|
1933
1930
|
data: VisibilityTokenData
|
|
1934
1931
|
});
|
|
1935
|
-
var ZIndexTypedData =
|
|
1936
|
-
type:
|
|
1932
|
+
var ZIndexTypedData = z85.object({
|
|
1933
|
+
type: z85.literal("ZIndex"),
|
|
1937
1934
|
data: ZIndexTokenData
|
|
1938
1935
|
});
|
|
1939
|
-
var DurationTypedData =
|
|
1940
|
-
type:
|
|
1936
|
+
var DurationTypedData = z85.object({
|
|
1937
|
+
type: z85.literal("Duration"),
|
|
1941
1938
|
data: DurationTokenData
|
|
1942
1939
|
});
|
|
1943
|
-
var FontTypedData =
|
|
1944
|
-
type:
|
|
1945
|
-
data:
|
|
1940
|
+
var FontTypedData = z85.object({
|
|
1941
|
+
type: z85.literal("Font"),
|
|
1942
|
+
data: z85.record(z85.any())
|
|
1946
1943
|
});
|
|
1947
|
-
var DesignTokenTypedData =
|
|
1944
|
+
var DesignTokenTypedData = z85.discriminatedUnion("type", [
|
|
1948
1945
|
BlurTokenTypedData,
|
|
1949
1946
|
BorderRadiusTokenTypedData,
|
|
1950
1947
|
BorderWidthTokenTypedData,
|
|
@@ -1994,32 +1991,32 @@ function designTokenTypeFilter(type) {
|
|
|
1994
1991
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1995
1992
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1996
1993
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1997
|
-
|
|
1998
|
-
tokenPersistentId:
|
|
1994
|
+
z86.object({
|
|
1995
|
+
tokenPersistentId: z86.string(),
|
|
1999
1996
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
2000
1997
|
})
|
|
2001
1998
|
);
|
|
2002
|
-
var ThemeElementData =
|
|
2003
|
-
value:
|
|
2004
|
-
overrides:
|
|
1999
|
+
var ThemeElementData = z86.object({
|
|
2000
|
+
value: z86.object({
|
|
2001
|
+
overrides: z86.array(ThemeOverride)
|
|
2005
2002
|
})
|
|
2006
2003
|
});
|
|
2007
|
-
var ThemeOriginPart =
|
|
2008
|
-
var ThemeOriginObject =
|
|
2009
|
-
id:
|
|
2010
|
-
name:
|
|
2004
|
+
var ThemeOriginPart = z86.object({});
|
|
2005
|
+
var ThemeOriginObject = z86.object({
|
|
2006
|
+
id: z86.string(),
|
|
2007
|
+
name: z86.string()
|
|
2011
2008
|
});
|
|
2012
|
-
var ThemeOriginSource =
|
|
2013
|
-
sourceId:
|
|
2014
|
-
sourceObjects:
|
|
2009
|
+
var ThemeOriginSource = z86.object({
|
|
2010
|
+
sourceId: z86.string(),
|
|
2011
|
+
sourceObjects: z86.array(ThemeOriginObject)
|
|
2015
2012
|
});
|
|
2016
|
-
var ThemeOrigin =
|
|
2017
|
-
sources:
|
|
2013
|
+
var ThemeOrigin = z86.object({
|
|
2014
|
+
sources: z86.array(ThemeOriginSource)
|
|
2018
2015
|
});
|
|
2019
2016
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
2020
2017
|
origin: ThemeOrigin.optional(),
|
|
2021
|
-
overrides:
|
|
2022
|
-
codeName:
|
|
2018
|
+
overrides: z86.array(ThemeOverride),
|
|
2019
|
+
codeName: z86.string()
|
|
2023
2020
|
});
|
|
2024
2021
|
|
|
2025
2022
|
// src/dsm/elements/utils.ts
|
|
@@ -2089,25 +2086,25 @@ var PageBlockDefinitionsMap = class {
|
|
|
2089
2086
|
};
|
|
2090
2087
|
|
|
2091
2088
|
// src/dsm/import/support/figma-files.ts
|
|
2092
|
-
import { z as
|
|
2093
|
-
var FigmaFileDownloadScope =
|
|
2094
|
-
styles:
|
|
2095
|
-
components:
|
|
2096
|
-
currentVersion:
|
|
2097
|
-
publishedVersion:
|
|
2098
|
-
downloadChunkSize:
|
|
2099
|
-
maxFileDepth:
|
|
2089
|
+
import { z as z87 } from "zod";
|
|
2090
|
+
var FigmaFileDownloadScope = z87.object({
|
|
2091
|
+
styles: z87.boolean(),
|
|
2092
|
+
components: z87.boolean(),
|
|
2093
|
+
currentVersion: z87.literal("__latest__").nullable(),
|
|
2094
|
+
publishedVersion: z87.string().nullable(),
|
|
2095
|
+
downloadChunkSize: z87.number().optional(),
|
|
2096
|
+
maxFileDepth: z87.number().optional()
|
|
2100
2097
|
});
|
|
2101
|
-
var FigmaFileAccessData =
|
|
2102
|
-
accessToken:
|
|
2098
|
+
var FigmaFileAccessData = z87.object({
|
|
2099
|
+
accessToken: z87.string()
|
|
2103
2100
|
});
|
|
2104
2101
|
|
|
2105
2102
|
// src/dsm/import/support/import-context.ts
|
|
2106
|
-
import { z as
|
|
2103
|
+
import { z as z89 } from "zod";
|
|
2107
2104
|
|
|
2108
2105
|
// src/dsm/import/warning.ts
|
|
2109
|
-
import { z as
|
|
2110
|
-
var ImportWarningType =
|
|
2106
|
+
import { z as z88 } from "zod";
|
|
2107
|
+
var ImportWarningType = z88.enum([
|
|
2111
2108
|
"NoVersionFound",
|
|
2112
2109
|
"UnsupportedFill",
|
|
2113
2110
|
"UnsupportedStroke",
|
|
@@ -2122,49 +2119,49 @@ var ImportWarningType = z89.enum([
|
|
|
2122
2119
|
"DuplicateImportedStylePath",
|
|
2123
2120
|
"NoUnpublishedStyles"
|
|
2124
2121
|
]);
|
|
2125
|
-
var ImportWarning =
|
|
2122
|
+
var ImportWarning = z88.object({
|
|
2126
2123
|
warningType: ImportWarningType,
|
|
2127
|
-
componentId:
|
|
2128
|
-
componentName:
|
|
2129
|
-
styleId:
|
|
2130
|
-
styleName:
|
|
2131
|
-
unsupportedStyleValueType:
|
|
2124
|
+
componentId: z88.string().optional(),
|
|
2125
|
+
componentName: z88.string().optional(),
|
|
2126
|
+
styleId: z88.string().optional(),
|
|
2127
|
+
styleName: z88.string().optional(),
|
|
2128
|
+
unsupportedStyleValueType: z88.string().optional()
|
|
2132
2129
|
});
|
|
2133
2130
|
|
|
2134
2131
|
// src/dsm/import/support/import-context.ts
|
|
2135
|
-
var ImportFunctionInput =
|
|
2136
|
-
importJobId:
|
|
2137
|
-
importContextId:
|
|
2138
|
-
designSystemId:
|
|
2132
|
+
var ImportFunctionInput = z89.object({
|
|
2133
|
+
importJobId: z89.string(),
|
|
2134
|
+
importContextId: z89.string(),
|
|
2135
|
+
designSystemId: z89.string().optional()
|
|
2139
2136
|
});
|
|
2140
|
-
var ImportedFigmaSourceData =
|
|
2141
|
-
sourceId:
|
|
2137
|
+
var ImportedFigmaSourceData = z89.object({
|
|
2138
|
+
sourceId: z89.string(),
|
|
2142
2139
|
figmaRemote: DataSourceFigmaRemote
|
|
2143
2140
|
});
|
|
2144
|
-
var FigmaImportBaseContext =
|
|
2145
|
-
designSystemId:
|
|
2141
|
+
var FigmaImportBaseContext = z89.object({
|
|
2142
|
+
designSystemId: z89.string(),
|
|
2146
2143
|
/**
|
|
2147
2144
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2148
2145
|
* mentioned in the `importedSourceDataBySourceId`
|
|
2149
2146
|
*
|
|
2150
2147
|
* fileId: file data
|
|
2151
2148
|
*/
|
|
2152
|
-
fileAccessByFileId:
|
|
2149
|
+
fileAccessByFileId: z89.record(FigmaFileAccessData),
|
|
2153
2150
|
/**
|
|
2154
2151
|
* Figma source data for which import was requested
|
|
2155
2152
|
*
|
|
2156
2153
|
* sourceId: source data
|
|
2157
2154
|
*/
|
|
2158
|
-
importedSourceDataBySourceId:
|
|
2155
|
+
importedSourceDataBySourceId: z89.record(ImportedFigmaSourceData),
|
|
2159
2156
|
/**
|
|
2160
2157
|
* Array of warnings that will be written into the import result summary at the end
|
|
2161
2158
|
* of import job execution and displayed by the client.
|
|
2162
2159
|
*/
|
|
2163
|
-
importWarnings:
|
|
2160
|
+
importWarnings: z89.record(ImportWarning.array()).default({})
|
|
2164
2161
|
});
|
|
2165
2162
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2166
|
-
sourcesWithMissingAccess:
|
|
2167
|
-
shadowOpacityOptional:
|
|
2163
|
+
sourcesWithMissingAccess: z89.array(z89.string()).default([]),
|
|
2164
|
+
shadowOpacityOptional: z89.boolean().default(false)
|
|
2168
2165
|
});
|
|
2169
2166
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2170
2167
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -2176,79 +2173,79 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
2176
2173
|
*
|
|
2177
2174
|
* File id -> file download scope
|
|
2178
2175
|
*/
|
|
2179
|
-
fileDownloadScopesByFileId:
|
|
2176
|
+
fileDownloadScopesByFileId: z89.record(FigmaFileDownloadScope),
|
|
2180
2177
|
/**
|
|
2181
2178
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2182
2179
|
* imported again.
|
|
2183
2180
|
*
|
|
2184
2181
|
* Source id -> import metadata
|
|
2185
2182
|
*/
|
|
2186
|
-
changedImportedSourceDataBySourceId:
|
|
2183
|
+
changedImportedSourceDataBySourceId: z89.record(ChangedImportedFigmaSourceData)
|
|
2187
2184
|
});
|
|
2188
2185
|
|
|
2189
2186
|
// src/dsm/import/support/import-model-collections.ts
|
|
2190
|
-
import { z as
|
|
2187
|
+
import { z as z97 } from "zod";
|
|
2191
2188
|
|
|
2192
2189
|
// src/dsm/import/image.ts
|
|
2193
|
-
import { z as
|
|
2194
|
-
var ImageImportModelType =
|
|
2195
|
-
var ImageImportModelBase =
|
|
2190
|
+
import { z as z90 } from "zod";
|
|
2191
|
+
var ImageImportModelType = z90.enum(["Url", "FigmaRender"]);
|
|
2192
|
+
var ImageImportModelBase = z90.object({
|
|
2196
2193
|
scope: AssetScope
|
|
2197
2194
|
});
|
|
2198
2195
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2199
|
-
type:
|
|
2200
|
-
url:
|
|
2201
|
-
originKey:
|
|
2202
|
-
extension:
|
|
2196
|
+
type: z90.literal(ImageImportModelType.enum.Url),
|
|
2197
|
+
url: z90.string(),
|
|
2198
|
+
originKey: z90.string(),
|
|
2199
|
+
extension: z90.string()
|
|
2203
2200
|
});
|
|
2204
|
-
var FigmaRenderFormat =
|
|
2201
|
+
var FigmaRenderFormat = z90.enum(["Svg", "Png"]);
|
|
2205
2202
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2206
|
-
type:
|
|
2207
|
-
fileId:
|
|
2208
|
-
fileVersionId:
|
|
2209
|
-
nodeId:
|
|
2210
|
-
originKey:
|
|
2203
|
+
type: z90.literal(ImageImportModelType.enum.FigmaRender),
|
|
2204
|
+
fileId: z90.string(),
|
|
2205
|
+
fileVersionId: z90.string().optional(),
|
|
2206
|
+
nodeId: z90.string(),
|
|
2207
|
+
originKey: z90.string()
|
|
2211
2208
|
});
|
|
2212
2209
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2213
|
-
format:
|
|
2214
|
-
scale:
|
|
2210
|
+
format: z90.literal(FigmaRenderFormat.enum.Png),
|
|
2211
|
+
scale: z90.number()
|
|
2215
2212
|
});
|
|
2216
2213
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2217
|
-
format:
|
|
2214
|
+
format: z90.literal(FigmaRenderFormat.enum.Svg)
|
|
2218
2215
|
});
|
|
2219
|
-
var FigmaRenderImportModel =
|
|
2216
|
+
var FigmaRenderImportModel = z90.discriminatedUnion("format", [
|
|
2220
2217
|
FigmaPngRenderImportModel,
|
|
2221
2218
|
FigmaSvgRenderImportModel
|
|
2222
2219
|
]);
|
|
2223
|
-
var ImageImportModel =
|
|
2220
|
+
var ImageImportModel = z90.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2224
2221
|
|
|
2225
2222
|
// src/dsm/import/component.ts
|
|
2226
|
-
import { z as
|
|
2223
|
+
import { z as z92 } from "zod";
|
|
2227
2224
|
|
|
2228
2225
|
// src/dsm/import/base.ts
|
|
2229
|
-
import { z as
|
|
2230
|
-
var ImportModelBase =
|
|
2231
|
-
id:
|
|
2226
|
+
import { z as z91 } from "zod";
|
|
2227
|
+
var ImportModelBase = z91.object({
|
|
2228
|
+
id: z91.string(),
|
|
2232
2229
|
meta: ObjectMeta,
|
|
2233
2230
|
origin: DesignElementOrigin,
|
|
2234
|
-
brandPersistentId:
|
|
2235
|
-
sortOrder:
|
|
2231
|
+
brandPersistentId: z91.string(),
|
|
2232
|
+
sortOrder: z91.number()
|
|
2236
2233
|
});
|
|
2237
2234
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
2238
2235
|
brandPersistentId: true,
|
|
2239
2236
|
origin: true,
|
|
2240
2237
|
sortOrder: true
|
|
2241
2238
|
}).extend({
|
|
2242
|
-
originId:
|
|
2243
|
-
originMetadata:
|
|
2239
|
+
originId: z91.string(),
|
|
2240
|
+
originMetadata: z91.record(z91.any())
|
|
2244
2241
|
});
|
|
2245
2242
|
|
|
2246
2243
|
// src/dsm/import/component.ts
|
|
2247
|
-
var ComponentImportModelPart =
|
|
2244
|
+
var ComponentImportModelPart = z92.object({
|
|
2248
2245
|
thumbnail: ImageImportModel
|
|
2249
2246
|
});
|
|
2250
2247
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2251
|
-
isAsset:
|
|
2248
|
+
isAsset: z92.boolean(),
|
|
2252
2249
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
2253
2250
|
origin: ComponentOrigin
|
|
2254
2251
|
});
|
|
@@ -2261,49 +2258,49 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
2261
2258
|
});
|
|
2262
2259
|
|
|
2263
2260
|
// src/dsm/import/theme.ts
|
|
2264
|
-
import { z as
|
|
2261
|
+
import { z as z93 } from "zod";
|
|
2265
2262
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2266
|
-
|
|
2267
|
-
id:
|
|
2263
|
+
z93.object({
|
|
2264
|
+
id: z93.string(),
|
|
2268
2265
|
meta: ObjectMeta
|
|
2269
2266
|
})
|
|
2270
2267
|
);
|
|
2271
2268
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2272
|
-
|
|
2269
|
+
z93.object({
|
|
2273
2270
|
origin: ThemeOverrideOrigin
|
|
2274
2271
|
})
|
|
2275
2272
|
);
|
|
2276
2273
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2277
|
-
|
|
2278
|
-
originId:
|
|
2274
|
+
z93.object({
|
|
2275
|
+
originId: z93.string(),
|
|
2279
2276
|
originMetadata: ThemeOverrideOriginPart
|
|
2280
2277
|
})
|
|
2281
2278
|
);
|
|
2282
|
-
var ThemeImportModel =
|
|
2279
|
+
var ThemeImportModel = z93.object({
|
|
2283
2280
|
meta: ObjectMeta,
|
|
2284
|
-
brandPersistentId:
|
|
2281
|
+
brandPersistentId: z93.string(),
|
|
2285
2282
|
originSource: ThemeOriginSource,
|
|
2286
|
-
overrides:
|
|
2287
|
-
sortOrder:
|
|
2283
|
+
overrides: z93.array(ThemeOverrideImportModel),
|
|
2284
|
+
sortOrder: z93.number()
|
|
2288
2285
|
});
|
|
2289
|
-
var ThemeImportModelInput =
|
|
2286
|
+
var ThemeImportModelInput = z93.object({
|
|
2290
2287
|
meta: ObjectMeta,
|
|
2291
|
-
originObjects:
|
|
2292
|
-
overrides:
|
|
2288
|
+
originObjects: z93.array(ThemeOriginObject),
|
|
2289
|
+
overrides: z93.array(ThemeOverrideImportModelInput)
|
|
2293
2290
|
});
|
|
2294
|
-
var ThemeUpdateImportModel =
|
|
2295
|
-
themePersistentId:
|
|
2296
|
-
overrides:
|
|
2291
|
+
var ThemeUpdateImportModel = z93.object({
|
|
2292
|
+
themePersistentId: z93.string(),
|
|
2293
|
+
overrides: z93.array(ThemeOverrideImportModel)
|
|
2297
2294
|
});
|
|
2298
|
-
var ThemeUpdateImportModelInput =
|
|
2299
|
-
themePersistentId:
|
|
2300
|
-
overrides:
|
|
2295
|
+
var ThemeUpdateImportModelInput = z93.object({
|
|
2296
|
+
themePersistentId: z93.string(),
|
|
2297
|
+
overrides: z93.array(ThemeOverrideImportModelInput)
|
|
2301
2298
|
});
|
|
2302
2299
|
|
|
2303
2300
|
// src/dsm/import/tokens.ts
|
|
2304
|
-
import { z as
|
|
2305
|
-
var DesignTokenImportModelPart =
|
|
2306
|
-
collection:
|
|
2301
|
+
import { z as z94 } from "zod";
|
|
2302
|
+
var DesignTokenImportModelPart = z94.object({
|
|
2303
|
+
collection: z94.string().optional()
|
|
2307
2304
|
});
|
|
2308
2305
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2309
2306
|
origin: DesignTokenOrigin
|
|
@@ -2321,15 +2318,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
2321
2318
|
}
|
|
2322
2319
|
|
|
2323
2320
|
// src/dsm/import/figma-frames.ts
|
|
2324
|
-
import { z as
|
|
2321
|
+
import { z as z95 } from "zod";
|
|
2325
2322
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2326
2323
|
image: FigmaPngRenderImportModel
|
|
2327
2324
|
});
|
|
2328
2325
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2329
|
-
children:
|
|
2326
|
+
children: z95.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2330
2327
|
});
|
|
2331
|
-
var FigmaFileStructureImportModelPart =
|
|
2332
|
-
data:
|
|
2328
|
+
var FigmaFileStructureImportModelPart = z95.object({
|
|
2329
|
+
data: z95.object({
|
|
2333
2330
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
2334
2331
|
assetsInFile: FigmaFileStructureStatistics
|
|
2335
2332
|
})
|
|
@@ -2340,7 +2337,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
2340
2337
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2341
2338
|
FigmaFileStructureImportModelPart.shape
|
|
2342
2339
|
).extend({
|
|
2343
|
-
fileVersionId:
|
|
2340
|
+
fileVersionId: z95.string()
|
|
2344
2341
|
});
|
|
2345
2342
|
function figmaFileStructureImportModelToMap(root) {
|
|
2346
2343
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -2354,30 +2351,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
2354
2351
|
}
|
|
2355
2352
|
|
|
2356
2353
|
// src/dsm/import/data-source.ts
|
|
2357
|
-
import { z as
|
|
2358
|
-
var DataSourceImportModel =
|
|
2359
|
-
id:
|
|
2360
|
-
fileName:
|
|
2361
|
-
thumbnailUrl:
|
|
2354
|
+
import { z as z96 } from "zod";
|
|
2355
|
+
var DataSourceImportModel = z96.object({
|
|
2356
|
+
id: z96.string(),
|
|
2357
|
+
fileName: z96.string().optional(),
|
|
2358
|
+
thumbnailUrl: z96.string().optional()
|
|
2362
2359
|
});
|
|
2363
2360
|
|
|
2364
2361
|
// src/dsm/import/support/import-model-collections.ts
|
|
2365
|
-
var ImportModelInputCollection =
|
|
2362
|
+
var ImportModelInputCollection = z97.object({
|
|
2366
2363
|
source: DataSourceImportModel,
|
|
2367
|
-
tokens:
|
|
2368
|
-
components:
|
|
2369
|
-
assets:
|
|
2370
|
-
themeUpdates:
|
|
2371
|
-
themes:
|
|
2364
|
+
tokens: z97.array(DesignTokenImportModelInput).default([]),
|
|
2365
|
+
components: z97.array(ComponentImportModelInput).default([]),
|
|
2366
|
+
assets: z97.array(AssetImportModelInput).default([]),
|
|
2367
|
+
themeUpdates: z97.array(ThemeUpdateImportModelInput).default([]),
|
|
2368
|
+
themes: z97.array(ThemeImportModelInput).default([]),
|
|
2372
2369
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2373
2370
|
});
|
|
2374
|
-
var ImportModelCollection =
|
|
2375
|
-
sources:
|
|
2376
|
-
tokens:
|
|
2377
|
-
components:
|
|
2378
|
-
themeUpdates:
|
|
2379
|
-
themes:
|
|
2380
|
-
figmaFileStructures:
|
|
2371
|
+
var ImportModelCollection = z97.object({
|
|
2372
|
+
sources: z97.array(DataSourceImportModel),
|
|
2373
|
+
tokens: z97.array(DesignTokenImportModel).default([]),
|
|
2374
|
+
components: z97.array(ComponentImportModel).default([]),
|
|
2375
|
+
themeUpdates: z97.array(ThemeUpdateImportModel).default([]),
|
|
2376
|
+
themes: z97.array(ThemeImportModel).default([]),
|
|
2377
|
+
figmaFileStructures: z97.array(FigmaFileStructureImportModel)
|
|
2381
2378
|
});
|
|
2382
2379
|
function addImportModelCollections(lhs, rhs) {
|
|
2383
2380
|
return {
|
|
@@ -2391,17 +2388,17 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
2391
2388
|
}
|
|
2392
2389
|
|
|
2393
2390
|
// src/dsm/data-sources/import-summary.ts
|
|
2394
|
-
var FileStructureStats =
|
|
2391
|
+
var FileStructureStats = z98.object({
|
|
2395
2392
|
frames: zeroNumberByDefault2(),
|
|
2396
2393
|
components: zeroNumberByDefault2(),
|
|
2397
2394
|
componentSets: zeroNumberByDefault2()
|
|
2398
2395
|
});
|
|
2399
2396
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2400
2397
|
// Backward compatibility
|
|
2401
|
-
|
|
2398
|
+
z98.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2402
2399
|
);
|
|
2403
|
-
var SourceImportSummaryByTokenType =
|
|
2404
|
-
var SourceImportTokenSummary =
|
|
2400
|
+
var SourceImportSummaryByTokenType = z98.record(SourceImportSummaryByTokenTypeKey, z98.number());
|
|
2401
|
+
var SourceImportTokenSummary = z98.object({
|
|
2405
2402
|
tokensCreated: zeroNumberByDefault2(),
|
|
2406
2403
|
tokensUpdated: zeroNumberByDefault2(),
|
|
2407
2404
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -2409,7 +2406,7 @@ var SourceImportTokenSummary = z99.object({
|
|
|
2409
2406
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2410
2407
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2411
2408
|
});
|
|
2412
|
-
var SourceImportComponentSummary =
|
|
2409
|
+
var SourceImportComponentSummary = z98.object({
|
|
2413
2410
|
componentsCreated: zeroNumberByDefault2(),
|
|
2414
2411
|
componentsUpdated: zeroNumberByDefault2(),
|
|
2415
2412
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -2417,69 +2414,69 @@ var SourceImportComponentSummary = z99.object({
|
|
|
2417
2414
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
2418
2415
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
2419
2416
|
});
|
|
2420
|
-
var SourceImportFrameSummary =
|
|
2417
|
+
var SourceImportFrameSummary = z98.object({
|
|
2421
2418
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2422
|
-
invalidReferencesCount: nullishToOptional(
|
|
2423
|
-
});
|
|
2424
|
-
var SourceImportSummary =
|
|
2425
|
-
sourceId: nullishToOptional(
|
|
2426
|
-
brandId: nullishToOptional(
|
|
2427
|
-
versionId: nullishToOptional(
|
|
2428
|
-
error: nullishToOptional(
|
|
2429
|
-
isFailed:
|
|
2430
|
-
warnings:
|
|
2419
|
+
invalidReferencesCount: nullishToOptional(z98.number().optional())
|
|
2420
|
+
});
|
|
2421
|
+
var SourceImportSummary = z98.object({
|
|
2422
|
+
sourceId: nullishToOptional(z98.string()),
|
|
2423
|
+
brandId: nullishToOptional(z98.string()),
|
|
2424
|
+
versionId: nullishToOptional(z98.string()),
|
|
2425
|
+
error: nullishToOptional(z98.any()),
|
|
2426
|
+
isFailed: z98.boolean(),
|
|
2427
|
+
warnings: z98.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2431
2428
|
...SourceImportTokenSummary.shape,
|
|
2432
2429
|
...SourceImportComponentSummary.shape,
|
|
2433
2430
|
...FileStructureStats.shape
|
|
2434
2431
|
});
|
|
2435
2432
|
function zeroNumberByDefault2() {
|
|
2436
|
-
return
|
|
2433
|
+
return z98.number().nullish().transform((v) => v ?? 0);
|
|
2437
2434
|
}
|
|
2438
2435
|
|
|
2439
2436
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2440
|
-
import { z as
|
|
2441
|
-
var PageBlockDefinitionAppearance =
|
|
2442
|
-
isBordered:
|
|
2443
|
-
hasBackground:
|
|
2444
|
-
isEditorPresentationDifferent:
|
|
2445
|
-
showBlockHeaderInEditor:
|
|
2437
|
+
import { z as z99 } from "zod";
|
|
2438
|
+
var PageBlockDefinitionAppearance = z99.object({
|
|
2439
|
+
isBordered: z99.boolean().optional(),
|
|
2440
|
+
hasBackground: z99.boolean().optional(),
|
|
2441
|
+
isEditorPresentationDifferent: z99.boolean().optional(),
|
|
2442
|
+
showBlockHeaderInEditor: z99.boolean().optional()
|
|
2446
2443
|
});
|
|
2447
2444
|
|
|
2448
2445
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2449
|
-
import { z as
|
|
2446
|
+
import { z as z102 } from "zod";
|
|
2450
2447
|
|
|
2451
2448
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2452
|
-
import { z as
|
|
2449
|
+
import { z as z101 } from "zod";
|
|
2453
2450
|
|
|
2454
2451
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2455
|
-
import { z as
|
|
2456
|
-
var PageBlockDefinitionLayoutType =
|
|
2457
|
-
var PageBlockDefinitionLayoutGap =
|
|
2458
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2459
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2460
|
-
var PageBlockDefinitionLayoutBase =
|
|
2452
|
+
import { z as z100 } from "zod";
|
|
2453
|
+
var PageBlockDefinitionLayoutType = z100.enum(["Column", "Row"]);
|
|
2454
|
+
var PageBlockDefinitionLayoutGap = z100.enum(["Small", "Medium", "Large", "None"]);
|
|
2455
|
+
var PageBlockDefinitionLayoutAlign = z100.enum(["Start", "Center", "End"]);
|
|
2456
|
+
var PageBlockDefinitionLayoutResizing = z100.enum(["Fill", "Hug"]);
|
|
2457
|
+
var PageBlockDefinitionLayoutBase = z100.object({
|
|
2461
2458
|
type: PageBlockDefinitionLayoutType,
|
|
2462
2459
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2463
2460
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2464
2461
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2465
2462
|
});
|
|
2466
2463
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2467
|
-
children:
|
|
2468
|
-
});
|
|
2469
|
-
var PageBlockDefinitionVariant =
|
|
2470
|
-
id:
|
|
2471
|
-
name:
|
|
2472
|
-
image:
|
|
2473
|
-
description:
|
|
2474
|
-
documentationLink:
|
|
2464
|
+
children: z100.lazy(() => z100.array(PageBlockDefinitionLayout.or(z100.string())))
|
|
2465
|
+
});
|
|
2466
|
+
var PageBlockDefinitionVariant = z100.object({
|
|
2467
|
+
id: z100.string(),
|
|
2468
|
+
name: z100.string(),
|
|
2469
|
+
image: z100.string().optional(),
|
|
2470
|
+
description: z100.string().optional(),
|
|
2471
|
+
documentationLink: z100.string().optional(),
|
|
2475
2472
|
layout: PageBlockDefinitionLayout,
|
|
2476
|
-
maxColumns:
|
|
2477
|
-
defaultColumns:
|
|
2473
|
+
maxColumns: z100.number().optional(),
|
|
2474
|
+
defaultColumns: z100.number().optional(),
|
|
2478
2475
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2479
2476
|
});
|
|
2480
2477
|
|
|
2481
2478
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2482
|
-
var PageBlockDefinitionPropertyType =
|
|
2479
|
+
var PageBlockDefinitionPropertyType = z101.enum([
|
|
2483
2480
|
"RichText",
|
|
2484
2481
|
"MultiRichText",
|
|
2485
2482
|
"Text",
|
|
@@ -2506,7 +2503,7 @@ var PageBlockDefinitionPropertyType = z102.enum([
|
|
|
2506
2503
|
"Storybook",
|
|
2507
2504
|
"Color"
|
|
2508
2505
|
]);
|
|
2509
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2506
|
+
var PageBlockDefinitionRichTextPropertyStyle = z101.enum([
|
|
2510
2507
|
"Title1",
|
|
2511
2508
|
"Title2",
|
|
2512
2509
|
"Title3",
|
|
@@ -2516,8 +2513,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z102.enum([
|
|
|
2516
2513
|
"Callout",
|
|
2517
2514
|
"Default"
|
|
2518
2515
|
]);
|
|
2519
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2520
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2516
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z101.enum(["OL", "UL", "Default"]);
|
|
2517
|
+
var PageBlockDefinitionTextPropertyStyle = z101.enum([
|
|
2521
2518
|
"Title1",
|
|
2522
2519
|
"Title2",
|
|
2523
2520
|
"Title3",
|
|
@@ -2531,15 +2528,15 @@ var PageBlockDefinitionTextPropertyStyle = z102.enum([
|
|
|
2531
2528
|
"SmallSemibold",
|
|
2532
2529
|
"Custom"
|
|
2533
2530
|
]);
|
|
2534
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2535
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2536
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2531
|
+
var PageBlockDefinitionTextPropertyColor = z101.enum(["Neutral", "NeutralFaded"]);
|
|
2532
|
+
var PageBlockDefinitionBooleanPropertyStyle = z101.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2533
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z101.enum([
|
|
2537
2534
|
"SegmentedControl",
|
|
2538
2535
|
"ToggleButton",
|
|
2539
2536
|
"Select",
|
|
2540
2537
|
"Checkbox"
|
|
2541
2538
|
]);
|
|
2542
|
-
var PageBlockDefinitionSingleSelectPropertyColor =
|
|
2539
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z101.enum([
|
|
2543
2540
|
"Green",
|
|
2544
2541
|
"Red",
|
|
2545
2542
|
"Yellow",
|
|
@@ -2554,71 +2551,71 @@ var PageBlockDefinitionSingleSelectPropertyColor = z102.enum([
|
|
|
2554
2551
|
"Cyan",
|
|
2555
2552
|
"Fuchsia"
|
|
2556
2553
|
]);
|
|
2557
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2558
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2559
|
-
var PageBlockDefinitionImageWidth =
|
|
2560
|
-
var PageBlockDefinitionSelectChoice =
|
|
2561
|
-
value:
|
|
2562
|
-
name:
|
|
2563
|
-
icon:
|
|
2554
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z101.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2555
|
+
var PageBlockDefinitionImageAspectRatio = z101.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2556
|
+
var PageBlockDefinitionImageWidth = z101.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2557
|
+
var PageBlockDefinitionSelectChoice = z101.object({
|
|
2558
|
+
value: z101.string(),
|
|
2559
|
+
name: z101.string(),
|
|
2560
|
+
icon: z101.string().optional(),
|
|
2564
2561
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2565
2562
|
});
|
|
2566
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2567
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2563
|
+
var PageBlockDefinitionUntypedPropertyOptions = z101.record(z101.any());
|
|
2564
|
+
var PageBlockDefinitionRichTextOptions = z101.object({
|
|
2568
2565
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2569
2566
|
});
|
|
2570
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2567
|
+
var PageBlockDefinitionMutiRichTextOptions = z101.object({
|
|
2571
2568
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2572
2569
|
});
|
|
2573
|
-
var PageBlockDefinitionTextOptions =
|
|
2574
|
-
placeholder:
|
|
2575
|
-
defaultValue:
|
|
2570
|
+
var PageBlockDefinitionTextOptions = z101.object({
|
|
2571
|
+
placeholder: z101.string().optional(),
|
|
2572
|
+
defaultValue: z101.string().optional(),
|
|
2576
2573
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2577
2574
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
2578
2575
|
});
|
|
2579
|
-
var PageBlockDefinitionSelectOptions =
|
|
2576
|
+
var PageBlockDefinitionSelectOptions = z101.object({
|
|
2580
2577
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2581
|
-
defaultChoice:
|
|
2582
|
-
choices:
|
|
2578
|
+
defaultChoice: z101.string(),
|
|
2579
|
+
choices: z101.array(PageBlockDefinitionSelectChoice)
|
|
2583
2580
|
});
|
|
2584
|
-
var PageBlockDefinitionImageOptions =
|
|
2581
|
+
var PageBlockDefinitionImageOptions = z101.object({
|
|
2585
2582
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2586
2583
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2587
|
-
allowCaption:
|
|
2588
|
-
recommendation:
|
|
2584
|
+
allowCaption: z101.boolean().optional(),
|
|
2585
|
+
recommendation: z101.string().optional()
|
|
2589
2586
|
});
|
|
2590
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2591
|
-
defaultvalue:
|
|
2587
|
+
var PageBlockDefinitionBooleanOptions = z101.object({
|
|
2588
|
+
defaultvalue: z101.boolean().optional(),
|
|
2592
2589
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2593
2590
|
});
|
|
2594
|
-
var PageBlockDefinitionNumberOptions =
|
|
2595
|
-
defaultValue:
|
|
2596
|
-
min:
|
|
2597
|
-
max:
|
|
2598
|
-
step:
|
|
2599
|
-
placeholder:
|
|
2591
|
+
var PageBlockDefinitionNumberOptions = z101.object({
|
|
2592
|
+
defaultValue: z101.number(),
|
|
2593
|
+
min: z101.number().optional(),
|
|
2594
|
+
max: z101.number().optional(),
|
|
2595
|
+
step: z101.number().optional(),
|
|
2596
|
+
placeholder: z101.string().optional()
|
|
2600
2597
|
});
|
|
2601
|
-
var PageBlockDefinitionComponentOptions =
|
|
2602
|
-
renderLayoutAs:
|
|
2603
|
-
allowPropertySelection:
|
|
2598
|
+
var PageBlockDefinitionComponentOptions = z101.object({
|
|
2599
|
+
renderLayoutAs: z101.enum(["List", "Table"]).optional(),
|
|
2600
|
+
allowPropertySelection: z101.boolean().optional()
|
|
2604
2601
|
});
|
|
2605
|
-
var PageBlockDefinitionProperty =
|
|
2606
|
-
id:
|
|
2607
|
-
name:
|
|
2602
|
+
var PageBlockDefinitionProperty = z101.object({
|
|
2603
|
+
id: z101.string(),
|
|
2604
|
+
name: z101.string(),
|
|
2608
2605
|
type: PageBlockDefinitionPropertyType,
|
|
2609
|
-
description:
|
|
2606
|
+
description: z101.string().optional(),
|
|
2610
2607
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2611
|
-
variantOptions:
|
|
2608
|
+
variantOptions: z101.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2612
2609
|
});
|
|
2613
|
-
var PageBlockDefinitionItem =
|
|
2614
|
-
properties:
|
|
2610
|
+
var PageBlockDefinitionItem = z101.object({
|
|
2611
|
+
properties: z101.array(PageBlockDefinitionProperty),
|
|
2615
2612
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2616
|
-
variants:
|
|
2617
|
-
defaultVariantKey:
|
|
2613
|
+
variants: z101.array(PageBlockDefinitionVariant),
|
|
2614
|
+
defaultVariantKey: z101.string()
|
|
2618
2615
|
});
|
|
2619
2616
|
|
|
2620
2617
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2621
|
-
var PageBlockCategory =
|
|
2618
|
+
var PageBlockCategory = z102.enum([
|
|
2622
2619
|
"Text",
|
|
2623
2620
|
"Layout",
|
|
2624
2621
|
"Media",
|
|
@@ -2632,318 +2629,318 @@ var PageBlockCategory = z103.enum([
|
|
|
2632
2629
|
"Data",
|
|
2633
2630
|
"Other"
|
|
2634
2631
|
]);
|
|
2635
|
-
var PageBlockBehaviorDataType =
|
|
2636
|
-
var PageBlockBehaviorSelectionType =
|
|
2637
|
-
var PageBlockDefinitionBehavior =
|
|
2632
|
+
var PageBlockBehaviorDataType = z102.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2633
|
+
var PageBlockBehaviorSelectionType = z102.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2634
|
+
var PageBlockDefinitionBehavior = z102.object({
|
|
2638
2635
|
dataType: PageBlockBehaviorDataType,
|
|
2639
|
-
items:
|
|
2640
|
-
numberOfItems:
|
|
2641
|
-
allowLinks:
|
|
2642
|
-
newItemLabel:
|
|
2636
|
+
items: z102.object({
|
|
2637
|
+
numberOfItems: z102.number(),
|
|
2638
|
+
allowLinks: z102.boolean(),
|
|
2639
|
+
newItemLabel: z102.string().optional()
|
|
2643
2640
|
}).optional(),
|
|
2644
|
-
entities:
|
|
2641
|
+
entities: z102.object({
|
|
2645
2642
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2646
|
-
maxSelected:
|
|
2643
|
+
maxSelected: z102.number()
|
|
2647
2644
|
}).optional()
|
|
2648
2645
|
});
|
|
2649
|
-
var PageBlockDefinitionOnboarding =
|
|
2650
|
-
helpText:
|
|
2651
|
-
documentationLink:
|
|
2646
|
+
var PageBlockDefinitionOnboarding = z102.object({
|
|
2647
|
+
helpText: z102.string(),
|
|
2648
|
+
documentationLink: z102.string().optional()
|
|
2652
2649
|
});
|
|
2653
|
-
var PageBlockDefinition =
|
|
2654
|
-
id:
|
|
2655
|
-
name:
|
|
2656
|
-
description:
|
|
2650
|
+
var PageBlockDefinition = z102.object({
|
|
2651
|
+
id: z102.string(),
|
|
2652
|
+
name: z102.string(),
|
|
2653
|
+
description: z102.string(),
|
|
2657
2654
|
category: PageBlockCategory,
|
|
2658
|
-
icon:
|
|
2659
|
-
documentationLink:
|
|
2660
|
-
searchKeywords:
|
|
2655
|
+
icon: z102.string().optional(),
|
|
2656
|
+
documentationLink: z102.string().optional(),
|
|
2657
|
+
searchKeywords: z102.array(z102.string()).optional(),
|
|
2661
2658
|
item: PageBlockDefinitionItem,
|
|
2662
2659
|
behavior: PageBlockDefinitionBehavior,
|
|
2663
|
-
editorOptions:
|
|
2660
|
+
editorOptions: z102.object({
|
|
2664
2661
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2665
2662
|
}),
|
|
2666
2663
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2667
2664
|
});
|
|
2668
2665
|
|
|
2669
2666
|
// src/dsm/documentation/group.ts
|
|
2670
|
-
import { z as
|
|
2671
|
-
var DocumentationPageGroup =
|
|
2672
|
-
type:
|
|
2673
|
-
childType:
|
|
2674
|
-
id:
|
|
2675
|
-
persistentId:
|
|
2676
|
-
shortPersistentId:
|
|
2677
|
-
designSystemVersionId:
|
|
2678
|
-
parentPersistentId:
|
|
2679
|
-
sortOrder:
|
|
2680
|
-
title:
|
|
2681
|
-
slug:
|
|
2682
|
-
userSlug:
|
|
2683
|
-
createdAt:
|
|
2684
|
-
updatedAt:
|
|
2667
|
+
import { z as z103 } from "zod";
|
|
2668
|
+
var DocumentationPageGroup = z103.object({
|
|
2669
|
+
type: z103.literal("ElementGroup"),
|
|
2670
|
+
childType: z103.literal("DocumentationPage"),
|
|
2671
|
+
id: z103.string(),
|
|
2672
|
+
persistentId: z103.string(),
|
|
2673
|
+
shortPersistentId: z103.string(),
|
|
2674
|
+
designSystemVersionId: z103.string(),
|
|
2675
|
+
parentPersistentId: z103.string().nullish(),
|
|
2676
|
+
sortOrder: z103.number(),
|
|
2677
|
+
title: z103.string(),
|
|
2678
|
+
slug: z103.string(),
|
|
2679
|
+
userSlug: z103.string().nullish(),
|
|
2680
|
+
createdAt: z103.coerce.date(),
|
|
2681
|
+
updatedAt: z103.coerce.date()
|
|
2685
2682
|
});
|
|
2686
2683
|
|
|
2687
2684
|
// src/dsm/documentation/link-preview.ts
|
|
2688
|
-
import { z as
|
|
2689
|
-
var DocumentationLinkPreview =
|
|
2690
|
-
title:
|
|
2691
|
-
description:
|
|
2685
|
+
import { z as z104 } from "zod";
|
|
2686
|
+
var DocumentationLinkPreview = z104.object({
|
|
2687
|
+
title: z104.string().optional(),
|
|
2688
|
+
description: z104.string().optional(),
|
|
2692
2689
|
thumbnail: PageBlockImageReference.optional()
|
|
2693
2690
|
});
|
|
2694
2691
|
|
|
2695
2692
|
// src/dsm/documentation/page-anchor.ts
|
|
2696
|
-
import { z as
|
|
2697
|
-
var DocumentationPageAnchor =
|
|
2698
|
-
blockId:
|
|
2699
|
-
level:
|
|
2700
|
-
text:
|
|
2693
|
+
import { z as z105 } from "zod";
|
|
2694
|
+
var DocumentationPageAnchor = z105.object({
|
|
2695
|
+
blockId: z105.string(),
|
|
2696
|
+
level: z105.number(),
|
|
2697
|
+
text: z105.string()
|
|
2701
2698
|
});
|
|
2702
2699
|
|
|
2703
2700
|
// src/dsm/documentation/page-content-backup.ts
|
|
2701
|
+
import { z as z106 } from "zod";
|
|
2702
|
+
var DocumentationPageContentBackup = z106.object({
|
|
2703
|
+
id: z106.string(),
|
|
2704
|
+
designSystemVersionId: z106.string(),
|
|
2705
|
+
createdAt: z106.coerce.date(),
|
|
2706
|
+
updatedAt: z106.coerce.date(),
|
|
2707
|
+
documentationPageId: z106.string(),
|
|
2708
|
+
documentationPageName: z106.string(),
|
|
2709
|
+
storagePath: z106.string()
|
|
2710
|
+
});
|
|
2711
|
+
|
|
2712
|
+
// src/dsm/documentation/page-content.ts
|
|
2704
2713
|
import { z as z107 } from "zod";
|
|
2705
|
-
var
|
|
2714
|
+
var DocumentationPageContentItem = z107.discriminatedUnion("type", [
|
|
2715
|
+
PageBlockEditorModelV2,
|
|
2716
|
+
PageSectionEditorModelV2
|
|
2717
|
+
]);
|
|
2718
|
+
var DocumentationPageContentData = z107.object({
|
|
2719
|
+
items: z107.array(DocumentationPageContentItem)
|
|
2720
|
+
});
|
|
2721
|
+
var DocumentationPageContent = z107.object({
|
|
2706
2722
|
id: z107.string(),
|
|
2707
2723
|
designSystemVersionId: z107.string(),
|
|
2708
2724
|
createdAt: z107.coerce.date(),
|
|
2709
2725
|
updatedAt: z107.coerce.date(),
|
|
2710
2726
|
documentationPageId: z107.string(),
|
|
2711
|
-
|
|
2712
|
-
storagePath: z107.string()
|
|
2727
|
+
data: DocumentationPageContentData
|
|
2713
2728
|
});
|
|
2714
2729
|
|
|
2715
|
-
// src/dsm/documentation/page
|
|
2730
|
+
// src/dsm/documentation/page.ts
|
|
2716
2731
|
import { z as z108 } from "zod";
|
|
2717
|
-
var
|
|
2718
|
-
|
|
2719
|
-
PageSectionEditorModelV2
|
|
2720
|
-
]);
|
|
2721
|
-
var DocumentationPageContentData = z108.object({
|
|
2722
|
-
items: z108.array(DocumentationPageContentItem)
|
|
2723
|
-
});
|
|
2724
|
-
var DocumentationPageContent = z108.object({
|
|
2732
|
+
var DocumentationPage = z108.object({
|
|
2733
|
+
type: z108.literal("DocumentationPage"),
|
|
2725
2734
|
id: z108.string(),
|
|
2735
|
+
persistentId: z108.string(),
|
|
2736
|
+
shortPersistentId: z108.string(),
|
|
2726
2737
|
designSystemVersionId: z108.string(),
|
|
2738
|
+
parentPersistentId: z108.string().nullish(),
|
|
2739
|
+
sortOrder: z108.number(),
|
|
2740
|
+
title: z108.string(),
|
|
2741
|
+
slug: z108.string(),
|
|
2742
|
+
userSlug: z108.string().nullish(),
|
|
2727
2743
|
createdAt: z108.coerce.date(),
|
|
2728
|
-
updatedAt: z108.coerce.date()
|
|
2729
|
-
documentationPageId: z108.string(),
|
|
2730
|
-
data: DocumentationPageContentData
|
|
2744
|
+
updatedAt: z108.coerce.date()
|
|
2731
2745
|
});
|
|
2732
2746
|
|
|
2733
|
-
// src/dsm/documentation/
|
|
2747
|
+
// src/dsm/documentation/thread.ts
|
|
2734
2748
|
import { z as z109 } from "zod";
|
|
2735
|
-
var
|
|
2736
|
-
type: z109.literal("DocumentationPage"),
|
|
2749
|
+
var DocumentationComment = z109.object({
|
|
2737
2750
|
id: z109.string(),
|
|
2738
|
-
|
|
2739
|
-
|
|
2751
|
+
authorId: z109.string(),
|
|
2752
|
+
threadId: z109.string(),
|
|
2753
|
+
roomId: z109.string(),
|
|
2754
|
+
createdAt: z109.coerce.date(),
|
|
2755
|
+
editedAt: z109.coerce.date().optional(),
|
|
2756
|
+
deletedAt: z109.coerce.date().optional(),
|
|
2757
|
+
body: z109.string()
|
|
2758
|
+
});
|
|
2759
|
+
var DocumentationCommentThread = z109.object({
|
|
2760
|
+
id: z109.string(),
|
|
2761
|
+
roomId: z109.string(),
|
|
2762
|
+
pagePersistentId: z109.string(),
|
|
2763
|
+
brandId: z109.string(),
|
|
2740
2764
|
designSystemVersionId: z109.string(),
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
slug: z109.string(),
|
|
2745
|
-
userSlug: z109.string().nullish(),
|
|
2765
|
+
designSystemId: z109.string(),
|
|
2766
|
+
blockId: z109.string().optional(),
|
|
2767
|
+
resolved: z109.boolean(),
|
|
2746
2768
|
createdAt: z109.coerce.date(),
|
|
2747
2769
|
updatedAt: z109.coerce.date()
|
|
2748
2770
|
});
|
|
2749
2771
|
|
|
2750
|
-
// src/dsm/documentation/thread.ts
|
|
2751
|
-
import { z as z110 } from "zod";
|
|
2752
|
-
var DocumentationComment = z110.object({
|
|
2753
|
-
id: z110.string(),
|
|
2754
|
-
authorId: z110.string(),
|
|
2755
|
-
threadId: z110.string(),
|
|
2756
|
-
roomId: z110.string(),
|
|
2757
|
-
createdAt: z110.coerce.date(),
|
|
2758
|
-
editedAt: z110.coerce.date().optional(),
|
|
2759
|
-
deletedAt: z110.coerce.date().optional(),
|
|
2760
|
-
body: z110.string()
|
|
2761
|
-
});
|
|
2762
|
-
var DocumentationCommentThread = z110.object({
|
|
2763
|
-
id: z110.string(),
|
|
2764
|
-
roomId: z110.string(),
|
|
2765
|
-
pagePersistentId: z110.string(),
|
|
2766
|
-
brandId: z110.string(),
|
|
2767
|
-
designSystemVersionId: z110.string(),
|
|
2768
|
-
designSystemId: z110.string(),
|
|
2769
|
-
blockId: z110.string().optional(),
|
|
2770
|
-
resolved: z110.boolean(),
|
|
2771
|
-
createdAt: z110.coerce.date(),
|
|
2772
|
-
updatedAt: z110.coerce.date()
|
|
2773
|
-
});
|
|
2774
|
-
|
|
2775
2772
|
// src/dsm/views/column.ts
|
|
2776
|
-
import { z as
|
|
2777
|
-
var ElementViewBaseColumnType =
|
|
2778
|
-
var ElementViewColumnType =
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2773
|
+
import { z as z110 } from "zod";
|
|
2774
|
+
var ElementViewBaseColumnType = z110.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2775
|
+
var ElementViewColumnType = z110.union([
|
|
2776
|
+
z110.literal("BaseProperty"),
|
|
2777
|
+
z110.literal("PropertyDefinition"),
|
|
2778
|
+
z110.literal("Theme")
|
|
2782
2779
|
]);
|
|
2783
|
-
var ElementViewColumnSharedAttributes =
|
|
2784
|
-
id:
|
|
2785
|
-
persistentId:
|
|
2786
|
-
elementDataViewId:
|
|
2787
|
-
sortPosition:
|
|
2788
|
-
width:
|
|
2780
|
+
var ElementViewColumnSharedAttributes = z110.object({
|
|
2781
|
+
id: z110.string(),
|
|
2782
|
+
persistentId: z110.string(),
|
|
2783
|
+
elementDataViewId: z110.string(),
|
|
2784
|
+
sortPosition: z110.number(),
|
|
2785
|
+
width: z110.number()
|
|
2789
2786
|
});
|
|
2790
2787
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2791
|
-
type:
|
|
2788
|
+
type: z110.literal("BaseProperty"),
|
|
2792
2789
|
basePropertyType: ElementViewBaseColumnType
|
|
2793
2790
|
});
|
|
2794
2791
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2795
|
-
type:
|
|
2796
|
-
propertyDefinitionId:
|
|
2792
|
+
type: z110.literal("PropertyDefinition"),
|
|
2793
|
+
propertyDefinitionId: z110.string()
|
|
2797
2794
|
});
|
|
2798
2795
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2799
|
-
type:
|
|
2800
|
-
themeId:
|
|
2796
|
+
type: z110.literal("Theme"),
|
|
2797
|
+
themeId: z110.string()
|
|
2801
2798
|
});
|
|
2802
|
-
var ElementViewColumn =
|
|
2799
|
+
var ElementViewColumn = z110.discriminatedUnion("type", [
|
|
2803
2800
|
ElementViewBasePropertyColumn,
|
|
2804
2801
|
ElementViewPropertyDefinitionColumn,
|
|
2805
2802
|
ElementViewThemeColumn
|
|
2806
2803
|
]);
|
|
2807
2804
|
|
|
2808
2805
|
// src/dsm/views/view.ts
|
|
2809
|
-
import { z as
|
|
2810
|
-
var ElementView =
|
|
2811
|
-
id:
|
|
2812
|
-
persistentId:
|
|
2813
|
-
designSystemVersionId:
|
|
2814
|
-
name:
|
|
2815
|
-
description:
|
|
2806
|
+
import { z as z111 } from "zod";
|
|
2807
|
+
var ElementView = z111.object({
|
|
2808
|
+
id: z111.string(),
|
|
2809
|
+
persistentId: z111.string(),
|
|
2810
|
+
designSystemVersionId: z111.string(),
|
|
2811
|
+
name: z111.string(),
|
|
2812
|
+
description: z111.string(),
|
|
2816
2813
|
targetElementType: ElementPropertyTargetType,
|
|
2817
|
-
isDefault:
|
|
2814
|
+
isDefault: z111.boolean()
|
|
2818
2815
|
});
|
|
2819
2816
|
|
|
2820
2817
|
// src/dsm/brand.ts
|
|
2821
|
-
import { z as
|
|
2822
|
-
var Brand =
|
|
2823
|
-
id:
|
|
2824
|
-
designSystemVersionId:
|
|
2825
|
-
persistentId:
|
|
2826
|
-
name:
|
|
2827
|
-
description:
|
|
2818
|
+
import { z as z112 } from "zod";
|
|
2819
|
+
var Brand = z112.object({
|
|
2820
|
+
id: z112.string(),
|
|
2821
|
+
designSystemVersionId: z112.string(),
|
|
2822
|
+
persistentId: z112.string(),
|
|
2823
|
+
name: z112.string(),
|
|
2824
|
+
description: z112.string()
|
|
2828
2825
|
});
|
|
2829
2826
|
|
|
2830
2827
|
// src/dsm/design-system.ts
|
|
2831
|
-
import { z as
|
|
2828
|
+
import { z as z123 } from "zod";
|
|
2832
2829
|
|
|
2833
2830
|
// src/workspace/npm-registry-settings.ts
|
|
2834
|
-
import { z as
|
|
2835
|
-
var NpmRegistryAuthType =
|
|
2836
|
-
var NpmRegistryType =
|
|
2837
|
-
var NpmRegistryBasicAuthConfig =
|
|
2838
|
-
authType:
|
|
2839
|
-
username:
|
|
2840
|
-
password:
|
|
2841
|
-
});
|
|
2842
|
-
var NpmRegistryBearerAuthConfig =
|
|
2843
|
-
authType:
|
|
2844
|
-
accessToken:
|
|
2845
|
-
});
|
|
2846
|
-
var NpmRegistryNoAuthConfig =
|
|
2847
|
-
authType:
|
|
2848
|
-
});
|
|
2849
|
-
var NpmRegistrCustomAuthConfig =
|
|
2850
|
-
authType:
|
|
2851
|
-
authHeaderName:
|
|
2852
|
-
authHeaderValue:
|
|
2853
|
-
});
|
|
2854
|
-
var NpmRegistryAuthConfig =
|
|
2831
|
+
import { z as z113 } from "zod";
|
|
2832
|
+
var NpmRegistryAuthType = z113.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2833
|
+
var NpmRegistryType = z113.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2834
|
+
var NpmRegistryBasicAuthConfig = z113.object({
|
|
2835
|
+
authType: z113.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2836
|
+
username: z113.string(),
|
|
2837
|
+
password: z113.string()
|
|
2838
|
+
});
|
|
2839
|
+
var NpmRegistryBearerAuthConfig = z113.object({
|
|
2840
|
+
authType: z113.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2841
|
+
accessToken: z113.string()
|
|
2842
|
+
});
|
|
2843
|
+
var NpmRegistryNoAuthConfig = z113.object({
|
|
2844
|
+
authType: z113.literal(NpmRegistryAuthType.Enum.None)
|
|
2845
|
+
});
|
|
2846
|
+
var NpmRegistrCustomAuthConfig = z113.object({
|
|
2847
|
+
authType: z113.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2848
|
+
authHeaderName: z113.string(),
|
|
2849
|
+
authHeaderValue: z113.string()
|
|
2850
|
+
});
|
|
2851
|
+
var NpmRegistryAuthConfig = z113.discriminatedUnion("authType", [
|
|
2855
2852
|
NpmRegistryBasicAuthConfig,
|
|
2856
2853
|
NpmRegistryBearerAuthConfig,
|
|
2857
2854
|
NpmRegistryNoAuthConfig,
|
|
2858
2855
|
NpmRegistrCustomAuthConfig
|
|
2859
2856
|
]);
|
|
2860
|
-
var NpmRegistryConfigBase =
|
|
2857
|
+
var NpmRegistryConfigBase = z113.object({
|
|
2861
2858
|
registryType: NpmRegistryType,
|
|
2862
|
-
enabledScopes:
|
|
2863
|
-
customRegistryUrl:
|
|
2864
|
-
bypassProxy:
|
|
2865
|
-
npmProxyRegistryConfigId:
|
|
2866
|
-
npmProxyVersion:
|
|
2859
|
+
enabledScopes: z113.array(z113.string()),
|
|
2860
|
+
customRegistryUrl: z113.string().optional(),
|
|
2861
|
+
bypassProxy: z113.boolean().default(false),
|
|
2862
|
+
npmProxyRegistryConfigId: z113.string().optional(),
|
|
2863
|
+
npmProxyVersion: z113.number().optional()
|
|
2867
2864
|
});
|
|
2868
2865
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2869
2866
|
|
|
2870
2867
|
// src/workspace/sso-provider.ts
|
|
2871
|
-
import { z as
|
|
2872
|
-
var SsoProvider =
|
|
2873
|
-
providerId:
|
|
2874
|
-
defaultAutoInviteValue:
|
|
2875
|
-
autoInviteDomains:
|
|
2876
|
-
skipDocsSupernovaLogin:
|
|
2877
|
-
areInvitesDisabled:
|
|
2878
|
-
isTestMode:
|
|
2879
|
-
emailDomains:
|
|
2880
|
-
metadataXml:
|
|
2868
|
+
import { z as z114 } from "zod";
|
|
2869
|
+
var SsoProvider = z114.object({
|
|
2870
|
+
providerId: z114.string(),
|
|
2871
|
+
defaultAutoInviteValue: z114.boolean(),
|
|
2872
|
+
autoInviteDomains: z114.record(z114.string(), z114.boolean()),
|
|
2873
|
+
skipDocsSupernovaLogin: z114.boolean(),
|
|
2874
|
+
areInvitesDisabled: z114.boolean(),
|
|
2875
|
+
isTestMode: z114.boolean(),
|
|
2876
|
+
emailDomains: z114.array(z114.string()),
|
|
2877
|
+
metadataXml: z114.string().nullish()
|
|
2881
2878
|
});
|
|
2882
2879
|
|
|
2883
2880
|
// src/workspace/user-invite.ts
|
|
2884
|
-
import { z as
|
|
2881
|
+
import { z as z116 } from "zod";
|
|
2885
2882
|
|
|
2886
2883
|
// src/workspace/workspace-role.ts
|
|
2887
|
-
import { z as
|
|
2888
|
-
var WorkspaceRoleSchema =
|
|
2884
|
+
import { z as z115 } from "zod";
|
|
2885
|
+
var WorkspaceRoleSchema = z115.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2889
2886
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2890
2887
|
|
|
2891
2888
|
// src/workspace/user-invite.ts
|
|
2892
2889
|
var MAX_MEMBERS_COUNT = 100;
|
|
2893
|
-
var UserInvite =
|
|
2894
|
-
email:
|
|
2890
|
+
var UserInvite = z116.object({
|
|
2891
|
+
email: z116.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2895
2892
|
role: WorkspaceRoleSchema
|
|
2896
2893
|
});
|
|
2897
|
-
var UserInvites =
|
|
2894
|
+
var UserInvites = z116.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2898
2895
|
|
|
2899
2896
|
// src/workspace/workspace-configuration.ts
|
|
2900
|
-
import { z as
|
|
2897
|
+
import { z as z118 } from "zod";
|
|
2901
2898
|
|
|
2902
2899
|
// src/workspace/workspace.ts
|
|
2903
|
-
import { z as
|
|
2900
|
+
import { z as z117 } from "zod";
|
|
2904
2901
|
import IPCIDR from "ip-cidr";
|
|
2905
2902
|
var isValidCIDR = (value) => {
|
|
2906
2903
|
return IPCIDR.isValidAddress(value);
|
|
2907
2904
|
};
|
|
2908
|
-
var WorkspaceIpWhitelistEntry =
|
|
2909
|
-
isEnabled:
|
|
2910
|
-
name:
|
|
2911
|
-
range:
|
|
2905
|
+
var WorkspaceIpWhitelistEntry = z117.object({
|
|
2906
|
+
isEnabled: z117.boolean(),
|
|
2907
|
+
name: z117.string(),
|
|
2908
|
+
range: z117.string().refine(isValidCIDR, {
|
|
2912
2909
|
message: "Invalid IP CIDR"
|
|
2913
2910
|
})
|
|
2914
2911
|
});
|
|
2915
|
-
var WorkspaceIpSettings =
|
|
2916
|
-
isEnabledForCloud:
|
|
2917
|
-
isEnabledForDocs:
|
|
2918
|
-
entries:
|
|
2912
|
+
var WorkspaceIpSettings = z117.object({
|
|
2913
|
+
isEnabledForCloud: z117.boolean(),
|
|
2914
|
+
isEnabledForDocs: z117.boolean(),
|
|
2915
|
+
entries: z117.array(WorkspaceIpWhitelistEntry)
|
|
2919
2916
|
});
|
|
2920
|
-
var WorkspaceProfile =
|
|
2921
|
-
name:
|
|
2922
|
-
handle:
|
|
2923
|
-
color:
|
|
2924
|
-
avatar: nullishToOptional(
|
|
2917
|
+
var WorkspaceProfile = z117.object({
|
|
2918
|
+
name: z117.string(),
|
|
2919
|
+
handle: z117.string(),
|
|
2920
|
+
color: z117.string(),
|
|
2921
|
+
avatar: nullishToOptional(z117.string()),
|
|
2925
2922
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2926
2923
|
});
|
|
2927
2924
|
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
2928
2925
|
avatar: true
|
|
2929
2926
|
});
|
|
2930
|
-
var Workspace =
|
|
2931
|
-
id:
|
|
2927
|
+
var Workspace = z117.object({
|
|
2928
|
+
id: z117.string(),
|
|
2932
2929
|
profile: WorkspaceProfile,
|
|
2933
2930
|
subscription: Subscription,
|
|
2934
2931
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2935
2932
|
sso: nullishToOptional(SsoProvider),
|
|
2936
2933
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2937
|
-
designSystems:
|
|
2934
|
+
designSystems: z117.array(DesignSystem).nullish()
|
|
2938
2935
|
});
|
|
2939
|
-
var WorkspaceWithDesignSystems =
|
|
2936
|
+
var WorkspaceWithDesignSystems = z117.object({
|
|
2940
2937
|
workspace: Workspace,
|
|
2941
|
-
designSystems:
|
|
2938
|
+
designSystems: z117.array(DesignSystem)
|
|
2942
2939
|
});
|
|
2943
2940
|
|
|
2944
2941
|
// src/workspace/workspace-configuration.ts
|
|
2945
|
-
var WorkspaceConfigurationUpdate =
|
|
2946
|
-
id:
|
|
2942
|
+
var WorkspaceConfigurationUpdate = z118.object({
|
|
2943
|
+
id: z118.string(),
|
|
2947
2944
|
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
2948
2945
|
sso: SsoProvider.optional(),
|
|
2949
2946
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -2951,16 +2948,16 @@ var WorkspaceConfigurationUpdate = z119.object({
|
|
|
2951
2948
|
});
|
|
2952
2949
|
|
|
2953
2950
|
// src/workspace/workspace-context.ts
|
|
2954
|
-
import { z as
|
|
2955
|
-
var WorkspaceContext =
|
|
2956
|
-
workspaceId:
|
|
2951
|
+
import { z as z119 } from "zod";
|
|
2952
|
+
var WorkspaceContext = z119.object({
|
|
2953
|
+
workspaceId: z119.string(),
|
|
2957
2954
|
product: ProductCodeSchema,
|
|
2958
2955
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2959
|
-
publicDesignSystem:
|
|
2956
|
+
publicDesignSystem: z119.boolean().optional()
|
|
2960
2957
|
});
|
|
2961
2958
|
|
|
2962
2959
|
// src/workspace/workspace-create.ts
|
|
2963
|
-
import { z as
|
|
2960
|
+
import { z as z120 } from "zod";
|
|
2964
2961
|
|
|
2965
2962
|
// src/utils/validation.ts
|
|
2966
2963
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2970,18 +2967,18 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2970
2967
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2971
2968
|
var HANDLE_MIN_LENGTH = 2;
|
|
2972
2969
|
var HANDLE_MAX_LENGTH = 64;
|
|
2973
|
-
var CreateWorkspaceInput =
|
|
2974
|
-
name:
|
|
2970
|
+
var CreateWorkspaceInput = z120.object({
|
|
2971
|
+
name: z120.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2975
2972
|
product: ProductCodeSchema,
|
|
2976
|
-
priceId:
|
|
2977
|
-
billingEmail:
|
|
2978
|
-
handle:
|
|
2973
|
+
priceId: z120.string(),
|
|
2974
|
+
billingEmail: z120.string().email().optional(),
|
|
2975
|
+
handle: z120.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2979
2976
|
invites: UserInvites.optional(),
|
|
2980
|
-
promoCode:
|
|
2977
|
+
promoCode: z120.string().optional(),
|
|
2981
2978
|
status: InternalStatusSchema.optional(),
|
|
2982
2979
|
planInterval: BillingIntervalSchema.optional(),
|
|
2983
|
-
seats:
|
|
2984
|
-
seatLimit:
|
|
2980
|
+
seats: z120.number().optional(),
|
|
2981
|
+
seatLimit: z120.number().optional(),
|
|
2985
2982
|
card: CardSchema.optional(),
|
|
2986
2983
|
sso: SsoProvider.optional(),
|
|
2987
2984
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -2989,268 +2986,269 @@ var CreateWorkspaceInput = z121.object({
|
|
|
2989
2986
|
});
|
|
2990
2987
|
|
|
2991
2988
|
// src/workspace/workspace-invitations.ts
|
|
2992
|
-
import { z as
|
|
2993
|
-
var WorkspaceInvitation =
|
|
2994
|
-
id:
|
|
2995
|
-
email:
|
|
2996
|
-
createdAt:
|
|
2997
|
-
resentAt:
|
|
2998
|
-
role:
|
|
2999
|
-
workspaceId:
|
|
3000
|
-
invitedBy:
|
|
2989
|
+
import { z as z121 } from "zod";
|
|
2990
|
+
var WorkspaceInvitation = z121.object({
|
|
2991
|
+
id: z121.string(),
|
|
2992
|
+
email: z121.string().email(),
|
|
2993
|
+
createdAt: z121.coerce.date(),
|
|
2994
|
+
resentAt: z121.coerce.date().nullish(),
|
|
2995
|
+
role: z121.nativeEnum(WorkspaceRole),
|
|
2996
|
+
workspaceId: z121.string(),
|
|
2997
|
+
invitedBy: z121.string()
|
|
3001
2998
|
});
|
|
3002
2999
|
|
|
3003
3000
|
// src/workspace/workspace-membership.ts
|
|
3004
|
-
import { z as
|
|
3005
|
-
var WorkspaceMembership =
|
|
3006
|
-
id:
|
|
3007
|
-
userId:
|
|
3008
|
-
workspaceId:
|
|
3009
|
-
workspaceRole:
|
|
3001
|
+
import { z as z122 } from "zod";
|
|
3002
|
+
var WorkspaceMembership = z122.object({
|
|
3003
|
+
id: z122.string(),
|
|
3004
|
+
userId: z122.string(),
|
|
3005
|
+
workspaceId: z122.string(),
|
|
3006
|
+
workspaceRole: z122.nativeEnum(WorkspaceRole),
|
|
3010
3007
|
notificationSettings: UserNotificationSettings
|
|
3011
3008
|
});
|
|
3012
|
-
var UpdateMembershipRolesInput =
|
|
3013
|
-
members:
|
|
3014
|
-
|
|
3015
|
-
userId:
|
|
3016
|
-
role:
|
|
3009
|
+
var UpdateMembershipRolesInput = z122.object({
|
|
3010
|
+
members: z122.array(
|
|
3011
|
+
z122.object({
|
|
3012
|
+
userId: z122.string(),
|
|
3013
|
+
role: z122.nativeEnum(WorkspaceRole)
|
|
3017
3014
|
})
|
|
3018
3015
|
)
|
|
3019
3016
|
});
|
|
3020
3017
|
|
|
3021
3018
|
// src/dsm/design-system.ts
|
|
3022
|
-
var DesignSystemSwitcher =
|
|
3023
|
-
isEnabled:
|
|
3024
|
-
designSystemIds:
|
|
3019
|
+
var DesignSystemSwitcher = z123.object({
|
|
3020
|
+
isEnabled: z123.boolean(),
|
|
3021
|
+
designSystemIds: z123.array(z123.string())
|
|
3025
3022
|
});
|
|
3026
|
-
var DesignSystem =
|
|
3027
|
-
id:
|
|
3028
|
-
workspaceId:
|
|
3029
|
-
name:
|
|
3030
|
-
description:
|
|
3031
|
-
docExporterId: nullishToOptional(
|
|
3032
|
-
docSlug:
|
|
3033
|
-
docUserSlug: nullishToOptional(
|
|
3034
|
-
docSlugDeprecated:
|
|
3035
|
-
isPublic:
|
|
3036
|
-
isMultibrand:
|
|
3037
|
-
docViewUrl: nullishToOptional(
|
|
3038
|
-
basePrefixes:
|
|
3023
|
+
var DesignSystem = z123.object({
|
|
3024
|
+
id: z123.string(),
|
|
3025
|
+
workspaceId: z123.string(),
|
|
3026
|
+
name: z123.string(),
|
|
3027
|
+
description: z123.string(),
|
|
3028
|
+
docExporterId: nullishToOptional(z123.string()),
|
|
3029
|
+
docSlug: z123.string(),
|
|
3030
|
+
docUserSlug: nullishToOptional(z123.string()),
|
|
3031
|
+
docSlugDeprecated: z123.string(),
|
|
3032
|
+
isPublic: z123.boolean(),
|
|
3033
|
+
isMultibrand: z123.boolean(),
|
|
3034
|
+
docViewUrl: nullishToOptional(z123.string()),
|
|
3035
|
+
basePrefixes: z123.array(z123.string()),
|
|
3039
3036
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
3040
|
-
createdAt:
|
|
3041
|
-
updatedAt:
|
|
3037
|
+
createdAt: z123.coerce.date(),
|
|
3038
|
+
updatedAt: z123.coerce.date()
|
|
3042
3039
|
});
|
|
3043
|
-
var DesignSystemWithWorkspace =
|
|
3040
|
+
var DesignSystemWithWorkspace = z123.object({
|
|
3044
3041
|
designSystem: DesignSystem,
|
|
3045
3042
|
workspace: Workspace
|
|
3046
3043
|
});
|
|
3047
3044
|
|
|
3048
3045
|
// src/dsm/desing-system-create.ts
|
|
3049
|
-
import { z as
|
|
3046
|
+
import { z as z124 } from "zod";
|
|
3050
3047
|
var DS_NAME_MIN_LENGTH = 2;
|
|
3051
3048
|
var DS_NAME_MAX_LENGTH = 64;
|
|
3052
3049
|
var DS_DESC_MAX_LENGTH = 64;
|
|
3053
|
-
var DesignSystemCreateInputMetadata =
|
|
3054
|
-
name:
|
|
3055
|
-
description:
|
|
3050
|
+
var DesignSystemCreateInputMetadata = z124.object({
|
|
3051
|
+
name: z124.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
3052
|
+
description: z124.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
3056
3053
|
});
|
|
3057
|
-
var DesignSystemCreateInput =
|
|
3054
|
+
var DesignSystemCreateInput = z124.object({
|
|
3058
3055
|
meta: DesignSystemCreateInputMetadata,
|
|
3059
|
-
workspaceId:
|
|
3060
|
-
isPublic:
|
|
3061
|
-
basePrefixes:
|
|
3062
|
-
docUserSlug:
|
|
3063
|
-
source:
|
|
3056
|
+
workspaceId: z124.string(),
|
|
3057
|
+
isPublic: z124.boolean().optional(),
|
|
3058
|
+
basePrefixes: z124.array(z124.string()).optional(),
|
|
3059
|
+
docUserSlug: z124.string().nullish().optional(),
|
|
3060
|
+
source: z124.array(z124.string()).optional()
|
|
3064
3061
|
});
|
|
3065
3062
|
|
|
3066
3063
|
// src/dsm/desing-system-update.ts
|
|
3067
|
-
import { z as
|
|
3064
|
+
import { z as z125 } from "zod";
|
|
3068
3065
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
3069
3066
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
3070
3067
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
3071
|
-
var DesignSystemUpdateInputMetadata =
|
|
3072
|
-
name:
|
|
3073
|
-
description:
|
|
3068
|
+
var DesignSystemUpdateInputMetadata = z125.object({
|
|
3069
|
+
name: z125.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
3070
|
+
description: z125.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
3074
3071
|
});
|
|
3075
|
-
var DesignSystemUpdateInput =
|
|
3072
|
+
var DesignSystemUpdateInput = z125.object({
|
|
3076
3073
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
3077
|
-
workspaceId:
|
|
3078
|
-
isPublic:
|
|
3079
|
-
basePrefixes:
|
|
3080
|
-
docUserSlug:
|
|
3081
|
-
source:
|
|
3082
|
-
name:
|
|
3083
|
-
description:
|
|
3084
|
-
docExporterId:
|
|
3074
|
+
workspaceId: z125.string().optional(),
|
|
3075
|
+
isPublic: z125.boolean().optional(),
|
|
3076
|
+
basePrefixes: z125.array(z125.string()).optional(),
|
|
3077
|
+
docUserSlug: z125.string().nullish().optional(),
|
|
3078
|
+
source: z125.array(z125.string()).optional(),
|
|
3079
|
+
name: z125.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
3080
|
+
description: z125.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
3081
|
+
docExporterId: z125.string().optional()
|
|
3085
3082
|
});
|
|
3086
3083
|
|
|
3087
3084
|
// src/dsm/exporter-property-values-collection.ts
|
|
3088
|
-
import { z as
|
|
3089
|
-
var ExporterPropertyImageValue =
|
|
3085
|
+
import { z as z126 } from "zod";
|
|
3086
|
+
var ExporterPropertyImageValue = z126.object({
|
|
3090
3087
|
asset: PageBlockAsset.optional(),
|
|
3091
|
-
assetId:
|
|
3092
|
-
assetUrl:
|
|
3093
|
-
});
|
|
3094
|
-
var ExporterPropertyValue =
|
|
3095
|
-
key:
|
|
3096
|
-
value:
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3088
|
+
assetId: z126.string().optional(),
|
|
3089
|
+
assetUrl: z126.string().optional()
|
|
3090
|
+
});
|
|
3091
|
+
var ExporterPropertyValue = z126.object({
|
|
3092
|
+
key: z126.string(),
|
|
3093
|
+
value: z126.union([
|
|
3094
|
+
z126.number(),
|
|
3095
|
+
z126.string(),
|
|
3096
|
+
z126.boolean(),
|
|
3100
3097
|
ExporterPropertyImageValue,
|
|
3101
3098
|
ColorTokenData,
|
|
3102
3099
|
TypographyTokenData
|
|
3103
3100
|
])
|
|
3104
3101
|
});
|
|
3105
|
-
var ExporterPropertyValuesCollection =
|
|
3106
|
-
id:
|
|
3107
|
-
designSystemId:
|
|
3108
|
-
exporterId:
|
|
3109
|
-
values:
|
|
3102
|
+
var ExporterPropertyValuesCollection = z126.object({
|
|
3103
|
+
id: z126.string(),
|
|
3104
|
+
designSystemId: z126.string(),
|
|
3105
|
+
exporterId: z126.string(),
|
|
3106
|
+
values: z126.array(ExporterPropertyValue)
|
|
3110
3107
|
});
|
|
3111
3108
|
|
|
3112
3109
|
// src/dsm/published-doc-page.ts
|
|
3113
|
-
import { z as
|
|
3110
|
+
import { z as z127 } from "zod";
|
|
3114
3111
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
3115
3112
|
function tryParseShortPersistentId(url = "/") {
|
|
3116
3113
|
const lastUrlPart = url.split("/").pop() || "";
|
|
3117
3114
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
3118
3115
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
3119
3116
|
}
|
|
3120
|
-
var PublishedDocPage =
|
|
3121
|
-
id:
|
|
3122
|
-
publishedDocId:
|
|
3123
|
-
pageShortPersistentId:
|
|
3124
|
-
pathV1:
|
|
3125
|
-
pathV2:
|
|
3126
|
-
storagePath:
|
|
3127
|
-
locale:
|
|
3128
|
-
isPrivate:
|
|
3129
|
-
isHidden:
|
|
3130
|
-
createdAt:
|
|
3131
|
-
updatedAt:
|
|
3117
|
+
var PublishedDocPage = z127.object({
|
|
3118
|
+
id: z127.string(),
|
|
3119
|
+
publishedDocId: z127.string(),
|
|
3120
|
+
pageShortPersistentId: z127.string(),
|
|
3121
|
+
pathV1: z127.string(),
|
|
3122
|
+
pathV2: z127.string(),
|
|
3123
|
+
storagePath: z127.string(),
|
|
3124
|
+
locale: z127.string().optional(),
|
|
3125
|
+
isPrivate: z127.boolean(),
|
|
3126
|
+
isHidden: z127.boolean(),
|
|
3127
|
+
createdAt: z127.coerce.date(),
|
|
3128
|
+
updatedAt: z127.coerce.date()
|
|
3132
3129
|
});
|
|
3133
3130
|
|
|
3134
3131
|
// src/dsm/published-doc.ts
|
|
3135
|
-
import { z as
|
|
3132
|
+
import { z as z128 } from "zod";
|
|
3136
3133
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
3137
|
-
var PublishedDocEnvironment =
|
|
3138
|
-
var PublishedDocsChecksums =
|
|
3139
|
-
var PublishedDocRoutingVersion =
|
|
3140
|
-
var PublishedDoc =
|
|
3141
|
-
id:
|
|
3142
|
-
designSystemVersionId:
|
|
3143
|
-
createdAt:
|
|
3144
|
-
updatedAt:
|
|
3145
|
-
lastPublishedAt:
|
|
3146
|
-
isDefault:
|
|
3147
|
-
isPublic:
|
|
3134
|
+
var PublishedDocEnvironment = z128.enum(publishedDocEnvironments);
|
|
3135
|
+
var PublishedDocsChecksums = z128.record(z128.string());
|
|
3136
|
+
var PublishedDocRoutingVersion = z128.enum(["1", "2"]);
|
|
3137
|
+
var PublishedDoc = z128.object({
|
|
3138
|
+
id: z128.string(),
|
|
3139
|
+
designSystemVersionId: z128.string(),
|
|
3140
|
+
createdAt: z128.coerce.date(),
|
|
3141
|
+
updatedAt: z128.coerce.date(),
|
|
3142
|
+
lastPublishedAt: z128.coerce.date(),
|
|
3143
|
+
isDefault: z128.boolean(),
|
|
3144
|
+
isPublic: z128.boolean(),
|
|
3148
3145
|
environment: PublishedDocEnvironment,
|
|
3149
3146
|
checksums: PublishedDocsChecksums,
|
|
3150
|
-
storagePath:
|
|
3151
|
-
wasMigrated:
|
|
3147
|
+
storagePath: z128.string(),
|
|
3148
|
+
wasMigrated: z128.boolean(),
|
|
3152
3149
|
routingVersion: PublishedDocRoutingVersion,
|
|
3153
|
-
usesLocalizations:
|
|
3154
|
-
wasPublishedWithLocalizations:
|
|
3150
|
+
usesLocalizations: z128.boolean(),
|
|
3151
|
+
wasPublishedWithLocalizations: z128.boolean()
|
|
3155
3152
|
});
|
|
3156
3153
|
|
|
3157
3154
|
// src/dsm/version.ts
|
|
3158
|
-
import { z as
|
|
3159
|
-
var DesignSystemVersion =
|
|
3160
|
-
id:
|
|
3161
|
-
version:
|
|
3162
|
-
createdAt:
|
|
3163
|
-
designSystemId:
|
|
3164
|
-
name:
|
|
3165
|
-
comment:
|
|
3166
|
-
isReadonly:
|
|
3167
|
-
changeLog:
|
|
3168
|
-
parentId:
|
|
3169
|
-
});
|
|
3170
|
-
var VersionCreationJobStatus =
|
|
3171
|
-
var VersionCreationJob =
|
|
3172
|
-
id:
|
|
3173
|
-
version:
|
|
3174
|
-
designSystemId:
|
|
3175
|
-
designSystemVersionId: nullishToOptional(
|
|
3155
|
+
import { z as z129 } from "zod";
|
|
3156
|
+
var DesignSystemVersion = z129.object({
|
|
3157
|
+
id: z129.string(),
|
|
3158
|
+
version: z129.string(),
|
|
3159
|
+
createdAt: z129.date(),
|
|
3160
|
+
designSystemId: z129.string(),
|
|
3161
|
+
name: z129.string(),
|
|
3162
|
+
comment: z129.string(),
|
|
3163
|
+
isReadonly: z129.boolean(),
|
|
3164
|
+
changeLog: z129.string(),
|
|
3165
|
+
parentId: z129.string().optional()
|
|
3166
|
+
});
|
|
3167
|
+
var VersionCreationJobStatus = z129.enum(["Success", "InProgress", "Error"]);
|
|
3168
|
+
var VersionCreationJob = z129.object({
|
|
3169
|
+
id: z129.string(),
|
|
3170
|
+
version: z129.string(),
|
|
3171
|
+
designSystemId: z129.string(),
|
|
3172
|
+
designSystemVersionId: nullishToOptional(z129.string()),
|
|
3176
3173
|
status: VersionCreationJobStatus,
|
|
3177
|
-
errorMessage: nullishToOptional(
|
|
3174
|
+
errorMessage: nullishToOptional(z129.string())
|
|
3178
3175
|
});
|
|
3179
3176
|
|
|
3180
3177
|
// src/export/export-runner/export-context.ts
|
|
3181
|
-
import { z as
|
|
3182
|
-
var ExportJobDocumentationContext =
|
|
3183
|
-
isSingleVersionDocs:
|
|
3184
|
-
versionSlug:
|
|
3178
|
+
import { z as z130 } from "zod";
|
|
3179
|
+
var ExportJobDocumentationContext = z130.object({
|
|
3180
|
+
isSingleVersionDocs: z130.boolean(),
|
|
3181
|
+
versionSlug: z130.string(),
|
|
3185
3182
|
environment: PublishedDocEnvironment
|
|
3186
3183
|
});
|
|
3187
|
-
var ExportJobContext =
|
|
3188
|
-
apiUrl:
|
|
3189
|
-
accessToken:
|
|
3190
|
-
designSystemId:
|
|
3191
|
-
designSystemVersionId:
|
|
3192
|
-
brandId:
|
|
3193
|
-
exporterPackageUrl:
|
|
3184
|
+
var ExportJobContext = z130.object({
|
|
3185
|
+
apiUrl: z130.string(),
|
|
3186
|
+
accessToken: z130.string(),
|
|
3187
|
+
designSystemId: z130.string(),
|
|
3188
|
+
designSystemVersionId: z130.string(),
|
|
3189
|
+
brandId: z130.string().optional(),
|
|
3190
|
+
exporterPackageUrl: z130.string(),
|
|
3194
3191
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3195
3192
|
documentation: ExportJobDocumentationContext.optional()
|
|
3196
3193
|
});
|
|
3197
3194
|
|
|
3198
3195
|
// src/export/export-runner/exporter-payload.ts
|
|
3199
|
-
import { z as
|
|
3200
|
-
var ExporterFunctionPayload =
|
|
3201
|
-
exportJobId:
|
|
3202
|
-
exportContextId:
|
|
3203
|
-
designSystemId:
|
|
3196
|
+
import { z as z131 } from "zod";
|
|
3197
|
+
var ExporterFunctionPayload = z131.object({
|
|
3198
|
+
exportJobId: z131.string(),
|
|
3199
|
+
exportContextId: z131.string(),
|
|
3200
|
+
designSystemId: z131.string(),
|
|
3201
|
+
workspaceId: z131.string()
|
|
3204
3202
|
});
|
|
3205
3203
|
|
|
3206
3204
|
// src/export/export-destinations.ts
|
|
3207
|
-
import { z as
|
|
3205
|
+
import { z as z132 } from "zod";
|
|
3208
3206
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
3209
3207
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
3210
|
-
var ExporterDestinationDocs =
|
|
3208
|
+
var ExporterDestinationDocs = z132.object({
|
|
3211
3209
|
environment: PublishedDocEnvironment
|
|
3212
3210
|
});
|
|
3213
|
-
var ExporterDestinationS3 =
|
|
3214
|
-
var ExporterDestinationGithub =
|
|
3215
|
-
|
|
3216
|
-
branch:
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
});
|
|
3221
|
-
var ExporterDestinationAzure =
|
|
3222
|
-
connectionId:
|
|
3223
|
-
organizationId:
|
|
3224
|
-
projectId:
|
|
3225
|
-
repositoryId:
|
|
3226
|
-
branch:
|
|
3227
|
-
relativePath:
|
|
3211
|
+
var ExporterDestinationS3 = z132.object({});
|
|
3212
|
+
var ExporterDestinationGithub = z132.object({
|
|
3213
|
+
url: z132.string(),
|
|
3214
|
+
branch: z132.string(),
|
|
3215
|
+
userId: z132.string(),
|
|
3216
|
+
connectionId: z132.string(),
|
|
3217
|
+
relativePath: z132.string()
|
|
3218
|
+
});
|
|
3219
|
+
var ExporterDestinationAzure = z132.object({
|
|
3220
|
+
connectionId: z132.string(),
|
|
3221
|
+
organizationId: z132.string(),
|
|
3222
|
+
projectId: z132.string(),
|
|
3223
|
+
repositoryId: z132.string(),
|
|
3224
|
+
branch: z132.string(),
|
|
3225
|
+
relativePath: z132.string()
|
|
3228
3226
|
// // +
|
|
3229
3227
|
// userId: z.coerce.string(),
|
|
3230
3228
|
// url: z.string(),
|
|
3231
3229
|
});
|
|
3232
|
-
var ExporterDestinationGitlab =
|
|
3233
|
-
connectionId:
|
|
3234
|
-
projectId:
|
|
3235
|
-
branch:
|
|
3236
|
-
relativePath:
|
|
3230
|
+
var ExporterDestinationGitlab = z132.object({
|
|
3231
|
+
connectionId: z132.string(),
|
|
3232
|
+
projectId: z132.string(),
|
|
3233
|
+
branch: z132.string(),
|
|
3234
|
+
relativePath: z132.string()
|
|
3237
3235
|
// // +
|
|
3238
3236
|
// userId: z.coerce.string(),
|
|
3239
3237
|
// url: z.string(),
|
|
3240
3238
|
});
|
|
3241
|
-
var ExporterDestinationBitbucket =
|
|
3242
|
-
connectionId:
|
|
3243
|
-
workspaceSlug:
|
|
3244
|
-
projectKey:
|
|
3245
|
-
repoSlug:
|
|
3246
|
-
branch:
|
|
3247
|
-
relativePath:
|
|
3239
|
+
var ExporterDestinationBitbucket = z132.object({
|
|
3240
|
+
connectionId: z132.string(),
|
|
3241
|
+
workspaceSlug: z132.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3242
|
+
projectKey: z132.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3243
|
+
repoSlug: z132.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3244
|
+
branch: z132.string(),
|
|
3245
|
+
relativePath: z132.string()
|
|
3248
3246
|
// // +
|
|
3249
3247
|
// userId: z.string(),
|
|
3250
3248
|
// url: z.string(),
|
|
3251
3249
|
});
|
|
3252
|
-
var ExportDestinationsMap =
|
|
3253
|
-
webhookUrl:
|
|
3250
|
+
var ExportDestinationsMap = z132.object({
|
|
3251
|
+
webhookUrl: z132.string().optional(),
|
|
3254
3252
|
destinationSnDocs: ExporterDestinationDocs.optional(),
|
|
3255
3253
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3256
3254
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3260,30 +3258,30 @@ var ExportDestinationsMap = z133.object({
|
|
|
3260
3258
|
});
|
|
3261
3259
|
|
|
3262
3260
|
// src/export/export-jobs.ts
|
|
3263
|
-
import { z as
|
|
3264
|
-
var ExportJobDestinationType =
|
|
3265
|
-
var ExportJobStatus =
|
|
3266
|
-
var ExportJobLogEntryType =
|
|
3267
|
-
var ExportJobLogEntry =
|
|
3268
|
-
id:
|
|
3269
|
-
time:
|
|
3261
|
+
import { z as z133 } from "zod";
|
|
3262
|
+
var ExportJobDestinationType = z133.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
3263
|
+
var ExportJobStatus = z133.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3264
|
+
var ExportJobLogEntryType = z133.enum(["success", "info", "warning", "error", "user"]);
|
|
3265
|
+
var ExportJobLogEntry = z133.object({
|
|
3266
|
+
id: z133.string().optional(),
|
|
3267
|
+
time: z133.coerce.date(),
|
|
3270
3268
|
type: ExportJobLogEntryType,
|
|
3271
|
-
message:
|
|
3269
|
+
message: z133.string()
|
|
3272
3270
|
});
|
|
3273
|
-
var ExportJobPullRequestDestinationResult =
|
|
3274
|
-
pullRequestUrl:
|
|
3271
|
+
var ExportJobPullRequestDestinationResult = z133.object({
|
|
3272
|
+
pullRequestUrl: z133.string()
|
|
3275
3273
|
});
|
|
3276
|
-
var ExportJobS3DestinationResult =
|
|
3277
|
-
bucket:
|
|
3278
|
-
urlPrefix:
|
|
3279
|
-
path:
|
|
3280
|
-
files:
|
|
3274
|
+
var ExportJobS3DestinationResult = z133.object({
|
|
3275
|
+
bucket: z133.string(),
|
|
3276
|
+
urlPrefix: z133.string().optional(),
|
|
3277
|
+
path: z133.string(),
|
|
3278
|
+
files: z133.array(z133.string())
|
|
3281
3279
|
});
|
|
3282
|
-
var ExportJobDocsDestinationResult =
|
|
3283
|
-
url:
|
|
3280
|
+
var ExportJobDocsDestinationResult = z133.object({
|
|
3281
|
+
url: z133.string()
|
|
3284
3282
|
});
|
|
3285
|
-
var ExportJobResult =
|
|
3286
|
-
error:
|
|
3283
|
+
var ExportJobResult = z133.object({
|
|
3284
|
+
error: z133.string().optional(),
|
|
3287
3285
|
s3: ExportJobS3DestinationResult.optional(),
|
|
3288
3286
|
github: ExportJobPullRequestDestinationResult.optional(),
|
|
3289
3287
|
azure: ExportJobPullRequestDestinationResult.optional(),
|
|
@@ -3291,28 +3289,27 @@ var ExportJobResult = z134.object({
|
|
|
3291
3289
|
bitbucket: ExportJobPullRequestDestinationResult.optional(),
|
|
3292
3290
|
sndocs: ExportJobDocsDestinationResult.optional()
|
|
3293
3291
|
});
|
|
3294
|
-
var ExportJob =
|
|
3295
|
-
id:
|
|
3296
|
-
createdAt:
|
|
3297
|
-
finishedAt:
|
|
3298
|
-
designSystemId:
|
|
3299
|
-
designSystemVersionId:
|
|
3300
|
-
workspaceId:
|
|
3301
|
-
scheduleId:
|
|
3302
|
-
exporterId:
|
|
3303
|
-
brandId:
|
|
3304
|
-
themeId:
|
|
3305
|
-
estimatedExecutionTime:
|
|
3292
|
+
var ExportJob = z133.object({
|
|
3293
|
+
id: z133.string(),
|
|
3294
|
+
createdAt: z133.date(),
|
|
3295
|
+
finishedAt: z133.date().optional(),
|
|
3296
|
+
designSystemId: z133.string(),
|
|
3297
|
+
designSystemVersionId: z133.string(),
|
|
3298
|
+
workspaceId: z133.string(),
|
|
3299
|
+
scheduleId: z133.string().nullish(),
|
|
3300
|
+
exporterId: z133.string(),
|
|
3301
|
+
brandId: z133.string().optional(),
|
|
3302
|
+
themeId: z133.string().optional(),
|
|
3303
|
+
estimatedExecutionTime: z133.number().optional(),
|
|
3306
3304
|
status: ExportJobStatus,
|
|
3307
3305
|
result: ExportJobResult.optional(),
|
|
3308
|
-
createdByUserId:
|
|
3306
|
+
createdByUserId: z133.string().optional(),
|
|
3309
3307
|
// Destinations
|
|
3310
3308
|
...ExportDestinationsMap.shape
|
|
3311
3309
|
});
|
|
3312
3310
|
var ExportJobFindByFilter = ExportJob.pick({
|
|
3313
3311
|
exporterId: true,
|
|
3314
3312
|
designSystemVersionId: true,
|
|
3315
|
-
destinations: true,
|
|
3316
3313
|
createdByUserId: true,
|
|
3317
3314
|
status: true,
|
|
3318
3315
|
scheduleId: true,
|
|
@@ -3320,45 +3317,45 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
3320
3317
|
themeId: true,
|
|
3321
3318
|
brandId: true
|
|
3322
3319
|
}).extend({
|
|
3323
|
-
destinations:
|
|
3320
|
+
destinations: z133.array(ExportJobDestinationType),
|
|
3324
3321
|
docsEnvironment: PublishedDocEnvironment
|
|
3325
3322
|
}).partial();
|
|
3326
3323
|
|
|
3327
3324
|
// src/export/export-schedule.ts
|
|
3328
|
-
import { z as
|
|
3329
|
-
var ExporterScheduleEventType =
|
|
3330
|
-
var ExporterSchedule =
|
|
3331
|
-
id:
|
|
3332
|
-
name:
|
|
3325
|
+
import { z as z134 } from "zod";
|
|
3326
|
+
var ExporterScheduleEventType = z134.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
3327
|
+
var ExporterSchedule = z134.object({
|
|
3328
|
+
id: z134.string(),
|
|
3329
|
+
name: z134.string(),
|
|
3333
3330
|
eventType: ExporterScheduleEventType,
|
|
3334
|
-
isEnabled:
|
|
3335
|
-
workspaceId:
|
|
3336
|
-
designSystemId:
|
|
3337
|
-
exporterId:
|
|
3338
|
-
brandId:
|
|
3339
|
-
themeId:
|
|
3331
|
+
isEnabled: z134.boolean(),
|
|
3332
|
+
workspaceId: z134.string(),
|
|
3333
|
+
designSystemId: z134.string(),
|
|
3334
|
+
exporterId: z134.string(),
|
|
3335
|
+
brandId: z134.string().optional(),
|
|
3336
|
+
themeId: z134.string().optional(),
|
|
3340
3337
|
// Destinations
|
|
3341
3338
|
...ExportDestinationsMap.shape
|
|
3342
3339
|
});
|
|
3343
3340
|
|
|
3344
3341
|
// src/export/exporter-workspace-membership-role.ts
|
|
3345
|
-
import { z as
|
|
3346
|
-
var ExporterWorkspaceMembershipRole =
|
|
3342
|
+
import { z as z135 } from "zod";
|
|
3343
|
+
var ExporterWorkspaceMembershipRole = z135.enum(["Owner", "OwnerArchived", "User"]);
|
|
3347
3344
|
|
|
3348
3345
|
// src/export/exporter-workspace-membership.ts
|
|
3349
|
-
import { z as
|
|
3350
|
-
var ExporterWorkspaceMembership =
|
|
3351
|
-
id:
|
|
3352
|
-
workspaceId:
|
|
3353
|
-
exporterId:
|
|
3346
|
+
import { z as z136 } from "zod";
|
|
3347
|
+
var ExporterWorkspaceMembership = z136.object({
|
|
3348
|
+
id: z136.string(),
|
|
3349
|
+
workspaceId: z136.string(),
|
|
3350
|
+
exporterId: z136.string(),
|
|
3354
3351
|
role: ExporterWorkspaceMembershipRole
|
|
3355
3352
|
});
|
|
3356
3353
|
|
|
3357
3354
|
// src/export/exporter.ts
|
|
3358
|
-
import { z as
|
|
3355
|
+
import { z as z139 } from "zod";
|
|
3359
3356
|
|
|
3360
3357
|
// src/export/git-providers.ts
|
|
3361
|
-
import { z as
|
|
3358
|
+
import { z as z137 } from "zod";
|
|
3362
3359
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
3363
3360
|
GitProviderNames2["Azure"] = "azure";
|
|
3364
3361
|
GitProviderNames2["Github"] = "github";
|
|
@@ -3366,11 +3363,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
3366
3363
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
3367
3364
|
return GitProviderNames2;
|
|
3368
3365
|
})(GitProviderNames || {});
|
|
3369
|
-
var GitProvider =
|
|
3366
|
+
var GitProvider = z137.nativeEnum(GitProviderNames);
|
|
3370
3367
|
|
|
3371
3368
|
// src/export/pulsar.ts
|
|
3372
|
-
import { z as
|
|
3373
|
-
var PulsarPropertyType =
|
|
3369
|
+
import { z as z138 } from "zod";
|
|
3370
|
+
var PulsarPropertyType = z138.enum([
|
|
3374
3371
|
"string",
|
|
3375
3372
|
"number",
|
|
3376
3373
|
"boolean",
|
|
@@ -3383,91 +3380,91 @@ var PulsarPropertyType = z139.enum([
|
|
|
3383
3380
|
"tokenProperties",
|
|
3384
3381
|
"tokenType"
|
|
3385
3382
|
]);
|
|
3386
|
-
var PulsarBaseProperty =
|
|
3387
|
-
label:
|
|
3388
|
-
key:
|
|
3389
|
-
description:
|
|
3383
|
+
var PulsarBaseProperty = z138.object({
|
|
3384
|
+
label: z138.string(),
|
|
3385
|
+
key: z138.string(),
|
|
3386
|
+
description: z138.string().nullish(),
|
|
3390
3387
|
type: PulsarPropertyType,
|
|
3391
|
-
values:
|
|
3392
|
-
default:
|
|
3388
|
+
values: z138.array(z138.string()).nullish(),
|
|
3389
|
+
default: z138.union([z138.string(), z138.boolean(), z138.number()]).nullish(),
|
|
3393
3390
|
// PulsarPropertyValueType //is optional?
|
|
3394
|
-
inputType:
|
|
3391
|
+
inputType: z138.enum(["code", "plain"]).optional(),
|
|
3395
3392
|
//is optional?
|
|
3396
|
-
isMultiline:
|
|
3393
|
+
isMultiline: z138.boolean().nullish()
|
|
3397
3394
|
});
|
|
3398
3395
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
3399
|
-
category:
|
|
3396
|
+
category: z138.string()
|
|
3400
3397
|
});
|
|
3401
|
-
var PulsarContributionVariant =
|
|
3402
|
-
key:
|
|
3403
|
-
name:
|
|
3404
|
-
isDefault: nullishToOptional(
|
|
3405
|
-
description: nullishToOptional(
|
|
3406
|
-
thumbnailURL: nullishToOptional(
|
|
3407
|
-
});
|
|
3408
|
-
var PulsarCustomBlock =
|
|
3409
|
-
title: nullishToOptional(
|
|
3410
|
-
key:
|
|
3411
|
-
category: nullishToOptional(
|
|
3412
|
-
description: nullishToOptional(
|
|
3413
|
-
iconURL: nullishToOptional(
|
|
3414
|
-
mode: nullishToOptional(
|
|
3415
|
-
properties: nullishToOptional(
|
|
3398
|
+
var PulsarContributionVariant = z138.object({
|
|
3399
|
+
key: z138.string(),
|
|
3400
|
+
name: z138.string(),
|
|
3401
|
+
isDefault: nullishToOptional(z138.boolean()),
|
|
3402
|
+
description: nullishToOptional(z138.string()),
|
|
3403
|
+
thumbnailURL: nullishToOptional(z138.string())
|
|
3404
|
+
});
|
|
3405
|
+
var PulsarCustomBlock = z138.object({
|
|
3406
|
+
title: nullishToOptional(z138.string()),
|
|
3407
|
+
key: z138.string(),
|
|
3408
|
+
category: nullishToOptional(z138.string()),
|
|
3409
|
+
description: nullishToOptional(z138.string()),
|
|
3410
|
+
iconURL: nullishToOptional(z138.string()),
|
|
3411
|
+
mode: nullishToOptional(z138.enum(["array", "block"])),
|
|
3412
|
+
properties: nullishToOptional(z138.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
3416
3413
|
});
|
|
3417
3414
|
|
|
3418
3415
|
// src/export/exporter.ts
|
|
3419
|
-
var ExporterType =
|
|
3420
|
-
var ExporterSource =
|
|
3421
|
-
var ExporterTag =
|
|
3422
|
-
var ExporterDetails =
|
|
3423
|
-
description:
|
|
3424
|
-
version:
|
|
3425
|
-
routingVersion: nullishToOptional(
|
|
3426
|
-
author: nullishToOptional(
|
|
3427
|
-
organization: nullishToOptional(
|
|
3428
|
-
homepage: nullishToOptional(
|
|
3429
|
-
readme: nullishToOptional(
|
|
3430
|
-
tags: nullishToOptional(
|
|
3431
|
-
packageId: nullishToOptional(
|
|
3432
|
-
iconURL: nullishToOptional(
|
|
3433
|
-
configurationProperties: nullishToOptional(
|
|
3434
|
-
customBlocks: nullishToOptional(
|
|
3435
|
-
blockVariants: nullishToOptional(
|
|
3436
|
-
usesBrands: nullishToOptional(
|
|
3437
|
-
usesThemes: nullishToOptional(
|
|
3416
|
+
var ExporterType = z139.enum(["code", "documentation"]);
|
|
3417
|
+
var ExporterSource = z139.enum(["git", "upload"]);
|
|
3418
|
+
var ExporterTag = z139.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
3419
|
+
var ExporterDetails = z139.object({
|
|
3420
|
+
description: z139.string(),
|
|
3421
|
+
version: z139.string(),
|
|
3422
|
+
routingVersion: nullishToOptional(z139.string()),
|
|
3423
|
+
author: nullishToOptional(z139.string()),
|
|
3424
|
+
organization: nullishToOptional(z139.string()),
|
|
3425
|
+
homepage: nullishToOptional(z139.string()),
|
|
3426
|
+
readme: nullishToOptional(z139.string()),
|
|
3427
|
+
tags: nullishToOptional(z139.array(ExporterTag)).default([]),
|
|
3428
|
+
packageId: nullishToOptional(z139.string().max(255)),
|
|
3429
|
+
iconURL: nullishToOptional(z139.string()),
|
|
3430
|
+
configurationProperties: nullishToOptional(z139.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3431
|
+
customBlocks: nullishToOptional(z139.array(PulsarCustomBlock)).default([]),
|
|
3432
|
+
blockVariants: nullishToOptional(z139.record(z139.string(), z139.array(PulsarContributionVariant))).default({}),
|
|
3433
|
+
usesBrands: nullishToOptional(z139.boolean()).default(false),
|
|
3434
|
+
usesThemes: nullishToOptional(z139.boolean()).default(false),
|
|
3438
3435
|
source: ExporterSource,
|
|
3439
3436
|
gitProvider: nullishToOptional(GitProvider),
|
|
3440
|
-
gitUrl: nullishToOptional(
|
|
3441
|
-
gitBranch: nullishToOptional(
|
|
3442
|
-
gitDirectory: nullishToOptional(
|
|
3437
|
+
gitUrl: nullishToOptional(z139.string()),
|
|
3438
|
+
gitBranch: nullishToOptional(z139.string()),
|
|
3439
|
+
gitDirectory: nullishToOptional(z139.string())
|
|
3443
3440
|
});
|
|
3444
|
-
var Exporter =
|
|
3445
|
-
id:
|
|
3446
|
-
createdAt:
|
|
3447
|
-
name:
|
|
3448
|
-
isPrivate:
|
|
3441
|
+
var Exporter = z139.object({
|
|
3442
|
+
id: z139.string(),
|
|
3443
|
+
createdAt: z139.coerce.date(),
|
|
3444
|
+
name: z139.string(),
|
|
3445
|
+
isPrivate: z139.boolean(),
|
|
3449
3446
|
details: ExporterDetails,
|
|
3450
3447
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3451
|
-
storagePath: nullishToOptional(
|
|
3448
|
+
storagePath: nullishToOptional(z139.string()).default("")
|
|
3452
3449
|
});
|
|
3453
3450
|
|
|
3454
3451
|
// src/feature-flags/feature-flags.ts
|
|
3455
|
-
import { z as
|
|
3456
|
-
var FlaggedFeature =
|
|
3457
|
-
var FeatureFlagMap =
|
|
3458
|
-
var FeatureFlag =
|
|
3459
|
-
id:
|
|
3452
|
+
import { z as z140 } from "zod";
|
|
3453
|
+
var FlaggedFeature = z140.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
3454
|
+
var FeatureFlagMap = z140.record(FlaggedFeature, z140.boolean());
|
|
3455
|
+
var FeatureFlag = z140.object({
|
|
3456
|
+
id: z140.string(),
|
|
3460
3457
|
feature: FlaggedFeature,
|
|
3461
|
-
createdAt:
|
|
3462
|
-
enabled:
|
|
3463
|
-
designSystemId:
|
|
3458
|
+
createdAt: z140.coerce.date(),
|
|
3459
|
+
enabled: z140.boolean(),
|
|
3460
|
+
designSystemId: z140.string().optional()
|
|
3464
3461
|
});
|
|
3465
3462
|
|
|
3466
3463
|
// src/integrations/external-oauth-request.ts
|
|
3467
|
-
import { z as
|
|
3464
|
+
import { z as z142 } from "zod";
|
|
3468
3465
|
|
|
3469
3466
|
// src/integrations/oauth-providers.ts
|
|
3470
|
-
import { z as
|
|
3467
|
+
import { z as z141 } from "zod";
|
|
3471
3468
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3472
3469
|
OAuthProviderNames2["Figma"] = "figma";
|
|
3473
3470
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -3476,75 +3473,75 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
3476
3473
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3477
3474
|
return OAuthProviderNames2;
|
|
3478
3475
|
})(OAuthProviderNames || {});
|
|
3479
|
-
var OAuthProviderSchema =
|
|
3476
|
+
var OAuthProviderSchema = z141.nativeEnum(OAuthProviderNames);
|
|
3480
3477
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3481
3478
|
|
|
3482
3479
|
// src/integrations/external-oauth-request.ts
|
|
3483
|
-
var ExternalOAuthRequest =
|
|
3484
|
-
id:
|
|
3480
|
+
var ExternalOAuthRequest = z142.object({
|
|
3481
|
+
id: z142.string(),
|
|
3485
3482
|
provider: OAuthProviderSchema,
|
|
3486
|
-
userId:
|
|
3487
|
-
state:
|
|
3488
|
-
createdAt:
|
|
3483
|
+
userId: z142.string(),
|
|
3484
|
+
state: z142.string(),
|
|
3485
|
+
createdAt: z142.coerce.date()
|
|
3489
3486
|
});
|
|
3490
3487
|
|
|
3491
3488
|
// src/integrations/git.ts
|
|
3492
|
-
import { z as
|
|
3493
|
-
var GitOrganization =
|
|
3494
|
-
id:
|
|
3495
|
-
name:
|
|
3496
|
-
url:
|
|
3489
|
+
import { z as z143 } from "zod";
|
|
3490
|
+
var GitOrganization = z143.object({
|
|
3491
|
+
id: z143.string(),
|
|
3492
|
+
name: z143.string(),
|
|
3493
|
+
url: z143.string()
|
|
3497
3494
|
});
|
|
3498
|
-
var GitProject =
|
|
3499
|
-
id:
|
|
3500
|
-
name:
|
|
3501
|
-
url:
|
|
3495
|
+
var GitProject = z143.object({
|
|
3496
|
+
id: z143.string(),
|
|
3497
|
+
name: z143.string(),
|
|
3498
|
+
url: z143.string()
|
|
3502
3499
|
});
|
|
3503
|
-
var GitRepository =
|
|
3504
|
-
id:
|
|
3505
|
-
name:
|
|
3506
|
-
url:
|
|
3507
|
-
defaultBranch:
|
|
3500
|
+
var GitRepository = z143.object({
|
|
3501
|
+
id: z143.string(),
|
|
3502
|
+
name: z143.string(),
|
|
3503
|
+
url: z143.string(),
|
|
3504
|
+
defaultBranch: z143.string()
|
|
3508
3505
|
});
|
|
3509
|
-
var GitBranch =
|
|
3510
|
-
name:
|
|
3511
|
-
lastCommitId:
|
|
3506
|
+
var GitBranch = z143.object({
|
|
3507
|
+
name: z143.string(),
|
|
3508
|
+
lastCommitId: z143.string()
|
|
3512
3509
|
});
|
|
3513
3510
|
|
|
3514
3511
|
// src/integrations/integration.ts
|
|
3515
|
-
import { z as
|
|
3516
|
-
var IntegrationDesignSystem =
|
|
3517
|
-
designSystemId:
|
|
3518
|
-
brandId:
|
|
3519
|
-
title:
|
|
3520
|
-
userId:
|
|
3521
|
-
date:
|
|
3522
|
-
});
|
|
3523
|
-
var IntegrationCredentialsType =
|
|
3524
|
-
var IntegrationCredentialsProfile =
|
|
3525
|
-
id:
|
|
3526
|
-
email:
|
|
3527
|
-
handle:
|
|
3528
|
-
type:
|
|
3529
|
-
avatarUrl:
|
|
3530
|
-
organization:
|
|
3531
|
-
installation:
|
|
3532
|
-
});
|
|
3533
|
-
var IntegrationCredentials =
|
|
3534
|
-
id:
|
|
3512
|
+
import { z as z144 } from "zod";
|
|
3513
|
+
var IntegrationDesignSystem = z144.object({
|
|
3514
|
+
designSystemId: z144.string(),
|
|
3515
|
+
brandId: z144.string(),
|
|
3516
|
+
title: z144.string().optional(),
|
|
3517
|
+
userId: z144.string().optional(),
|
|
3518
|
+
date: z144.coerce.date().optional()
|
|
3519
|
+
});
|
|
3520
|
+
var IntegrationCredentialsType = z144.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
3521
|
+
var IntegrationCredentialsProfile = z144.object({
|
|
3522
|
+
id: z144.string(),
|
|
3523
|
+
email: z144.string().optional(),
|
|
3524
|
+
handle: z144.string().optional(),
|
|
3525
|
+
type: z144.string().optional(),
|
|
3526
|
+
avatarUrl: z144.string().optional(),
|
|
3527
|
+
organization: z144.string().optional(),
|
|
3528
|
+
installation: z144.string().optional()
|
|
3529
|
+
});
|
|
3530
|
+
var IntegrationCredentials = z144.object({
|
|
3531
|
+
id: z144.string(),
|
|
3535
3532
|
type: IntegrationCredentialsType,
|
|
3536
|
-
integrationId:
|
|
3537
|
-
accessToken:
|
|
3538
|
-
userId:
|
|
3539
|
-
createdAt:
|
|
3540
|
-
refreshToken:
|
|
3541
|
-
tokenName:
|
|
3542
|
-
expiresAt:
|
|
3533
|
+
integrationId: z144.string(),
|
|
3534
|
+
accessToken: z144.string(),
|
|
3535
|
+
userId: z144.string(),
|
|
3536
|
+
createdAt: z144.coerce.date(),
|
|
3537
|
+
refreshToken: z144.string().optional(),
|
|
3538
|
+
tokenName: z144.string().optional(),
|
|
3539
|
+
expiresAt: z144.coerce.date().optional(),
|
|
3543
3540
|
profile: IntegrationCredentialsProfile.optional(),
|
|
3544
|
-
customUrl:
|
|
3541
|
+
customUrl: z144.string().optional(),
|
|
3545
3542
|
user: UserMinified.optional()
|
|
3546
3543
|
});
|
|
3547
|
-
var ExtendedIntegrationType =
|
|
3544
|
+
var ExtendedIntegrationType = z144.enum([
|
|
3548
3545
|
"Figma",
|
|
3549
3546
|
"Github",
|
|
3550
3547
|
"Gitlab",
|
|
@@ -3554,25 +3551,25 @@ var ExtendedIntegrationType = z145.enum([
|
|
|
3554
3551
|
"FigmaVariablesPlugin"
|
|
3555
3552
|
]);
|
|
3556
3553
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
3557
|
-
var Integration =
|
|
3558
|
-
id:
|
|
3559
|
-
workspaceId:
|
|
3554
|
+
var Integration = z144.object({
|
|
3555
|
+
id: z144.string(),
|
|
3556
|
+
workspaceId: z144.string(),
|
|
3560
3557
|
type: IntegrationType,
|
|
3561
|
-
createdAt:
|
|
3562
|
-
integrationCredentials:
|
|
3558
|
+
createdAt: z144.coerce.date(),
|
|
3559
|
+
integrationCredentials: z144.array(IntegrationCredentials).optional()
|
|
3563
3560
|
});
|
|
3564
3561
|
var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
3565
|
-
var IntegrationToken =
|
|
3566
|
-
access_token:
|
|
3567
|
-
refresh_token:
|
|
3568
|
-
expires_in:
|
|
3569
|
-
token_type:
|
|
3570
|
-
token_name:
|
|
3571
|
-
token_azure_organization_name:
|
|
3562
|
+
var IntegrationToken = z144.object({
|
|
3563
|
+
access_token: z144.string(),
|
|
3564
|
+
refresh_token: z144.string().optional(),
|
|
3565
|
+
expires_in: z144.union([z144.number().optional(), z144.string().optional()]),
|
|
3566
|
+
token_type: z144.string().optional(),
|
|
3567
|
+
token_name: z144.string().optional(),
|
|
3568
|
+
token_azure_organization_name: z144.string().optional(),
|
|
3572
3569
|
// Azure only
|
|
3573
|
-
token_bitbucket_username:
|
|
3570
|
+
token_bitbucket_username: z144.string().optional(),
|
|
3574
3571
|
// Bitbucket only
|
|
3575
|
-
custom_url:
|
|
3572
|
+
custom_url: z144.string().optional().refine((value) => {
|
|
3576
3573
|
if (!value)
|
|
3577
3574
|
return true;
|
|
3578
3575
|
if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
|
|
@@ -3598,131 +3595,131 @@ var IntegrationToken = z145.object({
|
|
|
3598
3595
|
});
|
|
3599
3596
|
|
|
3600
3597
|
// src/integrations/oauth-token.ts
|
|
3601
|
-
import { z as
|
|
3602
|
-
var IntegrationTokenSchemaOld =
|
|
3603
|
-
id:
|
|
3598
|
+
import { z as z145 } from "zod";
|
|
3599
|
+
var IntegrationTokenSchemaOld = z145.object({
|
|
3600
|
+
id: z145.string(),
|
|
3604
3601
|
provider: OAuthProviderSchema,
|
|
3605
|
-
scope:
|
|
3606
|
-
userId:
|
|
3607
|
-
accessToken:
|
|
3608
|
-
refreshToken:
|
|
3609
|
-
expiresAt:
|
|
3610
|
-
externalUserId:
|
|
3602
|
+
scope: z145.string(),
|
|
3603
|
+
userId: z145.string(),
|
|
3604
|
+
accessToken: z145.string(),
|
|
3605
|
+
refreshToken: z145.string(),
|
|
3606
|
+
expiresAt: z145.coerce.date(),
|
|
3607
|
+
externalUserId: z145.string().nullish()
|
|
3611
3608
|
});
|
|
3612
3609
|
|
|
3613
3610
|
// src/integrations/workspace-oauth-requests.ts
|
|
3614
|
-
import { z as
|
|
3615
|
-
var WorkspaceOAuthRequestSchema =
|
|
3616
|
-
id:
|
|
3617
|
-
workspaceId:
|
|
3611
|
+
import { z as z146 } from "zod";
|
|
3612
|
+
var WorkspaceOAuthRequestSchema = z146.object({
|
|
3613
|
+
id: z146.string(),
|
|
3614
|
+
workspaceId: z146.string(),
|
|
3618
3615
|
provider: OAuthProviderSchema,
|
|
3619
|
-
userId:
|
|
3620
|
-
createdAt:
|
|
3616
|
+
userId: z146.string(),
|
|
3617
|
+
createdAt: z146.coerce.date()
|
|
3621
3618
|
});
|
|
3622
3619
|
|
|
3623
3620
|
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3624
|
-
import { z as
|
|
3621
|
+
import { z as z147 } from "zod";
|
|
3625
3622
|
var DesignSystemVersionRoom = Entity.extend({
|
|
3626
|
-
designSystemVersionId:
|
|
3627
|
-
liveblocksId:
|
|
3623
|
+
designSystemVersionId: z147.string(),
|
|
3624
|
+
liveblocksId: z147.string()
|
|
3628
3625
|
});
|
|
3629
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
3630
|
-
routingVersion:
|
|
3626
|
+
var DesignSystemVersionRoomInternalSettings = z147.object({
|
|
3627
|
+
routingVersion: z147.string()
|
|
3631
3628
|
});
|
|
3632
|
-
var DesignSystemVersionRoomInitialState =
|
|
3633
|
-
pages:
|
|
3634
|
-
groups:
|
|
3629
|
+
var DesignSystemVersionRoomInitialState = z147.object({
|
|
3630
|
+
pages: z147.array(DocumentationPageV2),
|
|
3631
|
+
groups: z147.array(ElementGroup),
|
|
3635
3632
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3636
3633
|
});
|
|
3637
|
-
var DesignSystemVersionRoomUpdate =
|
|
3638
|
-
pages:
|
|
3639
|
-
groups:
|
|
3640
|
-
deletedPageIds:
|
|
3641
|
-
deletedGroupIds:
|
|
3634
|
+
var DesignSystemVersionRoomUpdate = z147.object({
|
|
3635
|
+
pages: z147.array(DocumentationPageV2),
|
|
3636
|
+
groups: z147.array(ElementGroup),
|
|
3637
|
+
deletedPageIds: z147.array(z147.string()),
|
|
3638
|
+
deletedGroupIds: z147.array(z147.string())
|
|
3642
3639
|
});
|
|
3643
3640
|
|
|
3644
3641
|
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3645
|
-
import { z as
|
|
3642
|
+
import { z as z148 } from "zod";
|
|
3646
3643
|
var DocumentationPageRoom = Entity.extend({
|
|
3647
|
-
designSystemVersionId:
|
|
3648
|
-
documentationPageId:
|
|
3649
|
-
liveblocksId:
|
|
3650
|
-
isDirty:
|
|
3644
|
+
designSystemVersionId: z148.string(),
|
|
3645
|
+
documentationPageId: z148.string(),
|
|
3646
|
+
liveblocksId: z148.string(),
|
|
3647
|
+
isDirty: z148.boolean()
|
|
3651
3648
|
});
|
|
3652
|
-
var DocumentationPageRoomState =
|
|
3653
|
-
pageItems:
|
|
3649
|
+
var DocumentationPageRoomState = z148.object({
|
|
3650
|
+
pageItems: z148.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3654
3651
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
3655
3652
|
});
|
|
3656
|
-
var DocumentationPageRoomRoomUpdate =
|
|
3653
|
+
var DocumentationPageRoomRoomUpdate = z148.object({
|
|
3657
3654
|
page: DocumentationPageV2,
|
|
3658
3655
|
pageParent: ElementGroup
|
|
3659
3656
|
});
|
|
3660
3657
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3661
|
-
pageItems:
|
|
3662
|
-
blockDefinitions:
|
|
3658
|
+
pageItems: z148.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3659
|
+
blockDefinitions: z148.array(PageBlockDefinition)
|
|
3663
3660
|
});
|
|
3664
3661
|
|
|
3665
3662
|
// src/liveblocks/rooms/room-type.ts
|
|
3666
|
-
import { z as
|
|
3663
|
+
import { z as z149 } from "zod";
|
|
3667
3664
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3668
3665
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3669
3666
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3670
3667
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3671
3668
|
return RoomTypeEnum2;
|
|
3672
3669
|
})(RoomTypeEnum || {});
|
|
3673
|
-
var RoomTypeSchema =
|
|
3670
|
+
var RoomTypeSchema = z149.nativeEnum(RoomTypeEnum);
|
|
3674
3671
|
var RoomType = RoomTypeSchema.enum;
|
|
3675
3672
|
|
|
3676
3673
|
// src/liveblocks/rooms/workspace-room.ts
|
|
3677
|
-
import { z as
|
|
3674
|
+
import { z as z150 } from "zod";
|
|
3678
3675
|
var WorkspaceRoom = Entity.extend({
|
|
3679
|
-
workspaceId:
|
|
3680
|
-
liveblocksId:
|
|
3676
|
+
workspaceId: z150.string(),
|
|
3677
|
+
liveblocksId: z150.string()
|
|
3681
3678
|
});
|
|
3682
3679
|
|
|
3683
3680
|
// src/npm/npm-package.ts
|
|
3684
|
-
import { z as
|
|
3685
|
-
var AnyRecord =
|
|
3681
|
+
import { z as z151 } from "zod";
|
|
3682
|
+
var AnyRecord = z151.record(z151.any());
|
|
3686
3683
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3687
|
-
|
|
3688
|
-
tarball:
|
|
3684
|
+
z151.object({
|
|
3685
|
+
tarball: z151.string()
|
|
3689
3686
|
})
|
|
3690
3687
|
);
|
|
3691
3688
|
var NpmPackageVersion = AnyRecord.and(
|
|
3692
|
-
|
|
3689
|
+
z151.object({
|
|
3693
3690
|
dist: NpmPackageVersionDist
|
|
3694
3691
|
})
|
|
3695
3692
|
);
|
|
3696
3693
|
var NpmPackage = AnyRecord.and(
|
|
3697
|
-
|
|
3698
|
-
_id:
|
|
3699
|
-
name:
|
|
3694
|
+
z151.object({
|
|
3695
|
+
_id: z151.string(),
|
|
3696
|
+
name: z151.string(),
|
|
3700
3697
|
// e.g. "latest": "1.2.3"
|
|
3701
|
-
"dist-tags":
|
|
3698
|
+
"dist-tags": z151.record(z151.string(), z151.string()),
|
|
3702
3699
|
// "1.2.3": {...}
|
|
3703
|
-
versions:
|
|
3700
|
+
versions: z151.record(NpmPackageVersion)
|
|
3704
3701
|
})
|
|
3705
3702
|
);
|
|
3706
3703
|
|
|
3707
3704
|
// src/npm/npm-proxy-token-payload.ts
|
|
3708
|
-
import { z as
|
|
3709
|
-
var NpmProxyTokenPayload =
|
|
3710
|
-
npmProxyRegistryConfigId:
|
|
3705
|
+
import { z as z152 } from "zod";
|
|
3706
|
+
var NpmProxyTokenPayload = z152.object({
|
|
3707
|
+
npmProxyRegistryConfigId: z152.string()
|
|
3711
3708
|
});
|
|
3712
3709
|
|
|
3713
3710
|
// src/tokens/personal-access-token.ts
|
|
3714
|
-
import { z as
|
|
3715
|
-
var PersonalAccessToken =
|
|
3716
|
-
id:
|
|
3717
|
-
userId:
|
|
3718
|
-
workspaceId:
|
|
3711
|
+
import { z as z153 } from "zod";
|
|
3712
|
+
var PersonalAccessToken = z153.object({
|
|
3713
|
+
id: z153.string(),
|
|
3714
|
+
userId: z153.string(),
|
|
3715
|
+
workspaceId: z153.string().optional(),
|
|
3719
3716
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3720
|
-
name:
|
|
3721
|
-
hidden:
|
|
3722
|
-
token:
|
|
3723
|
-
scope:
|
|
3724
|
-
createdAt:
|
|
3725
|
-
expireAt:
|
|
3717
|
+
name: z153.string(),
|
|
3718
|
+
hidden: z153.boolean(),
|
|
3719
|
+
token: z153.string(),
|
|
3720
|
+
scope: z153.string().optional(),
|
|
3721
|
+
createdAt: z153.coerce.date(),
|
|
3722
|
+
expireAt: z153.coerce.date().optional()
|
|
3726
3723
|
});
|
|
3727
3724
|
|
|
3728
3725
|
// src/utils/errors.ts
|
|
@@ -3780,7 +3777,7 @@ var SupernovaException = class _SupernovaException extends Error {
|
|
|
3780
3777
|
return new _SupernovaException("MissingExporterPermission", message);
|
|
3781
3778
|
}
|
|
3782
3779
|
static missingIntegration(message) {
|
|
3783
|
-
return new _SupernovaException("
|
|
3780
|
+
return new _SupernovaException("MissingIntegration", message);
|
|
3784
3781
|
}
|
|
3785
3782
|
static noAccess(message) {
|
|
3786
3783
|
return new _SupernovaException("NoAccess", message);
|
|
@@ -3860,26 +3857,26 @@ async function sleep(ms) {
|
|
|
3860
3857
|
}
|
|
3861
3858
|
|
|
3862
3859
|
// src/utils/content-loader-instruction.ts
|
|
3863
|
-
import { z as
|
|
3864
|
-
var ContentLoadInstruction =
|
|
3865
|
-
from:
|
|
3866
|
-
to:
|
|
3867
|
-
authorizationHeaderKvsId:
|
|
3868
|
-
timeout:
|
|
3869
|
-
});
|
|
3870
|
-
var ContentLoaderPayload =
|
|
3871
|
-
type:
|
|
3860
|
+
import { z as z154 } from "zod";
|
|
3861
|
+
var ContentLoadInstruction = z154.object({
|
|
3862
|
+
from: z154.string(),
|
|
3863
|
+
to: z154.string(),
|
|
3864
|
+
authorizationHeaderKvsId: z154.string().optional(),
|
|
3865
|
+
timeout: z154.number().optional()
|
|
3866
|
+
});
|
|
3867
|
+
var ContentLoaderPayload = z154.object({
|
|
3868
|
+
type: z154.literal("Single"),
|
|
3872
3869
|
instruction: ContentLoadInstruction
|
|
3873
3870
|
}).or(
|
|
3874
|
-
|
|
3875
|
-
type:
|
|
3876
|
-
loadingChunkSize:
|
|
3877
|
-
instructions:
|
|
3871
|
+
z154.object({
|
|
3872
|
+
type: z154.literal("Multiple"),
|
|
3873
|
+
loadingChunkSize: z154.number().optional(),
|
|
3874
|
+
instructions: z154.array(ContentLoadInstruction)
|
|
3878
3875
|
})
|
|
3879
3876
|
).or(
|
|
3880
|
-
|
|
3881
|
-
type:
|
|
3882
|
-
location:
|
|
3877
|
+
z154.object({
|
|
3878
|
+
type: z154.literal("S3"),
|
|
3879
|
+
location: z154.string()
|
|
3883
3880
|
})
|
|
3884
3881
|
);
|
|
3885
3882
|
|