@supernova-studio/supernova-sdk-beta 1.6.19 → 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/areas/SDKAreaBrands.d.ts +18 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +20 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +8 -0
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +11 -2
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +17 -0
- 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/support/SDKSource.d.ts +76 -70
- package/build/sdk-typescript/src/model/users/SDKUser.d.ts +14 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIPWhitelistSettings.d.ts +1 -1
- package/build/sdk-typescript/src/tests/Enterprise/PluginFigmaTokens.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/supernova-sdk-typescript.js +342 -114
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +1 -1
|
@@ -35243,6 +35243,35 @@ class AreaBrands {
|
|
|
35243
35243
|
return this.dataCore.getBrand(from.designSystemId, from.versionId, from.brandId);
|
|
35244
35244
|
});
|
|
35245
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
|
+
}
|
|
35246
35275
|
}
|
|
35247
35276
|
exports.AreaBrands = AreaBrands;
|
|
35248
35277
|
|
|
@@ -36900,6 +36929,37 @@ class AreaVersions {
|
|
|
36900
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`);
|
|
36901
36930
|
});
|
|
36902
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
|
+
}
|
|
36903
36963
|
/** Fetches all design system versions of provided design system */
|
|
36904
36964
|
getVersions(designSystemId) {
|
|
36905
36965
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -37088,6 +37148,16 @@ class AreaWorkspaces {
|
|
|
37088
37148
|
return this.dataCore.updateWorkspaceProfile(workspaceId, update);
|
|
37089
37149
|
});
|
|
37090
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
|
+
}
|
|
37091
37161
|
/** Updates workspace onboarding state for a specific workspace
|
|
37092
37162
|
* @param workspaceId - ID of the workspace
|
|
37093
37163
|
* @param update - New onboarding state
|
|
@@ -38238,6 +38308,38 @@ class DataCore {
|
|
|
38238
38308
|
return new SDKWorkspace_1.Workspace(data);
|
|
38239
38309
|
});
|
|
38240
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
|
+
}
|
|
38241
38343
|
/** Validate that workspace handle is available */
|
|
38242
38344
|
validateIsWorkspaceHandleAvailable(handle) {
|
|
38243
38345
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38273,6 +38375,11 @@ class DataCore {
|
|
|
38273
38375
|
return this.write.updateRemoteWorkspaceProfile(workspaceId, profile);
|
|
38274
38376
|
});
|
|
38275
38377
|
}
|
|
38378
|
+
testIpWhitelistSettings(workspaceId, ipWhitelistSettings) {
|
|
38379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38380
|
+
return this.write.testIpWhitelistSettings(workspaceId, ipWhitelistSettings);
|
|
38381
|
+
});
|
|
38382
|
+
}
|
|
38276
38383
|
updateWorkspaceOnboarding(workspaceId, state) {
|
|
38277
38384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38278
38385
|
return this.write.updateRemoteWorkspaceOnboarding(workspaceId, state);
|
|
@@ -39119,7 +39226,7 @@ exports.DataCoreRenderRequests = DataCoreRenderRequests;
|
|
|
39119
39226
|
/*!************************************************************!*\
|
|
39120
39227
|
!*** ./src/core/data/requests/SDKDataCoreWriteRequests.ts ***!
|
|
39121
39228
|
\************************************************************/
|
|
39122
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
39229
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
39123
39230
|
|
|
39124
39231
|
"use strict";
|
|
39125
39232
|
|
|
@@ -39141,6 +39248,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
39141
39248
|
};
|
|
39142
39249
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
39143
39250
|
exports.DataCoreWriteRequests = void 0;
|
|
39251
|
+
const uuid_1 = __webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-node/index.js");
|
|
39144
39252
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
39145
39253
|
// MARK: - Request engine: Write
|
|
39146
39254
|
class DataCoreWriteRequests {
|
|
@@ -39209,6 +39317,73 @@ class DataCoreWriteRequests {
|
|
|
39209
39317
|
return payload.result.workspace;
|
|
39210
39318
|
});
|
|
39211
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
|
+
}
|
|
39212
39387
|
/** Remote: Updates a workspace profile */
|
|
39213
39388
|
updateRemoteWorkspaceProfile(workspaceId, profile) {
|
|
39214
39389
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39216,6 +39391,13 @@ class DataCoreWriteRequests {
|
|
|
39216
39391
|
return this.bridge.put(endpoint, profile);
|
|
39217
39392
|
});
|
|
39218
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
|
+
}
|
|
39219
39401
|
/** Remote: Updates a workspace avatar */
|
|
39220
39402
|
updateRemoteWorkspaceAvatar(workspaceId, avatar) {
|
|
39221
39403
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -41715,8 +41897,8 @@ exports.TokenResolver = TokenResolver;
|
|
|
41715
41897
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41716
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;
|
|
41717
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;
|
|
41718
|
-
exports.
|
|
41719
|
-
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;
|
|
41720
41902
|
var SDKThemeUtilities_1 = __webpack_require__(/*! ./model/themes/SDKThemeUtilities */ "./src/model/themes/SDKThemeUtilities.ts");
|
|
41721
41903
|
Object.defineProperty(exports, "ThemeUtilities", ({ enumerable: true, get: function () { return SDKThemeUtilities_1.ThemeUtilities; } }));
|
|
41722
41904
|
var SDKElementPropertyValue_1 = __webpack_require__(/*! ./model/elements/values/SDKElementPropertyValue */ "./src/model/elements/values/SDKElementPropertyValue.ts");
|
|
@@ -41973,6 +42155,8 @@ var SDKWorkspaceNPMRegistryAuthType_1 = __webpack_require__(/*! ./model/enums/SD
|
|
|
41973
42155
|
Object.defineProperty(exports, "WorkspaceNPMRegistryAuthType", ({ enumerable: true, get: function () { return SDKWorkspaceNPMRegistryAuthType_1.WorkspaceNPMRegistryAuthType; } }));
|
|
41974
42156
|
var SDKWorkspaceNPMRegistryType_1 = __webpack_require__(/*! ./model/enums/SDKWorkspaceNPMRegistryType */ "./src/model/enums/SDKWorkspaceNPMRegistryType.ts");
|
|
41975
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; } }));
|
|
41976
42160
|
// Supporting objects
|
|
41977
42161
|
var SDKDesignComponentOrigin_1 = __webpack_require__(/*! ./model/support/SDKDesignComponentOrigin */ "./src/model/support/SDKDesignComponentOrigin.ts");
|
|
41978
42162
|
Object.defineProperty(exports, "DesignComponentOrigin", ({ enumerable: true, get: function () { return SDKDesignComponentOrigin_1.DesignComponentOrigin; } }));
|
|
@@ -46549,7 +46733,7 @@ class DesignComponentOrigin {
|
|
|
46549
46733
|
const remoteSource = sources.filter((s) => s.id === model.sourceId)[0];
|
|
46550
46734
|
if (remoteSource) {
|
|
46551
46735
|
this.sourceType = remoteSource.type;
|
|
46552
|
-
this.fileId = (_e = remoteSource.fileId) !== null && _e !== void 0 ? _e : null;
|
|
46736
|
+
this.fileId = (_e = remoteSource.cloud.fileId) !== null && _e !== void 0 ? _e : null;
|
|
46553
46737
|
this.fileName = (_f = remoteSource.fileName) !== null && _f !== void 0 ? _f : null;
|
|
46554
46738
|
}
|
|
46555
46739
|
}
|
|
@@ -46663,76 +46847,100 @@ exports.Source = void 0;
|
|
|
46663
46847
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46664
46848
|
// MARK: - Object Definition
|
|
46665
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
|
+
}
|
|
46666
46865
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46667
46866
|
// MARK: - Constructor
|
|
46668
46867
|
constructor(model) {
|
|
46669
|
-
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;
|
|
46670
46869
|
this.type = model.type;
|
|
46671
46870
|
this.id = model.id;
|
|
46672
46871
|
this.fileName = (_a = model.fileName) !== null && _a !== void 0 ? _a : null;
|
|
46673
|
-
this.
|
|
46674
|
-
this.
|
|
46675
|
-
this.
|
|
46676
|
-
if (
|
|
46677
|
-
this.
|
|
46678
|
-
|
|
46679
|
-
|
|
46680
|
-
|
|
46681
|
-
|
|
46682
|
-
|
|
46683
|
-
|
|
46684
|
-
|
|
46685
|
-
|
|
46686
|
-
|
|
46687
|
-
|
|
46688
|
-
|
|
46689
|
-
|
|
46690
|
-
|
|
46691
|
-
|
|
46692
|
-
|
|
46693
|
-
|
|
46694
|
-
|
|
46695
|
-
|
|
46696
|
-
|
|
46697
|
-
|
|
46698
|
-
|
|
46699
|
-
componentAssetsDeleted: model.cloud.lastImportResult.componentAssetsDeleted,
|
|
46700
|
-
isFailed: model.cloud.lastImportResult.isFailed,
|
|
46701
|
-
versionId: model.cloud.lastImportResult.versionId,
|
|
46702
|
-
fileSize: (_l = model.cloud.lastImportResult.fileSize) !== null && _l !== void 0 ? _l : null,
|
|
46703
|
-
};
|
|
46704
|
-
}
|
|
46705
|
-
else {
|
|
46706
|
-
this.lastImportResult = null;
|
|
46707
|
-
}
|
|
46708
|
-
if ((_m = model.cloud) === null || _m === void 0 ? void 0 : _m.lastImportFramesResult) {
|
|
46709
|
-
this.lastImportFramesResult = {
|
|
46710
|
-
sourceId: model.cloud.lastImportFramesResult.sourceId,
|
|
46711
|
-
isFailed: model.cloud.lastImportFramesResult.isFailed,
|
|
46712
|
-
error: (_o = model.cloud.lastImportFramesResult.error) !== null && _o !== void 0 ? _o : null,
|
|
46713
|
-
assetsInFile: model.cloud.lastImportFramesResult.assetsInFile
|
|
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)
|
|
46714
46898
|
? {
|
|
46715
|
-
|
|
46716
|
-
|
|
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)
|
|
46917
|
+
? {
|
|
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,
|
|
46717
46929
|
}
|
|
46718
46930
|
: null,
|
|
46719
|
-
invalidReferencesCount: (_p = model.cloud.lastImportFramesResult.invalidReferencesCount) !== null && _p !== void 0 ? _p : null,
|
|
46720
46931
|
};
|
|
46721
46932
|
}
|
|
46722
|
-
|
|
46723
|
-
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
|
+
};
|
|
46724
46942
|
}
|
|
46725
|
-
this.
|
|
46726
|
-
this.ownerUserName = (_t = (_s = model.cloud) === null || _s === void 0 ? void 0 : _s.ownerUserName) !== null && _t !== void 0 ? _t : null;
|
|
46727
|
-
this.state = (_v = (_u = model.cloud) === null || _u === void 0 ? void 0 : _u.state) !== null && _v !== void 0 ? _v : null;
|
|
46728
|
-
this.linkType = model.linkType;
|
|
46729
|
-
this.brandId = (_w = model.brandId) !== null && _w !== void 0 ? _w : null;
|
|
46730
|
-
this.lastUpdatesCheckedAt = ((_x = model.cloud) === null || _x === void 0 ? void 0 : _x.lastUpdatesCheckedAt)
|
|
46731
|
-
? new Date(model.cloud.lastUpdatesCheckedAt)
|
|
46732
|
-
: null;
|
|
46733
|
-
this.lastImportedAt = ((_y = model.cloud) === null || _y === void 0 ? void 0 : _y.lastImportedAt)
|
|
46734
|
-
? new Date(model.cloud.lastImportedAt)
|
|
46735
|
-
: null;
|
|
46943
|
+
this.scope = model.scope;
|
|
46736
46944
|
}
|
|
46737
46945
|
// --- --- --- --- --- --- --- --- --- ---
|
|
46738
46946
|
// MARK: - Serialization & Deserialization
|
|
@@ -46742,25 +46950,26 @@ class Source {
|
|
|
46742
46950
|
type: this.type,
|
|
46743
46951
|
id: this.id,
|
|
46744
46952
|
fileName: this.fileName,
|
|
46953
|
+
linkType: this.linkType,
|
|
46954
|
+
brandId: this.brandId,
|
|
46745
46955
|
cloud: {
|
|
46746
|
-
fileId: this.fileId,
|
|
46747
|
-
autoImportMode: this.autoImportMode,
|
|
46748
|
-
fileThumbnailUrl: this.fileThumbnailUrl,
|
|
46749
|
-
lastUpdatesCheckedAt: this.lastUpdatesCheckedAt
|
|
46750
|
-
? 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()
|
|
46751
46961
|
: null,
|
|
46752
|
-
lastImportedAt: this.lastImportedAt
|
|
46753
|
-
? this.lastImportedAt.toISOString()
|
|
46962
|
+
lastImportedAt: this.cloud.lastImportedAt
|
|
46963
|
+
? this.cloud.lastImportedAt.toISOString()
|
|
46754
46964
|
: null,
|
|
46755
|
-
lastImportedVersion: this.lastImportedVersion,
|
|
46756
|
-
lastImportResult: this.lastImportResult,
|
|
46757
|
-
lastImportFramesResult: this.lastImportFramesResult,
|
|
46758
|
-
ownerId: this.ownerId,
|
|
46759
|
-
ownerUserName: this.ownerUserName,
|
|
46760
|
-
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,
|
|
46761
46971
|
},
|
|
46762
|
-
|
|
46763
|
-
brandId: this.brandId,
|
|
46972
|
+
scope: this.scope,
|
|
46764
46973
|
};
|
|
46765
46974
|
}
|
|
46766
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` */
|
|
@@ -46769,47 +46978,40 @@ class Source {
|
|
|
46769
46978
|
type: this.type,
|
|
46770
46979
|
id: this.id,
|
|
46771
46980
|
fileName: this.fileName,
|
|
46772
|
-
|
|
46773
|
-
|
|
46774
|
-
|
|
46775
|
-
|
|
46776
|
-
|
|
46777
|
-
|
|
46778
|
-
|
|
46779
|
-
|
|
46780
|
-
|
|
46781
|
-
|
|
46782
|
-
|
|
46783
|
-
|
|
46784
|
-
|
|
46785
|
-
|
|
46786
|
-
|
|
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
|
+
},
|
|
46787
46998
|
linkType: this.linkType,
|
|
46788
46999
|
brandId: this.brandId,
|
|
47000
|
+
scope: this.scope,
|
|
46789
47001
|
};
|
|
46790
47002
|
}
|
|
46791
47003
|
/** Reconstructs class from the transport model */
|
|
46792
47004
|
static fromTransport(model) {
|
|
46793
|
-
|
|
47005
|
+
console.log("source transport model", model);
|
|
47006
|
+
return {
|
|
46794
47007
|
type: model.type,
|
|
46795
47008
|
id: model.id,
|
|
46796
47009
|
fileName: model.fileName,
|
|
46797
|
-
cloud: {
|
|
46798
|
-
fileId: model.fileId,
|
|
46799
|
-
autoImportMode: model.autoImportMode,
|
|
46800
|
-
fileThumbnailUrl: model.fileThumbnailUrl,
|
|
46801
|
-
lastUpdatesCheckedAt: model.lastUpdatesCheckedAt,
|
|
46802
|
-
lastImportedAt: model.lastImportedAt,
|
|
46803
|
-
lastImportedVersion: model.lastImportedVersion,
|
|
46804
|
-
lastImportResult: model.lastImportResult,
|
|
46805
|
-
lastImportFramesResult: model.lastImportFramesResult,
|
|
46806
|
-
ownerId: model.ownerId,
|
|
46807
|
-
ownerUserName: model.ownerUserName,
|
|
46808
|
-
state: model.state,
|
|
46809
|
-
},
|
|
46810
47010
|
linkType: model.linkType,
|
|
46811
47011
|
brandId: model.brandId,
|
|
46812
|
-
|
|
47012
|
+
scope: model.scope,
|
|
47013
|
+
cloud: Object.assign(Object.assign({}, model.cloud), { lastUpdatesCheckedAt: model.cloud.lastUpdatesCheckedAt, lastImportedAt: model.cloud.lastImportedAt }),
|
|
47014
|
+
};
|
|
46813
47015
|
}
|
|
46814
47016
|
}
|
|
46815
47017
|
exports.Source = Source;
|
|
@@ -49643,7 +49845,13 @@ class TokenComparator {
|
|
|
49643
49845
|
return true;
|
|
49644
49846
|
}
|
|
49645
49847
|
static isEqualDimensionTokenValue(a, b) {
|
|
49646
|
-
|
|
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)) {
|
|
49647
49855
|
return true;
|
|
49648
49856
|
}
|
|
49649
49857
|
return a.measure === b.measure && a.unit === b.unit;
|
|
@@ -49675,13 +49883,25 @@ class TokenComparator {
|
|
|
49675
49883
|
// We don't really have a way to distuingish String from ProductCopy just by value here as we store type above the hierarchy
|
|
49676
49884
|
// As long as this function is used as part of isEqualTokenValue where we check tokenType it is safe
|
|
49677
49885
|
static isEqualStringTokenValue(a, b) {
|
|
49678
|
-
|
|
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)) {
|
|
49679
49893
|
return true;
|
|
49680
49894
|
}
|
|
49681
49895
|
return a.text === b.text;
|
|
49682
49896
|
}
|
|
49683
49897
|
static isEqualOptionTokenValue(a, b) {
|
|
49684
|
-
|
|
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)) {
|
|
49685
49905
|
return true;
|
|
49686
49906
|
}
|
|
49687
49907
|
// NOTE: We do not rely on options always be present
|
|
@@ -50106,10 +50326,12 @@ class User {
|
|
|
50106
50326
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
50107
50327
|
// MARK: - Constructor
|
|
50108
50328
|
constructor(model) {
|
|
50329
|
+
var _a;
|
|
50109
50330
|
this.id = model.id;
|
|
50110
50331
|
this.email = model.email;
|
|
50111
50332
|
this.profile = new SDKUserProfile_1.UserProfile(model.profile);
|
|
50112
50333
|
this.createdAt = model.createdAt ? new Date(model.createdAt) : null;
|
|
50334
|
+
this.linkedIntegrations = (_a = model.linkedIntegrations) !== null && _a !== void 0 ? _a : null;
|
|
50113
50335
|
}
|
|
50114
50336
|
// --- --- --- --- --- --- --- --- --- ---
|
|
50115
50337
|
// MARK: - Serialization & Deserialization
|
|
@@ -50120,6 +50342,7 @@ class User {
|
|
|
50120
50342
|
email: this.email,
|
|
50121
50343
|
profile: this.profile.toRemote(),
|
|
50122
50344
|
createdAt: this.createdAt ? this.createdAt.toISOString() : "",
|
|
50345
|
+
linkedIntegrations: this.linkedIntegrations,
|
|
50123
50346
|
};
|
|
50124
50347
|
}
|
|
50125
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` */
|
|
@@ -50129,6 +50352,7 @@ class User {
|
|
|
50129
50352
|
email: this.email,
|
|
50130
50353
|
profile: this.profile.toTransport(),
|
|
50131
50354
|
createdAt: this.createdAt ? this.createdAt.toISOString() : "",
|
|
50355
|
+
linkedIntegrations: this.linkedIntegrations,
|
|
50132
50356
|
};
|
|
50133
50357
|
}
|
|
50134
50358
|
/** Reconstructs class from the transport model */
|
|
@@ -52787,6 +53011,7 @@ class DTTokenReferenceResolver {
|
|
|
52787
53011
|
}
|
|
52788
53012
|
lookupReferencedToken(reference) {
|
|
52789
53013
|
var _a;
|
|
53014
|
+
reference = reference.trim();
|
|
52790
53015
|
let ref = reference;
|
|
52791
53016
|
if (reference.includes('$')) {
|
|
52792
53017
|
// Convert $ reference to {}-type of reference as keys are all defined as {}
|
|
@@ -52797,6 +53022,7 @@ class DTTokenReferenceResolver {
|
|
|
52797
53022
|
}
|
|
52798
53023
|
lookupAllReferencedTokens(reference) {
|
|
52799
53024
|
var _a, _b;
|
|
53025
|
+
reference = reference.trim();
|
|
52800
53026
|
const findings = [...this.findBracketStrings(reference), ...this.findDollarStrings(reference)];
|
|
52801
53027
|
const result = [];
|
|
52802
53028
|
for (const finding of findings) {
|
|
@@ -52818,6 +53044,7 @@ class DTTokenReferenceResolver {
|
|
|
52818
53044
|
return result;
|
|
52819
53045
|
}
|
|
52820
53046
|
replaceAllReferencedTokens(reference, replacements) {
|
|
53047
|
+
reference = reference.trim();
|
|
52821
53048
|
// Seek from the last position so we don't have to deal with repositioning
|
|
52822
53049
|
const sortedReps = replacements.sort((a, b) => b.location - a.location);
|
|
52823
53050
|
let finalReference = reference;
|
|
@@ -66342,6 +66569,10 @@ function getNodeRequestOptions(request) {
|
|
|
66342
66569
|
agent = agent(parsedURL);
|
|
66343
66570
|
}
|
|
66344
66571
|
|
|
66572
|
+
if (!headers.has('Connection') && !agent) {
|
|
66573
|
+
headers.set('Connection', 'close');
|
|
66574
|
+
}
|
|
66575
|
+
|
|
66345
66576
|
// HTTP-network fetch step 4.2
|
|
66346
66577
|
// chunked encoding is handled by Node.js
|
|
66347
66578
|
|
|
@@ -66715,11 +66946,8 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
66715
66946
|
|
|
66716
66947
|
if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
|
|
66717
66948
|
response.once('close', function (hadError) {
|
|
66718
|
-
// tests for socket presence, as in some situations the
|
|
66719
|
-
// the 'socket' event is not triggered for the request
|
|
66720
|
-
// (happens in deno), avoids `TypeError`
|
|
66721
66949
|
// if a data listener is still present we didn't end cleanly
|
|
66722
|
-
const hasDataListener = socket
|
|
66950
|
+
const hasDataListener = socket.listenerCount('data') > 0;
|
|
66723
66951
|
|
|
66724
66952
|
if (hasDataListener && !hadError) {
|
|
66725
66953
|
const err = new Error('Premature close');
|