@supernova-studio/client 1.69.6 → 1.71.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 +40 -2
- package/dist/index.d.ts +40 -2
- package/dist/index.js +58 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3719,15 +3719,20 @@ var Collection = z99.object({
|
|
|
3719
3719
|
});
|
|
3720
3720
|
var CollectionImportModelInput = z100.object({
|
|
3721
3721
|
id: z100.string(),
|
|
3722
|
+
legacyId: z100.string(),
|
|
3722
3723
|
name: z100.string(),
|
|
3723
3724
|
parentId: z100.string().optional(),
|
|
3725
|
+
parentLegacyId: z100.string().optional(),
|
|
3724
3726
|
parentPersistentId: z100.string().optional()
|
|
3725
3727
|
});
|
|
3726
3728
|
var CollectionImportModel = z100.object({
|
|
3727
3729
|
id: z100.string(),
|
|
3730
|
+
legacyId: z100.string(),
|
|
3731
|
+
parentId: z100.string().optional(),
|
|
3732
|
+
parentLegacyId: z100.string().optional(),
|
|
3728
3733
|
name: z100.string(),
|
|
3729
|
-
|
|
3730
|
-
|
|
3734
|
+
origin: CollectionOrigin,
|
|
3735
|
+
parentPersistentId: z100.string().optional()
|
|
3731
3736
|
});
|
|
3732
3737
|
var ImportModelBase = z101.object({
|
|
3733
3738
|
id: z101.string(),
|
|
@@ -3831,20 +3836,22 @@ var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
|
3831
3836
|
})
|
|
3832
3837
|
);
|
|
3833
3838
|
var ThemeImportModel = z106.object({
|
|
3839
|
+
id: z106.string(),
|
|
3840
|
+
parentId: z106.string().optional(),
|
|
3834
3841
|
meta: ObjectMeta,
|
|
3835
3842
|
brandPersistentId: z106.string(),
|
|
3836
3843
|
originSource: ThemeOriginSource,
|
|
3837
3844
|
overrides: z106.array(ThemeOverrideImportModel),
|
|
3838
3845
|
sortOrder: z106.number(),
|
|
3839
|
-
collectionIds: z106.array(z106.string()).optional()
|
|
3840
|
-
parentPersistentId: z106.string().optional()
|
|
3846
|
+
collectionIds: z106.array(z106.string()).optional()
|
|
3841
3847
|
});
|
|
3842
3848
|
var ThemeImportModelInput = z106.object({
|
|
3849
|
+
id: z106.string(),
|
|
3850
|
+
parentId: z106.string().optional(),
|
|
3843
3851
|
meta: ObjectMeta,
|
|
3844
3852
|
originObjects: z106.array(ThemeOriginObject),
|
|
3845
3853
|
overrides: z106.array(ThemeOverrideImportModelInput),
|
|
3846
|
-
collectionIds: z106.array(z106.string()).optional()
|
|
3847
|
-
parentPersistentId: z106.string().optional()
|
|
3854
|
+
collectionIds: z106.array(z106.string()).optional()
|
|
3848
3855
|
});
|
|
3849
3856
|
var ThemeUpdateImportModel = z106.object({
|
|
3850
3857
|
themePersistentId: z106.string(),
|
|
@@ -4836,6 +4843,7 @@ var ForgeProjectInvitation = z155.object({
|
|
|
4836
4843
|
forgeProjectId: z155.string(),
|
|
4837
4844
|
workspaceInvitationId: z155.string(),
|
|
4838
4845
|
role: ForgeProjectRole,
|
|
4846
|
+
effectiveRole: ForgeProjectRole,
|
|
4839
4847
|
createdAt: z155.coerce.date(),
|
|
4840
4848
|
updatedAt: z155.coerce.date(),
|
|
4841
4849
|
createdById: z155.string()
|
|
@@ -5823,7 +5831,8 @@ var FlaggedFeature = z208.enum([
|
|
|
5823
5831
|
"ForgeOnDemandIterations",
|
|
5824
5832
|
"ForgeAutoRetryOnErrors",
|
|
5825
5833
|
"ForgeAiBackendMigrated",
|
|
5826
|
-
"CustomForgeTemplate"
|
|
5834
|
+
"CustomForgeTemplate",
|
|
5835
|
+
"ForgeRestartPlaywright"
|
|
5827
5836
|
]);
|
|
5828
5837
|
var FeatureFlagMap = z208.record(FlaggedFeature, z208.boolean());
|
|
5829
5838
|
var FeatureFlag = z208.object({
|
|
@@ -13519,35 +13528,22 @@ var RequestExecutorError = class _RequestExecutorError extends Error {
|
|
|
13519
13528
|
this.errorCode = errorCode;
|
|
13520
13529
|
this.serverErrorType = serverErrorType;
|
|
13521
13530
|
}
|
|
13522
|
-
static
|
|
13531
|
+
static tryParseJSON(body) {
|
|
13523
13532
|
try {
|
|
13524
|
-
|
|
13525
|
-
if (errorObj && typeof errorObj.errorCode === "string") {
|
|
13526
|
-
return errorObj.errorCode;
|
|
13527
|
-
}
|
|
13528
|
-
return null;
|
|
13529
|
-
} catch (e) {
|
|
13530
|
-
return null;
|
|
13531
|
-
}
|
|
13532
|
-
}
|
|
13533
|
-
static tryParseServerErrorType(body) {
|
|
13534
|
-
try {
|
|
13535
|
-
const errorObj = JSON.parse(body);
|
|
13536
|
-
if (errorObj && typeof errorObj.errorCode === "string") {
|
|
13537
|
-
return errorObj.type;
|
|
13538
|
-
}
|
|
13539
|
-
return null;
|
|
13533
|
+
return JSON.parse(body);
|
|
13540
13534
|
} catch (e) {
|
|
13541
13535
|
return null;
|
|
13542
13536
|
}
|
|
13543
13537
|
}
|
|
13544
13538
|
static serverError(endpoint, status, bodyText) {
|
|
13539
|
+
const parsedBody = this.tryParseJSON(bodyText);
|
|
13545
13540
|
return new _RequestExecutorError(
|
|
13546
13541
|
"ServerError",
|
|
13547
13542
|
`Endpoint ${endpoint} returned ${status}
|
|
13548
13543
|
${bodyText}`,
|
|
13549
|
-
|
|
13550
|
-
|
|
13544
|
+
parsedBody?.errorCode ?? null,
|
|
13545
|
+
parsedBody?.type ?? null,
|
|
13546
|
+
parsedBody ?? null
|
|
13551
13547
|
);
|
|
13552
13548
|
}
|
|
13553
13549
|
static responseParsingError(endpoint, cause) {
|
|
@@ -13559,6 +13555,12 @@ ${bodyText}`,
|
|
|
13559
13555
|
cause
|
|
13560
13556
|
);
|
|
13561
13557
|
}
|
|
13558
|
+
getDisplayMessage() {
|
|
13559
|
+
if (this.type === "ServerError" && this.cause && typeof this.cause === "object" && "message" in this.cause) {
|
|
13560
|
+
return this.cause.message || this.message;
|
|
13561
|
+
}
|
|
13562
|
+
return this.message;
|
|
13563
|
+
}
|
|
13562
13564
|
};
|
|
13563
13565
|
|
|
13564
13566
|
// src/api/transport/request-executor.ts
|