@supernova-studio/client 1.35.2 → 1.35.4
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 +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +22 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1050,6 +1050,9 @@ function recordToMap(record) {
|
|
|
1050
1050
|
for (const [k, v] of Object.entries(record)) map.set(k, v);
|
|
1051
1051
|
return map;
|
|
1052
1052
|
}
|
|
1053
|
+
function pickDefined(obj) {
|
|
1054
|
+
return Object.fromEntries(Object.entries(obj).filter(([_, v]) => v !== void 0));
|
|
1055
|
+
}
|
|
1053
1056
|
var ContentLoadInstruction = z39.object({
|
|
1054
1057
|
from: z39.string(),
|
|
1055
1058
|
to: z39.string(),
|
|
@@ -10300,10 +10303,11 @@ var CodeComponentsEndpoint = class {
|
|
|
10300
10303
|
}
|
|
10301
10304
|
);
|
|
10302
10305
|
}
|
|
10303
|
-
async list(dsId, vId) {
|
|
10306
|
+
async list(dsId, vId, brandId) {
|
|
10304
10307
|
return this.requestExecutor.json(
|
|
10305
10308
|
`/design-systems/${dsId}/versions/${vId}/code-components`,
|
|
10306
|
-
DTOCodeComponentListResponse
|
|
10309
|
+
DTOCodeComponentListResponse,
|
|
10310
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
10307
10311
|
);
|
|
10308
10312
|
}
|
|
10309
10313
|
async deleteAll(dsId, vId) {
|
|
@@ -10379,10 +10383,11 @@ var DesignSystemComponentEndpoint = class {
|
|
|
10379
10383
|
constructor(requestExecutor) {
|
|
10380
10384
|
this.requestExecutor = requestExecutor;
|
|
10381
10385
|
}
|
|
10382
|
-
async list(dsId, vId) {
|
|
10386
|
+
async list(dsId, vId, brandId) {
|
|
10383
10387
|
return this.requestExecutor.json(
|
|
10384
10388
|
`/design-systems/${dsId}/versions/${vId}/design-system-components`,
|
|
10385
|
-
DTODesignSystemComponentListResponse
|
|
10389
|
+
DTODesignSystemComponentListResponse,
|
|
10390
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
10386
10391
|
);
|
|
10387
10392
|
}
|
|
10388
10393
|
async create(dsId, vId, body) {
|
|
@@ -10483,10 +10488,11 @@ var FigmaComponentsEndpoint = class {
|
|
|
10483
10488
|
constructor(requestExecutor) {
|
|
10484
10489
|
this.requestExecutor = requestExecutor;
|
|
10485
10490
|
}
|
|
10486
|
-
async list(dsId, vId) {
|
|
10491
|
+
async list(dsId, vId, brandId) {
|
|
10487
10492
|
return this.requestExecutor.json(
|
|
10488
10493
|
`/design-systems/${dsId}/versions/${vId}/components`,
|
|
10489
|
-
DTOFigmaComponentListResponse
|
|
10494
|
+
DTOFigmaComponentListResponse,
|
|
10495
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
10490
10496
|
);
|
|
10491
10497
|
}
|
|
10492
10498
|
};
|
|
@@ -10694,10 +10700,11 @@ var TokenGroupsEndpoint = class {
|
|
|
10694
10700
|
}
|
|
10695
10701
|
);
|
|
10696
10702
|
}
|
|
10697
|
-
list(dsId, versionId) {
|
|
10703
|
+
list(dsId, versionId, brandId) {
|
|
10698
10704
|
return this.requestExecutor.json(
|
|
10699
10705
|
`/design-systems/${dsId}/versions/${versionId}/token-groups`,
|
|
10700
|
-
DTODesignTokenGroupListResponse
|
|
10706
|
+
DTODesignTokenGroupListResponse,
|
|
10707
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
10701
10708
|
);
|
|
10702
10709
|
}
|
|
10703
10710
|
};
|
|
@@ -10713,10 +10720,11 @@ var TokensEndpoint = class {
|
|
|
10713
10720
|
body
|
|
10714
10721
|
});
|
|
10715
10722
|
}
|
|
10716
|
-
list(dsId, versionId) {
|
|
10723
|
+
list(dsId, versionId, brandId) {
|
|
10717
10724
|
return this.requestExecutor.json(
|
|
10718
10725
|
`/design-systems/${dsId}/versions/${versionId}/tokens`,
|
|
10719
|
-
DTODesignTokenListResponse
|
|
10726
|
+
DTODesignTokenListResponse,
|
|
10727
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
10720
10728
|
);
|
|
10721
10729
|
}
|
|
10722
10730
|
get(dsId, versionId, tokenId) {
|
|
@@ -10974,8 +10982,10 @@ var StorybookEntriesEndpoint = class {
|
|
|
10974
10982
|
constructor(requestExecutor) {
|
|
10975
10983
|
this.requestExecutor = requestExecutor;
|
|
10976
10984
|
}
|
|
10977
|
-
list(dsId) {
|
|
10978
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/storybook`, DTOStorybookEntryListResponse
|
|
10985
|
+
list(dsId, brandId) {
|
|
10986
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/storybook`, DTOStorybookEntryListResponse, {
|
|
10987
|
+
query: new URLSearchParams(pickDefined({ brandId }))
|
|
10988
|
+
});
|
|
10979
10989
|
}
|
|
10980
10990
|
replace(dsId, entryId) {
|
|
10981
10991
|
return this.requestExecutor.json(
|