@supernova-studio/client 0.54.35 → 0.55.1

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
@@ -7637,7 +7637,56 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7637
7637
  name: z.ZodOptional<z.ZodString>;
7638
7638
  description: z.ZodOptional<z.ZodString>;
7639
7639
  accessMode: z.ZodOptional<z.ZodEnum<["Open", "InviteOnly"]>>;
7640
- inviteUserIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7640
+ invites: z.ZodOptional<z.ZodObject<Pick<{
7641
+ usersToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7642
+ userId: z.ZodString;
7643
+ }, "strip", z.ZodTypeAny, {
7644
+ userId: string;
7645
+ }, {
7646
+ userId: string;
7647
+ }>, "many">>;
7648
+ invitesToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7649
+ inviteId: z.ZodString;
7650
+ }, "strip", z.ZodTypeAny, {
7651
+ inviteId: string;
7652
+ }, {
7653
+ inviteId: string;
7654
+ }>, "many">>;
7655
+ emailsToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7656
+ email: z.ZodString;
7657
+ workspaceRole: z.ZodEnum<["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest", "Contributor"]>;
7658
+ }, "strip", z.ZodTypeAny, {
7659
+ email: string;
7660
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7661
+ }, {
7662
+ email: string;
7663
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7664
+ }>, "many">>;
7665
+ removeUserIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7666
+ deleteInvitationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7667
+ }, "usersToInvite" | "invitesToInvite" | "emailsToInvite">, "strip", z.ZodTypeAny, {
7668
+ usersToInvite?: {
7669
+ userId: string;
7670
+ }[] | undefined;
7671
+ invitesToInvite?: {
7672
+ inviteId: string;
7673
+ }[] | undefined;
7674
+ emailsToInvite?: {
7675
+ email: string;
7676
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7677
+ }[] | undefined;
7678
+ }, {
7679
+ usersToInvite?: {
7680
+ userId: string;
7681
+ }[] | undefined;
7682
+ invitesToInvite?: {
7683
+ inviteId: string;
7684
+ }[] | undefined;
7685
+ emailsToInvite?: {
7686
+ email: string;
7687
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7688
+ }[] | undefined;
7689
+ }>>;
7641
7690
  }, "strip", z.ZodTypeAny, {
7642
7691
  workspaceId: string;
7643
7692
  description?: string | undefined;
@@ -7647,7 +7696,18 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7647
7696
  } | undefined;
7648
7697
  name?: string | undefined;
7649
7698
  accessMode?: "Open" | "InviteOnly" | undefined;
7650
- inviteUserIds?: string[] | undefined;
7699
+ invites?: {
7700
+ usersToInvite?: {
7701
+ userId: string;
7702
+ }[] | undefined;
7703
+ invitesToInvite?: {
7704
+ inviteId: string;
7705
+ }[] | undefined;
7706
+ emailsToInvite?: {
7707
+ email: string;
7708
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7709
+ }[] | undefined;
7710
+ } | undefined;
7651
7711
  }, {
7652
7712
  workspaceId: string;
7653
7713
  description?: string | undefined;
@@ -7657,7 +7717,18 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7657
7717
  } | undefined;
7658
7718
  name?: string | undefined;
7659
7719
  accessMode?: "Open" | "InviteOnly" | undefined;
7660
- inviteUserIds?: string[] | undefined;
7720
+ invites?: {
7721
+ usersToInvite?: {
7722
+ userId: string;
7723
+ }[] | undefined;
7724
+ invitesToInvite?: {
7725
+ inviteId: string;
7726
+ }[] | undefined;
7727
+ emailsToInvite?: {
7728
+ email: string;
7729
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7730
+ }[] | undefined;
7731
+ } | undefined;
7661
7732
  }>;
7662
7733
  type DTODesignSystemCreateInput = z.infer<typeof DTODesignSystemCreateInput>;
7663
7734
 
@@ -46830,16 +46901,16 @@ declare const DTOUserNotificationSettingsResponse: z.ZodObject<{
46830
46901
  };
46831
46902
  }>;
46832
46903
  }, "strip", z.ZodTypeAny, {
46833
- workspaceId: string;
46834
46904
  userId: string;
46905
+ workspaceId: string;
46835
46906
  notificationSettings: {
46836
46907
  liveblocksNotificationSettings: {
46837
46908
  sendCommentNotificationEmails: boolean;
46838
46909
  };
46839
46910
  };
46840
46911
  }, {
46841
- workspaceId: string;
46842
46912
  userId: string;
46913
+ workspaceId: string;
46843
46914
  notificationSettings: {
46844
46915
  liveblocksNotificationSettings: {
46845
46916
  sendCommentNotificationEmails: boolean;
@@ -47827,7 +47898,9 @@ type RequestEexecutorServerErrorCode = SupernovaExceptionType | undefined;
47827
47898
  declare class RequestExecutorError extends Error {
47828
47899
  readonly type: RequestExecutorErrorType;
47829
47900
  readonly errorCode: RequestEexecutorServerErrorCode;
47901
+ readonly serverErrorType: SupernovaExceptionType | undefined;
47830
47902
  static tryParseErrorCode(body: string): any;
47903
+ static tryParseServerErrorType(body: string): any;
47831
47904
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
47832
47905
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
47833
47906
  private constructor();
package/dist/index.d.ts CHANGED
@@ -7637,7 +7637,56 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7637
7637
  name: z.ZodOptional<z.ZodString>;
7638
7638
  description: z.ZodOptional<z.ZodString>;
7639
7639
  accessMode: z.ZodOptional<z.ZodEnum<["Open", "InviteOnly"]>>;
7640
- inviteUserIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7640
+ invites: z.ZodOptional<z.ZodObject<Pick<{
7641
+ usersToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7642
+ userId: z.ZodString;
7643
+ }, "strip", z.ZodTypeAny, {
7644
+ userId: string;
7645
+ }, {
7646
+ userId: string;
7647
+ }>, "many">>;
7648
+ invitesToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7649
+ inviteId: z.ZodString;
7650
+ }, "strip", z.ZodTypeAny, {
7651
+ inviteId: string;
7652
+ }, {
7653
+ inviteId: string;
7654
+ }>, "many">>;
7655
+ emailsToInvite: z.ZodOptional<z.ZodArray<z.ZodObject<{
7656
+ email: z.ZodString;
7657
+ workspaceRole: z.ZodEnum<["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest", "Contributor"]>;
7658
+ }, "strip", z.ZodTypeAny, {
7659
+ email: string;
7660
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7661
+ }, {
7662
+ email: string;
7663
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7664
+ }>, "many">>;
7665
+ removeUserIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7666
+ deleteInvitationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7667
+ }, "usersToInvite" | "invitesToInvite" | "emailsToInvite">, "strip", z.ZodTypeAny, {
7668
+ usersToInvite?: {
7669
+ userId: string;
7670
+ }[] | undefined;
7671
+ invitesToInvite?: {
7672
+ inviteId: string;
7673
+ }[] | undefined;
7674
+ emailsToInvite?: {
7675
+ email: string;
7676
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7677
+ }[] | undefined;
7678
+ }, {
7679
+ usersToInvite?: {
7680
+ userId: string;
7681
+ }[] | undefined;
7682
+ invitesToInvite?: {
7683
+ inviteId: string;
7684
+ }[] | undefined;
7685
+ emailsToInvite?: {
7686
+ email: string;
7687
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7688
+ }[] | undefined;
7689
+ }>>;
7641
7690
  }, "strip", z.ZodTypeAny, {
7642
7691
  workspaceId: string;
7643
7692
  description?: string | undefined;
@@ -7647,7 +7696,18 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7647
7696
  } | undefined;
7648
7697
  name?: string | undefined;
7649
7698
  accessMode?: "Open" | "InviteOnly" | undefined;
7650
- inviteUserIds?: string[] | undefined;
7699
+ invites?: {
7700
+ usersToInvite?: {
7701
+ userId: string;
7702
+ }[] | undefined;
7703
+ invitesToInvite?: {
7704
+ inviteId: string;
7705
+ }[] | undefined;
7706
+ emailsToInvite?: {
7707
+ email: string;
7708
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7709
+ }[] | undefined;
7710
+ } | undefined;
7651
7711
  }, {
7652
7712
  workspaceId: string;
7653
7713
  description?: string | undefined;
@@ -7657,7 +7717,18 @@ declare const DTODesignSystemCreateInput: z.ZodObject<{
7657
7717
  } | undefined;
7658
7718
  name?: string | undefined;
7659
7719
  accessMode?: "Open" | "InviteOnly" | undefined;
7660
- inviteUserIds?: string[] | undefined;
7720
+ invites?: {
7721
+ usersToInvite?: {
7722
+ userId: string;
7723
+ }[] | undefined;
7724
+ invitesToInvite?: {
7725
+ inviteId: string;
7726
+ }[] | undefined;
7727
+ emailsToInvite?: {
7728
+ email: string;
7729
+ workspaceRole: "Owner" | "Admin" | "Creator" | "Viewer" | "Billing" | "Guest" | "Contributor";
7730
+ }[] | undefined;
7731
+ } | undefined;
7661
7732
  }>;
7662
7733
  type DTODesignSystemCreateInput = z.infer<typeof DTODesignSystemCreateInput>;
7663
7734
 
@@ -46830,16 +46901,16 @@ declare const DTOUserNotificationSettingsResponse: z.ZodObject<{
46830
46901
  };
46831
46902
  }>;
46832
46903
  }, "strip", z.ZodTypeAny, {
46833
- workspaceId: string;
46834
46904
  userId: string;
46905
+ workspaceId: string;
46835
46906
  notificationSettings: {
46836
46907
  liveblocksNotificationSettings: {
46837
46908
  sendCommentNotificationEmails: boolean;
46838
46909
  };
46839
46910
  };
46840
46911
  }, {
46841
- workspaceId: string;
46842
46912
  userId: string;
46913
+ workspaceId: string;
46843
46914
  notificationSettings: {
46844
46915
  liveblocksNotificationSettings: {
46845
46916
  sendCommentNotificationEmails: boolean;
@@ -47827,7 +47898,9 @@ type RequestEexecutorServerErrorCode = SupernovaExceptionType | undefined;
47827
47898
  declare class RequestExecutorError extends Error {
47828
47899
  readonly type: RequestExecutorErrorType;
47829
47900
  readonly errorCode: RequestEexecutorServerErrorCode;
47901
+ readonly serverErrorType: SupernovaExceptionType | undefined;
47830
47902
  static tryParseErrorCode(body: string): any;
47903
+ static tryParseServerErrorType(body: string): any;
47831
47904
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
47832
47905
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
47833
47906
  private constructor();
package/dist/index.js CHANGED
@@ -178,6 +178,7 @@ var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr)
178
178
 
179
179
 
180
180
 
181
+
181
182
 
182
183
 
183
184
  var __defProp2 = Object.defineProperty;
@@ -4328,6 +4329,15 @@ var DesignSystemInviteEmailData = _zod.z.object({
4328
4329
  invitedBy: User,
4329
4330
  documentationDomain: _zod.z.string().optional()
4330
4331
  });
4332
+ var WorkspaceInviteEmailRecipient = _zod.z.object({
4333
+ email: _zod.z.string(),
4334
+ role: WorkspaceRoleSchema
4335
+ });
4336
+ var WorkspaceInviteEmailData = _zod.z.object({
4337
+ workspace: Workspace,
4338
+ invitedBy: User,
4339
+ documentationDomain: _zod.z.string().optional()
4340
+ });
4331
4341
  var EventDataSourceImported = _zod.z.object({
4332
4342
  type: _zod.z.literal("DataSourceImported"),
4333
4343
  workspaceId: _zod.z.string(),
@@ -5103,6 +5113,26 @@ var DTODataSourceCreationResponse = _zod.z.object({
5103
5113
 
5104
5114
  // src/api/dto/design-systems/design-system.ts
5105
5115
 
5116
+
5117
+ // src/api/dto/design-systems/members.ts
5118
+
5119
+ var DTODesignSystemMember = _zod.z.object({
5120
+ userId: _zod.z.string()
5121
+ });
5122
+ var DTODesignSystemInvitation = _zod.z.object({
5123
+ id: _zod.z.string(),
5124
+ workspaceInvitationId: _zod.z.string()
5125
+ });
5126
+ var DTODesignSystemMemberListResponse = _zod.z.object({
5127
+ members: DTODesignSystemMember.array(),
5128
+ invitations: DTODesignSystemInvitation.array()
5129
+ });
5130
+ var DTODesignSystemMembersUpdateResponse = _zod.z.object({
5131
+ ok: _zod.z.literal(true)
5132
+ });
5133
+ var DTODesignSystemMembersUpdatePayload = DesignSystemMembershipUpdates;
5134
+
5135
+ // src/api/dto/design-systems/design-system.ts
5106
5136
  var DTODesignSystem = DesignSystem.omit({
5107
5137
  name: true,
5108
5138
  description: true,
@@ -5125,7 +5155,11 @@ var DTODesignSystemCreateInput = _zod.z.object({
5125
5155
  name: _zod.z.string().min(2).max(64).optional(),
5126
5156
  description: _zod.z.string().max(1024).optional(),
5127
5157
  accessMode: DesignSystemAccessMode.optional(),
5128
- inviteUserIds: _zod.z.string().array().optional()
5158
+ invites: DTODesignSystemMembersUpdatePayload.pick({
5159
+ usersToInvite: true,
5160
+ invitesToInvite: true,
5161
+ emailsToInvite: true
5162
+ }).optional()
5129
5163
  });
5130
5164
 
5131
5165
  // src/api/dto/design-systems/elements-diff.ts
@@ -5145,24 +5179,6 @@ var DTODesignElementsDataDiffResponse = _zod.z.object({
5145
5179
  var DTOExporterProperty = _zod.z.any({});
5146
5180
  var DTOExporterPropertyListResponse = _zod.z.object({ items: _zod.z.array(DTOExporterProperty) });
5147
5181
 
5148
- // src/api/dto/design-systems/members.ts
5149
-
5150
- var DTODesignSystemMember = _zod.z.object({
5151
- userId: _zod.z.string()
5152
- });
5153
- var DTODesignSystemInvitation = _zod.z.object({
5154
- id: _zod.z.string(),
5155
- workspaceInvitationId: _zod.z.string()
5156
- });
5157
- var DTODesignSystemMemberListResponse = _zod.z.object({
5158
- members: DTODesignSystemMember.array(),
5159
- invitations: DTODesignSystemInvitation.array()
5160
- });
5161
- var DTODesignSystemMembersUpdateResponse = _zod.z.object({
5162
- ok: _zod.z.literal(true)
5163
- });
5164
- var DTODesignSystemMembersUpdatePayload = DesignSystemMembershipUpdates;
5165
-
5166
5182
  // src/api/dto/design-systems/version.ts
5167
5183
 
5168
5184
 
@@ -6604,12 +6620,14 @@ var WorkspacesEndpoint = class {
6604
6620
 
6605
6621
  // src/api/transport/request-executor-error.ts
6606
6622
  var RequestExecutorError = class _RequestExecutorError extends Error {
6607
- constructor(type, message, errorCode, cause) {
6623
+ constructor(type, message, errorCode, serverErrorType, cause) {
6608
6624
  super(`${type}: ${message}`, { cause });
6609
6625
  __publicField(this, "type");
6610
6626
  __publicField(this, "errorCode");
6627
+ __publicField(this, "serverErrorType");
6611
6628
  this.type = type;
6612
6629
  this.errorCode = errorCode;
6630
+ this.serverErrorType = serverErrorType;
6613
6631
  }
6614
6632
  static tryParseErrorCode(body) {
6615
6633
  try {
@@ -6622,12 +6640,24 @@ var RequestExecutorError = class _RequestExecutorError extends Error {
6622
6640
  return null;
6623
6641
  }
6624
6642
  }
6643
+ static tryParseServerErrorType(body) {
6644
+ try {
6645
+ const errorObj = JSON.parse(body);
6646
+ if (errorObj && typeof errorObj.errorCode === "string") {
6647
+ return errorObj.type;
6648
+ }
6649
+ return null;
6650
+ } catch (e) {
6651
+ return null;
6652
+ }
6653
+ }
6625
6654
  static serverError(endpoint, status, bodyText) {
6626
6655
  return new _RequestExecutorError(
6627
6656
  "ServerError",
6628
6657
  `Endpoint ${endpoint} returned ${status}
6629
6658
  ${bodyText}`,
6630
- this.tryParseErrorCode(bodyText)
6659
+ this.tryParseErrorCode(bodyText),
6660
+ this.tryParseServerErrorType(bodyText)
6631
6661
  );
6632
6662
  }
6633
6663
  static responseParsingError(endpoint, cause) {
@@ -6635,6 +6665,7 @@ ${bodyText}`,
6635
6665
  "ResponseParsingError",
6636
6666
  `Endpoint ${endpoint} returned incompatible JSON`,
6637
6667
  void 0,
6668
+ void 0,
6638
6669
  cause
6639
6670
  );
6640
6671
  }