@supernova-studio/client 1.42.1 → 1.42.2
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 +2576 -2301
- package/dist/index.d.ts +2576 -2301
- package/dist/index.js +107 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9156,22 +9156,25 @@ var DTOFileReference = DTOFile.pick({
|
|
|
9156
9156
|
url: true,
|
|
9157
9157
|
source: true
|
|
9158
9158
|
});
|
|
9159
|
-
var
|
|
9160
|
-
|
|
9159
|
+
var DTOFileUploadOwnerUser = z310.object({
|
|
9160
|
+
ownerType: z310.literal("User")
|
|
9161
9161
|
});
|
|
9162
|
-
var
|
|
9163
|
-
|
|
9162
|
+
var DTOFileUploadOwnerWorkspace = z310.object({
|
|
9163
|
+
ownerType: z310.literal("Workspace"),
|
|
9164
9164
|
workspaceId: z310.string()
|
|
9165
9165
|
});
|
|
9166
|
-
var
|
|
9166
|
+
var DTOFileUploadOwner = z310.discriminatedUnion("ownerType", [DTOFileUploadOwnerUser, DTOFileUploadOwnerWorkspace]);
|
|
9167
9167
|
var DTOFileUploadInput = z310.object({
|
|
9168
9168
|
size: z310.number(),
|
|
9169
9169
|
name: z310.string(),
|
|
9170
9170
|
checksum: z310.string()
|
|
9171
9171
|
});
|
|
9172
|
-
var
|
|
9172
|
+
var DTOFileUploadBulkPayload = z310.object({
|
|
9173
9173
|
files: DTOFileUploadInput.array()
|
|
9174
|
-
}).and(
|
|
9174
|
+
}).and(DTOFileUploadOwner);
|
|
9175
|
+
var DTOFileFinalizeBulkPayload = z310.object({
|
|
9176
|
+
fileIds: z310.string().array()
|
|
9177
|
+
}).and(DTOFileUploadOwner);
|
|
9175
9178
|
var DTOFileListResponse = z310.object({
|
|
9176
9179
|
files: DTOFile.array()
|
|
9177
9180
|
});
|
|
@@ -9184,6 +9187,9 @@ var DTOFileUploadBulkResponse = z310.object({
|
|
|
9184
9187
|
})
|
|
9185
9188
|
)
|
|
9186
9189
|
});
|
|
9190
|
+
var DTOFileFinalizeBulkResponse = z310.object({
|
|
9191
|
+
files: z310.array(DTOFile)
|
|
9192
|
+
});
|
|
9187
9193
|
|
|
9188
9194
|
// src/api/dto/forge/agent.ts
|
|
9189
9195
|
import { z as z311 } from "zod";
|
|
@@ -10429,7 +10435,7 @@ var DTOThemeCreatePayload = z335.object({
|
|
|
10429
10435
|
overrides: DTOThemeOverride.array()
|
|
10430
10436
|
});
|
|
10431
10437
|
|
|
10432
|
-
// src/api/dto/trail-events/
|
|
10438
|
+
// src/api/dto/trail-events/trail-events.ts
|
|
10433
10439
|
import { z as z336 } from "zod";
|
|
10434
10440
|
var DTOTrailEventType = z336.enum([
|
|
10435
10441
|
"IterationCreated",
|
|
@@ -11082,7 +11088,7 @@ var FigmaFrameStructuresEndpoint = class {
|
|
|
11082
11088
|
};
|
|
11083
11089
|
|
|
11084
11090
|
// src/api/endpoints/design-system/versions/files.ts
|
|
11085
|
-
var
|
|
11091
|
+
var DesignSystemFilesEndpoint = class {
|
|
11086
11092
|
constructor(requestExecutor) {
|
|
11087
11093
|
this.requestExecutor = requestExecutor;
|
|
11088
11094
|
}
|
|
@@ -11345,7 +11351,7 @@ var DesignSystemVersionsEndpoint = class {
|
|
|
11345
11351
|
this.designSystemComponents = new DesignSystemComponentEndpoint(requestExecutor);
|
|
11346
11352
|
this.documentation = new DocumentationEndpoint(requestExecutor);
|
|
11347
11353
|
this.codeComponents = new CodeComponentsEndpoint(requestExecutor);
|
|
11348
|
-
this.files = new
|
|
11354
|
+
this.files = new DesignSystemFilesEndpoint(requestExecutor);
|
|
11349
11355
|
}
|
|
11350
11356
|
list(dsId) {
|
|
11351
11357
|
return this.requestExecutor.json(`/design-systems/${dsId}/versions`, DTODesignSystemVersionsListResponse);
|
|
@@ -11661,6 +11667,25 @@ var DesignSystemsEndpoint = class {
|
|
|
11661
11667
|
}
|
|
11662
11668
|
};
|
|
11663
11669
|
|
|
11670
|
+
// src/api/endpoints/files.ts
|
|
11671
|
+
var FilesEndpoint = class {
|
|
11672
|
+
constructor(requestExecutor) {
|
|
11673
|
+
this.requestExecutor = requestExecutor;
|
|
11674
|
+
}
|
|
11675
|
+
upload(body) {
|
|
11676
|
+
return this.requestExecutor.json(`/files/upload`, DTOFileUploadBulkResponse, {
|
|
11677
|
+
method: "POST",
|
|
11678
|
+
body
|
|
11679
|
+
});
|
|
11680
|
+
}
|
|
11681
|
+
finalizeUpload(body) {
|
|
11682
|
+
return this.requestExecutor.json(`/files/upload/finalize`, DTOFileFinalizeBulkResponse, {
|
|
11683
|
+
method: "POST",
|
|
11684
|
+
body
|
|
11685
|
+
});
|
|
11686
|
+
}
|
|
11687
|
+
};
|
|
11688
|
+
|
|
11664
11689
|
// src/api/endpoints/forge/agents.ts
|
|
11665
11690
|
var ForgeAgentsEndpoint = class {
|
|
11666
11691
|
constructor(requestExecutor) {
|
|
@@ -12147,6 +12172,41 @@ var ForgeProjectIterationsEndpoint = class {
|
|
|
12147
12172
|
}
|
|
12148
12173
|
};
|
|
12149
12174
|
|
|
12175
|
+
// src/api/endpoints/liveblocks.ts
|
|
12176
|
+
var LiveblocksEndpoint = class {
|
|
12177
|
+
constructor(requestExecutor) {
|
|
12178
|
+
this.requestExecutor = requestExecutor;
|
|
12179
|
+
}
|
|
12180
|
+
auth(body) {
|
|
12181
|
+
return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
|
|
12182
|
+
method: "POST",
|
|
12183
|
+
body
|
|
12184
|
+
});
|
|
12185
|
+
}
|
|
12186
|
+
};
|
|
12187
|
+
|
|
12188
|
+
// src/api/endpoints/users.ts
|
|
12189
|
+
var UsersEndpoint = class {
|
|
12190
|
+
constructor(requestExecutor) {
|
|
12191
|
+
this.requestExecutor = requestExecutor;
|
|
12192
|
+
}
|
|
12193
|
+
getMe() {
|
|
12194
|
+
return this.requestExecutor.json("/users/me", DTOAuthenticatedUserResponse);
|
|
12195
|
+
}
|
|
12196
|
+
listWorkspaces(uid) {
|
|
12197
|
+
return this.requestExecutor.json(`/users/${uid}/workspaces`, DTOUserWorkspaceMembershipsResponse);
|
|
12198
|
+
}
|
|
12199
|
+
delete(uid) {
|
|
12200
|
+
return this.requestExecutor.json(`/users/${uid}`, DTOAuthenticatedUserResponse, { method: "DELETE" });
|
|
12201
|
+
}
|
|
12202
|
+
updateProfile(uid, body) {
|
|
12203
|
+
return this.requestExecutor.json(`/users/${uid}/profile`, DTOAuthenticatedUserResponse, {
|
|
12204
|
+
method: "PUT",
|
|
12205
|
+
body
|
|
12206
|
+
});
|
|
12207
|
+
}
|
|
12208
|
+
};
|
|
12209
|
+
|
|
12150
12210
|
// src/api/endpoints/workspaces/chat-threads.ts
|
|
12151
12211
|
import { z as z348 } from "zod";
|
|
12152
12212
|
var WorkspaceChatThreadsEndpoint = class {
|
|
@@ -12363,41 +12423,6 @@ var WorkspacesEndpoint = class {
|
|
|
12363
12423
|
}
|
|
12364
12424
|
};
|
|
12365
12425
|
|
|
12366
|
-
// src/api/endpoints/liveblocks.ts
|
|
12367
|
-
var LiveblocksEndpoint = class {
|
|
12368
|
-
constructor(requestExecutor) {
|
|
12369
|
-
this.requestExecutor = requestExecutor;
|
|
12370
|
-
}
|
|
12371
|
-
auth(body) {
|
|
12372
|
-
return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
|
|
12373
|
-
method: "POST",
|
|
12374
|
-
body
|
|
12375
|
-
});
|
|
12376
|
-
}
|
|
12377
|
-
};
|
|
12378
|
-
|
|
12379
|
-
// src/api/endpoints/users.ts
|
|
12380
|
-
var UsersEndpoint = class {
|
|
12381
|
-
constructor(requestExecutor) {
|
|
12382
|
-
this.requestExecutor = requestExecutor;
|
|
12383
|
-
}
|
|
12384
|
-
getMe() {
|
|
12385
|
-
return this.requestExecutor.json("/users/me", DTOAuthenticatedUserResponse);
|
|
12386
|
-
}
|
|
12387
|
-
listWorkspaces(uid) {
|
|
12388
|
-
return this.requestExecutor.json(`/users/${uid}/workspaces`, DTOUserWorkspaceMembershipsResponse);
|
|
12389
|
-
}
|
|
12390
|
-
delete(uid) {
|
|
12391
|
-
return this.requestExecutor.json(`/users/${uid}`, DTOAuthenticatedUserResponse, { method: "DELETE" });
|
|
12392
|
-
}
|
|
12393
|
-
updateProfile(uid, body) {
|
|
12394
|
-
return this.requestExecutor.json(`/users/${uid}/profile`, DTOAuthenticatedUserResponse, {
|
|
12395
|
-
method: "PUT",
|
|
12396
|
-
body
|
|
12397
|
-
});
|
|
12398
|
-
}
|
|
12399
|
-
};
|
|
12400
|
-
|
|
12401
12426
|
// src/api/transport/request-executor-error.ts
|
|
12402
12427
|
var RequestExecutorError = class _RequestExecutorError extends Error {
|
|
12403
12428
|
constructor(type, message, errorCode, serverErrorType, cause) {
|
|
@@ -12508,6 +12533,34 @@ var RequestExecutor = class {
|
|
|
12508
12533
|
}
|
|
12509
12534
|
};
|
|
12510
12535
|
|
|
12536
|
+
// src/api/endpoints/threads.ts
|
|
12537
|
+
var ThreadsEndpoint = class {
|
|
12538
|
+
constructor(requestExecutor) {
|
|
12539
|
+
this.requestExecutor = requestExecutor;
|
|
12540
|
+
}
|
|
12541
|
+
listMessages(threadId) {
|
|
12542
|
+
return this.requestExecutor.json(`/threads/${threadId}/messages`, DTOThreadMessageListResponse);
|
|
12543
|
+
}
|
|
12544
|
+
postMessage(threadId, body) {
|
|
12545
|
+
return this.requestExecutor.json(`/threads/${threadId}/messages`, DTOThreadMessageListResponse, {
|
|
12546
|
+
method: "POST",
|
|
12547
|
+
body
|
|
12548
|
+
});
|
|
12549
|
+
}
|
|
12550
|
+
postReaction(threadId, body) {
|
|
12551
|
+
return this.requestExecutor.json(`/threads/${threadId}/reactions`, DTOThreadReactionResponse, {
|
|
12552
|
+
method: "POST",
|
|
12553
|
+
body
|
|
12554
|
+
});
|
|
12555
|
+
}
|
|
12556
|
+
deleteReaction(threadId, body) {
|
|
12557
|
+
return this.requestExecutor.json(`/threads/${threadId}/reactions`, DTOFileUploadFinalizeResponse, {
|
|
12558
|
+
method: "DELETE",
|
|
12559
|
+
body
|
|
12560
|
+
});
|
|
12561
|
+
}
|
|
12562
|
+
};
|
|
12563
|
+
|
|
12511
12564
|
// src/api/client.ts
|
|
12512
12565
|
var SupernovaApiClient = class {
|
|
12513
12566
|
constructor(config) {
|
|
@@ -12518,6 +12571,8 @@ var SupernovaApiClient = class {
|
|
|
12518
12571
|
__publicField(this, "codegen");
|
|
12519
12572
|
__publicField(this, "liveblocks");
|
|
12520
12573
|
__publicField(this, "forge");
|
|
12574
|
+
__publicField(this, "files");
|
|
12575
|
+
__publicField(this, "threads");
|
|
12521
12576
|
const requestExecutor = new RequestExecutor({
|
|
12522
12577
|
host: config.host,
|
|
12523
12578
|
accessToken: config.accessToken
|
|
@@ -12528,6 +12583,8 @@ var SupernovaApiClient = class {
|
|
|
12528
12583
|
this.codegen = new CodegenEndpoint(requestExecutor);
|
|
12529
12584
|
this.liveblocks = new LiveblocksEndpoint(requestExecutor);
|
|
12530
12585
|
this.forge = new ForgeEndpoint(requestExecutor);
|
|
12586
|
+
this.files = new FilesEndpoint(requestExecutor);
|
|
12587
|
+
this.threads = new ThreadsEndpoint(requestExecutor);
|
|
12531
12588
|
}
|
|
12532
12589
|
};
|
|
12533
12590
|
|
|
@@ -19264,12 +19321,15 @@ export {
|
|
|
19264
19321
|
DTOFigmaNodeV2,
|
|
19265
19322
|
DTOFigmaSourceUpdatePayload,
|
|
19266
19323
|
DTOFile,
|
|
19324
|
+
DTOFileFinalizeBulkPayload,
|
|
19325
|
+
DTOFileFinalizeBulkResponse,
|
|
19267
19326
|
DTOFileListResponse,
|
|
19268
19327
|
DTOFileReference,
|
|
19269
19328
|
DTOFileResponseItem,
|
|
19270
19329
|
DTOFileSource,
|
|
19271
19330
|
DTOFileSourceFigma,
|
|
19272
19331
|
DTOFileSourceUpload,
|
|
19332
|
+
DTOFileUploadBulkPayload,
|
|
19273
19333
|
DTOFileUploadBulkResponse,
|
|
19274
19334
|
DTOFileUploadFinalizePayload,
|
|
19275
19335
|
DTOFileUploadFinalizeResponse,
|
|
@@ -19601,6 +19661,7 @@ export {
|
|
|
19601
19661
|
DesignSystemBffEndpoint,
|
|
19602
19662
|
DesignSystemComponentEndpoint,
|
|
19603
19663
|
DesignSystemContactsEndpoint,
|
|
19664
|
+
DesignSystemFilesEndpoint,
|
|
19604
19665
|
DesignSystemMembersEndpoint,
|
|
19605
19666
|
DesignSystemPageRedirectsEndpoint,
|
|
19606
19667
|
DesignSystemSourcesEndpoint,
|