@supernova-studio/supernova-sdk-beta 1.6.18 → 1.6.20
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/build/sdk-typescript/src/core/SDKSupernova.d.ts +5 -5
- package/build/sdk-typescript/src/core/areas/{SDKAreaPipelines.d.ts → SDKAreaAutomation.d.ts} +10 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaBrands.d.ts +18 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +23 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +23 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +25 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +20 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +15 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +51 -6
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +8 -3
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +40 -4
- package/build/sdk-typescript/src/exports.d.ts +1 -0
- package/build/sdk-typescript/src/model/base/SDKBrand.d.ts +5 -1
- package/build/sdk-typescript/src/model/base/SDKDesignSystemVersion.d.ts +5 -0
- package/build/sdk-typescript/src/model/enums/SDKImportJobOperation.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKImportJobState.d.ts +6 -0
- package/build/sdk-typescript/src/model/jobs/SDKImportJob.d.ts +35 -0
- package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +1 -1
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +76 -70
- package/build/sdk-typescript/src/model/users/SDKUser.d.ts +14 -0
- package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +18 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIPWhitelistSettings.d.ts +1 -1
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSSOSettings.d.ts +2 -2
- package/build/sdk-typescript/src/tests/Areas/AreaDesignSystems.spec.d.ts +1 -0
- package/build/supernova-sdk-typescript.js +925 -259
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +1 -1
|
@@ -34919,6 +34919,7 @@ exports.Supernova = void 0;
|
|
|
34919
34919
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
34920
34920
|
// MARK: - Imports
|
|
34921
34921
|
const SDKAreaAssets_1 = __webpack_require__(/*! ./areas/SDKAreaAssets */ "./src/core/areas/SDKAreaAssets.ts");
|
|
34922
|
+
const SDKAreaAutomation_1 = __webpack_require__(/*! ./areas/SDKAreaAutomation */ "./src/core/areas/SDKAreaAutomation.ts");
|
|
34922
34923
|
const SDKAreaBrands_1 = __webpack_require__(/*! ./areas/SDKAreaBrands */ "./src/core/areas/SDKAreaBrands.ts");
|
|
34923
34924
|
const SDKAreaBulkOperations_1 = __webpack_require__(/*! ./areas/SDKAreaBulkOperations */ "./src/core/areas/SDKAreaBulkOperations.ts");
|
|
34924
34925
|
const SDKAreaComponents_1 = __webpack_require__(/*! ./areas/SDKAreaComponents */ "./src/core/areas/SDKAreaComponents.ts");
|
|
@@ -34927,7 +34928,6 @@ const SDKAreaDesignSystems_1 = __webpack_require__(/*! ./areas/SDKAreaDesignSyst
|
|
|
34927
34928
|
const SDKAreaDocumentation_1 = __webpack_require__(/*! ./areas/SDKAreaDocumentation */ "./src/core/areas/SDKAreaDocumentation.ts");
|
|
34928
34929
|
const SDKAreaIntegrations_1 = __webpack_require__(/*! ./areas/SDKAreaIntegrations */ "./src/core/areas/SDKAreaIntegrations.ts");
|
|
34929
34930
|
const SDKAreaMe_1 = __webpack_require__(/*! ./areas/SDKAreaMe */ "./src/core/areas/SDKAreaMe.ts");
|
|
34930
|
-
const SDKAreaPipelines_1 = __webpack_require__(/*! ./areas/SDKAreaPipelines */ "./src/core/areas/SDKAreaPipelines.ts");
|
|
34931
34931
|
const SDKAreaTokens_1 = __webpack_require__(/*! ./areas/SDKAreaTokens */ "./src/core/areas/SDKAreaTokens.ts");
|
|
34932
34932
|
const SDKAreaUsers_1 = __webpack_require__(/*! ./areas/SDKAreaUsers */ "./src/core/areas/SDKAreaUsers.ts");
|
|
34933
34933
|
const SDKAreaVersions_1 = __webpack_require__(/*! ./areas/SDKAreaVersions */ "./src/core/areas/SDKAreaVersions.ts");
|
|
@@ -34962,9 +34962,9 @@ class Supernova {
|
|
|
34962
34962
|
this.components = new SDKAreaComponents_1.AreaComponents(this.dataCore);
|
|
34963
34963
|
this.assets = new SDKAreaAssets_1.AreaAssets(this.dataCore);
|
|
34964
34964
|
this.documentation = new SDKAreaDocumentation_1.AreaDocumentation(this.dataCore);
|
|
34965
|
-
this.
|
|
34965
|
+
this.automation = new SDKAreaAutomation_1.AreaAutomation(this.dataCore);
|
|
34966
34966
|
this.users = new SDKAreaUsers_1.AreaUsers(this.dataCore);
|
|
34967
|
-
this.
|
|
34967
|
+
this.integrations = new SDKAreaIntegrations_1.AreaIntegrations(this.dataCore);
|
|
34968
34968
|
this.dataSources = new SDKAreaDataSources_1.AreaDataSources(this.dataCore);
|
|
34969
34969
|
this.bulkOperations = new SDKAreaBulkOperations_1.AreaBulkOperations(this.dataCore);
|
|
34970
34970
|
}
|
|
@@ -35057,6 +35057,137 @@ class AreaAssets {
|
|
|
35057
35057
|
exports.AreaAssets = AreaAssets;
|
|
35058
35058
|
|
|
35059
35059
|
|
|
35060
|
+
/***/ }),
|
|
35061
|
+
|
|
35062
|
+
/***/ "./src/core/areas/SDKAreaAutomation.ts":
|
|
35063
|
+
/*!*********************************************!*\
|
|
35064
|
+
!*** ./src/core/areas/SDKAreaAutomation.ts ***!
|
|
35065
|
+
\*********************************************/
|
|
35066
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
35067
|
+
|
|
35068
|
+
"use strict";
|
|
35069
|
+
|
|
35070
|
+
//
|
|
35071
|
+
// AreaAutomation.ts
|
|
35072
|
+
// Supernova SDK
|
|
35073
|
+
//
|
|
35074
|
+
// Created by Jiri Trecak.
|
|
35075
|
+
//
|
|
35076
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
35077
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35078
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35079
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35080
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35081
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
35082
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35083
|
+
});
|
|
35084
|
+
};
|
|
35085
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
35086
|
+
exports.AreaAutomation = void 0;
|
|
35087
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
35088
|
+
// MARK: - Automation Area
|
|
35089
|
+
class AreaAutomation {
|
|
35090
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35091
|
+
// MARK: - Constructor
|
|
35092
|
+
constructor(dataCore) {
|
|
35093
|
+
this.dataCore = dataCore;
|
|
35094
|
+
}
|
|
35095
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35096
|
+
// MARK: - Read
|
|
35097
|
+
/** Fetches exporters belonging to workspace by id */
|
|
35098
|
+
getExporters(workspaceId) {
|
|
35099
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35100
|
+
return this.dataCore.exporters(workspaceId);
|
|
35101
|
+
});
|
|
35102
|
+
}
|
|
35103
|
+
/** Fetches all custom configuration properties that specific exporter provides
|
|
35104
|
+
* @param exporterId - Identifier of the exporter to fetch configuration for
|
|
35105
|
+
* @param from - Remote version to fetch from
|
|
35106
|
+
* @returns All custom blocks
|
|
35107
|
+
*/
|
|
35108
|
+
getExporterConfiguration(workspaceId, exporterId, designSystemId) {
|
|
35109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35110
|
+
return this.dataCore.exporterConfigurationProperties(exporterId, workspaceId, designSystemId);
|
|
35111
|
+
});
|
|
35112
|
+
}
|
|
35113
|
+
/** Fetches all custom variants that specific exporter provides
|
|
35114
|
+
* @param workspaceId - Identifier of the workspace where the exporter is installed
|
|
35115
|
+
* @param exporterId - Identifier of the exporter to fetch configuration for
|
|
35116
|
+
* @returns All custom variants
|
|
35117
|
+
*/
|
|
35118
|
+
getExporterBlockVariants(workspaceId, exporterId) {
|
|
35119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35120
|
+
return this.dataCore.documentationExporterCustomVariants(workspaceId, exporterId);
|
|
35121
|
+
});
|
|
35122
|
+
}
|
|
35123
|
+
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
35124
|
+
publish(to, environment) {
|
|
35125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35126
|
+
// Check if doc is being published by downloading the latest documentation job. If so, prevent publishing
|
|
35127
|
+
const lastJob = yield this.isPublishing(to, environment);
|
|
35128
|
+
if (lastJob.status === "Idle") {
|
|
35129
|
+
const result = this.dataCore.documentationPublish(to.workspaceId, to.designSystemId, to.versionId, environment);
|
|
35130
|
+
return result;
|
|
35131
|
+
}
|
|
35132
|
+
return {
|
|
35133
|
+
status: "InProgress",
|
|
35134
|
+
jobId: lastJob.jobId,
|
|
35135
|
+
exporterId: lastJob.exporterId,
|
|
35136
|
+
};
|
|
35137
|
+
});
|
|
35138
|
+
}
|
|
35139
|
+
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
35140
|
+
isPublishing(to, environment) {
|
|
35141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35142
|
+
const jobs = yield this.dataCore.documentationBuilds(to.workspaceId, to.designSystemId, to.versionId, environment, 1);
|
|
35143
|
+
const job = jobs[0];
|
|
35144
|
+
if (!job) {
|
|
35145
|
+
// Nothing published just yet
|
|
35146
|
+
return {
|
|
35147
|
+
status: "Idle",
|
|
35148
|
+
jobId: null,
|
|
35149
|
+
exporterId: null,
|
|
35150
|
+
};
|
|
35151
|
+
}
|
|
35152
|
+
if (job.status === "InProgress") {
|
|
35153
|
+
return {
|
|
35154
|
+
status: "InProgress",
|
|
35155
|
+
jobId: job.id,
|
|
35156
|
+
exporterId: job.exporterId,
|
|
35157
|
+
};
|
|
35158
|
+
}
|
|
35159
|
+
return {
|
|
35160
|
+
status: "Idle",
|
|
35161
|
+
jobId: null,
|
|
35162
|
+
exporterId: null,
|
|
35163
|
+
};
|
|
35164
|
+
});
|
|
35165
|
+
}
|
|
35166
|
+
/** Gets all import jobs that are currently in progress.
|
|
35167
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
35168
|
+
* @returns Nothing
|
|
35169
|
+
*/
|
|
35170
|
+
getImportJobs(from) {
|
|
35171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35172
|
+
return this.dataCore.getImportJobs(from.designSystemId, from.versionId);
|
|
35173
|
+
});
|
|
35174
|
+
}
|
|
35175
|
+
getImportJob(from, jobId) {
|
|
35176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35177
|
+
return this.dataCore.getImportJob(from.designSystemId, from.versionId, jobId);
|
|
35178
|
+
});
|
|
35179
|
+
}
|
|
35180
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35181
|
+
// MARK: - Create/Update
|
|
35182
|
+
scheduleImportJobForFigmaSources(from, sourceIds, dryRun = false) {
|
|
35183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35184
|
+
return this.dataCore.scheduleImportJobForFigmaSources(from.designSystemId, from.versionId, sourceIds, dryRun);
|
|
35185
|
+
});
|
|
35186
|
+
}
|
|
35187
|
+
}
|
|
35188
|
+
exports.AreaAutomation = AreaAutomation;
|
|
35189
|
+
|
|
35190
|
+
|
|
35060
35191
|
/***/ }),
|
|
35061
35192
|
|
|
35062
35193
|
/***/ "./src/core/areas/SDKAreaBrands.ts":
|
|
@@ -35112,6 +35243,35 @@ class AreaBrands {
|
|
|
35112
35243
|
return this.dataCore.getBrand(from.designSystemId, from.versionId, from.brandId);
|
|
35113
35244
|
});
|
|
35114
35245
|
}
|
|
35246
|
+
/** Creates new brand and retrieves the newly created brand object.
|
|
35247
|
+
* @param from - Remote brand to fetch from
|
|
35248
|
+
* @param model - new brand model
|
|
35249
|
+
* @returns Newly created brand object
|
|
35250
|
+
*/
|
|
35251
|
+
createBrand(from, model) {
|
|
35252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35253
|
+
return this.dataCore.createBrand(from.designSystemId, from.versionId, model);
|
|
35254
|
+
});
|
|
35255
|
+
}
|
|
35256
|
+
/** Edits brand
|
|
35257
|
+
* @param from - Remote brand to fetch from
|
|
35258
|
+
* @param model - new version model
|
|
35259
|
+
* @returns nothing
|
|
35260
|
+
*/
|
|
35261
|
+
editBrand(from, brand) {
|
|
35262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35263
|
+
yield this.dataCore.editBrand(from.designSystemId, from.versionId, from.brandId, brand);
|
|
35264
|
+
});
|
|
35265
|
+
}
|
|
35266
|
+
/** Deletes brand
|
|
35267
|
+
* @param from - Remote brand to fetch from
|
|
35268
|
+
* @returns nothing
|
|
35269
|
+
*/
|
|
35270
|
+
deleteBrand(from) {
|
|
35271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35272
|
+
yield this.dataCore.deleteBrand(from.designSystemId, from.versionId, from.brandId);
|
|
35273
|
+
});
|
|
35274
|
+
}
|
|
35115
35275
|
}
|
|
35116
35276
|
exports.AreaBrands = AreaBrands;
|
|
35117
35277
|
|
|
@@ -35514,6 +35674,30 @@ class AreaDataSources {
|
|
|
35514
35674
|
return this.dataCore.designSystemSources(from.designSystemId);
|
|
35515
35675
|
});
|
|
35516
35676
|
}
|
|
35677
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35678
|
+
// MARK: - Create/Update
|
|
35679
|
+
linkFigmaSource(from, url, options) {
|
|
35680
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35681
|
+
return this.dataCore.linkFigmaSource(from.designSystemId, from.brandId, url, options);
|
|
35682
|
+
});
|
|
35683
|
+
}
|
|
35684
|
+
updateFigmaSource(from, sourceId, options) {
|
|
35685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35686
|
+
return this.dataCore.updateFigmaSource(from.designSystemId, sourceId, options);
|
|
35687
|
+
});
|
|
35688
|
+
}
|
|
35689
|
+
updateFigmaSourceClaimOwnership(from, sourceId) {
|
|
35690
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35691
|
+
return this.dataCore.updateFigmaSourceClaimOwnership(from.designSystemId, sourceId);
|
|
35692
|
+
});
|
|
35693
|
+
}
|
|
35694
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35695
|
+
// MARK: - Delete
|
|
35696
|
+
deleteFigmaSource(from, sourceId) {
|
|
35697
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35698
|
+
return this.dataCore.deleteFigmaSource(from.designSystemId, sourceId);
|
|
35699
|
+
});
|
|
35700
|
+
}
|
|
35517
35701
|
}
|
|
35518
35702
|
exports.AreaDataSources = AreaDataSources;
|
|
35519
35703
|
|
|
@@ -35573,6 +35757,49 @@ class AreaDesignSystems {
|
|
|
35573
35757
|
return this.dataCore.designSystem(designSystemId);
|
|
35574
35758
|
});
|
|
35575
35759
|
}
|
|
35760
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35761
|
+
// MARK: - Create/Update
|
|
35762
|
+
/** Creates a new design system and retrieves the newly created DS object
|
|
35763
|
+
* @param name - Name of the design system
|
|
35764
|
+
* @returns Newly created design system object
|
|
35765
|
+
*/
|
|
35766
|
+
createDesignSystem(workspaceId, name, description) {
|
|
35767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35768
|
+
return this.dataCore.createDesignSystem(workspaceId, name, description);
|
|
35769
|
+
});
|
|
35770
|
+
}
|
|
35771
|
+
/** Updates design system metadata for a specific design system
|
|
35772
|
+
* @param designSystemId - ID of the design system
|
|
35773
|
+
* @param name - New DS name
|
|
35774
|
+
* @param description - New DS description
|
|
35775
|
+
* @returns Nothing
|
|
35776
|
+
*/
|
|
35777
|
+
updateDesignSystemMetadata(designSystemId, name, description) {
|
|
35778
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35779
|
+
return this.dataCore.updateDesignSystemMetadata(designSystemId, name, description);
|
|
35780
|
+
});
|
|
35781
|
+
}
|
|
35782
|
+
/** Enabled or disables multibrand functionality for a specific design system
|
|
35783
|
+
* @param designSystemId - ID of the design system
|
|
35784
|
+
* @param isMultibrand - Multibrand functionality enabled or disabled
|
|
35785
|
+
* @returns Nothing
|
|
35786
|
+
*/
|
|
35787
|
+
updateDesignSystemIsMultibrand(designSystem, isMultibrand) {
|
|
35788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35789
|
+
return this.dataCore.updateDesignSystemIsMultibrand(designSystem, isMultibrand);
|
|
35790
|
+
});
|
|
35791
|
+
}
|
|
35792
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35793
|
+
// MARK: - Delete
|
|
35794
|
+
/** Deletes a design system. This action is irreversible, all data will be lost, and can only be performed by the admins of the workspace
|
|
35795
|
+
* @param designSystemId - ID of the design system
|
|
35796
|
+
* @returns Nothing. RIP design system.
|
|
35797
|
+
*/
|
|
35798
|
+
deleteDesignSystem(designSystemId) {
|
|
35799
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35800
|
+
return this.dataCore.deleteDesignSystem(designSystemId);
|
|
35801
|
+
});
|
|
35802
|
+
}
|
|
35576
35803
|
}
|
|
35577
35804
|
exports.AreaDesignSystems = AreaDesignSystems;
|
|
35578
35805
|
|
|
@@ -35765,6 +35992,55 @@ class AreaIntegrations {
|
|
|
35765
35992
|
return this.dataCore.getOAuthURL("azure");
|
|
35766
35993
|
});
|
|
35767
35994
|
}
|
|
35995
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35996
|
+
// MARK: - Create/Update
|
|
35997
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
35998
|
+
// MARK: - Delete
|
|
35999
|
+
/** Deletes user Figma OAuth integration.
|
|
36000
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
36001
|
+
* @returns Nothing
|
|
36002
|
+
*/
|
|
36003
|
+
deleteFigmaOAuthIntegration(userId) {
|
|
36004
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36005
|
+
return this.dataCore.deleteOAuthIntegration(userId, "figma");
|
|
36006
|
+
});
|
|
36007
|
+
}
|
|
36008
|
+
/** Deletes user GitHub OAuth integration.
|
|
36009
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
36010
|
+
* @returns Nothing
|
|
36011
|
+
*/
|
|
36012
|
+
deleteGitHubOAuthIntegration(userId) {
|
|
36013
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36014
|
+
return this.dataCore.deleteOAuthIntegration(userId, "github");
|
|
36015
|
+
});
|
|
36016
|
+
}
|
|
36017
|
+
/** Deletes user GitLab OAuth integration.
|
|
36018
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
36019
|
+
* @returns Nothing
|
|
36020
|
+
*/
|
|
36021
|
+
deleteGitLabOAuthIntegration(userId) {
|
|
36022
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36023
|
+
return this.dataCore.deleteOAuthIntegration(userId, "gitlab");
|
|
36024
|
+
});
|
|
36025
|
+
}
|
|
36026
|
+
/** Deletes user Bitbucket OAuth integration.
|
|
36027
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
36028
|
+
* @returns Nothing
|
|
36029
|
+
*/
|
|
36030
|
+
deleteBitbucketOAuthIntegration(userId) {
|
|
36031
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36032
|
+
return this.dataCore.deleteOAuthIntegration(userId, "bitbucket");
|
|
36033
|
+
});
|
|
36034
|
+
}
|
|
36035
|
+
/** Deletes user Azure OAuth integration.
|
|
36036
|
+
* @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
|
|
36037
|
+
* @returns Nothing
|
|
36038
|
+
*/
|
|
36039
|
+
deleteAzureOAuthIntegration(userId) {
|
|
36040
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36041
|
+
return this.dataCore.deleteOAuthIntegration(userId, "azure");
|
|
36042
|
+
});
|
|
36043
|
+
}
|
|
35768
36044
|
}
|
|
35769
36045
|
exports.AreaIntegrations = AreaIntegrations;
|
|
35770
36046
|
|
|
@@ -35856,116 +36132,6 @@ class AreaMe {
|
|
|
35856
36132
|
exports.AreaMe = AreaMe;
|
|
35857
36133
|
|
|
35858
36134
|
|
|
35859
|
-
/***/ }),
|
|
35860
|
-
|
|
35861
|
-
/***/ "./src/core/areas/SDKAreaPipelines.ts":
|
|
35862
|
-
/*!********************************************!*\
|
|
35863
|
-
!*** ./src/core/areas/SDKAreaPipelines.ts ***!
|
|
35864
|
-
\********************************************/
|
|
35865
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
35866
|
-
|
|
35867
|
-
"use strict";
|
|
35868
|
-
|
|
35869
|
-
//
|
|
35870
|
-
// AreaPipelines.ts
|
|
35871
|
-
// Supernova SDK
|
|
35872
|
-
//
|
|
35873
|
-
// Created by Jiri Trecak.
|
|
35874
|
-
//
|
|
35875
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
35876
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35877
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35878
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35879
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35880
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
35881
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35882
|
-
});
|
|
35883
|
-
};
|
|
35884
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
35885
|
-
exports.AreaPipelines = void 0;
|
|
35886
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
35887
|
-
// MARK: - Pipelines Area
|
|
35888
|
-
class AreaPipelines {
|
|
35889
|
-
// --- --- --- --- --- --- --- --- --- ---
|
|
35890
|
-
// MARK: - Constructor
|
|
35891
|
-
constructor(dataCore) {
|
|
35892
|
-
this.dataCore = dataCore;
|
|
35893
|
-
}
|
|
35894
|
-
// --- --- --- --- --- --- --- --- --- ---
|
|
35895
|
-
// MARK: - Read
|
|
35896
|
-
/** Fetches exporters belonging to workspace by id */
|
|
35897
|
-
getExporters(workspaceId) {
|
|
35898
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35899
|
-
return this.dataCore.exporters(workspaceId);
|
|
35900
|
-
});
|
|
35901
|
-
}
|
|
35902
|
-
/** Fetches all custom configuration properties that specific exporter provides
|
|
35903
|
-
* @param exporterId - Identifier of the exporter to fetch configuration for
|
|
35904
|
-
* @param from - Remote version to fetch from
|
|
35905
|
-
* @returns All custom blocks
|
|
35906
|
-
*/
|
|
35907
|
-
getExporterConfiguration(workspaceId, exporterId, designSystemId) {
|
|
35908
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35909
|
-
return this.dataCore.exporterConfigurationProperties(exporterId, workspaceId, designSystemId);
|
|
35910
|
-
});
|
|
35911
|
-
}
|
|
35912
|
-
/** Fetches all custom variants that specific exporter provides
|
|
35913
|
-
* @param workspaceId - Identifier of the workspace where the exporter is installed
|
|
35914
|
-
* @param exporterId - Identifier of the exporter to fetch configuration for
|
|
35915
|
-
* @returns All custom variants
|
|
35916
|
-
*/
|
|
35917
|
-
getExporterBlockVariants(workspaceId, exporterId) {
|
|
35918
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35919
|
-
return this.dataCore.documentationExporterCustomVariants(workspaceId, exporterId);
|
|
35920
|
-
});
|
|
35921
|
-
}
|
|
35922
|
-
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
35923
|
-
publish(to, environment) {
|
|
35924
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35925
|
-
// Check if doc is being published by downloading the latest documentation job. If so, prevent publishing
|
|
35926
|
-
const lastJob = yield this.isPublishing(to, environment);
|
|
35927
|
-
if (lastJob.status === "Idle") {
|
|
35928
|
-
const result = this.dataCore.documentationPublish(to.workspaceId, to.designSystemId, to.versionId, environment);
|
|
35929
|
-
return result;
|
|
35930
|
-
}
|
|
35931
|
-
return {
|
|
35932
|
-
status: "InProgress",
|
|
35933
|
-
jobId: lastJob.jobId,
|
|
35934
|
-
exporterId: lastJob.exporterId,
|
|
35935
|
-
};
|
|
35936
|
-
});
|
|
35937
|
-
}
|
|
35938
|
-
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
35939
|
-
isPublishing(to, environment) {
|
|
35940
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35941
|
-
const jobs = yield this.dataCore.documentationBuilds(to.workspaceId, to.designSystemId, to.versionId, environment, 1);
|
|
35942
|
-
const job = jobs[0];
|
|
35943
|
-
if (!job) {
|
|
35944
|
-
// Nothing published just yet
|
|
35945
|
-
return {
|
|
35946
|
-
status: "Idle",
|
|
35947
|
-
jobId: null,
|
|
35948
|
-
exporterId: null,
|
|
35949
|
-
};
|
|
35950
|
-
}
|
|
35951
|
-
if (job.status === "InProgress") {
|
|
35952
|
-
return {
|
|
35953
|
-
status: "InProgress",
|
|
35954
|
-
jobId: job.id,
|
|
35955
|
-
exporterId: job.exporterId,
|
|
35956
|
-
};
|
|
35957
|
-
}
|
|
35958
|
-
return {
|
|
35959
|
-
status: "Idle",
|
|
35960
|
-
jobId: null,
|
|
35961
|
-
exporterId: null,
|
|
35962
|
-
};
|
|
35963
|
-
});
|
|
35964
|
-
}
|
|
35965
|
-
}
|
|
35966
|
-
exports.AreaPipelines = AreaPipelines;
|
|
35967
|
-
|
|
35968
|
-
|
|
35969
36135
|
/***/ }),
|
|
35970
36136
|
|
|
35971
36137
|
/***/ "./src/core/areas/SDKAreaTokenValues.ts":
|
|
@@ -36763,6 +36929,37 @@ class AreaVersions {
|
|
|
36763
36929
|
throw SDKSupernovaError_1.SupernovaError.fromMessage(`Unable to retrieve active version for design system id ${designSystemId} - no version is currently active in selected design system`);
|
|
36764
36930
|
});
|
|
36765
36931
|
}
|
|
36932
|
+
/** Creates new version and retrieves the newly created version object.
|
|
36933
|
+
* @param designSystemId - ID of the design system
|
|
36934
|
+
* @param model - new version model
|
|
36935
|
+
* @returns Newly created version object
|
|
36936
|
+
*/
|
|
36937
|
+
createVersion(designSystemId, model) {
|
|
36938
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36939
|
+
return this.dataCore.createVersion(designSystemId, model);
|
|
36940
|
+
});
|
|
36941
|
+
}
|
|
36942
|
+
/** Edits version
|
|
36943
|
+
* @param designSystemId - ID of the design system
|
|
36944
|
+
* @param versionId - ID of version
|
|
36945
|
+
* @param model - new version model
|
|
36946
|
+
* @returns nothing
|
|
36947
|
+
*/
|
|
36948
|
+
editVersion(designSystemId, versionId, model) {
|
|
36949
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36950
|
+
yield this.dataCore.editVersion(designSystemId, versionId, model);
|
|
36951
|
+
});
|
|
36952
|
+
}
|
|
36953
|
+
/** Deletes version
|
|
36954
|
+
* @param designSystemId - ID of the design system
|
|
36955
|
+
* @param versionId - ID of version
|
|
36956
|
+
* @returns nothing
|
|
36957
|
+
*/
|
|
36958
|
+
deleteVersion(designSystemId, versionId) {
|
|
36959
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36960
|
+
yield this.dataCore.deleteVersion(designSystemId, versionId);
|
|
36961
|
+
});
|
|
36962
|
+
}
|
|
36766
36963
|
/** Fetches all design system versions of provided design system */
|
|
36767
36964
|
getVersions(designSystemId) {
|
|
36768
36965
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -36777,14 +36974,21 @@ class AreaVersions {
|
|
|
36777
36974
|
}
|
|
36778
36975
|
getTokenStudioData(from) {
|
|
36779
36976
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36780
|
-
return
|
|
36977
|
+
return {};
|
|
36978
|
+
// return this.dataCore.getTokenStudioData(from.designSystemId, from.versionId)
|
|
36781
36979
|
});
|
|
36782
36980
|
}
|
|
36783
36981
|
// --- --- --- --- --- --- --- --- --- ---
|
|
36784
36982
|
// MARK: - Create/Update
|
|
36785
36983
|
writeTokenStudioData(from, data) {
|
|
36786
36984
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36787
|
-
return
|
|
36985
|
+
return false;
|
|
36986
|
+
/*
|
|
36987
|
+
return this.dataCore.writeTokenStudioData(
|
|
36988
|
+
from.designSystemId,
|
|
36989
|
+
from.versionId,
|
|
36990
|
+
data
|
|
36991
|
+
) */
|
|
36788
36992
|
});
|
|
36789
36993
|
}
|
|
36790
36994
|
}
|
|
@@ -36857,6 +37061,16 @@ class AreaWorkspaces {
|
|
|
36857
37061
|
return memberships;
|
|
36858
37062
|
});
|
|
36859
37063
|
}
|
|
37064
|
+
/** Fetches all users that are part of the workspace. Each user contains user role as well.
|
|
37065
|
+
* @param workspaceId - ID of the workspace
|
|
37066
|
+
* @returns All users that are members of the provided workspace
|
|
37067
|
+
*/
|
|
37068
|
+
userMemberships(workspaceId) {
|
|
37069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37070
|
+
const memberships = yield this.dataCore.userMemberships(workspaceId);
|
|
37071
|
+
return memberships;
|
|
37072
|
+
});
|
|
37073
|
+
}
|
|
36860
37074
|
subscriptionProductFeatures() {
|
|
36861
37075
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36862
37076
|
return this.dataCore.subscriptionProductFeatures();
|
|
@@ -36934,6 +37148,16 @@ class AreaWorkspaces {
|
|
|
36934
37148
|
return this.dataCore.updateWorkspaceProfile(workspaceId, update);
|
|
36935
37149
|
});
|
|
36936
37150
|
}
|
|
37151
|
+
/** tests accessibility of IP allowlist settings
|
|
37152
|
+
* @param workspaceId - ID of the workspace
|
|
37153
|
+
* @param ipWhitelistSettings - settings to test
|
|
37154
|
+
* @returns information if workspace is accesible by your IP
|
|
37155
|
+
*/
|
|
37156
|
+
testIpWhitelistSettings(workspaceId, ipWhitelistSettings) {
|
|
37157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37158
|
+
return this.dataCore.testIpWhitelistSettings(workspaceId, ipWhitelistSettings);
|
|
37159
|
+
});
|
|
37160
|
+
}
|
|
36937
37161
|
/** Updates workspace onboarding state for a specific workspace
|
|
36938
37162
|
* @param workspaceId - ID of the workspace
|
|
36939
37163
|
* @param update - New onboarding state
|
|
@@ -37296,6 +37520,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
37296
37520
|
};
|
|
37297
37521
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
37298
37522
|
exports.DataCore = void 0;
|
|
37523
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
37524
|
+
// MARK: - Imports
|
|
37299
37525
|
const SDKAcl_1 = __webpack_require__(/*! ../../model/acl/SDKAcl */ "./src/model/acl/SDKAcl.ts");
|
|
37300
37526
|
const SDKAsset_1 = __webpack_require__(/*! ../../model/assets/SDKAsset */ "./src/model/assets/SDKAsset.ts");
|
|
37301
37527
|
const SDKBrand_1 = __webpack_require__(/*! ../../model/base/SDKBrand */ "./src/model/base/SDKBrand.ts");
|
|
@@ -37308,9 +37534,11 @@ const SDKElementProperty_1 = __webpack_require__(/*! ../../model/elements/SDKEle
|
|
|
37308
37534
|
const SDKElementPropertyValue_1 = __webpack_require__(/*! ../../model/elements/values/SDKElementPropertyValue */ "./src/model/elements/values/SDKElementPropertyValue.ts");
|
|
37309
37535
|
const SDKExporterCustomBlock_1 = __webpack_require__(/*! ../../model/exporters/custom_blocks/SDKExporterCustomBlock */ "./src/model/exporters/custom_blocks/SDKExporterCustomBlock.ts");
|
|
37310
37536
|
const SDKExporter_1 = __webpack_require__(/*! ../../model/exporters/SDKExporter */ "./src/model/exporters/SDKExporter.ts");
|
|
37537
|
+
const SDKImportJob_1 = __webpack_require__(/*! ../../model/jobs/SDKImportJob */ "./src/model/jobs/SDKImportJob.ts");
|
|
37311
37538
|
const SDKMembership_1 = __webpack_require__(/*! ../../model/membership/SDKMembership */ "./src/model/membership/SDKMembership.ts");
|
|
37312
37539
|
const SDKSource_1 = __webpack_require__(/*! ../../model/support/SDKSource */ "./src/model/support/SDKSource.ts");
|
|
37313
37540
|
const SDKUser_1 = __webpack_require__(/*! ../../model/users/SDKUser */ "./src/model/users/SDKUser.ts");
|
|
37541
|
+
const SDKUserMembership_1 = __webpack_require__(/*! ../../model/users/SDKUserMembership */ "./src/model/users/SDKUserMembership.ts");
|
|
37314
37542
|
const SDKWorkspace_1 = __webpack_require__(/*! ../../model/workspaces/SDKWorkspace */ "./src/model/workspaces/SDKWorkspace.ts");
|
|
37315
37543
|
const SDKWorkspaceIPWhitelistSettings_1 = __webpack_require__(/*! ../../model/workspaces/SDKWorkspaceIPWhitelistSettings */ "./src/model/workspaces/SDKWorkspaceIPWhitelistSettings.ts");
|
|
37316
37544
|
const SDKWorkspaceNPMRegistrySettings_1 = __webpack_require__(/*! ../../model/workspaces/SDKWorkspaceNPMRegistrySettings */ "./src/model/workspaces/SDKWorkspaceNPMRegistrySettings.ts");
|
|
@@ -37339,7 +37567,7 @@ class DataCore {
|
|
|
37339
37567
|
this.render = new SDKDataCoreRenderRequests_1.DataCoreRenderRequests(bridge);
|
|
37340
37568
|
}
|
|
37341
37569
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
37342
|
-
// MARK: -
|
|
37570
|
+
// MARK: - Users
|
|
37343
37571
|
/** Remote: Get information about currently logged in user */
|
|
37344
37572
|
currentUser() {
|
|
37345
37573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -37361,6 +37589,13 @@ class DataCore {
|
|
|
37361
37589
|
return data.map((m) => new SDKMembership_1.Membership(m));
|
|
37362
37590
|
});
|
|
37363
37591
|
}
|
|
37592
|
+
/** Remote: Get information about all workspaces user has access to, including which role they play */
|
|
37593
|
+
userMemberships(workspaceId) {
|
|
37594
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37595
|
+
const data = yield this.read.getRemoteUserMemberships(workspaceId);
|
|
37596
|
+
return data.map((m) => new SDKUserMembership_1.UserMembership(m));
|
|
37597
|
+
});
|
|
37598
|
+
}
|
|
37364
37599
|
subscriptionProductFeatures() {
|
|
37365
37600
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37366
37601
|
const data = yield this.read.getRemoteSubscriptionProductFeatures();
|
|
@@ -38073,6 +38308,38 @@ class DataCore {
|
|
|
38073
38308
|
return new SDKWorkspace_1.Workspace(data);
|
|
38074
38309
|
});
|
|
38075
38310
|
}
|
|
38311
|
+
createVersion(designSystemId, model) {
|
|
38312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38313
|
+
const data = yield this.write.createRemoteVersion(designSystemId, model);
|
|
38314
|
+
return new SDKDesignSystemVersion_1.DesignSystemVersion(data);
|
|
38315
|
+
});
|
|
38316
|
+
}
|
|
38317
|
+
editVersion(designSystemId, versionId, model) {
|
|
38318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38319
|
+
yield this.write.updateRemoteVersion(designSystemId, versionId, model);
|
|
38320
|
+
});
|
|
38321
|
+
}
|
|
38322
|
+
deleteVersion(designSystemId, versionId) {
|
|
38323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38324
|
+
yield this.write.deleteRemoteVersion(designSystemId, versionId);
|
|
38325
|
+
});
|
|
38326
|
+
}
|
|
38327
|
+
createBrand(designSystemId, versionId, model) {
|
|
38328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38329
|
+
const data = yield this.write.createRemoteBrand(designSystemId, versionId, model);
|
|
38330
|
+
return new SDKBrand_1.Brand(data);
|
|
38331
|
+
});
|
|
38332
|
+
}
|
|
38333
|
+
editBrand(designSystemId, versionId, brandId, brand) {
|
|
38334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38335
|
+
yield this.write.updateRemoteBrand(designSystemId, versionId, brandId, brand);
|
|
38336
|
+
});
|
|
38337
|
+
}
|
|
38338
|
+
deleteBrand(designSystemId, versionId, brandId) {
|
|
38339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38340
|
+
yield this.write.deleteRemoteBrand(designSystemId, versionId, brandId);
|
|
38341
|
+
});
|
|
38342
|
+
}
|
|
38076
38343
|
/** Validate that workspace handle is available */
|
|
38077
38344
|
validateIsWorkspaceHandleAvailable(handle) {
|
|
38078
38345
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38108,6 +38375,11 @@ class DataCore {
|
|
|
38108
38375
|
return this.write.updateRemoteWorkspaceProfile(workspaceId, profile);
|
|
38109
38376
|
});
|
|
38110
38377
|
}
|
|
38378
|
+
testIpWhitelistSettings(workspaceId, ipWhitelistSettings) {
|
|
38379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38380
|
+
return this.write.testIpWhitelistSettings(workspaceId, ipWhitelistSettings);
|
|
38381
|
+
});
|
|
38382
|
+
}
|
|
38111
38383
|
updateWorkspaceOnboarding(workspaceId, state) {
|
|
38112
38384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38113
38385
|
return this.write.updateRemoteWorkspaceOnboarding(workspaceId, state);
|
|
@@ -38153,15 +38425,40 @@ class DataCore {
|
|
|
38153
38425
|
/** Download information about a single design system and retrieve it resolved */
|
|
38154
38426
|
designSystem(designSystemId) {
|
|
38155
38427
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38156
|
-
const data = yield this.read.getRemoteDesignSystem(designSystemId);
|
|
38157
|
-
return new SDKDesignSystem_1.DesignSystem(data);
|
|
38428
|
+
const data = yield this.read.getRemoteDesignSystem(designSystemId);
|
|
38429
|
+
return new SDKDesignSystem_1.DesignSystem(data);
|
|
38430
|
+
});
|
|
38431
|
+
}
|
|
38432
|
+
/** Download information about design systems that user has access to under a single workspace and retrieve it resolved */
|
|
38433
|
+
designSystems(workspaceId) {
|
|
38434
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38435
|
+
const data = yield this.read.getRemoteDesignSystems(workspaceId);
|
|
38436
|
+
return data.map((d) => new SDKDesignSystem_1.DesignSystem(d));
|
|
38437
|
+
});
|
|
38438
|
+
}
|
|
38439
|
+
/** Creates a design system */
|
|
38440
|
+
createDesignSystem(workspaceId, name, description) {
|
|
38441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38442
|
+
const data = yield this.write.createRemoteDesignSystem(workspaceId, name, description);
|
|
38443
|
+
return new SDKDesignSystem_1.DesignSystem(data);
|
|
38444
|
+
});
|
|
38445
|
+
}
|
|
38446
|
+
/** Updates a design system metadata */
|
|
38447
|
+
updateDesignSystemMetadata(designSystemId, name, description) {
|
|
38448
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38449
|
+
yield this.write.updateRemoteDesignSystemMetadata(designSystemId, name, description);
|
|
38450
|
+
});
|
|
38451
|
+
}
|
|
38452
|
+
/** Updates a design system multibrand option */
|
|
38453
|
+
updateDesignSystemIsMultibrand(designSystem, isMultibrand) {
|
|
38454
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38455
|
+
yield this.write.updateRemoteDesignSystemIsMultibrand(designSystem, isMultibrand);
|
|
38158
38456
|
});
|
|
38159
38457
|
}
|
|
38160
|
-
/**
|
|
38161
|
-
|
|
38458
|
+
/** Delete a design system */
|
|
38459
|
+
deleteDesignSystem(designSystemId) {
|
|
38162
38460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38163
|
-
|
|
38164
|
-
return data.map((d) => new SDKDesignSystem_1.DesignSystem(d));
|
|
38461
|
+
yield this.write.deleteDesignSystem(designSystemId);
|
|
38165
38462
|
});
|
|
38166
38463
|
}
|
|
38167
38464
|
/** Download information about a desing system source within a design system design and retrieve it resolved */
|
|
@@ -38178,6 +38475,48 @@ class DataCore {
|
|
|
38178
38475
|
return data.map((d) => new SDKSource_1.Source(d));
|
|
38179
38476
|
});
|
|
38180
38477
|
}
|
|
38478
|
+
deleteFigmaSource(designSystemId, sourceId) {
|
|
38479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38480
|
+
return this.write.deleteRemoteSource(designSystemId, sourceId);
|
|
38481
|
+
});
|
|
38482
|
+
}
|
|
38483
|
+
linkFigmaSource(designSystemId, brandId, url, options) {
|
|
38484
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38485
|
+
const payload = {
|
|
38486
|
+
figmaFileUrl: url,
|
|
38487
|
+
autoImportMode: options.autoImport,
|
|
38488
|
+
brandId,
|
|
38489
|
+
scopes: options.scopes,
|
|
38490
|
+
};
|
|
38491
|
+
if (options.themeId) {
|
|
38492
|
+
payload.themeId = options.themeId;
|
|
38493
|
+
}
|
|
38494
|
+
const data = yield this.write.linkFigmaSource(designSystemId, payload);
|
|
38495
|
+
return new SDKSource_1.Source(data);
|
|
38496
|
+
});
|
|
38497
|
+
}
|
|
38498
|
+
updateFigmaSource(designSystemId, sourceId, options) {
|
|
38499
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38500
|
+
const payload = {};
|
|
38501
|
+
if (options.scopes) {
|
|
38502
|
+
payload.scopes = options.scopes;
|
|
38503
|
+
}
|
|
38504
|
+
if (options.hasOwnProperty("autoImport")) {
|
|
38505
|
+
payload.autoImportMode = options.autoImport;
|
|
38506
|
+
}
|
|
38507
|
+
if (options.hasOwnProperty("themeId")) {
|
|
38508
|
+
payload.themeId = options.themeId;
|
|
38509
|
+
}
|
|
38510
|
+
const data = yield this.write.updateFigmaSource(designSystemId, sourceId, payload);
|
|
38511
|
+
return new SDKSource_1.Source(data);
|
|
38512
|
+
});
|
|
38513
|
+
}
|
|
38514
|
+
updateFigmaSourceClaimOwnership(designSystemId, sourceId) {
|
|
38515
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38516
|
+
const data = yield this.write.updateFigmaSourceClaimOwnership(designSystemId, sourceId);
|
|
38517
|
+
return new SDKSource_1.Source(data);
|
|
38518
|
+
});
|
|
38519
|
+
}
|
|
38181
38520
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38182
38521
|
// MARK: - Versions
|
|
38183
38522
|
versions(designSystemId) {
|
|
@@ -38211,6 +38550,9 @@ class DataCore {
|
|
|
38211
38550
|
getOAuthURL(service) {
|
|
38212
38551
|
return this.read.getOAuthURL(service);
|
|
38213
38552
|
}
|
|
38553
|
+
deleteOAuthIntegration(userId, service) {
|
|
38554
|
+
return this.write.deleteOAuthIntegration(userId, service);
|
|
38555
|
+
}
|
|
38214
38556
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38215
38557
|
// MARK: - Transactions
|
|
38216
38558
|
bulkUpdateTokenData(designSystemId, versionId, data) {
|
|
@@ -38293,15 +38635,23 @@ class DataCore {
|
|
|
38293
38635
|
});
|
|
38294
38636
|
}
|
|
38295
38637
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38296
|
-
// MARK: -
|
|
38297
|
-
|
|
38638
|
+
// MARK: - Automation
|
|
38639
|
+
getImportJob(designSystemId, versionId, jobId) {
|
|
38640
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38641
|
+
const data = yield this.read.getImportJob(designSystemId, versionId, jobId);
|
|
38642
|
+
return new SDKImportJob_1.ImportJob(data);
|
|
38643
|
+
});
|
|
38644
|
+
}
|
|
38645
|
+
getImportJobs(designSystemId, versionId) {
|
|
38298
38646
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38299
|
-
|
|
38647
|
+
const data = yield this.read.getImportJobs(designSystemId, versionId);
|
|
38648
|
+
return data.map((d) => new SDKImportJob_1.ImportJob(d));
|
|
38300
38649
|
});
|
|
38301
38650
|
}
|
|
38302
|
-
|
|
38651
|
+
scheduleImportJobForFigmaSources(designSystemId, versionId, sourceIds, dryRun) {
|
|
38303
38652
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38304
|
-
|
|
38653
|
+
const data = yield this.write.scheduleImportJobForFigmaSources(designSystemId, versionId, sourceIds, dryRun);
|
|
38654
|
+
return new SDKImportJob_1.ImportJob(data);
|
|
38305
38655
|
});
|
|
38306
38656
|
}
|
|
38307
38657
|
}
|
|
@@ -38362,7 +38712,7 @@ class DataCoreReadRequests {
|
|
|
38362
38712
|
return payload.result.user;
|
|
38363
38713
|
});
|
|
38364
38714
|
}
|
|
38365
|
-
/** Remote: Get information about all workspaces user
|
|
38715
|
+
/** Remote: Get information about all workspaces user can access */
|
|
38366
38716
|
getRemoteMemberships(userId) {
|
|
38367
38717
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38368
38718
|
const endpoint = this.bridge.getUserEndpoint(userId, "workspaces");
|
|
@@ -38404,6 +38754,14 @@ class DataCoreReadRequests {
|
|
|
38404
38754
|
return payload.result.status === "OK";
|
|
38405
38755
|
});
|
|
38406
38756
|
}
|
|
38757
|
+
/** Remote: Get all users memberships */
|
|
38758
|
+
getRemoteUserMemberships(workspaceId) {
|
|
38759
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38760
|
+
const endpoint = this.bridge.getWorkspaceEndpoint(workspaceId, "members");
|
|
38761
|
+
const payload = yield this.bridge.get(endpoint);
|
|
38762
|
+
return payload.result.members;
|
|
38763
|
+
});
|
|
38764
|
+
}
|
|
38407
38765
|
/** Remote: Get information about the state of workspace onboarding, what was completed and what not */
|
|
38408
38766
|
getRemoteWorkspaceOnboarding(workspaceId) {
|
|
38409
38767
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38459,7 +38817,7 @@ class DataCoreReadRequests {
|
|
|
38459
38817
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38460
38818
|
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, `sources/${sourceId}`);
|
|
38461
38819
|
const payload = yield this.bridge.get(endpoint);
|
|
38462
|
-
return payload.result.
|
|
38820
|
+
return payload.result.source;
|
|
38463
38821
|
});
|
|
38464
38822
|
}
|
|
38465
38823
|
/** Remote: Get all design sources of a single design system */
|
|
@@ -38736,12 +39094,19 @@ class DataCoreReadRequests {
|
|
|
38736
39094
|
});
|
|
38737
39095
|
}
|
|
38738
39096
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38739
|
-
// MARK: -
|
|
38740
|
-
|
|
39097
|
+
// MARK: - Automation
|
|
39098
|
+
getImportJobs(designSystemId, versionId) {
|
|
38741
39099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38742
|
-
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "
|
|
39100
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "import-jobs");
|
|
38743
39101
|
const payload = yield this.bridge.get(endpoint);
|
|
38744
|
-
return payload.result;
|
|
39102
|
+
return payload.result.jobs;
|
|
39103
|
+
});
|
|
39104
|
+
}
|
|
39105
|
+
getImportJob(designSystemId, versionId, jobId) {
|
|
39106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39107
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `import-jobs/${jobId}`);
|
|
39108
|
+
const payload = yield this.bridge.get(endpoint);
|
|
39109
|
+
return payload.result.job;
|
|
38745
39110
|
});
|
|
38746
39111
|
}
|
|
38747
39112
|
}
|
|
@@ -38861,7 +39226,7 @@ exports.DataCoreRenderRequests = DataCoreRenderRequests;
|
|
|
38861
39226
|
/*!************************************************************!*\
|
|
38862
39227
|
!*** ./src/core/data/requests/SDKDataCoreWriteRequests.ts ***!
|
|
38863
39228
|
\************************************************************/
|
|
38864
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
39229
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
38865
39230
|
|
|
38866
39231
|
"use strict";
|
|
38867
39232
|
|
|
@@ -38883,6 +39248,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38883
39248
|
};
|
|
38884
39249
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
38885
39250
|
exports.DataCoreWriteRequests = void 0;
|
|
39251
|
+
const uuid_1 = __webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-node/index.js");
|
|
38886
39252
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38887
39253
|
// MARK: - Request engine: Write
|
|
38888
39254
|
class DataCoreWriteRequests {
|
|
@@ -38908,7 +39274,7 @@ class DataCoreWriteRequests {
|
|
|
38908
39274
|
return true;
|
|
38909
39275
|
});
|
|
38910
39276
|
}
|
|
38911
|
-
/** Remote: Updates the user profile of specified user.
|
|
39277
|
+
/** Remote: Updates the user profile of specified user. This call can only be used on the user who is authenticated with the token */
|
|
38912
39278
|
updateRemoteUserProfile(profile, userId) {
|
|
38913
39279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38914
39280
|
const endpoint = this.bridge.getUserEndpoint(userId, "profile");
|
|
@@ -38951,6 +39317,73 @@ class DataCoreWriteRequests {
|
|
|
38951
39317
|
return payload.result.workspace;
|
|
38952
39318
|
});
|
|
38953
39319
|
}
|
|
39320
|
+
/** Remote: Creates a new version */
|
|
39321
|
+
createRemoteVersion(designSystemId, model) {
|
|
39322
|
+
var _a, _b;
|
|
39323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39324
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, "head/commit");
|
|
39325
|
+
const response = yield this.bridge.post(endpoint, {
|
|
39326
|
+
meta: {
|
|
39327
|
+
name: (_a = model.name) !== null && _a !== void 0 ? _a : "",
|
|
39328
|
+
description: (_b = model.description) !== null && _b !== void 0 ? _b : "",
|
|
39329
|
+
},
|
|
39330
|
+
version: model.version,
|
|
39331
|
+
changelog: "",
|
|
39332
|
+
});
|
|
39333
|
+
return response.result.designSystemVersion;
|
|
39334
|
+
});
|
|
39335
|
+
}
|
|
39336
|
+
/** Remote: Updates a version */
|
|
39337
|
+
updateRemoteVersion(designSystemId, versionId, model) {
|
|
39338
|
+
var _a, _b;
|
|
39339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39340
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, null);
|
|
39341
|
+
return this.bridge.put(endpoint, {
|
|
39342
|
+
meta: {
|
|
39343
|
+
name: (_a = model.name) !== null && _a !== void 0 ? _a : "",
|
|
39344
|
+
description: (_b = model.description) !== null && _b !== void 0 ? _b : "",
|
|
39345
|
+
},
|
|
39346
|
+
version: model.version,
|
|
39347
|
+
changelog: "",
|
|
39348
|
+
});
|
|
39349
|
+
});
|
|
39350
|
+
}
|
|
39351
|
+
/** Remote: Deletes a version */
|
|
39352
|
+
deleteRemoteVersion(designSystemId, versionId) {
|
|
39353
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39354
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, null);
|
|
39355
|
+
return this.bridge.delete(endpoint);
|
|
39356
|
+
});
|
|
39357
|
+
}
|
|
39358
|
+
/** Remote: Creates a new brand */
|
|
39359
|
+
createRemoteBrand(designSystemId, versionId, model) {
|
|
39360
|
+
var _a, _b;
|
|
39361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39362
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "brands");
|
|
39363
|
+
const response = yield this.bridge.post(endpoint, {
|
|
39364
|
+
meta: {
|
|
39365
|
+
name: (_a = model.name) !== null && _a !== void 0 ? _a : "",
|
|
39366
|
+
description: (_b = model.description) !== null && _b !== void 0 ? _b : "",
|
|
39367
|
+
},
|
|
39368
|
+
persistentId: (0, uuid_1.v4)(),
|
|
39369
|
+
});
|
|
39370
|
+
return response.result.designSystemVersion;
|
|
39371
|
+
});
|
|
39372
|
+
}
|
|
39373
|
+
/** Remote: Updates a brand */
|
|
39374
|
+
updateRemoteBrand(designSystemId, versionId, brandId, brand) {
|
|
39375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39376
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `brands/${brandId}`);
|
|
39377
|
+
return this.bridge.put(endpoint, brand.toRemote());
|
|
39378
|
+
});
|
|
39379
|
+
}
|
|
39380
|
+
/** Remote: Deletes a brand */
|
|
39381
|
+
deleteRemoteBrand(designSystemId, versionId, brandId) {
|
|
39382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39383
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `brands/${brandId}`);
|
|
39384
|
+
return this.bridge.delete(endpoint);
|
|
39385
|
+
});
|
|
39386
|
+
}
|
|
38954
39387
|
/** Remote: Updates a workspace profile */
|
|
38955
39388
|
updateRemoteWorkspaceProfile(workspaceId, profile) {
|
|
38956
39389
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38958,6 +39391,13 @@ class DataCoreWriteRequests {
|
|
|
38958
39391
|
return this.bridge.put(endpoint, profile);
|
|
38959
39392
|
});
|
|
38960
39393
|
}
|
|
39394
|
+
testIpWhitelistSettings(workspaceId, ipWhitelistSettings) {
|
|
39395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39396
|
+
const endpoint = this.bridge.getWorkspaceEndpoint(workspaceId, "ip-whitelist-test");
|
|
39397
|
+
const response = yield this.bridge.post(endpoint, ipWhitelistSettings);
|
|
39398
|
+
return response.result;
|
|
39399
|
+
});
|
|
39400
|
+
}
|
|
38961
39401
|
/** Remote: Updates a workspace avatar */
|
|
38962
39402
|
updateRemoteWorkspaceAvatar(workspaceId, avatar) {
|
|
38963
39403
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39015,6 +39455,55 @@ class DataCoreWriteRequests {
|
|
|
39015
39455
|
});
|
|
39016
39456
|
}
|
|
39017
39457
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39458
|
+
// MARK: - Design System
|
|
39459
|
+
/** Remote: Creates a new design system */
|
|
39460
|
+
createRemoteDesignSystem(workspaceId, name, description) {
|
|
39461
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39462
|
+
const endpoint = this.bridge.getBaseEndpoint("design-systems");
|
|
39463
|
+
const payload = yield this.bridge.post(endpoint, {
|
|
39464
|
+
meta: {
|
|
39465
|
+
name,
|
|
39466
|
+
description: description !== null && description !== void 0 ? description : "",
|
|
39467
|
+
},
|
|
39468
|
+
workspaceId,
|
|
39469
|
+
});
|
|
39470
|
+
return payload.result.designSystem;
|
|
39471
|
+
});
|
|
39472
|
+
}
|
|
39473
|
+
/** Remote: Updates a design system metadata */
|
|
39474
|
+
updateRemoteDesignSystemMetadata(designSystemId, name, description) {
|
|
39475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39476
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, undefined);
|
|
39477
|
+
yield this.bridge.put(endpoint, {
|
|
39478
|
+
meta: {
|
|
39479
|
+
name,
|
|
39480
|
+
description: description !== null && description !== void 0 ? description : "",
|
|
39481
|
+
},
|
|
39482
|
+
});
|
|
39483
|
+
});
|
|
39484
|
+
}
|
|
39485
|
+
/** Remote: Updates a design system multibrand capabilities */
|
|
39486
|
+
updateRemoteDesignSystemIsMultibrand(designSystem, isMultibrand) {
|
|
39487
|
+
var _a;
|
|
39488
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39489
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystem.id, undefined);
|
|
39490
|
+
yield this.bridge.put(endpoint, {
|
|
39491
|
+
isMultibrand,
|
|
39492
|
+
meta: {
|
|
39493
|
+
name: designSystem.name,
|
|
39494
|
+
description: (_a = designSystem.description) !== null && _a !== void 0 ? _a : "",
|
|
39495
|
+
},
|
|
39496
|
+
});
|
|
39497
|
+
});
|
|
39498
|
+
}
|
|
39499
|
+
/** Remote: Deletes a design system */
|
|
39500
|
+
deleteDesignSystem(designSystemId) {
|
|
39501
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39502
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, null);
|
|
39503
|
+
return this.bridge.delete(endpoint);
|
|
39504
|
+
});
|
|
39505
|
+
}
|
|
39506
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39018
39507
|
// MARK: - Documentation
|
|
39019
39508
|
publishDocumentation(workspaceId, designSystemId, versionId, environment) {
|
|
39020
39509
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39022,7 +39511,7 @@ class DataCoreWriteRequests {
|
|
|
39022
39511
|
const payload = {
|
|
39023
39512
|
designSystemId,
|
|
39024
39513
|
designSystemVersionId: versionId,
|
|
39025
|
-
environment
|
|
39514
|
+
environment,
|
|
39026
39515
|
};
|
|
39027
39516
|
const response = yield this.bridge.post(endpoint, payload);
|
|
39028
39517
|
const result = response.result.job;
|
|
@@ -39295,12 +39784,56 @@ class DataCoreWriteRequests {
|
|
|
39295
39784
|
});
|
|
39296
39785
|
}
|
|
39297
39786
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39298
|
-
// MARK: -
|
|
39299
|
-
|
|
39787
|
+
// MARK: - Integrations
|
|
39788
|
+
/** Remote: Deletes a OAuth integration */
|
|
39789
|
+
deleteOAuthIntegration(userId, service) {
|
|
39300
39790
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39301
|
-
const endpoint = this.bridge.
|
|
39302
|
-
yield this.bridge.
|
|
39303
|
-
|
|
39791
|
+
const endpoint = this.bridge.getBaseEndpoint(`users/${userId}/integration/${service}`);
|
|
39792
|
+
yield this.bridge.delete(endpoint);
|
|
39793
|
+
});
|
|
39794
|
+
}
|
|
39795
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39796
|
+
// MARK: - Jobs
|
|
39797
|
+
/** Remote: Schedules import job */
|
|
39798
|
+
scheduleImportJobForFigmaSources(designSystemId, versionId, sourceIds, dryRun) {
|
|
39799
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39800
|
+
const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "cloud-import");
|
|
39801
|
+
const data = {
|
|
39802
|
+
sourceIds,
|
|
39803
|
+
dryRun,
|
|
39804
|
+
};
|
|
39805
|
+
const payload = yield this.bridge.post(endpoint, data);
|
|
39806
|
+
return payload.result.token;
|
|
39807
|
+
});
|
|
39808
|
+
}
|
|
39809
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39810
|
+
// MARK: - Sources
|
|
39811
|
+
/** Remote: Deletes a remote data source */
|
|
39812
|
+
deleteRemoteSource(designSystemId, sourceId) {
|
|
39813
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39814
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, `sources/${sourceId}`);
|
|
39815
|
+
return this.bridge.delete(endpoint);
|
|
39816
|
+
});
|
|
39817
|
+
}
|
|
39818
|
+
linkFigmaSource(designSystemId, data) {
|
|
39819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39820
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, `sources`);
|
|
39821
|
+
const payload = yield this.bridge.post(endpoint, data);
|
|
39822
|
+
return payload.result.source;
|
|
39823
|
+
});
|
|
39824
|
+
}
|
|
39825
|
+
updateFigmaSource(designSystemId, sourceId, data) {
|
|
39826
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39827
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, `sources/${sourceId}`);
|
|
39828
|
+
const payload = yield this.bridge.put(endpoint, data);
|
|
39829
|
+
return payload.result.source;
|
|
39830
|
+
});
|
|
39831
|
+
}
|
|
39832
|
+
updateFigmaSourceClaimOwnership(designSystemId, sourceId) {
|
|
39833
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39834
|
+
const endpoint = this.bridge.getDesignSystemEndpoint(designSystemId, `sources/${sourceId}/ownership`);
|
|
39835
|
+
const payload = yield this.bridge.put(endpoint, {});
|
|
39836
|
+
return payload.result.source;
|
|
39304
39837
|
});
|
|
39305
39838
|
}
|
|
39306
39839
|
}
|
|
@@ -41364,8 +41897,8 @@ exports.TokenResolver = TokenResolver;
|
|
|
41364
41897
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41365
41898
|
exports.DocumentationPageBlockCallout = exports.DocumentationPageBlockAssets = exports.DocumentationPageBlockAsset = exports.Documentation = exports.DesignComponent = exports.ElementDataViewColumnType = exports.ElementDataViewColumnBasePropertyType = exports.ElementDataViewColumn = exports.ElementDataView = exports.ElementPropertyOption = exports.ElementPropertyType = exports.ElementPropertyTargetElementType = exports.ElementPropertyLinkElementType = exports.ElementProperty = exports.Component = exports.RenderedAsset = exports.Asset = exports.ExporterConfigurationPropertyType = exports.ExporterConfigurationPropertyInputType = exports.ExporterConfigurationProperty = exports.ExporterCustomBlockVariant = exports.ExporterCustomBlockPropertyInputType = exports.ExporterCustomBlockPropertyType = exports.ExporterCustomBlockProperty = exports.ExporterCustomBlockMode = exports.ExporterCustomBlock = exports.Exporter = exports.Membership = exports.DesignSystemVersion = exports.DesignSystem = exports.Brand = exports.SubscriptionProductFeatures = exports.Acl = exports.UserProfile = exports.User = exports.WorkspaceNPMRegistrySettings = exports.WorkspaceSSOSettings = exports.WorkspaceIPWhitelistSettings = exports.WorkspaceSubscription = exports.WorkspaceOnboarding = exports.WorkspaceProfile = exports.Workspace = exports.Supernova = exports.OPTION_TOKEN_TYPES = exports.STRING_TOKEN_TYPES = exports.DIMENSION_TOKEN_TYPES = exports.TokenUtils = exports.TokenUtilPreviewSegmentGenerator = exports.ElementPropertyValue = exports.ThemeUtilities = void 0;
|
|
41366
41899
|
exports.BlurType = exports.AssetScaleType = exports.AssetScale = exports.AssetFormat = exports.Alignment = exports.TokenGroup = exports.DesignComponentGroup = exports.AssetGroup = exports.RichTextSpanAttribute = exports.RichTextSpan = exports.DocumentationRichText = exports.DocumentationPageAsset = exports.DocumentationPageBlock = exports.DocumentationPage = exports.DocumentationItem = exports.DocumentationGroup = exports.DocumentationConfiguration = exports.DocumentationItemConfiguration = exports.DocumentationItemHeader = exports.DocumentationPageBlockTableColumn = exports.DocumentationPageBlockTableRow = exports.DocumentationPageBlockTableCell = exports.DocumentationPageBlockTable = exports.DocumentationPageBlockTabItem = exports.DocumentationPageBlockTab = exports.DocumentationPageBlockColumnItem = exports.DocumentationPageBlockColumn = exports.DocumentationPageUnorderedList = exports.DocumentationPageBlockTokenList = exports.DocumentationPageBlockTokenGroup = exports.DocumentationPageBlockToken = exports.DocumentationPageBlockText = exports.DocumentationPageBlockShortcuts = exports.DocumentationPageBlockShortcutType = exports.DocumentationPageBlockShortcut = exports.DocumentationPageBlockRenderCode = exports.DocumentationPageBlockQuote = exports.DocumentationPageOrderedList = exports.DocumentationPageBlockImage = exports.DocumentationPageBlockHeading = exports.DocumentationPageBlockFrames = exports.DocumentationPageBlockFrame = exports.DocumentationPageBlockEmbedYoutube = exports.DocumentationPageBlockEmbedStorybook = exports.DocumentationPageBlockEmbedLink = exports.DocumentationPageBlockEmbedGeneric = exports.DocumentationPageBlockEmbedFigma = exports.DocumentationPageBlockDivider = exports.DocumentationPageBlockCustom = exports.DocumentationPageBlockCode = void 0;
|
|
41367
|
-
exports.
|
|
41368
|
-
exports.SupernovaError = exports.UnreachableCaseError = exports.TokenTransform = exports.MarkdownTransformType = exports.MarkdownTransform = exports.DocSearchResultDataType = exports.DocSearch = exports.SupernovaToolsDesignTokensPlugin = exports.DTPluginToSupernovaMapType = exports.JSONBuilderNamingOption = exports.TokenJSONBuilder = exports.TokenUtilPreviewGenerator = exports.TokenThemeOverride = exports.TokenTheme = exports.Token = exports.VisibilityToken = exports.TextDecorationToken = exports.TextCaseToken = exports.FontWeightToken = exports.FontFamilyToken = void 0;
|
|
41900
|
+
exports.StringToken = exports.TypographyToken = exports.ShadowToken = exports.ZIndexToken = exports.DurationToken = exports.RadiusToken = exports.BorderWidthToken = exports.ParagraphSpacingToken = exports.LetterSpacingToken = exports.LineHeightToken = exports.FontSizeToken = exports.OpacityToken = exports.SpaceToken = exports.SizeToken = exports.DimensionToken = exports.GradientToken = exports.ColorToken = exports.BorderToken = exports.BlurToken = exports.TokenOrigin = exports.Size = exports.Source = exports.DesignComponentOrigin = exports.SourceType = exports.WorkspaceNPMRegistryType = exports.WorkspaceNPMRegistryAuthType = exports.WorkspaceSubscriptionStatusInternal = exports.WorkspaceSubscriptionStatus = exports.WorkspaceSubscriptionProduct = exports.WorkspaceSubscriptionPlanInterval = exports.VisibilityType = exports.UserRole = exports.Unit = exports.TokenType = exports.TextDecoration = exports.TextCase = exports.ShadowType = exports.RichTextSpanAttributeType = exports.GradientType = exports.FrameLayout = exports.FrameAlignment = exports.DocumentationPageBlockThemeType = exports.DocumentationPageBlockType = exports.DocumentationPageAssetType = exports.DocumentationItemType = exports.DocumentationHeadingType = exports.DocumentationGroupBehavior = exports.DocumentationCalloutType = exports.BorderStyle = exports.BorderPosition = void 0;
|
|
41901
|
+
exports.SupernovaError = exports.UnreachableCaseError = exports.TokenTransform = exports.MarkdownTransformType = exports.MarkdownTransform = exports.DocSearchResultDataType = exports.DocSearch = exports.SupernovaToolsDesignTokensPlugin = exports.DTPluginToSupernovaMapType = exports.JSONBuilderNamingOption = exports.TokenJSONBuilder = exports.TokenUtilPreviewGenerator = exports.TokenThemeOverride = exports.TokenTheme = exports.Token = exports.VisibilityToken = exports.TextDecorationToken = exports.TextCaseToken = exports.FontWeightToken = exports.FontFamilyToken = exports.ProductCopyToken = void 0;
|
|
41369
41902
|
var SDKThemeUtilities_1 = __webpack_require__(/*! ./model/themes/SDKThemeUtilities */ "./src/model/themes/SDKThemeUtilities.ts");
|
|
41370
41903
|
Object.defineProperty(exports, "ThemeUtilities", ({ enumerable: true, get: function () { return SDKThemeUtilities_1.ThemeUtilities; } }));
|
|
41371
41904
|
var SDKElementPropertyValue_1 = __webpack_require__(/*! ./model/elements/values/SDKElementPropertyValue */ "./src/model/elements/values/SDKElementPropertyValue.ts");
|
|
@@ -41622,6 +42155,8 @@ var SDKWorkspaceNPMRegistryAuthType_1 = __webpack_require__(/*! ./model/enums/SD
|
|
|
41622
42155
|
Object.defineProperty(exports, "WorkspaceNPMRegistryAuthType", ({ enumerable: true, get: function () { return SDKWorkspaceNPMRegistryAuthType_1.WorkspaceNPMRegistryAuthType; } }));
|
|
41623
42156
|
var SDKWorkspaceNPMRegistryType_1 = __webpack_require__(/*! ./model/enums/SDKWorkspaceNPMRegistryType */ "./src/model/enums/SDKWorkspaceNPMRegistryType.ts");
|
|
41624
42157
|
Object.defineProperty(exports, "WorkspaceNPMRegistryType", ({ enumerable: true, get: function () { return SDKWorkspaceNPMRegistryType_1.WorkspaceNPMRegistryType; } }));
|
|
42158
|
+
var SDKSourceType_1 = __webpack_require__(/*! ./model/enums/SDKSourceType */ "./src/model/enums/SDKSourceType.ts");
|
|
42159
|
+
Object.defineProperty(exports, "SourceType", ({ enumerable: true, get: function () { return SDKSourceType_1.SourceType; } }));
|
|
41625
42160
|
// Supporting objects
|
|
41626
42161
|
var SDKDesignComponentOrigin_1 = __webpack_require__(/*! ./model/support/SDKDesignComponentOrigin */ "./src/model/support/SDKDesignComponentOrigin.ts");
|
|
41627
42162
|
Object.defineProperty(exports, "DesignComponentOrigin", ({ enumerable: true, get: function () { return SDKDesignComponentOrigin_1.DesignComponentOrigin; } }));
|
|
@@ -43965,10 +44500,9 @@ class DocumentationBlockBuilder {
|
|
|
43965
44500
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
43966
44501
|
// MARK: - Static
|
|
43967
44502
|
static fromGenericModel(model, customBlocks, configuration) {
|
|
44503
|
+
var _a;
|
|
43968
44504
|
// Map children. Children that are not supported by the data model natively should be ignored
|
|
43969
|
-
const children = model.children
|
|
43970
|
-
.map((c) => DocumentationBlockBuilder.fromGenericModel(c, customBlocks, configuration))
|
|
43971
|
-
.filter((c) => c !== undefined);
|
|
44505
|
+
const children = ((_a = model.children) === null || _a === void 0 ? void 0 : _a.map((c) => DocumentationBlockBuilder.fromGenericModel(c, customBlocks, configuration)).filter((c) => c !== undefined)) || [];
|
|
43972
44506
|
switch (model.type) {
|
|
43973
44507
|
case SDKDocumentationPageBlockType_1.DocumentationPageBlockType.text:
|
|
43974
44508
|
return new SDKDocumentationPageBlockText_1.DocumentationPageBlockText(model, children);
|
|
@@ -46089,6 +46623,48 @@ class TokenGroup {
|
|
|
46089
46623
|
exports.TokenGroup = TokenGroup;
|
|
46090
46624
|
|
|
46091
46625
|
|
|
46626
|
+
/***/ }),
|
|
46627
|
+
|
|
46628
|
+
/***/ "./src/model/jobs/SDKImportJob.ts":
|
|
46629
|
+
/*!****************************************!*\
|
|
46630
|
+
!*** ./src/model/jobs/SDKImportJob.ts ***!
|
|
46631
|
+
\****************************************/
|
|
46632
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
46633
|
+
|
|
46634
|
+
"use strict";
|
|
46635
|
+
|
|
46636
|
+
//
|
|
46637
|
+
// SDKImportJob.ts
|
|
46638
|
+
// Supernova SDK
|
|
46639
|
+
//
|
|
46640
|
+
// Created by Jiri Trecak.
|
|
46641
|
+
//
|
|
46642
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46643
|
+
exports.ImportJob = void 0;
|
|
46644
|
+
const SDKSource_1 = __webpack_require__(/*! ../support/SDKSource */ "./src/model/support/SDKSource.ts");
|
|
46645
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46646
|
+
// MARK: - Function Definition
|
|
46647
|
+
class ImportJob {
|
|
46648
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
46649
|
+
// MARK: - Constructor
|
|
46650
|
+
constructor(model) {
|
|
46651
|
+
var _a;
|
|
46652
|
+
this.id = model.id;
|
|
46653
|
+
this.designSystemId = model.designSystemId;
|
|
46654
|
+
this.designSystemVersionId = model.designSystemVersionId;
|
|
46655
|
+
this.createdAt = model.createdAt ? new Date(model.createdAt) : null;
|
|
46656
|
+
this.state = model.state;
|
|
46657
|
+
this.operation = model.operation;
|
|
46658
|
+
this.stateChangedAt = model.stateChangedAt
|
|
46659
|
+
? new Date(model.stateChangedAt)
|
|
46660
|
+
: null;
|
|
46661
|
+
this.error = (_a = model.error) !== null && _a !== void 0 ? _a : null;
|
|
46662
|
+
this.sources = model.sources.map((source) => new SDKSource_1.Source(source));
|
|
46663
|
+
}
|
|
46664
|
+
}
|
|
46665
|
+
exports.ImportJob = ImportJob;
|
|
46666
|
+
|
|
46667
|
+
|
|
46092
46668
|
/***/ }),
|
|
46093
46669
|
|
|
46094
46670
|
/***/ "./src/model/membership/SDKMembership.ts":
|
|
@@ -46107,8 +46683,6 @@ exports.TokenGroup = TokenGroup;
|
|
|
46107
46683
|
//
|
|
46108
46684
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46109
46685
|
exports.Membership = void 0;
|
|
46110
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46111
|
-
// MARK: - Imports
|
|
46112
46686
|
const SDKWorkspace_1 = __webpack_require__(/*! ../workspaces/SDKWorkspace */ "./src/model/workspaces/SDKWorkspace.ts");
|
|
46113
46687
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46114
46688
|
// MARK: - Function Definition
|
|
@@ -46159,7 +46733,7 @@ class DesignComponentOrigin {
|
|
|
46159
46733
|
const remoteSource = sources.filter((s) => s.id === model.sourceId)[0];
|
|
46160
46734
|
if (remoteSource) {
|
|
46161
46735
|
this.sourceType = remoteSource.type;
|
|
46162
|
-
this.fileId = (_e = remoteSource.fileId) !== null && _e !== void 0 ? _e : null;
|
|
46736
|
+
this.fileId = (_e = remoteSource.cloud.fileId) !== null && _e !== void 0 ? _e : null;
|
|
46163
46737
|
this.fileName = (_f = remoteSource.fileName) !== null && _f !== void 0 ? _f : null;
|
|
46164
46738
|
}
|
|
46165
46739
|
}
|
|
@@ -46273,76 +46847,100 @@ exports.Source = void 0;
|
|
|
46273
46847
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46274
46848
|
// MARK: - Object Definition
|
|
46275
46849
|
class Source {
|
|
46850
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46851
|
+
// MARK: - Getter & Setters
|
|
46852
|
+
get hasError() {
|
|
46853
|
+
var _a, _b;
|
|
46854
|
+
const lastImportResult = (_a = this.cloud) === null || _a === void 0 ? void 0 : _a.lastImportResult;
|
|
46855
|
+
if (!lastImportResult)
|
|
46856
|
+
return false;
|
|
46857
|
+
// If the import failed completely, it counts as an error
|
|
46858
|
+
if (lastImportResult.isFailed)
|
|
46859
|
+
return true;
|
|
46860
|
+
// Any error warnings count as an error
|
|
46861
|
+
if ((_b = lastImportResult.warnings) === null || _b === void 0 ? void 0 : _b.length)
|
|
46862
|
+
return true;
|
|
46863
|
+
return false;
|
|
46864
|
+
}
|
|
46276
46865
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46277
46866
|
// MARK: - Constructor
|
|
46278
46867
|
constructor(model) {
|
|
46279
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
46868
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
46280
46869
|
this.type = model.type;
|
|
46281
46870
|
this.id = model.id;
|
|
46282
46871
|
this.fileName = (_a = model.fileName) !== null && _a !== void 0 ? _a : null;
|
|
46283
|
-
this.
|
|
46284
|
-
this.
|
|
46285
|
-
this.
|
|
46286
|
-
if (
|
|
46287
|
-
this.
|
|
46288
|
-
|
|
46289
|
-
|
|
46290
|
-
|
|
46291
|
-
|
|
46292
|
-
|
|
46293
|
-
|
|
46294
|
-
|
|
46295
|
-
|
|
46296
|
-
|
|
46297
|
-
|
|
46298
|
-
|
|
46299
|
-
|
|
46300
|
-
|
|
46301
|
-
|
|
46302
|
-
|
|
46303
|
-
|
|
46304
|
-
|
|
46305
|
-
|
|
46306
|
-
|
|
46307
|
-
|
|
46308
|
-
|
|
46309
|
-
|
|
46310
|
-
|
|
46311
|
-
|
|
46312
|
-
|
|
46313
|
-
|
|
46314
|
-
|
|
46315
|
-
|
|
46316
|
-
|
|
46317
|
-
|
|
46318
|
-
|
|
46319
|
-
|
|
46320
|
-
|
|
46321
|
-
|
|
46322
|
-
|
|
46323
|
-
|
|
46872
|
+
this.linkType = model.linkType;
|
|
46873
|
+
this.brandId = (_b = model.brandId) !== null && _b !== void 0 ? _b : null;
|
|
46874
|
+
this.fileName = (_c = model.fileName) !== null && _c !== void 0 ? _c : null;
|
|
46875
|
+
if (model.cloud) {
|
|
46876
|
+
this.cloud = {
|
|
46877
|
+
fileId: (_e = (_d = model.cloud) === null || _d === void 0 ? void 0 : _d.fileId) !== null && _e !== void 0 ? _e : null,
|
|
46878
|
+
autoImportMode: (_g = (_f = model.cloud) === null || _f === void 0 ? void 0 : _f.autoImportMode) !== null && _g !== void 0 ? _g : null,
|
|
46879
|
+
fileThumbnailUrl: (_j = (_h = model.cloud) === null || _h === void 0 ? void 0 : _h.fileThumbnailUrl) !== null && _j !== void 0 ? _j : null,
|
|
46880
|
+
ownerId: (_l = (_k = model.cloud) === null || _k === void 0 ? void 0 : _k.ownerId) !== null && _l !== void 0 ? _l : null,
|
|
46881
|
+
ownerUserName: (_o = (_m = model.cloud) === null || _m === void 0 ? void 0 : _m.ownerUserName) !== null && _o !== void 0 ? _o : null,
|
|
46882
|
+
state: (_q = (_p = model.cloud) === null || _p === void 0 ? void 0 : _p.state) !== null && _q !== void 0 ? _q : null,
|
|
46883
|
+
lastUpdatesCheckedAt: ((_r = model.cloud) === null || _r === void 0 ? void 0 : _r.lastUpdatesCheckedAt)
|
|
46884
|
+
? new Date(model.cloud.lastUpdatesCheckedAt)
|
|
46885
|
+
: null,
|
|
46886
|
+
lastImportedAt: ((_s = model.cloud) === null || _s === void 0 ? void 0 : _s.lastImportedAt)
|
|
46887
|
+
? new Date(model.cloud.lastImportedAt)
|
|
46888
|
+
: null,
|
|
46889
|
+
lastImportedVersion: ((_t = model.cloud) === null || _t === void 0 ? void 0 : _t.lastImportedVersion)
|
|
46890
|
+
? {
|
|
46891
|
+
id: model.cloud.lastImportedVersion.id,
|
|
46892
|
+
created_at: model.cloud.lastImportedVersion.created_at,
|
|
46893
|
+
label: (_u = model.cloud.lastImportedVersion.label) !== null && _u !== void 0 ? _u : null,
|
|
46894
|
+
description: model.cloud.lastImportedVersion.description,
|
|
46895
|
+
}
|
|
46896
|
+
: null,
|
|
46897
|
+
lastImportResult: ((_v = model.cloud) === null || _v === void 0 ? void 0 : _v.lastImportResult)
|
|
46898
|
+
? {
|
|
46899
|
+
sourceId: model.cloud.lastImportResult.sourceId,
|
|
46900
|
+
brandId: model.cloud.lastImportResult.brandId,
|
|
46901
|
+
tokensCreated: model.cloud.lastImportResult.tokensCreated,
|
|
46902
|
+
tokensUpdated: model.cloud.lastImportResult.tokensUpdated,
|
|
46903
|
+
tokensDeleted: model.cloud.lastImportResult.tokensDeleted,
|
|
46904
|
+
componentsCreated: model.cloud.lastImportResult.componentsCreated,
|
|
46905
|
+
componentsUpdated: model.cloud.lastImportResult.componentsUpdated,
|
|
46906
|
+
componentsDeleted: model.cloud.lastImportResult.componentsDeleted,
|
|
46907
|
+
componentAssetsCreated: model.cloud.lastImportResult.componentAssetsCreated,
|
|
46908
|
+
componentAssetsUpdated: model.cloud.lastImportResult.componentAssetsUpdated,
|
|
46909
|
+
componentAssetsDeleted: model.cloud.lastImportResult.componentAssetsDeleted,
|
|
46910
|
+
isFailed: model.cloud.lastImportResult.isFailed,
|
|
46911
|
+
versionId: model.cloud.lastImportResult.versionId,
|
|
46912
|
+
fileSize: (_w = model.cloud.lastImportResult.fileSize) !== null && _w !== void 0 ? _w : null,
|
|
46913
|
+
warnings: (_x = model.cloud.lastImportResult.warnings) !== null && _x !== void 0 ? _x : [],
|
|
46914
|
+
}
|
|
46915
|
+
: null,
|
|
46916
|
+
lastImportFramesResult: ((_y = model.cloud) === null || _y === void 0 ? void 0 : _y.lastImportFramesResult)
|
|
46324
46917
|
? {
|
|
46325
|
-
|
|
46326
|
-
|
|
46918
|
+
sourceId: model.cloud.lastImportFramesResult.sourceId,
|
|
46919
|
+
isFailed: model.cloud.lastImportFramesResult.isFailed,
|
|
46920
|
+
error: (_z = model.cloud.lastImportFramesResult.error) !== null && _z !== void 0 ? _z : null,
|
|
46921
|
+
assetsInFile: model.cloud.lastImportFramesResult.assetsInFile
|
|
46922
|
+
? {
|
|
46923
|
+
frames: model.cloud.lastImportFramesResult.assetsInFile.frames,
|
|
46924
|
+
components: model.cloud.lastImportFramesResult.assetsInFile
|
|
46925
|
+
.components,
|
|
46926
|
+
}
|
|
46927
|
+
: null,
|
|
46928
|
+
invalidReferencesCount: (_0 = model.cloud.lastImportFramesResult.invalidReferencesCount) !== null && _0 !== void 0 ? _0 : null,
|
|
46327
46929
|
}
|
|
46328
46930
|
: null,
|
|
46329
|
-
invalidReferencesCount: (_p = model.cloud.lastImportFramesResult.invalidReferencesCount) !== null && _p !== void 0 ? _p : null,
|
|
46330
46931
|
};
|
|
46331
46932
|
}
|
|
46332
|
-
|
|
46333
|
-
this.
|
|
46933
|
+
if (model.tokenStudio) {
|
|
46934
|
+
this.tokenStudio = {
|
|
46935
|
+
connectionName: model.tokenStudio.connectionName,
|
|
46936
|
+
lastImportedAt: model.tokenStudio.lastImportedAt
|
|
46937
|
+
? new Date(model.tokenStudio.lastImportedAt)
|
|
46938
|
+
: null,
|
|
46939
|
+
settings: model.tokenStudio.settings,
|
|
46940
|
+
lastImportedResults: model.tokenStudio.lastImportedResults,
|
|
46941
|
+
};
|
|
46334
46942
|
}
|
|
46335
|
-
this.
|
|
46336
|
-
this.ownerUserName = (_t = (_s = model.cloud) === null || _s === void 0 ? void 0 : _s.ownerUserName) !== null && _t !== void 0 ? _t : null;
|
|
46337
|
-
this.state = (_v = (_u = model.cloud) === null || _u === void 0 ? void 0 : _u.state) !== null && _v !== void 0 ? _v : null;
|
|
46338
|
-
this.linkType = model.linkType;
|
|
46339
|
-
this.brandId = (_w = model.brandId) !== null && _w !== void 0 ? _w : null;
|
|
46340
|
-
this.lastUpdatesCheckedAt = ((_x = model.cloud) === null || _x === void 0 ? void 0 : _x.lastUpdatesCheckedAt)
|
|
46341
|
-
? new Date(model.cloud.lastUpdatesCheckedAt)
|
|
46342
|
-
: null;
|
|
46343
|
-
this.lastImportedAt = ((_y = model.cloud) === null || _y === void 0 ? void 0 : _y.lastImportedAt)
|
|
46344
|
-
? new Date(model.cloud.lastImportedAt)
|
|
46345
|
-
: null;
|
|
46943
|
+
this.scope = model.scope;
|
|
46346
46944
|
}
|
|
46347
46945
|
// --- --- --- --- --- --- --- --- --- ---
|
|
46348
46946
|
// MARK: - Serialization & Deserialization
|
|
@@ -46352,25 +46950,26 @@ class Source {
|
|
|
46352
46950
|
type: this.type,
|
|
46353
46951
|
id: this.id,
|
|
46354
46952
|
fileName: this.fileName,
|
|
46953
|
+
linkType: this.linkType,
|
|
46954
|
+
brandId: this.brandId,
|
|
46355
46955
|
cloud: {
|
|
46356
|
-
fileId: this.fileId,
|
|
46357
|
-
autoImportMode: this.autoImportMode,
|
|
46358
|
-
fileThumbnailUrl: this.fileThumbnailUrl,
|
|
46359
|
-
lastUpdatesCheckedAt: this.lastUpdatesCheckedAt
|
|
46360
|
-
? this.lastUpdatesCheckedAt.toISOString()
|
|
46956
|
+
fileId: this.cloud.fileId,
|
|
46957
|
+
autoImportMode: this.cloud.autoImportMode,
|
|
46958
|
+
fileThumbnailUrl: this.cloud.fileThumbnailUrl,
|
|
46959
|
+
lastUpdatesCheckedAt: this.cloud.lastUpdatesCheckedAt
|
|
46960
|
+
? this.cloud.lastUpdatesCheckedAt.toISOString()
|
|
46361
46961
|
: null,
|
|
46362
|
-
lastImportedAt: this.lastImportedAt
|
|
46363
|
-
? this.lastImportedAt.toISOString()
|
|
46962
|
+
lastImportedAt: this.cloud.lastImportedAt
|
|
46963
|
+
? this.cloud.lastImportedAt.toISOString()
|
|
46364
46964
|
: null,
|
|
46365
|
-
lastImportedVersion: this.lastImportedVersion,
|
|
46366
|
-
lastImportResult: this.lastImportResult,
|
|
46367
|
-
lastImportFramesResult: this.lastImportFramesResult,
|
|
46368
|
-
ownerId: this.ownerId,
|
|
46369
|
-
ownerUserName: this.ownerUserName,
|
|
46370
|
-
state: this.state,
|
|
46965
|
+
lastImportedVersion: this.cloud.lastImportedVersion,
|
|
46966
|
+
lastImportResult: this.cloud.lastImportResult,
|
|
46967
|
+
lastImportFramesResult: this.cloud.lastImportFramesResult,
|
|
46968
|
+
ownerId: this.cloud.ownerId,
|
|
46969
|
+
ownerUserName: this.cloud.ownerUserName,
|
|
46970
|
+
state: this.cloud.state,
|
|
46371
46971
|
},
|
|
46372
|
-
|
|
46373
|
-
brandId: this.brandId,
|
|
46972
|
+
scope: this.scope,
|
|
46374
46973
|
};
|
|
46375
46974
|
}
|
|
46376
46975
|
/** Constructs representation that can be used to transport the instantiated object as JSON, for example for SSR <> Client use-cases. Reconstruct to class instance using `fromTransport` */
|
|
@@ -46379,47 +46978,40 @@ class Source {
|
|
|
46379
46978
|
type: this.type,
|
|
46380
46979
|
id: this.id,
|
|
46381
46980
|
fileName: this.fileName,
|
|
46382
|
-
|
|
46383
|
-
|
|
46384
|
-
|
|
46385
|
-
|
|
46386
|
-
|
|
46387
|
-
|
|
46388
|
-
|
|
46389
|
-
|
|
46390
|
-
|
|
46391
|
-
|
|
46392
|
-
|
|
46393
|
-
|
|
46394
|
-
|
|
46395
|
-
|
|
46396
|
-
|
|
46981
|
+
cloud: {
|
|
46982
|
+
fileId: this.cloud.fileId,
|
|
46983
|
+
autoImportMode: this.cloud.autoImportMode,
|
|
46984
|
+
fileThumbnailUrl: this.cloud.fileThumbnailUrl,
|
|
46985
|
+
lastUpdatesCheckedAt: this.cloud.lastUpdatesCheckedAt
|
|
46986
|
+
? this.cloud.lastUpdatesCheckedAt.toISOString()
|
|
46987
|
+
: null,
|
|
46988
|
+
lastImportedAt: this.cloud.lastImportedAt
|
|
46989
|
+
? this.cloud.lastImportedAt.toISOString()
|
|
46990
|
+
: null,
|
|
46991
|
+
lastImportedVersion: this.cloud.lastImportedVersion,
|
|
46992
|
+
lastImportResult: this.cloud.lastImportResult,
|
|
46993
|
+
lastImportFramesResult: this.cloud.lastImportFramesResult,
|
|
46994
|
+
ownerId: this.cloud.ownerId,
|
|
46995
|
+
ownerUserName: this.cloud.ownerUserName,
|
|
46996
|
+
state: this.cloud.state,
|
|
46997
|
+
},
|
|
46397
46998
|
linkType: this.linkType,
|
|
46398
46999
|
brandId: this.brandId,
|
|
47000
|
+
scope: this.scope,
|
|
46399
47001
|
};
|
|
46400
47002
|
}
|
|
46401
47003
|
/** Reconstructs class from the transport model */
|
|
46402
47004
|
static fromTransport(model) {
|
|
46403
|
-
|
|
47005
|
+
console.log("source transport model", model);
|
|
47006
|
+
return {
|
|
46404
47007
|
type: model.type,
|
|
46405
47008
|
id: model.id,
|
|
46406
47009
|
fileName: model.fileName,
|
|
46407
|
-
cloud: {
|
|
46408
|
-
fileId: model.fileId,
|
|
46409
|
-
autoImportMode: model.autoImportMode,
|
|
46410
|
-
fileThumbnailUrl: model.fileThumbnailUrl,
|
|
46411
|
-
lastUpdatesCheckedAt: model.lastUpdatesCheckedAt,
|
|
46412
|
-
lastImportedAt: model.lastImportedAt,
|
|
46413
|
-
lastImportedVersion: model.lastImportedVersion,
|
|
46414
|
-
lastImportResult: model.lastImportResult,
|
|
46415
|
-
lastImportFramesResult: model.lastImportFramesResult,
|
|
46416
|
-
ownerId: model.ownerId,
|
|
46417
|
-
ownerUserName: model.ownerUserName,
|
|
46418
|
-
state: model.state,
|
|
46419
|
-
},
|
|
46420
47010
|
linkType: model.linkType,
|
|
46421
47011
|
brandId: model.brandId,
|
|
46422
|
-
|
|
47012
|
+
scope: model.scope,
|
|
47013
|
+
cloud: Object.assign(Object.assign({}, model.cloud), { lastUpdatesCheckedAt: model.cloud.lastUpdatesCheckedAt, lastImportedAt: model.cloud.lastImportedAt }),
|
|
47014
|
+
};
|
|
46423
47015
|
}
|
|
46424
47016
|
}
|
|
46425
47017
|
exports.Source = Source;
|
|
@@ -49253,7 +49845,13 @@ class TokenComparator {
|
|
|
49253
49845
|
return true;
|
|
49254
49846
|
}
|
|
49255
49847
|
static isEqualDimensionTokenValue(a, b) {
|
|
49256
|
-
|
|
49848
|
+
// If this.referencesSameToken(a, b) === true, they could still reference token, that has override
|
|
49849
|
+
// Base: typography.fontSize = {fs.default}, fs.default = 10
|
|
49850
|
+
// Theme: typography.fontSize = {fs.default}, fs.default = 11
|
|
49851
|
+
// Thus they reference same token, but in theme it has different value.
|
|
49852
|
+
// Which makes its parent (typography) being ignored as override candidate.
|
|
49853
|
+
// This concerns all tokens that could be used as properties inside complex tokens (dim, string, options).
|
|
49854
|
+
if (this.isUndefinedValue(a, b)) {
|
|
49257
49855
|
return true;
|
|
49258
49856
|
}
|
|
49259
49857
|
return a.measure === b.measure && a.unit === b.unit;
|
|
@@ -49285,13 +49883,25 @@ class TokenComparator {
|
|
|
49285
49883
|
// We don't really have a way to distuingish String from ProductCopy just by value here as we store type above the hierarchy
|
|
49286
49884
|
// As long as this function is used as part of isEqualTokenValue where we check tokenType it is safe
|
|
49287
49885
|
static isEqualStringTokenValue(a, b) {
|
|
49288
|
-
|
|
49886
|
+
// If this.referencesSameToken(a, b) === true, they could still reference token, that has override
|
|
49887
|
+
// Base: typography.fontFamily = {ff.default}, ff.default = Roboto
|
|
49888
|
+
// Theme: typography.fontFamily = {ff.default}, ff.default = Gotham
|
|
49889
|
+
// Thus they reference same token, but in theme it has different value.
|
|
49890
|
+
// Which makes its parent (typography) being ignored as override candidate.
|
|
49891
|
+
// This concerns all tokens that could be used as properties inside complex tokens (dim, string, options).
|
|
49892
|
+
if (this.isUndefinedValue(a, b)) {
|
|
49289
49893
|
return true;
|
|
49290
49894
|
}
|
|
49291
49895
|
return a.text === b.text;
|
|
49292
49896
|
}
|
|
49293
49897
|
static isEqualOptionTokenValue(a, b) {
|
|
49294
|
-
|
|
49898
|
+
// If this.referencesSameToken(a, b) === true, they could still reference token, that has override
|
|
49899
|
+
// Base: typography.textCase = {tc.default}, tc.default = None
|
|
49900
|
+
// Theme: typography.textCase = {tc.default}, tc.default = Upper
|
|
49901
|
+
// Thus they reference same token, but in theme it has different value.
|
|
49902
|
+
// Which makes its parent (typography) being ignored as override candidate.
|
|
49903
|
+
// This concerns all tokens that could be used as properties inside complex tokens (dim, string, options).
|
|
49904
|
+
if (this.isUndefinedValue(a, b)) {
|
|
49295
49905
|
return true;
|
|
49296
49906
|
}
|
|
49297
49907
|
// NOTE: We do not rely on options always be present
|
|
@@ -49716,10 +50326,12 @@ class User {
|
|
|
49716
50326
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
49717
50327
|
// MARK: - Constructor
|
|
49718
50328
|
constructor(model) {
|
|
50329
|
+
var _a;
|
|
49719
50330
|
this.id = model.id;
|
|
49720
50331
|
this.email = model.email;
|
|
49721
50332
|
this.profile = new SDKUserProfile_1.UserProfile(model.profile);
|
|
49722
50333
|
this.createdAt = model.createdAt ? new Date(model.createdAt) : null;
|
|
50334
|
+
this.linkedIntegrations = (_a = model.linkedIntegrations) !== null && _a !== void 0 ? _a : null;
|
|
49723
50335
|
}
|
|
49724
50336
|
// --- --- --- --- --- --- --- --- --- ---
|
|
49725
50337
|
// MARK: - Serialization & Deserialization
|
|
@@ -49730,6 +50342,7 @@ class User {
|
|
|
49730
50342
|
email: this.email,
|
|
49731
50343
|
profile: this.profile.toRemote(),
|
|
49732
50344
|
createdAt: this.createdAt ? this.createdAt.toISOString() : "",
|
|
50345
|
+
linkedIntegrations: this.linkedIntegrations,
|
|
49733
50346
|
};
|
|
49734
50347
|
}
|
|
49735
50348
|
/** Constructs representation that can be used to transport the instantiated object as JSON, for example for SSR <> Client use-cases. Reconstruct to class instance using `fromTransport` */
|
|
@@ -49739,6 +50352,7 @@ class User {
|
|
|
49739
50352
|
email: this.email,
|
|
49740
50353
|
profile: this.profile.toTransport(),
|
|
49741
50354
|
createdAt: this.createdAt ? this.createdAt.toISOString() : "",
|
|
50355
|
+
linkedIntegrations: this.linkedIntegrations,
|
|
49742
50356
|
};
|
|
49743
50357
|
}
|
|
49744
50358
|
/** Reconstructs class from the transport model */
|
|
@@ -49749,6 +50363,49 @@ class User {
|
|
|
49749
50363
|
exports.User = User;
|
|
49750
50364
|
|
|
49751
50365
|
|
|
50366
|
+
/***/ }),
|
|
50367
|
+
|
|
50368
|
+
/***/ "./src/model/users/SDKUserMembership.ts":
|
|
50369
|
+
/*!**********************************************!*\
|
|
50370
|
+
!*** ./src/model/users/SDKUserMembership.ts ***!
|
|
50371
|
+
\**********************************************/
|
|
50372
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
50373
|
+
|
|
50374
|
+
"use strict";
|
|
50375
|
+
|
|
50376
|
+
//
|
|
50377
|
+
// SDKUserMembership.ts
|
|
50378
|
+
// Supernova SDK
|
|
50379
|
+
//
|
|
50380
|
+
// Created by Jiri Trecak.
|
|
50381
|
+
//
|
|
50382
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
50383
|
+
exports.UserMembership = void 0;
|
|
50384
|
+
const SDKUser_1 = __webpack_require__(/*! ./SDKUser */ "./src/model/users/SDKUser.ts");
|
|
50385
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - --- --- --- --- --- --- --- --- --- ---
|
|
50386
|
+
// MARK: - Object Definition
|
|
50387
|
+
class UserMembership {
|
|
50388
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
50389
|
+
// MARK: - Constructor
|
|
50390
|
+
constructor(model) {
|
|
50391
|
+
this.user = new SDKUser_1.User(model.user);
|
|
50392
|
+
this.role = model.role;
|
|
50393
|
+
this.effectiveRole = model.effectiveRole;
|
|
50394
|
+
}
|
|
50395
|
+
// --- --- --- --- --- --- --- --- --- ---
|
|
50396
|
+
// MARK: - Serialization & Deserialization
|
|
50397
|
+
/** Constructs representation that can be used to write full object to remote */
|
|
50398
|
+
toRemote() {
|
|
50399
|
+
return {
|
|
50400
|
+
user: this.user.toRemote(),
|
|
50401
|
+
role: this.role,
|
|
50402
|
+
effectiveRole: this.effectiveRole,
|
|
50403
|
+
};
|
|
50404
|
+
}
|
|
50405
|
+
}
|
|
50406
|
+
exports.UserMembership = UserMembership;
|
|
50407
|
+
|
|
50408
|
+
|
|
49752
50409
|
/***/ }),
|
|
49753
50410
|
|
|
49754
50411
|
/***/ "./src/model/users/SDKUserProfile.ts":
|
|
@@ -52040,7 +52697,7 @@ class DTTokenGroupTreeMerger {
|
|
|
52040
52697
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
52041
52698
|
// MARK: - Merger
|
|
52042
52699
|
makeGroupsDiff(tokensDiff, existingElements) {
|
|
52043
|
-
//
|
|
52700
|
+
// Construct roots to take data from
|
|
52044
52701
|
const exitingRoots = (0, SDKDTGroupTree_1.buildBrandedElementRoots)(existingElements);
|
|
52045
52702
|
const desiredStructures = new Map();
|
|
52046
52703
|
// Make group structure
|
|
@@ -52075,21 +52732,26 @@ class DTTokenGroupTreeMerger {
|
|
|
52075
52732
|
const compareDesiredAndExisting = (importNode, existingNode) => {
|
|
52076
52733
|
var _a;
|
|
52077
52734
|
if (importNode.isGroup) {
|
|
52735
|
+
let isChildGroupChanged = false;
|
|
52078
52736
|
for (const c of importNode.children) {
|
|
52079
52737
|
const existingChild = ((_a = existingNode === null || existingNode === void 0 ? void 0 : existingNode.children) !== null && _a !== void 0 ? _a : []).find((exc) => exc.name === c.name && exc.isGroup === c.isGroup);
|
|
52080
|
-
|
|
52738
|
+
isChildGroupChanged =
|
|
52739
|
+
compareDesiredAndExisting(c, existingChild) || isChildGroupChanged;
|
|
52081
52740
|
}
|
|
52082
52741
|
const importChildrenIds = importNode.children.map((c) => c.element.id);
|
|
52083
52742
|
if (existingNode) {
|
|
52084
52743
|
importNode.element.id = existingNode.element.id;
|
|
52085
52744
|
importNode.element.idInVersion = existingNode.element.idInVersion;
|
|
52086
52745
|
const existingChildrenIds = existingNode.children.map((c) => c.element.id);
|
|
52746
|
+
// mark changed group not only if 1st level children are changed, but for lower levels as well
|
|
52087
52747
|
if (JSON.stringify(importChildrenIds) !==
|
|
52088
|
-
JSON.stringify(existingChildrenIds)
|
|
52748
|
+
JSON.stringify(existingChildrenIds) ||
|
|
52749
|
+
isChildGroupChanged) {
|
|
52089
52750
|
toUpdate.push({
|
|
52090
52751
|
element: importNode.element,
|
|
52091
52752
|
childrenIds: importChildrenIds,
|
|
52092
52753
|
});
|
|
52754
|
+
return true;
|
|
52093
52755
|
}
|
|
52094
52756
|
}
|
|
52095
52757
|
else {
|
|
@@ -52097,8 +52759,10 @@ class DTTokenGroupTreeMerger {
|
|
|
52097
52759
|
element: importNode.element,
|
|
52098
52760
|
childrenIds: importChildrenIds,
|
|
52099
52761
|
});
|
|
52762
|
+
return true;
|
|
52100
52763
|
}
|
|
52101
52764
|
}
|
|
52765
|
+
return false;
|
|
52102
52766
|
};
|
|
52103
52767
|
for (const [brandId, typeRoots] of desiredStructures.entries()) {
|
|
52104
52768
|
for (const type of typeRoots.keys()) {
|
|
@@ -52347,6 +53011,7 @@ class DTTokenReferenceResolver {
|
|
|
52347
53011
|
}
|
|
52348
53012
|
lookupReferencedToken(reference) {
|
|
52349
53013
|
var _a;
|
|
53014
|
+
reference = reference.trim();
|
|
52350
53015
|
let ref = reference;
|
|
52351
53016
|
if (reference.includes('$')) {
|
|
52352
53017
|
// Convert $ reference to {}-type of reference as keys are all defined as {}
|
|
@@ -52357,6 +53022,7 @@ class DTTokenReferenceResolver {
|
|
|
52357
53022
|
}
|
|
52358
53023
|
lookupAllReferencedTokens(reference) {
|
|
52359
53024
|
var _a, _b;
|
|
53025
|
+
reference = reference.trim();
|
|
52360
53026
|
const findings = [...this.findBracketStrings(reference), ...this.findDollarStrings(reference)];
|
|
52361
53027
|
const result = [];
|
|
52362
53028
|
for (const finding of findings) {
|
|
@@ -52378,6 +53044,7 @@ class DTTokenReferenceResolver {
|
|
|
52378
53044
|
return result;
|
|
52379
53045
|
}
|
|
52380
53046
|
replaceAllReferencedTokens(reference, replacements) {
|
|
53047
|
+
reference = reference.trim();
|
|
52381
53048
|
// Seek from the last position so we don't have to deal with repositioning
|
|
52382
53049
|
const sortedReps = replacements.sort((a, b) => b.location - a.location);
|
|
52383
53050
|
let finalReference = reference;
|
|
@@ -56478,7 +57145,6 @@ class TokenUtilPreviewSegmentGenerator {
|
|
|
56478
57145
|
const spread = formatDimension(layer.spread, "px");
|
|
56479
57146
|
const color = SDKColorToken_1.ColorToken.colorValueToHex6(layer.color).toUpperCase();
|
|
56480
57147
|
const value = `${x} ${y} ${radius} ${spread} ${color}`;
|
|
56481
|
-
console.log(layer);
|
|
56482
57148
|
return appendPercentageIfApplicable(layer.opacity.measure, value);
|
|
56483
57149
|
};
|
|
56484
57150
|
if (reference) {
|