@supernova-studio/client 0.47.18 → 0.47.22

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.mjs CHANGED
@@ -2771,7 +2771,10 @@ var ExporterDestinationGithub = z133.object({
2771
2771
  url: z133.string(),
2772
2772
  // Location
2773
2773
  branch: z133.string(),
2774
- relativePath: nullishToOptional(z133.string())
2774
+ relativePath: nullishToOptional(z133.string()),
2775
+ // Legacy deprecated fields. Use `credentialId` instead
2776
+ connectionId: z133.string().optional(),
2777
+ userId: z133.number().optional()
2775
2778
  });
2776
2779
  var ExporterDestinationAzure = z133.object({
2777
2780
  credentialId: z133.string().optional(),
@@ -2783,7 +2786,10 @@ var ExporterDestinationAzure = z133.object({
2783
2786
  branch: z133.string(),
2784
2787
  relativePath: nullishToOptional(z133.string()),
2785
2788
  // Maybe not needed
2786
- url: nullishToOptional(z133.string())
2789
+ url: nullishToOptional(z133.string()),
2790
+ // Legacy deprecated fields. Use `credentialId` instead
2791
+ connectionId: z133.string().optional(),
2792
+ userId: z133.number().optional()
2787
2793
  });
2788
2794
  var ExporterDestinationGitlab = z133.object({
2789
2795
  credentialId: z133.string().optional(),
@@ -2793,7 +2799,10 @@ var ExporterDestinationGitlab = z133.object({
2793
2799
  branch: z133.string(),
2794
2800
  relativePath: nullishToOptional(z133.string()),
2795
2801
  // Maybe not needed
2796
- url: nullishToOptional(z133.string())
2802
+ url: nullishToOptional(z133.string()),
2803
+ // Legacy deprecated fields. Use `credentialId` instead
2804
+ connectionId: z133.string().optional(),
2805
+ userId: z133.number().optional()
2797
2806
  });
2798
2807
  var ExporterDestinationBitbucket = z133.object({
2799
2808
  credentialId: z133.string().optional(),
@@ -2803,7 +2812,10 @@ var ExporterDestinationBitbucket = z133.object({
2803
2812
  repoSlug: z133.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
2804
2813
  // Location
2805
2814
  branch: z133.string(),
2806
- relativePath: nullishToOptional(z133.string())
2815
+ relativePath: nullishToOptional(z133.string()),
2816
+ // Legacy deprecated fields. Use `credentialId` instead
2817
+ connectionId: z133.string().optional(),
2818
+ userId: z133.number().optional()
2807
2819
  });
2808
2820
  var ExportDestinationsMap = z133.object({
2809
2821
  webhookUrl: z133.string().optional(),
@@ -3062,12 +3074,12 @@ var IntegrationDesignSystem = z145.object({
3062
3074
  });
3063
3075
  var IntegrationCredentialsType = z145.enum(["OAuth2", "PAT", "GithubApp"]);
3064
3076
  var IntegrationCredentialsProfile = z145.object({
3065
- id: z145.string(),
3066
- email: z145.string().optional(),
3067
- handle: z145.string().optional(),
3068
- type: z145.string().optional(),
3069
- avatarUrl: z145.string().optional(),
3070
- organization: z145.string().optional()
3077
+ id: nullishToOptional(z145.string()),
3078
+ email: nullishToOptional(z145.string()),
3079
+ handle: nullishToOptional(z145.string()),
3080
+ type: nullishToOptional(z145.string()),
3081
+ avatarUrl: nullishToOptional(z145.string()),
3082
+ organization: nullishToOptional(z145.string())
3071
3083
  });
3072
3084
  var IntegrationCredentials = z145.object({
3073
3085
  id: z145.string(),
@@ -3081,6 +3093,7 @@ var IntegrationCredentials = z145.object({
3081
3093
  expiresAt: z145.coerce.date().optional(),
3082
3094
  refreshedAt: z145.coerce.date().optional(),
3083
3095
  username: z145.string().optional(),
3096
+ appInstallationId: z145.string().optional(),
3084
3097
  profile: IntegrationCredentialsProfile.optional(),
3085
3098
  customUrl: z145.string().optional(),
3086
3099
  user: UserMinified.optional()
@@ -3311,6 +3324,9 @@ var SupernovaException = class _SupernovaException extends Error {
3311
3324
  static missingCredentials(message) {
3312
3325
  return new _SupernovaException("MissingCredentials", message);
3313
3326
  }
3327
+ static thirdPartyError(message) {
3328
+ return new _SupernovaException("ThirdPartyError", message);
3329
+ }
3314
3330
  //
3315
3331
  // To refactor
3316
3332
  //
@@ -4335,7 +4351,8 @@ function pipelineToDto(pipeline) {
4335
4351
  destinationGithub: pipeline.destinationGithub,
4336
4352
  destinationGitlab: pipeline.destinationGitlab,
4337
4353
  destinationS3: pipeline.destinationS3,
4338
- webhookUrl: pipeline.webhookUrl
4354
+ webhookUrl: pipeline.webhookUrl,
4355
+ latestJobs: []
4339
4356
  };
4340
4357
  }
4341
4358
 
@@ -4371,21 +4388,32 @@ function gitBranchToDto(branch) {
4371
4388
 
4372
4389
  // src/api/conversion/integrations/integration.ts
4373
4390
  function integrationToDto(integration) {
4374
- if (integration.integrationCredentials) {
4375
- integration.integrationCredentials.forEach((credential) => {
4376
- credential.accessToken = "";
4377
- delete credential.refreshToken;
4378
- });
4379
- }
4380
4391
  return {
4381
4392
  id: integration.id,
4382
4393
  workspaceId: integration.workspaceId,
4383
4394
  type: integration.type,
4384
4395
  createdAt: integration.createdAt,
4385
- integrationCredentials: integration.integrationCredentials ?? void 0,
4396
+ integrationCredentials: integration.integrationCredentials?.map(integrationCredentialToDto),
4386
4397
  integrationDesignSystems: integration.integrationDesignSystems ?? void 0
4387
4398
  };
4388
4399
  }
4400
+ function integrationCredentialToDto(credential) {
4401
+ return {
4402
+ id: credential.id,
4403
+ createdAt: credential.createdAt,
4404
+ refreshedAt: credential.refreshedAt,
4405
+ expiresAt: credential.expiresAt,
4406
+ integrationId: credential.integrationId,
4407
+ type: credential.type,
4408
+ userId: credential.userId,
4409
+ user: credential.user,
4410
+ customUrl: credential.customUrl,
4411
+ profile: credential.profile,
4412
+ tokenName: credential.tokenName,
4413
+ username: credential.username,
4414
+ appInstallationId: credential.appInstallationId
4415
+ };
4416
+ }
4389
4417
 
4390
4418
  // src/api/dto/design-systems/brand.ts
4391
4419
  import { z as z156 } from "zod";
@@ -5275,7 +5303,7 @@ var DTOExporter = z188.object({
5275
5303
  iconURL: z188.string().optional(),
5276
5304
  configurationProperties: PulsarContributionConfigurationProperty.array(),
5277
5305
  customBlocks: PulsarCustomBlock.array(),
5278
- blockVariants: PulsarContributionVariant.array(),
5306
+ blockVariants: z188.record(z188.string(), PulsarContributionVariant.array()),
5279
5307
  usesBrands: z188.boolean(),
5280
5308
  usesThemes: z188.boolean(),
5281
5309
  source: DTOExporterSource,
@@ -5295,7 +5323,10 @@ var DTOExporterCreateOutput = z188.object({
5295
5323
  var DTOExporterGitProviderEnum = z188.enum(["github", "gitlab", "bitbucket", "azure"]);
5296
5324
  var DTOExporterCreateInput = z188.object({
5297
5325
  url: z188.string(),
5298
- provider: DTOExporterGitProviderEnum.optional()
5326
+ provider: DTOExporterGitProviderEnum
5327
+ });
5328
+ var DTOExporterUpdateInput = z188.object({
5329
+ url: z188.string().optional()
5299
5330
  });
5300
5331
 
5301
5332
  // src/api/dto/export/job.ts
@@ -5354,7 +5385,8 @@ var DTOPipeline = z190.object({
5354
5385
  exporterId: z190.string(),
5355
5386
  brandPersistentId: z190.string().optional(),
5356
5387
  themePersistentId: z190.string().optional(),
5357
- ...ExportDestinationsMap.shape
5388
+ ...ExportDestinationsMap.shape,
5389
+ latestJobs: DTOExportJob.array()
5358
5390
  });
5359
5391
 
5360
5392
  // src/api/dto/liveblocks/auth-response.ts
@@ -5394,12 +5426,16 @@ var DTOGitBranch = z193.object({
5394
5426
 
5395
5427
  // src/api/dto/workspaces/integrations.ts
5396
5428
  import { z as z194 } from "zod";
5429
+ var DTOIntegrationCredentials = IntegrationCredentials.omit({
5430
+ accessToken: true,
5431
+ refreshToken: true
5432
+ });
5397
5433
  var DTOIntegration = z194.object({
5398
5434
  id: z194.string(),
5399
5435
  workspaceId: z194.string(),
5400
5436
  type: ExtendedIntegrationType,
5401
5437
  createdAt: z194.coerce.date(),
5402
- integrationCredentials: z194.array(IntegrationCredentials).optional(),
5438
+ integrationCredentials: z194.array(DTOIntegrationCredentials).optional(),
5403
5439
  integrationDesignSystems: z194.array(IntegrationDesignSystem).optional()
5404
5440
  });
5405
5441
  var DTOIntegrationOAuthGetResponse = z194.object({
@@ -9294,6 +9330,7 @@ export {
9294
9330
  DTOExporterPropertyListResponse,
9295
9331
  DTOExporterSource,
9296
9332
  DTOExporterType,
9333
+ DTOExporterUpdateInput,
9297
9334
  DTOFigmaNode,
9298
9335
  DTOFigmaNodeData,
9299
9336
  DTOFigmaNodeOrigin,
@@ -9307,6 +9344,7 @@ export {
9307
9344
  DTOGitProject,
9308
9345
  DTOGitRepository,
9309
9346
  DTOIntegration,
9347
+ DTOIntegrationCredentials,
9310
9348
  DTOIntegrationOAuthGetResponse,
9311
9349
  DTOIntegrationPostResponse,
9312
9350
  DTOIntegrationsGetListResponse,
@@ -9377,6 +9415,7 @@ export {
9377
9415
  gitOrganizationToDto,
9378
9416
  gitProjectToDto,
9379
9417
  gitRepositoryToDto,
9418
+ integrationCredentialToDto,
9380
9419
  integrationToDto,
9381
9420
  itemConfigurationToYjs,
9382
9421
  pageToProsemirrorDoc,