@supernova-studio/client 0.58.8 → 0.58.9
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 +821 -90
- package/dist/index.d.ts +821 -90
- package/dist/index.js +123 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/design-systems/data-source.ts +28 -3
- package/src/api/endpoints/design-system/sources.ts +21 -1
- package/src/api/endpoints/design-system/versions/elements-action.ts +1 -3
- package/src/api/endpoints/design-system/versions/index.ts +0 -1
- package/src/api/endpoints/design-system/versions/versions.ts +3 -3
- package/src/api/endpoints/design-system/versions/elements-actions.ts +0 -20
package/dist/index.mjs
CHANGED
|
@@ -571,7 +571,8 @@ var FigmaFileDownloadScope = z22.object({
|
|
|
571
571
|
maxFileDepth: z22.number().optional()
|
|
572
572
|
});
|
|
573
573
|
var FigmaFileAccessData = z22.object({
|
|
574
|
-
accessToken: z22.string()
|
|
574
|
+
accessToken: z22.string(),
|
|
575
|
+
accessTokenType: z22.enum(["OAuth2", "PAT"])
|
|
575
576
|
});
|
|
576
577
|
var ImportWarningType = z23.enum([
|
|
577
578
|
"NoVersionFound",
|
|
@@ -4325,7 +4326,7 @@ var IntegrationDesignSystem = z154.object({
|
|
|
4325
4326
|
userId: z154.string().optional(),
|
|
4326
4327
|
date: z154.coerce.date().optional()
|
|
4327
4328
|
});
|
|
4328
|
-
var IntegrationCredentialsType = z154.enum(["OAuth2", "PAT"
|
|
4329
|
+
var IntegrationCredentialsType = z154.enum(["OAuth2", "PAT"]);
|
|
4329
4330
|
var IntegrationCredentialsState = z154.enum(["Active", "Inactive"]);
|
|
4330
4331
|
var IntegrationCredentialsProfile = z154.object({
|
|
4331
4332
|
id: nullishToOptional(z154.string()),
|
|
@@ -5245,6 +5246,7 @@ var DTODesignSystemContactsResponse = z185.object({
|
|
|
5245
5246
|
|
|
5246
5247
|
// src/api/dto/design-systems/data-source.ts
|
|
5247
5248
|
import { z as z186 } from "zod";
|
|
5249
|
+
var DTODataSourceFigmaScope = DataSourceFigmaScope;
|
|
5248
5250
|
var DTODataSourceFigmaFileVersion = z186.object({
|
|
5249
5251
|
id: z186.string(),
|
|
5250
5252
|
created_at: z186.coerce.date(),
|
|
@@ -5269,7 +5271,7 @@ var DTODataSourceFigma = z186.object({
|
|
|
5269
5271
|
id: z186.string(),
|
|
5270
5272
|
type: z186.literal(DataSourceRemoteType.Enum.Figma),
|
|
5271
5273
|
fileName: z186.string(),
|
|
5272
|
-
scope:
|
|
5274
|
+
scope: DTODataSourceFigmaScope,
|
|
5273
5275
|
brandId: z186.string(),
|
|
5274
5276
|
themeId: z186.string().nullish(),
|
|
5275
5277
|
cloud: DTODataSourceFigmaCloud.nullish()
|
|
@@ -5331,9 +5333,18 @@ var DTODataSource = z186.discriminatedUnion("type", [
|
|
|
5331
5333
|
var DTODataSourcesListResponse = z186.object({
|
|
5332
5334
|
sources: z186.array(DTODataSource)
|
|
5333
5335
|
});
|
|
5334
|
-
var
|
|
5336
|
+
var DTODataSourceResponse = z186.object({
|
|
5335
5337
|
source: DTODataSource
|
|
5336
5338
|
});
|
|
5339
|
+
var DTODataSourceFigmaCreatePayload = z186.object({
|
|
5340
|
+
brandPersistentId: z186.string(),
|
|
5341
|
+
figmaFileUrl: z186.string(),
|
|
5342
|
+
scope: DTODataSourceFigmaScope,
|
|
5343
|
+
autoImportMode: DataSourceAutoImportMode
|
|
5344
|
+
});
|
|
5345
|
+
var DTODataSourceFigmaImportPayload = z186.object({
|
|
5346
|
+
sourceIds: z186.array(z186.string())
|
|
5347
|
+
});
|
|
5337
5348
|
|
|
5338
5349
|
// src/api/dto/design-systems/design-system.ts
|
|
5339
5350
|
import { z as z189 } from "zod";
|
|
@@ -7070,8 +7081,30 @@ var DesignSystemComponentEndpoint = class {
|
|
|
7070
7081
|
}
|
|
7071
7082
|
};
|
|
7072
7083
|
|
|
7073
|
-
// src/api/endpoints/design-system/versions/
|
|
7074
|
-
var
|
|
7084
|
+
// src/api/endpoints/design-system/versions/documentation.ts
|
|
7085
|
+
var DocumentationEndpoint = class {
|
|
7086
|
+
constructor(requestExecutor) {
|
|
7087
|
+
this.requestExecutor = requestExecutor;
|
|
7088
|
+
}
|
|
7089
|
+
getStructure(designSystemId, versionId) {
|
|
7090
|
+
return this.requestExecutor.json(
|
|
7091
|
+
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7092
|
+
DTODocumentationStructure
|
|
7093
|
+
);
|
|
7094
|
+
}
|
|
7095
|
+
async getDocStructure(dsId, vId) {
|
|
7096
|
+
return await this.requestExecutor.json(
|
|
7097
|
+
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7098
|
+
DTODocumentationStructure,
|
|
7099
|
+
{
|
|
7100
|
+
method: "GET"
|
|
7101
|
+
}
|
|
7102
|
+
);
|
|
7103
|
+
}
|
|
7104
|
+
};
|
|
7105
|
+
|
|
7106
|
+
// src/api/endpoints/design-system/versions/elements-action.ts
|
|
7107
|
+
var ElementsActionEndpoint = class {
|
|
7075
7108
|
constructor(requestExecutor) {
|
|
7076
7109
|
this.requestExecutor = requestExecutor;
|
|
7077
7110
|
}
|
|
@@ -7088,6 +7121,71 @@ var ElementsActionsEndpoint = class {
|
|
|
7088
7121
|
}
|
|
7089
7122
|
);
|
|
7090
7123
|
}
|
|
7124
|
+
async createDocGroup(dsId, vId, input) {
|
|
7125
|
+
return this.requestExecutor.json(
|
|
7126
|
+
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7127
|
+
DTOElementActionOutput,
|
|
7128
|
+
{
|
|
7129
|
+
body: {
|
|
7130
|
+
type: "DocumentationGroupCreate",
|
|
7131
|
+
input
|
|
7132
|
+
},
|
|
7133
|
+
method: "POST"
|
|
7134
|
+
}
|
|
7135
|
+
);
|
|
7136
|
+
}
|
|
7137
|
+
async moveDocGroup(dsId, vId, input) {
|
|
7138
|
+
return this.requestExecutor.json(
|
|
7139
|
+
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7140
|
+
DTOElementActionOutput,
|
|
7141
|
+
{
|
|
7142
|
+
body: {
|
|
7143
|
+
type: "DocumentationGroupMove",
|
|
7144
|
+
input
|
|
7145
|
+
},
|
|
7146
|
+
method: "POST"
|
|
7147
|
+
}
|
|
7148
|
+
);
|
|
7149
|
+
}
|
|
7150
|
+
async updateDocPage(dsId, vId, input) {
|
|
7151
|
+
return this.requestExecutor.json(
|
|
7152
|
+
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7153
|
+
DTOElementActionOutput,
|
|
7154
|
+
{
|
|
7155
|
+
body: {
|
|
7156
|
+
type: "DocumentationPageUpdate",
|
|
7157
|
+
input
|
|
7158
|
+
},
|
|
7159
|
+
method: "POST"
|
|
7160
|
+
}
|
|
7161
|
+
);
|
|
7162
|
+
}
|
|
7163
|
+
async updateDocGroup(dsId, vId, input) {
|
|
7164
|
+
return this.requestExecutor.json(
|
|
7165
|
+
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7166
|
+
DTOElementActionOutput,
|
|
7167
|
+
{
|
|
7168
|
+
body: {
|
|
7169
|
+
type: "DocumentationGroupUpdate",
|
|
7170
|
+
input
|
|
7171
|
+
},
|
|
7172
|
+
method: "POST"
|
|
7173
|
+
}
|
|
7174
|
+
);
|
|
7175
|
+
}
|
|
7176
|
+
async createDocTab(dsId, vId, input) {
|
|
7177
|
+
return this.requestExecutor.json(
|
|
7178
|
+
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
7179
|
+
DTOElementActionOutput,
|
|
7180
|
+
{
|
|
7181
|
+
body: {
|
|
7182
|
+
type: "DocumentationTabCreate",
|
|
7183
|
+
input
|
|
7184
|
+
},
|
|
7185
|
+
method: "POST"
|
|
7186
|
+
}
|
|
7187
|
+
);
|
|
7188
|
+
}
|
|
7091
7189
|
};
|
|
7092
7190
|
|
|
7093
7191
|
// src/api/endpoints/design-system/versions/import-jobs.ts
|
|
@@ -7279,28 +7377,6 @@ var TokensEndpoint = class {
|
|
|
7279
7377
|
}
|
|
7280
7378
|
};
|
|
7281
7379
|
|
|
7282
|
-
// src/api/endpoints/design-system/versions/documentation.ts
|
|
7283
|
-
var DocumentationEndpoint = class {
|
|
7284
|
-
constructor(requestExecutor) {
|
|
7285
|
-
this.requestExecutor = requestExecutor;
|
|
7286
|
-
}
|
|
7287
|
-
getStructure(designSystemId, versionId) {
|
|
7288
|
-
return this.requestExecutor.json(
|
|
7289
|
-
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7290
|
-
DTODocumentationStructure
|
|
7291
|
-
);
|
|
7292
|
-
}
|
|
7293
|
-
async getDocStructure(dsId, vId) {
|
|
7294
|
-
return await this.requestExecutor.json(
|
|
7295
|
-
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7296
|
-
DTODocumentationStructure,
|
|
7297
|
-
{
|
|
7298
|
-
method: "GET"
|
|
7299
|
-
}
|
|
7300
|
-
);
|
|
7301
|
-
}
|
|
7302
|
-
};
|
|
7303
|
-
|
|
7304
7380
|
// src/api/endpoints/design-system/versions/versions.ts
|
|
7305
7381
|
var DesignSystemVersionsEndpoint = class {
|
|
7306
7382
|
constructor(requestExecutor) {
|
|
@@ -7314,7 +7390,7 @@ var DesignSystemVersionsEndpoint = class {
|
|
|
7314
7390
|
__publicField(this, "stats");
|
|
7315
7391
|
__publicField(this, "elementPropertyDefinitions");
|
|
7316
7392
|
__publicField(this, "elementPropertyValues");
|
|
7317
|
-
__publicField(this, "
|
|
7393
|
+
__publicField(this, "elementsAction");
|
|
7318
7394
|
__publicField(this, "designSystemComponents");
|
|
7319
7395
|
__publicField(this, "documentation");
|
|
7320
7396
|
this.themes = new ThemesEndpoint(requestExecutor);
|
|
@@ -7326,7 +7402,7 @@ var DesignSystemVersionsEndpoint = class {
|
|
|
7326
7402
|
this.stats = new VersionStatsEndpoint(requestExecutor);
|
|
7327
7403
|
this.elementPropertyDefinitions = new ElementPropertyDefinitionsEndpoint(requestExecutor);
|
|
7328
7404
|
this.elementPropertyValues = new ElementPropertyValuesEndpoint(requestExecutor);
|
|
7329
|
-
this.
|
|
7405
|
+
this.elementsAction = new ElementsActionEndpoint(requestExecutor);
|
|
7330
7406
|
this.designSystemComponents = new DesignSystemComponentEndpoint(requestExecutor);
|
|
7331
7407
|
this.documentation = new DocumentationEndpoint(requestExecutor);
|
|
7332
7408
|
}
|
|
@@ -7399,12 +7475,24 @@ var DesignSystemSourcesEndpoint = class {
|
|
|
7399
7475
|
constructor(requestExecutor) {
|
|
7400
7476
|
this.requestExecutor = requestExecutor;
|
|
7401
7477
|
}
|
|
7478
|
+
create(dsId, payload) {
|
|
7479
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourceResponse, {
|
|
7480
|
+
method: "POST",
|
|
7481
|
+
body: payload
|
|
7482
|
+
});
|
|
7483
|
+
}
|
|
7402
7484
|
list(dsId) {
|
|
7403
7485
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
7404
7486
|
}
|
|
7405
7487
|
delete(dsId, sourceId) {
|
|
7406
7488
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z253.any(), { method: "DELETE" });
|
|
7407
7489
|
}
|
|
7490
|
+
figmaImport(dsId, payload) {
|
|
7491
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
7492
|
+
method: "POST",
|
|
7493
|
+
body: payload
|
|
7494
|
+
});
|
|
7495
|
+
}
|
|
7408
7496
|
};
|
|
7409
7497
|
|
|
7410
7498
|
// src/api/endpoints/design-system/design-systems.ts
|
|
@@ -12617,10 +12705,13 @@ export {
|
|
|
12617
12705
|
DTOCreateDocumentationTabInput,
|
|
12618
12706
|
DTOCreateVersionInput,
|
|
12619
12707
|
DTODataSource,
|
|
12620
|
-
DTODataSourceCreationResponse,
|
|
12621
12708
|
DTODataSourceFigma,
|
|
12622
12709
|
DTODataSourceFigmaCloud,
|
|
12710
|
+
DTODataSourceFigmaCreatePayload,
|
|
12711
|
+
DTODataSourceFigmaImportPayload,
|
|
12712
|
+
DTODataSourceFigmaScope,
|
|
12623
12713
|
DTODataSourceFigmaVariablesPlugin,
|
|
12714
|
+
DTODataSourceResponse,
|
|
12624
12715
|
DTODataSourceTokenStudio,
|
|
12625
12716
|
DTODataSourcesListResponse,
|
|
12626
12717
|
DTODeleteDocumentationGroupInput,
|
|
@@ -12865,12 +12956,13 @@ export {
|
|
|
12865
12956
|
DesignSystemVersionsEndpoint,
|
|
12866
12957
|
DesignSystemsEndpoint,
|
|
12867
12958
|
DimensionsVariableScopeType,
|
|
12959
|
+
DocumentationEndpoint,
|
|
12868
12960
|
DocumentationHierarchySettings,
|
|
12869
12961
|
DocumentationPageEditorModel,
|
|
12870
12962
|
DocumentationPageV1DTO,
|
|
12871
12963
|
ElementPropertyDefinitionsEndpoint,
|
|
12872
12964
|
ElementPropertyValuesEndpoint,
|
|
12873
|
-
|
|
12965
|
+
ElementsActionEndpoint,
|
|
12874
12966
|
ExportersEndpoint,
|
|
12875
12967
|
FormattedCollections,
|
|
12876
12968
|
FrontendVersionRoomYDoc,
|