@supernova-studio/client 0.57.7 → 0.57.9

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
@@ -3826,7 +3826,7 @@ var DesignSystemInvitation = z132.object({
3826
3826
  designSystemId: z132.string(),
3827
3827
  workspaceInvitationId: z132.string(),
3828
3828
  designSystemRole: DesignSystemRole.optional(),
3829
- workspaceRole: WorkspaceRoleSchema.optional()
3829
+ workspaceRole: WorkspaceRoleSchema
3830
3830
  });
3831
3831
  var DesignSystemMembership = z133.object({
3832
3832
  id: z133.string(),
@@ -3834,7 +3834,7 @@ var DesignSystemMembership = z133.object({
3834
3834
  designSystemId: z133.string(),
3835
3835
  designSystemRole: DesignSystemRole.optional(),
3836
3836
  workspaceMembershipId: z133.string(),
3837
- workspaceRole: WorkspaceRoleSchema.optional()
3837
+ workspaceRole: WorkspaceRoleSchema
3838
3838
  });
3839
3839
  var DesignSystemMembers = z133.object({
3840
3840
  members: DesignSystemMembership.array(),
@@ -6051,6 +6051,9 @@ import { z as z215 } from "zod";
6051
6051
  var DTOExporterType = z215.enum(["documentation", "code"]);
6052
6052
  var DTOExporterSource = z215.enum(["git", "upload"]);
6053
6053
  var DTOExporterMembershipRole = z215.enum(["Owner", "OwnerArchived", "User"]);
6054
+ var DTOExporterListQuery = z215.object({
6055
+ limit: z215.coerce.number().optional()
6056
+ });
6054
6057
  var DTOExporter = z215.object({
6055
6058
  id: z215.string(),
6056
6059
  name: z215.string(),
@@ -6064,9 +6067,9 @@ var DTOExporter = z215.object({
6064
6067
  usesBrands: z215.boolean(),
6065
6068
  usesThemes: z215.boolean(),
6066
6069
  source: DTOExporterSource,
6067
- gitUrl: z215.string().optional(),
6068
- gitBranch: z215.string().optional(),
6069
- gitDirectory: z215.string().optional()
6070
+ gitUrl: nullishToOptional(z215.string()),
6071
+ gitBranch: nullishToOptional(z215.string()),
6072
+ gitDirectory: nullishToOptional(z215.string())
6070
6073
  });
6071
6074
  var DTOExporterMembership = z215.object({
6072
6075
  workspaceId: z215.string(),
@@ -6077,6 +6080,10 @@ var DTOExporterCreateOutput = z215.object({
6077
6080
  exporter: DTOExporter,
6078
6081
  membership: DTOExporterMembership
6079
6082
  });
6083
+ var DTOExporterListResponse = z215.object({
6084
+ exporters: DTOExporter.array(),
6085
+ membership: DTOExporterMembership.array()
6086
+ });
6080
6087
  var DTOExporterGitProviderEnum = z215.enum(["github", "gitlab", "bitbucket", "azure"]);
6081
6088
  var DTOExporterCreateInput = z215.object({
6082
6089
  url: z215.string(),
@@ -6143,6 +6150,11 @@ var DTOExportJobResponse = z216.object({
6143
6150
 
6144
6151
  // src/api/dto/export/pipeline.ts
6145
6152
  import { z as z217 } from "zod";
6153
+ var DTOPipelineListQuery = z217.object({
6154
+ designSystemId: z217.string().optional(),
6155
+ exporterId: z217.string().optional(),
6156
+ latestJobsLimit: z217.coerce.number().optional()
6157
+ });
6146
6158
  var DTOPipeline = z217.object({
6147
6159
  id: z217.string(),
6148
6160
  name: z217.string(),
@@ -6157,6 +6169,12 @@ var DTOPipeline = z217.object({
6157
6169
  ...ExportDestinationsMap.shape,
6158
6170
  latestJobs: DTOExportJob.array()
6159
6171
  });
6172
+ var DTOPipelineListResponse = z217.object({
6173
+ pipelines: DTOPipeline.array()
6174
+ });
6175
+ var DTOPipelineResponse = z217.object({
6176
+ pipeline: DTOPipeline
6177
+ });
6160
6178
 
6161
6179
  // src/api/dto/documentation/publish.ts
6162
6180
  var DTOPublishDocumentationChanges = ExportJobDocumentationChanges;
@@ -6815,6 +6833,63 @@ var DTOUserProfileUpdateResponse = z241.object({
6815
6833
  user: User
6816
6834
  });
6817
6835
 
6836
+ // src/api/endpoints/codegen/exporters.ts
6837
+ var ExportersEndpoint = class {
6838
+ constructor(requestExecutor) {
6839
+ this.requestExecutor = requestExecutor;
6840
+ }
6841
+ list(workspaceId, query) {
6842
+ const queryWithStrings = Object.fromEntries(
6843
+ Object.entries(query).filter((e) => !!e[1]).map(([k, v]) => [k, v.toString()])
6844
+ );
6845
+ return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterListResponse, {
6846
+ query: new URLSearchParams(queryWithStrings)
6847
+ });
6848
+ }
6849
+ };
6850
+
6851
+ // src/api/endpoints/codegen/pipelines.ts
6852
+ var PipelinesEndpoint = class {
6853
+ constructor(requestExecutor) {
6854
+ this.requestExecutor = requestExecutor;
6855
+ }
6856
+ list(workspaceId, query) {
6857
+ const queryWithStrings = Object.fromEntries(
6858
+ Object.entries(query).filter((e) => !!e[1]).map(([k, v]) => [k, v.toString()])
6859
+ );
6860
+ return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/pipelines`, DTOPipelineListResponse, {
6861
+ query: new URLSearchParams(queryWithStrings)
6862
+ });
6863
+ }
6864
+ create(workspaceId, payload) {
6865
+ return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/pipelines`, DTOPipelineResponse, {
6866
+ body: payload,
6867
+ method: "POST"
6868
+ });
6869
+ }
6870
+ trigger(workspaceId, pipelineId, payload) {
6871
+ return this.requestExecutor.json(
6872
+ `/codegen/workspaces/${workspaceId}/pipelines/${pipelineId}/trigger`,
6873
+ DTOExportJobResponse,
6874
+ {
6875
+ body: payload,
6876
+ method: "POST"
6877
+ }
6878
+ );
6879
+ }
6880
+ };
6881
+
6882
+ // src/api/endpoints/codegen/codegen.ts
6883
+ var CodegenEndpoint = class {
6884
+ constructor(requestExecutor) {
6885
+ this.requestExecutor = requestExecutor;
6886
+ __publicField(this, "exporters");
6887
+ __publicField(this, "pipelines");
6888
+ this.pipelines = new PipelinesEndpoint(requestExecutor);
6889
+ this.exporters = new ExportersEndpoint(requestExecutor);
6890
+ }
6891
+ };
6892
+
6818
6893
  // src/api/endpoints/design-system/versions/brands.ts
6819
6894
  var BrandsEndpoint = class {
6820
6895
  constructor(requestExecutor) {
@@ -7018,7 +7093,7 @@ var DesignSystemsEndpoint = class {
7018
7093
  return this.requestExecutor.json(`/workspaces/${wsId}/design-systems`, DTODesignSystemsListResponse);
7019
7094
  }
7020
7095
  get(dsId) {
7021
- return this.requestExecutor.json(`/design-systems/${dsId}`, z244.any());
7096
+ return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
7022
7097
  }
7023
7098
  delete(dsId) {
7024
7099
  return this.requestExecutor.json(`/design-systems/${dsId}`, z244.any(), { method: "DELETE" });
@@ -7271,6 +7346,7 @@ var SupernovaApiClient = class {
7271
7346
  __publicField(this, "users");
7272
7347
  __publicField(this, "workspaces");
7273
7348
  __publicField(this, "designSystems");
7349
+ __publicField(this, "codegen");
7274
7350
  const requestExecutor = new RequestExecutor({
7275
7351
  host: config.host,
7276
7352
  accessToken: config.accessToken
@@ -7278,6 +7354,7 @@ var SupernovaApiClient = class {
7278
7354
  this.users = new UsersEndpoint(requestExecutor);
7279
7355
  this.workspaces = new WorkspacesEndpoint(requestExecutor);
7280
7356
  this.designSystems = new DesignSystemsEndpoint(requestExecutor);
7357
+ this.codegen = new CodegenEndpoint(requestExecutor);
7281
7358
  }
7282
7359
  };
7283
7360
 
@@ -12185,6 +12262,7 @@ export {
12185
12262
  BackendVersionRoomYDoc,
12186
12263
  BlockDefinitionUtils,
12187
12264
  BlockParsingUtils,
12265
+ CodegenEndpoint,
12188
12266
  Collection,
12189
12267
  DTOAppBootstrapDataQuery,
12190
12268
  DTOAppBootstrapDataResponse,
@@ -12330,6 +12408,8 @@ export {
12330
12408
  DTOExporterCreateInput,
12331
12409
  DTOExporterCreateOutput,
12332
12410
  DTOExporterGitProviderEnum,
12411
+ DTOExporterListQuery,
12412
+ DTOExporterListResponse,
12333
12413
  DTOExporterMembership,
12334
12414
  DTOExporterMembershipRole,
12335
12415
  DTOExporterProperty,
@@ -12376,6 +12456,9 @@ export {
12376
12456
  DTOPagination,
12377
12457
  DTOPipeline,
12378
12458
  DTOPipelineCreateBody,
12459
+ DTOPipelineListQuery,
12460
+ DTOPipelineListResponse,
12461
+ DTOPipelineResponse,
12379
12462
  DTOPipelineTriggerBody,
12380
12463
  DTOPipelineUpdateBody,
12381
12464
  DTOPropertyDefinitionCreateActionInputV2,
@@ -12439,6 +12522,7 @@ export {
12439
12522
  DocumentationHierarchySettings,
12440
12523
  DocumentationPageEditorModel,
12441
12524
  DocumentationPageV1DTO,
12525
+ ExportersEndpoint,
12442
12526
  FormattedCollections,
12443
12527
  FrontendVersionRoomYDoc,
12444
12528
  ListTreeBuilder,
@@ -12446,6 +12530,7 @@ export {
12446
12530
  ObjectMeta2 as ObjectMeta,
12447
12531
  PageBlockEditorModel,
12448
12532
  PageSectionEditorModel,
12533
+ PipelinesEndpoint,
12449
12534
  RGB,
12450
12535
  RGBA,
12451
12536
  RequestExecutor,