@supernova-studio/client 0.54.34 → 0.55.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 CHANGED
@@ -47827,7 +47827,9 @@ type RequestEexecutorServerErrorCode = SupernovaExceptionType | undefined;
47827
47827
  declare class RequestExecutorError extends Error {
47828
47828
  readonly type: RequestExecutorErrorType;
47829
47829
  readonly errorCode: RequestEexecutorServerErrorCode;
47830
+ readonly serverErrorType: SupernovaExceptionType | undefined;
47830
47831
  static tryParseErrorCode(body: string): any;
47832
+ static tryParseServerErrorType(body: string): any;
47831
47833
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
47832
47834
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
47833
47835
  private constructor();
package/dist/index.d.ts CHANGED
@@ -47827,7 +47827,9 @@ type RequestEexecutorServerErrorCode = SupernovaExceptionType | undefined;
47827
47827
  declare class RequestExecutorError extends Error {
47828
47828
  readonly type: RequestExecutorErrorType;
47829
47829
  readonly errorCode: RequestEexecutorServerErrorCode;
47830
+ readonly serverErrorType: SupernovaExceptionType | undefined;
47830
47831
  static tryParseErrorCode(body: string): any;
47832
+ static tryParseServerErrorType(body: string): any;
47831
47833
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
47832
47834
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
47833
47835
  private constructor();
package/dist/index.js CHANGED
@@ -177,6 +177,7 @@ var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr)
177
177
 
178
178
 
179
179
 
180
+
180
181
 
181
182
 
182
183
  var __defProp2 = Object.defineProperty;
@@ -4318,6 +4319,15 @@ var UserSession = _zod.z.object({
4318
4319
  session: Session,
4319
4320
  user: User.nullable()
4320
4321
  });
4322
+ var DesignSystemInviteEmailRecipient = _zod.z.object({
4323
+ email: _zod.z.string(),
4324
+ role: WorkspaceRoleSchema
4325
+ });
4326
+ var DesignSystemInviteEmailData = _zod.z.object({
4327
+ designSystem: DesignSystem,
4328
+ invitedBy: User,
4329
+ documentationDomain: _zod.z.string().optional()
4330
+ });
4321
4331
  var EventDataSourceImported = _zod.z.object({
4322
4332
  type: _zod.z.literal("DataSourceImported"),
4323
4333
  workspaceId: _zod.z.string(),
@@ -6594,12 +6604,14 @@ var WorkspacesEndpoint = class {
6594
6604
 
6595
6605
  // src/api/transport/request-executor-error.ts
6596
6606
  var RequestExecutorError = class _RequestExecutorError extends Error {
6597
- constructor(type, message, errorCode, cause) {
6607
+ constructor(type, message, errorCode, serverErrorType, cause) {
6598
6608
  super(`${type}: ${message}`, { cause });
6599
6609
  __publicField(this, "type");
6600
6610
  __publicField(this, "errorCode");
6611
+ __publicField(this, "serverErrorType");
6601
6612
  this.type = type;
6602
6613
  this.errorCode = errorCode;
6614
+ this.serverErrorType = serverErrorType;
6603
6615
  }
6604
6616
  static tryParseErrorCode(body) {
6605
6617
  try {
@@ -6612,12 +6624,24 @@ var RequestExecutorError = class _RequestExecutorError extends Error {
6612
6624
  return null;
6613
6625
  }
6614
6626
  }
6627
+ static tryParseServerErrorType(body) {
6628
+ try {
6629
+ const errorObj = JSON.parse(body);
6630
+ if (errorObj && typeof errorObj.errorCode === "string") {
6631
+ return errorObj.type;
6632
+ }
6633
+ return null;
6634
+ } catch (e) {
6635
+ return null;
6636
+ }
6637
+ }
6615
6638
  static serverError(endpoint, status, bodyText) {
6616
6639
  return new _RequestExecutorError(
6617
6640
  "ServerError",
6618
6641
  `Endpoint ${endpoint} returned ${status}
6619
6642
  ${bodyText}`,
6620
- this.tryParseErrorCode(bodyText)
6643
+ this.tryParseErrorCode(bodyText),
6644
+ this.tryParseServerErrorType(bodyText)
6621
6645
  );
6622
6646
  }
6623
6647
  static responseParsingError(endpoint, cause) {
@@ -6625,6 +6649,7 @@ ${bodyText}`,
6625
6649
  "ResponseParsingError",
6626
6650
  `Endpoint ${endpoint} returned incompatible JSON`,
6627
6651
  void 0,
6652
+ void 0,
6628
6653
  cause
6629
6654
  );
6630
6655
  }