@supernova-studio/model 0.42.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +576 -268
- package/dist/index.d.ts +576 -268
- package/dist/index.js +30 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +153 -134
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/billing/features.ts +1 -0
- package/src/dsm/elements/data/documentation-v2.ts +2 -2
- package/src/integrations/integration.ts +12 -11
- package/src/users/index.ts +2 -0
- package/src/users/user-create.ts +9 -0
- package/src/users/user-test.ts +8 -0
package/dist/index.mjs
CHANGED
|
@@ -118,7 +118,8 @@ var FeaturesSummary = z6.object({
|
|
|
118
118
|
sso: featureToggleSchema,
|
|
119
119
|
workspacePaidSeats: featureLimitedSchema,
|
|
120
120
|
workspaceViewers: featureLimitedSchema,
|
|
121
|
-
customDocumentationExporter: featureToggleSchema
|
|
121
|
+
customDocumentationExporter: featureToggleSchema,
|
|
122
|
+
protectedPages: featureToggleSchema
|
|
122
123
|
});
|
|
123
124
|
|
|
124
125
|
// src/billing/invoice.ts
|
|
@@ -1216,8 +1217,8 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1216
1217
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1217
1218
|
var DocumentationItemConfigurationV2 = z41.object({
|
|
1218
1219
|
showSidebar: z41.boolean(),
|
|
1219
|
-
isPrivate: z41.boolean()
|
|
1220
|
-
isHidden: z41.boolean()
|
|
1220
|
+
isPrivate: z41.boolean(),
|
|
1221
|
+
isHidden: z41.boolean(),
|
|
1221
1222
|
header: DocumentationItemHeaderV2
|
|
1222
1223
|
});
|
|
1223
1224
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -3220,7 +3221,7 @@ var CustomDomain = z127.object({
|
|
|
3220
3221
|
});
|
|
3221
3222
|
|
|
3222
3223
|
// src/docs-server/session.ts
|
|
3223
|
-
import { z as
|
|
3224
|
+
import { z as z134 } from "zod";
|
|
3224
3225
|
|
|
3225
3226
|
// src/users/linked-integrations.ts
|
|
3226
3227
|
import { z as z128 } from "zod";
|
|
@@ -3248,88 +3249,103 @@ var UserLinkedIntegrations = z128.object({
|
|
|
3248
3249
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
3249
3250
|
});
|
|
3250
3251
|
|
|
3251
|
-
// src/users/user-
|
|
3252
|
+
// src/users/user-create.ts
|
|
3252
3253
|
import { z as z129 } from "zod";
|
|
3253
|
-
var
|
|
3254
|
-
|
|
3255
|
-
|
|
3254
|
+
var CreateUserInput = z129.object({
|
|
3255
|
+
email: z129.string(),
|
|
3256
|
+
name: z129.string(),
|
|
3257
|
+
username: z129.string()
|
|
3256
3258
|
});
|
|
3257
3259
|
|
|
3258
|
-
// src/users/user-
|
|
3260
|
+
// src/users/user-identity.ts
|
|
3259
3261
|
import { z as z130 } from "zod";
|
|
3260
|
-
var
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3262
|
+
var UserIdentity = z130.object({
|
|
3263
|
+
id: z130.string(),
|
|
3264
|
+
userId: z130.string()
|
|
3265
|
+
});
|
|
3266
|
+
|
|
3267
|
+
// src/users/user-profile.ts
|
|
3268
|
+
import { z as z131 } from "zod";
|
|
3269
|
+
var UserOnboardingDepartment = z131.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
3270
|
+
var UserOnboardingJobLevel = z131.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3271
|
+
var UserOnboarding = z131.object({
|
|
3272
|
+
companyName: z131.string().optional(),
|
|
3273
|
+
numberOfPeopleInOrg: z131.string().optional(),
|
|
3274
|
+
numberOfPeopleInDesignTeam: z131.string().optional(),
|
|
3266
3275
|
department: UserOnboardingDepartment.optional(),
|
|
3267
|
-
jobTitle:
|
|
3268
|
-
phase:
|
|
3276
|
+
jobTitle: z131.string().optional(),
|
|
3277
|
+
phase: z131.string().optional(),
|
|
3269
3278
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
3270
3279
|
});
|
|
3271
|
-
var UserProfile =
|
|
3272
|
-
name:
|
|
3273
|
-
avatar:
|
|
3274
|
-
nickname:
|
|
3280
|
+
var UserProfile = z131.object({
|
|
3281
|
+
name: z131.string(),
|
|
3282
|
+
avatar: z131.string().optional(),
|
|
3283
|
+
nickname: z131.string().optional(),
|
|
3275
3284
|
onboarding: UserOnboarding.optional()
|
|
3276
3285
|
});
|
|
3277
3286
|
|
|
3287
|
+
// src/users/user-test.ts
|
|
3288
|
+
import { z as z132 } from "zod";
|
|
3289
|
+
var UserTest = z132.object({
|
|
3290
|
+
id: z132.string(),
|
|
3291
|
+
email: z132.string()
|
|
3292
|
+
});
|
|
3293
|
+
|
|
3278
3294
|
// src/users/user.ts
|
|
3279
|
-
import { z as
|
|
3280
|
-
var User =
|
|
3281
|
-
id:
|
|
3282
|
-
email:
|
|
3283
|
-
emailVerified:
|
|
3284
|
-
createdAt:
|
|
3285
|
-
trialExpiresAt:
|
|
3295
|
+
import { z as z133 } from "zod";
|
|
3296
|
+
var User = z133.object({
|
|
3297
|
+
id: z133.string(),
|
|
3298
|
+
email: z133.string(),
|
|
3299
|
+
emailVerified: z133.boolean(),
|
|
3300
|
+
createdAt: z133.coerce.date(),
|
|
3301
|
+
trialExpiresAt: z133.coerce.date().optional(),
|
|
3286
3302
|
profile: UserProfile,
|
|
3287
3303
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3288
|
-
loggedOutAt:
|
|
3289
|
-
isProtected:
|
|
3304
|
+
loggedOutAt: z133.coerce.date().optional(),
|
|
3305
|
+
isProtected: z133.boolean()
|
|
3290
3306
|
});
|
|
3291
3307
|
|
|
3292
3308
|
// src/docs-server/session.ts
|
|
3293
|
-
var NpmProxyToken =
|
|
3294
|
-
access:
|
|
3295
|
-
expiresAt:
|
|
3309
|
+
var NpmProxyToken = z134.object({
|
|
3310
|
+
access: z134.string(),
|
|
3311
|
+
expiresAt: z134.number()
|
|
3296
3312
|
});
|
|
3297
|
-
var SessionData =
|
|
3298
|
-
returnToUrl:
|
|
3313
|
+
var SessionData = z134.object({
|
|
3314
|
+
returnToUrl: z134.string().optional(),
|
|
3299
3315
|
npmProxyToken: NpmProxyToken.optional()
|
|
3300
3316
|
});
|
|
3301
|
-
var Session =
|
|
3302
|
-
id:
|
|
3303
|
-
expiresAt:
|
|
3304
|
-
userId:
|
|
3317
|
+
var Session = z134.object({
|
|
3318
|
+
id: z134.string(),
|
|
3319
|
+
expiresAt: z134.coerce.date(),
|
|
3320
|
+
userId: z134.string().nullable(),
|
|
3305
3321
|
data: SessionData
|
|
3306
3322
|
});
|
|
3307
|
-
var AuthTokens =
|
|
3308
|
-
access:
|
|
3309
|
-
refresh:
|
|
3323
|
+
var AuthTokens = z134.object({
|
|
3324
|
+
access: z134.string(),
|
|
3325
|
+
refresh: z134.string()
|
|
3310
3326
|
});
|
|
3311
|
-
var UserSession =
|
|
3327
|
+
var UserSession = z134.object({
|
|
3312
3328
|
session: Session,
|
|
3313
3329
|
user: User.nullable()
|
|
3314
3330
|
});
|
|
3315
3331
|
|
|
3316
3332
|
// src/feature-flags/feature-flags.ts
|
|
3317
|
-
import { z as
|
|
3318
|
-
var FlaggedFeature =
|
|
3319
|
-
var FeatureFlagMap =
|
|
3320
|
-
var FeatureFlag =
|
|
3321
|
-
id:
|
|
3333
|
+
import { z as z135 } from "zod";
|
|
3334
|
+
var FlaggedFeature = z135.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
3335
|
+
var FeatureFlagMap = z135.record(FlaggedFeature, z135.boolean());
|
|
3336
|
+
var FeatureFlag = z135.object({
|
|
3337
|
+
id: z135.string(),
|
|
3322
3338
|
feature: FlaggedFeature,
|
|
3323
|
-
createdAt:
|
|
3324
|
-
enabled:
|
|
3325
|
-
designSystemId:
|
|
3339
|
+
createdAt: z135.coerce.date(),
|
|
3340
|
+
enabled: z135.boolean(),
|
|
3341
|
+
designSystemId: z135.string().optional()
|
|
3326
3342
|
});
|
|
3327
3343
|
|
|
3328
3344
|
// src/integrations/external-oauth-request.ts
|
|
3329
|
-
import { z as
|
|
3345
|
+
import { z as z137 } from "zod";
|
|
3330
3346
|
|
|
3331
3347
|
// src/integrations/oauth-providers.ts
|
|
3332
|
-
import { z as
|
|
3348
|
+
import { z as z136 } from "zod";
|
|
3333
3349
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3334
3350
|
OAuthProviderNames2["Figma"] = "figma";
|
|
3335
3351
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -3338,110 +3354,111 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
3338
3354
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3339
3355
|
return OAuthProviderNames2;
|
|
3340
3356
|
})(OAuthProviderNames || {});
|
|
3341
|
-
var OAuthProviderSchema =
|
|
3357
|
+
var OAuthProviderSchema = z136.nativeEnum(OAuthProviderNames);
|
|
3342
3358
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3343
3359
|
|
|
3344
3360
|
// src/integrations/external-oauth-request.ts
|
|
3345
|
-
var ExternalOAuthRequest =
|
|
3346
|
-
id:
|
|
3361
|
+
var ExternalOAuthRequest = z137.object({
|
|
3362
|
+
id: z137.string(),
|
|
3347
3363
|
provider: OAuthProviderSchema,
|
|
3348
|
-
userId:
|
|
3349
|
-
state:
|
|
3350
|
-
createdAt:
|
|
3364
|
+
userId: z137.string(),
|
|
3365
|
+
state: z137.string(),
|
|
3366
|
+
createdAt: z137.coerce.date()
|
|
3351
3367
|
});
|
|
3352
3368
|
|
|
3353
3369
|
// src/integrations/integration.ts
|
|
3354
|
-
import { z as
|
|
3355
|
-
var
|
|
3356
|
-
var
|
|
3357
|
-
id:
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
createdAt: z136.coerce.date()
|
|
3361
|
-
});
|
|
3362
|
-
var IntegrationCredentialsType = z136.enum(["OAuth2", "PAT"]);
|
|
3363
|
-
var IntegrationCredentialsProfile = z136.object({
|
|
3364
|
-
id: z136.string(),
|
|
3365
|
-
username: z136.string().optional(),
|
|
3366
|
-
avatarUrl: z136.string().optional()
|
|
3370
|
+
import { z as z138 } from "zod";
|
|
3371
|
+
var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT"]);
|
|
3372
|
+
var IntegrationCredentialsProfile = z138.object({
|
|
3373
|
+
id: z138.string(),
|
|
3374
|
+
username: z138.string().optional(),
|
|
3375
|
+
avatarUrl: z138.string().optional()
|
|
3367
3376
|
});
|
|
3368
|
-
var IntegrationCredentialsSchema =
|
|
3369
|
-
id:
|
|
3377
|
+
var IntegrationCredentialsSchema = z138.object({
|
|
3378
|
+
id: z138.string(),
|
|
3370
3379
|
type: IntegrationCredentialsType,
|
|
3371
|
-
integrationId:
|
|
3372
|
-
accessToken:
|
|
3373
|
-
userId:
|
|
3374
|
-
createdAt:
|
|
3375
|
-
refreshToken:
|
|
3380
|
+
integrationId: z138.string(),
|
|
3381
|
+
accessToken: z138.string(),
|
|
3382
|
+
userId: z138.string(),
|
|
3383
|
+
createdAt: z138.coerce.date(),
|
|
3384
|
+
refreshToken: z138.string().optional(),
|
|
3376
3385
|
profile: IntegrationCredentialsProfile.optional()
|
|
3377
3386
|
});
|
|
3387
|
+
var IntegrationType = z138.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
3388
|
+
var Integration = z138.object({
|
|
3389
|
+
id: z138.string(),
|
|
3390
|
+
workspaceId: z138.string(),
|
|
3391
|
+
type: IntegrationType,
|
|
3392
|
+
createdAt: z138.coerce.date(),
|
|
3393
|
+
integrationCredentials: z138.array(IntegrationCredentialsSchema).optional()
|
|
3394
|
+
});
|
|
3378
3395
|
|
|
3379
3396
|
// src/integrations/oauth-token.ts
|
|
3380
|
-
import { z as
|
|
3381
|
-
var IntegrationTokenSchema =
|
|
3382
|
-
id:
|
|
3397
|
+
import { z as z139 } from "zod";
|
|
3398
|
+
var IntegrationTokenSchema = z139.object({
|
|
3399
|
+
id: z139.string(),
|
|
3383
3400
|
provider: OAuthProviderSchema,
|
|
3384
|
-
scope:
|
|
3385
|
-
userId:
|
|
3386
|
-
accessToken:
|
|
3387
|
-
refreshToken:
|
|
3388
|
-
expiresAt:
|
|
3389
|
-
externalUserId:
|
|
3401
|
+
scope: z139.string(),
|
|
3402
|
+
userId: z139.string(),
|
|
3403
|
+
accessToken: z139.string(),
|
|
3404
|
+
refreshToken: z139.string(),
|
|
3405
|
+
expiresAt: z139.coerce.date(),
|
|
3406
|
+
externalUserId: z139.string().nullish()
|
|
3390
3407
|
});
|
|
3391
3408
|
|
|
3392
3409
|
// src/integrations/workspace-oauth-requests.ts
|
|
3393
|
-
import { z as
|
|
3394
|
-
var WorkspaceOAuthRequestSchema =
|
|
3395
|
-
id:
|
|
3396
|
-
workspaceId:
|
|
3410
|
+
import { z as z140 } from "zod";
|
|
3411
|
+
var WorkspaceOAuthRequestSchema = z140.object({
|
|
3412
|
+
id: z140.string(),
|
|
3413
|
+
workspaceId: z140.string(),
|
|
3397
3414
|
provider: OAuthProviderSchema,
|
|
3398
|
-
userId:
|
|
3399
|
-
createdAt:
|
|
3415
|
+
userId: z140.string(),
|
|
3416
|
+
createdAt: z140.coerce.date()
|
|
3400
3417
|
});
|
|
3401
3418
|
|
|
3402
3419
|
// src/npm/npm-package.ts
|
|
3403
|
-
import { z as
|
|
3404
|
-
var AnyRecord =
|
|
3420
|
+
import { z as z141 } from "zod";
|
|
3421
|
+
var AnyRecord = z141.record(z141.any());
|
|
3405
3422
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3406
|
-
|
|
3407
|
-
tarball:
|
|
3423
|
+
z141.object({
|
|
3424
|
+
tarball: z141.string()
|
|
3408
3425
|
})
|
|
3409
3426
|
);
|
|
3410
3427
|
var NpmPackageVersion = AnyRecord.and(
|
|
3411
|
-
|
|
3428
|
+
z141.object({
|
|
3412
3429
|
dist: NpmPackageVersionDist
|
|
3413
3430
|
})
|
|
3414
3431
|
);
|
|
3415
3432
|
var NpmPackage = AnyRecord.and(
|
|
3416
|
-
|
|
3417
|
-
_id:
|
|
3418
|
-
name:
|
|
3433
|
+
z141.object({
|
|
3434
|
+
_id: z141.string(),
|
|
3435
|
+
name: z141.string(),
|
|
3419
3436
|
// e.g. "latest": "1.2.3"
|
|
3420
|
-
"dist-tags":
|
|
3437
|
+
"dist-tags": z141.record(z141.string(), z141.string()),
|
|
3421
3438
|
// "1.2.3": {...}
|
|
3422
|
-
versions:
|
|
3439
|
+
versions: z141.record(NpmPackageVersion)
|
|
3423
3440
|
})
|
|
3424
3441
|
);
|
|
3425
3442
|
|
|
3426
3443
|
// src/npm/npm-proxy-token-payload.ts
|
|
3427
|
-
import { z as
|
|
3428
|
-
var NpmProxyTokenPayload =
|
|
3429
|
-
npmProxyRegistryConfigId:
|
|
3444
|
+
import { z as z142 } from "zod";
|
|
3445
|
+
var NpmProxyTokenPayload = z142.object({
|
|
3446
|
+
npmProxyRegistryConfigId: z142.string()
|
|
3430
3447
|
});
|
|
3431
3448
|
|
|
3432
3449
|
// src/tokens/personal-access-token.ts
|
|
3433
|
-
import { z as
|
|
3434
|
-
var PersonalAccessToken =
|
|
3435
|
-
id:
|
|
3436
|
-
userId:
|
|
3437
|
-
workspaceId:
|
|
3450
|
+
import { z as z143 } from "zod";
|
|
3451
|
+
var PersonalAccessToken = z143.object({
|
|
3452
|
+
id: z143.string(),
|
|
3453
|
+
userId: z143.string(),
|
|
3454
|
+
workspaceId: z143.string().optional(),
|
|
3438
3455
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3439
|
-
name:
|
|
3440
|
-
hidden:
|
|
3441
|
-
token:
|
|
3442
|
-
scope:
|
|
3443
|
-
createdAt:
|
|
3444
|
-
expireAt:
|
|
3456
|
+
name: z143.string(),
|
|
3457
|
+
hidden: z143.boolean(),
|
|
3458
|
+
token: z143.string(),
|
|
3459
|
+
scope: z143.string().optional(),
|
|
3460
|
+
createdAt: z143.coerce.date(),
|
|
3461
|
+
expireAt: z143.coerce.date().optional()
|
|
3445
3462
|
});
|
|
3446
3463
|
|
|
3447
3464
|
// src/utils/errors.ts
|
|
@@ -3576,26 +3593,26 @@ async function sleep(ms) {
|
|
|
3576
3593
|
}
|
|
3577
3594
|
|
|
3578
3595
|
// src/utils/content-loader-instruction.ts
|
|
3579
|
-
import { z as
|
|
3580
|
-
var ContentLoadInstruction =
|
|
3581
|
-
from:
|
|
3582
|
-
to:
|
|
3583
|
-
authorizationHeaderKvsId:
|
|
3584
|
-
timeout:
|
|
3585
|
-
});
|
|
3586
|
-
var ContentLoaderPayload =
|
|
3587
|
-
type:
|
|
3596
|
+
import { z as z144 } from "zod";
|
|
3597
|
+
var ContentLoadInstruction = z144.object({
|
|
3598
|
+
from: z144.string(),
|
|
3599
|
+
to: z144.string(),
|
|
3600
|
+
authorizationHeaderKvsId: z144.string().optional(),
|
|
3601
|
+
timeout: z144.number().optional()
|
|
3602
|
+
});
|
|
3603
|
+
var ContentLoaderPayload = z144.object({
|
|
3604
|
+
type: z144.literal("Single"),
|
|
3588
3605
|
instruction: ContentLoadInstruction
|
|
3589
3606
|
}).or(
|
|
3590
|
-
|
|
3591
|
-
type:
|
|
3592
|
-
loadingChunkSize:
|
|
3593
|
-
instructions:
|
|
3607
|
+
z144.object({
|
|
3608
|
+
type: z144.literal("Multiple"),
|
|
3609
|
+
loadingChunkSize: z144.number().optional(),
|
|
3610
|
+
instructions: z144.array(ContentLoadInstruction)
|
|
3594
3611
|
})
|
|
3595
3612
|
).or(
|
|
3596
|
-
|
|
3597
|
-
type:
|
|
3598
|
-
location:
|
|
3613
|
+
z144.object({
|
|
3614
|
+
type: z144.literal("S3"),
|
|
3615
|
+
location: z144.string()
|
|
3599
3616
|
})
|
|
3600
3617
|
);
|
|
3601
3618
|
|
|
@@ -4277,6 +4294,7 @@ export {
|
|
|
4277
4294
|
ContentLoadInstruction,
|
|
4278
4295
|
ContentLoaderPayload,
|
|
4279
4296
|
CreateDesignToken,
|
|
4297
|
+
CreateUserInput,
|
|
4280
4298
|
CreateWorkspaceInput,
|
|
4281
4299
|
CustomDomain,
|
|
4282
4300
|
Customer,
|
|
@@ -4724,6 +4742,7 @@ export {
|
|
|
4724
4742
|
UserOnboardingJobLevel,
|
|
4725
4743
|
UserProfile,
|
|
4726
4744
|
UserSession,
|
|
4745
|
+
UserTest,
|
|
4727
4746
|
Visibility,
|
|
4728
4747
|
VisibilityTokenData,
|
|
4729
4748
|
VisibilityValue,
|