@supernova-studio/client 0.57.6 → 0.57.8

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
@@ -4645,6 +4645,7 @@ var PersonalAccessToken = z174.object({
4645
4645
  id: z174.string(),
4646
4646
  userId: z174.string(),
4647
4647
  workspaceId: z174.string().optional(),
4648
+ designSystemId: z174.string().optional(),
4648
4649
  workspaceRole: WorkspaceRoleSchema.optional(),
4649
4650
  name: z174.string(),
4650
4651
  hidden: z174.boolean(),
@@ -6050,6 +6051,9 @@ import { z as z215 } from "zod";
6050
6051
  var DTOExporterType = z215.enum(["documentation", "code"]);
6051
6052
  var DTOExporterSource = z215.enum(["git", "upload"]);
6052
6053
  var DTOExporterMembershipRole = z215.enum(["Owner", "OwnerArchived", "User"]);
6054
+ var DTOExporterListQuery = z215.object({
6055
+ limit: z215.coerce.number().optional()
6056
+ });
6053
6057
  var DTOExporter = z215.object({
6054
6058
  id: z215.string(),
6055
6059
  name: z215.string(),
@@ -6063,9 +6067,9 @@ var DTOExporter = z215.object({
6063
6067
  usesBrands: z215.boolean(),
6064
6068
  usesThemes: z215.boolean(),
6065
6069
  source: DTOExporterSource,
6066
- gitUrl: z215.string().optional(),
6067
- gitBranch: z215.string().optional(),
6068
- gitDirectory: z215.string().optional()
6070
+ gitUrl: nullishToOptional(z215.string()),
6071
+ gitBranch: nullishToOptional(z215.string()),
6072
+ gitDirectory: nullishToOptional(z215.string())
6069
6073
  });
6070
6074
  var DTOExporterMembership = z215.object({
6071
6075
  workspaceId: z215.string(),
@@ -6076,6 +6080,10 @@ var DTOExporterCreateOutput = z215.object({
6076
6080
  exporter: DTOExporter,
6077
6081
  membership: DTOExporterMembership
6078
6082
  });
6083
+ var DTOExporterListResponse = z215.object({
6084
+ exporters: DTOExporter.array(),
6085
+ membership: DTOExporterMembership.array()
6086
+ });
6079
6087
  var DTOExporterGitProviderEnum = z215.enum(["github", "gitlab", "bitbucket", "azure"]);
6080
6088
  var DTOExporterCreateInput = z215.object({
6081
6089
  url: z215.string(),
@@ -6142,6 +6150,11 @@ var DTOExportJobResponse = z216.object({
6142
6150
 
6143
6151
  // src/api/dto/export/pipeline.ts
6144
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
+ });
6145
6158
  var DTOPipeline = z217.object({
6146
6159
  id: z217.string(),
6147
6160
  name: z217.string(),
@@ -6156,6 +6169,12 @@ var DTOPipeline = z217.object({
6156
6169
  ...ExportDestinationsMap.shape,
6157
6170
  latestJobs: DTOExportJob.array()
6158
6171
  });
6172
+ var DTOPipelineListResponse = z217.object({
6173
+ pipelines: DTOPipeline.array()
6174
+ });
6175
+ var DTOPipelineResponse = z217.object({
6176
+ pipeline: DTOPipeline
6177
+ });
6159
6178
 
6160
6179
  // src/api/dto/documentation/publish.ts
6161
6180
  var DTOPublishDocumentationChanges = ExportJobDocumentationChanges;
@@ -6814,6 +6833,63 @@ var DTOUserProfileUpdateResponse = z241.object({
6814
6833
  user: User
6815
6834
  });
6816
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
+
6817
6893
  // src/api/endpoints/design-system/versions/brands.ts
6818
6894
  var BrandsEndpoint = class {
6819
6895
  constructor(requestExecutor) {
@@ -7017,7 +7093,7 @@ var DesignSystemsEndpoint = class {
7017
7093
  return this.requestExecutor.json(`/workspaces/${wsId}/design-systems`, DTODesignSystemsListResponse);
7018
7094
  }
7019
7095
  get(dsId) {
7020
- return this.requestExecutor.json(`/design-systems/${dsId}`, z244.any());
7096
+ return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
7021
7097
  }
7022
7098
  delete(dsId) {
7023
7099
  return this.requestExecutor.json(`/design-systems/${dsId}`, z244.any(), { method: "DELETE" });
@@ -7270,6 +7346,7 @@ var SupernovaApiClient = class {
7270
7346
  __publicField(this, "users");
7271
7347
  __publicField(this, "workspaces");
7272
7348
  __publicField(this, "designSystems");
7349
+ __publicField(this, "codegen");
7273
7350
  const requestExecutor = new RequestExecutor({
7274
7351
  host: config.host,
7275
7352
  accessToken: config.accessToken
@@ -7277,6 +7354,7 @@ var SupernovaApiClient = class {
7277
7354
  this.users = new UsersEndpoint(requestExecutor);
7278
7355
  this.workspaces = new WorkspacesEndpoint(requestExecutor);
7279
7356
  this.designSystems = new DesignSystemsEndpoint(requestExecutor);
7357
+ this.codegen = new CodegenEndpoint(requestExecutor);
7280
7358
  }
7281
7359
  };
7282
7360
 
@@ -12184,6 +12262,7 @@ export {
12184
12262
  BackendVersionRoomYDoc,
12185
12263
  BlockDefinitionUtils,
12186
12264
  BlockParsingUtils,
12265
+ CodegenEndpoint,
12187
12266
  Collection,
12188
12267
  DTOAppBootstrapDataQuery,
12189
12268
  DTOAppBootstrapDataResponse,
@@ -12329,6 +12408,8 @@ export {
12329
12408
  DTOExporterCreateInput,
12330
12409
  DTOExporterCreateOutput,
12331
12410
  DTOExporterGitProviderEnum,
12411
+ DTOExporterListQuery,
12412
+ DTOExporterListResponse,
12332
12413
  DTOExporterMembership,
12333
12414
  DTOExporterMembershipRole,
12334
12415
  DTOExporterProperty,
@@ -12375,6 +12456,9 @@ export {
12375
12456
  DTOPagination,
12376
12457
  DTOPipeline,
12377
12458
  DTOPipelineCreateBody,
12459
+ DTOPipelineListQuery,
12460
+ DTOPipelineListResponse,
12461
+ DTOPipelineResponse,
12378
12462
  DTOPipelineTriggerBody,
12379
12463
  DTOPipelineUpdateBody,
12380
12464
  DTOPropertyDefinitionCreateActionInputV2,
@@ -12445,6 +12529,7 @@ export {
12445
12529
  ObjectMeta2 as ObjectMeta,
12446
12530
  PageBlockEditorModel,
12447
12531
  PageSectionEditorModel,
12532
+ PipelinesEndpoint,
12448
12533
  RGB,
12449
12534
  RGBA,
12450
12535
  RequestExecutor,