@supernova-studio/model 0.46.11 → 0.46.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -477,7 +477,8 @@ var DataSourceFigmaScope = z27.object({
477
477
  components: z27.boolean(),
478
478
  documentationFrames: z27.boolean(),
479
479
  tokens: z27.boolean(),
480
- themePersistentId: z27.string().optional()
480
+ themePersistentId: z27.string().optional(),
481
+ isUnpublishedImportFallbackEnabled: z27.boolean()
481
482
  });
482
483
  var DataSourceFigmaImportMetadata = z27.object({
483
484
  fileData: DataSourceFigmaFileData.optional(),
@@ -2066,35 +2067,68 @@ var FigmaFileAccessData = z86.object({
2066
2067
  });
2067
2068
 
2068
2069
  // src/dsm/import/support/import-context.ts
2070
+ import { z as z88 } from "zod";
2071
+
2072
+ // src/dsm/import/warning.ts
2069
2073
  import { z as z87 } from "zod";
2070
- var ImportFunctionInput = z87.object({
2071
- importJobId: z87.string(),
2072
- importContextId: z87.string(),
2073
- designSystemId: z87.string().optional()
2074
+ var ImportWarningType = z87.enum([
2075
+ "NoVersionFound",
2076
+ "UnsupportedFill",
2077
+ "UnsupportedStroke",
2078
+ "UnsupportedEffect",
2079
+ "NoPublishedElements",
2080
+ "NoPublishedStyles",
2081
+ "NoPublishedComponents",
2082
+ "NoPublishedAssets",
2083
+ "StyleNotApplied",
2084
+ "ComponentHasNoThumbnail",
2085
+ "DuplicateImportedStyleId",
2086
+ "DuplicateImportedStylePath",
2087
+ "NoUnpublishedStyles"
2088
+ ]);
2089
+ var ImportWarning = z87.object({
2090
+ warningType: ImportWarningType,
2091
+ componentId: z87.string().optional(),
2092
+ componentName: z87.string().optional(),
2093
+ styleId: z87.string().optional(),
2094
+ styleName: z87.string().optional(),
2095
+ unsupportedStyleValueType: z87.string().optional()
2074
2096
  });
2075
- var ImportedFigmaSourceData = z87.object({
2076
- sourceId: z87.string(),
2097
+
2098
+ // src/dsm/import/support/import-context.ts
2099
+ var ImportFunctionInput = z88.object({
2100
+ importJobId: z88.string(),
2101
+ importContextId: z88.string(),
2102
+ designSystemId: z88.string().optional()
2103
+ });
2104
+ var ImportedFigmaSourceData = z88.object({
2105
+ sourceId: z88.string(),
2077
2106
  figmaRemote: DataSourceFigmaRemote
2078
2107
  });
2079
- var FigmaImportBaseContext = z87.object({
2080
- designSystemId: z87.string(),
2108
+ var FigmaImportBaseContext = z88.object({
2109
+ designSystemId: z88.string(),
2081
2110
  /**
2082
2111
  * Data required for accessing Figma files. This should contain access data for all file ids
2083
2112
  * mentioned in the `importedSourceDataBySourceId`
2084
2113
  *
2085
2114
  * fileId: file data
2086
2115
  */
2087
- fileAccessByFileId: z87.record(FigmaFileAccessData),
2116
+ fileAccessByFileId: z88.record(FigmaFileAccessData),
2088
2117
  /**
2089
2118
  * Figma source data for which import was requested
2090
2119
  *
2091
2120
  * sourceId: source data
2092
2121
  */
2093
- importedSourceDataBySourceId: z87.record(ImportedFigmaSourceData)
2122
+ importedSourceDataBySourceId: z88.record(ImportedFigmaSourceData),
2123
+ /**
2124
+ * Array of warnings that will be written into the import result summary at the end
2125
+ * of import job execution and displayed by the client.
2126
+ */
2127
+ importWarnings: z88.record(ImportWarning.array()).default({})
2094
2128
  });
2095
2129
  var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
2096
- sourcesWithMissingAccess: z87.array(z87.string()).default([]),
2097
- shadowOpacityOptional: z87.boolean().default(false)
2130
+ sourcesWithMissingAccess: z88.array(z88.string()).default([]),
2131
+ shadowOpacityOptional: z88.boolean().default(false)
2098
2132
  });
2099
2133
  var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
2100
2134
  importMetadata: DataSourceFigmaImportMetadata
@@ -2106,79 +2140,79 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
2106
2140
  *
2107
2141
  * File id -> file download scope
2108
2142
  */
2109
- fileDownloadScopesByFileId: z87.record(FigmaFileDownloadScope),
2143
+ fileDownloadScopesByFileId: z88.record(FigmaFileDownloadScope),
2110
2144
  /**
2111
2145
  * Sources filtered down to the ones that have changed since last import and therefore need to be
2112
2146
  * imported again.
2113
2147
  *
2114
2148
  * Source id -> import metadata
2115
2149
  */
2116
- changedImportedSourceDataBySourceId: z87.record(ChangedImportedFigmaSourceData)
2150
+ changedImportedSourceDataBySourceId: z88.record(ChangedImportedFigmaSourceData)
2117
2151
  });
2118
2152
 
2119
2153
  // src/dsm/import/support/import-model-collections.ts
2120
- import { z as z95 } from "zod";
2154
+ import { z as z96 } from "zod";
2121
2155
 
2122
2156
  // src/dsm/import/image.ts
2123
- import { z as z88 } from "zod";
2124
- var ImageImportModelType = z88.enum(["Url", "FigmaRender"]);
2125
- var ImageImportModelBase = z88.object({
2157
+ import { z as z89 } from "zod";
2158
+ var ImageImportModelType = z89.enum(["Url", "FigmaRender"]);
2159
+ var ImageImportModelBase = z89.object({
2126
2160
  scope: AssetScope
2127
2161
  });
2128
2162
  var UrlImageImportModel = ImageImportModelBase.extend({
2129
- type: z88.literal(ImageImportModelType.enum.Url),
2130
- url: z88.string(),
2131
- originKey: z88.string(),
2132
- extension: z88.string()
2163
+ type: z89.literal(ImageImportModelType.enum.Url),
2164
+ url: z89.string(),
2165
+ originKey: z89.string(),
2166
+ extension: z89.string()
2133
2167
  });
2134
- var FigmaRenderFormat = z88.enum(["Svg", "Png"]);
2168
+ var FigmaRenderFormat = z89.enum(["Svg", "Png"]);
2135
2169
  var FigmaRenderBase = ImageImportModelBase.extend({
2136
- type: z88.literal(ImageImportModelType.enum.FigmaRender),
2137
- fileId: z88.string(),
2138
- fileVersionId: z88.string().optional(),
2139
- nodeId: z88.string(),
2140
- originKey: z88.string()
2170
+ type: z89.literal(ImageImportModelType.enum.FigmaRender),
2171
+ fileId: z89.string(),
2172
+ fileVersionId: z89.string().optional(),
2173
+ nodeId: z89.string(),
2174
+ originKey: z89.string()
2141
2175
  });
2142
2176
  var FigmaPngRenderImportModel = FigmaRenderBase.extend({
2143
- format: z88.literal(FigmaRenderFormat.enum.Png),
2144
- scale: z88.number()
2177
+ format: z89.literal(FigmaRenderFormat.enum.Png),
2178
+ scale: z89.number()
2145
2179
  });
2146
2180
  var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
2147
- format: z88.literal(FigmaRenderFormat.enum.Svg)
2181
+ format: z89.literal(FigmaRenderFormat.enum.Svg)
2148
2182
  });
2149
- var FigmaRenderImportModel = z88.discriminatedUnion("format", [
2183
+ var FigmaRenderImportModel = z89.discriminatedUnion("format", [
2150
2184
  FigmaPngRenderImportModel,
2151
2185
  FigmaSvgRenderImportModel
2152
2186
  ]);
2153
- var ImageImportModel = z88.union([UrlImageImportModel, FigmaRenderImportModel]);
2187
+ var ImageImportModel = z89.union([UrlImageImportModel, FigmaRenderImportModel]);
2154
2188
 
2155
2189
  // src/dsm/import/component.ts
2156
- import { z as z90 } from "zod";
2190
+ import { z as z91 } from "zod";
2157
2191
 
2158
2192
  // src/dsm/import/base.ts
2159
- import { z as z89 } from "zod";
2160
- var ImportModelBase = z89.object({
2161
- id: z89.string(),
2193
+ import { z as z90 } from "zod";
2194
+ var ImportModelBase = z90.object({
2195
+ id: z90.string(),
2162
2196
  meta: ObjectMeta,
2163
2197
  origin: DesignElementOrigin,
2164
- brandPersistentId: z89.string(),
2165
- sortOrder: z89.number()
2198
+ brandPersistentId: z90.string(),
2199
+ sortOrder: z90.number()
2166
2200
  });
2167
2201
  var ImportModelInputBase = ImportModelBase.omit({
2168
2202
  brandPersistentId: true,
2169
2203
  origin: true,
2170
2204
  sortOrder: true
2171
2205
  }).extend({
2172
- originId: z89.string(),
2173
- originMetadata: z89.record(z89.any())
2206
+ originId: z90.string(),
2207
+ originMetadata: z90.record(z90.any())
2174
2208
  });
2175
2209
 
2176
2210
  // src/dsm/import/component.ts
2177
- var ComponentImportModelPart = z90.object({
2211
+ var ComponentImportModelPart = z91.object({
2178
2212
  thumbnail: ImageImportModel
2179
2213
  });
2180
2214
  var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
2181
- isAsset: z90.boolean(),
2215
+ isAsset: z91.boolean(),
2182
2216
  svg: FigmaSvgRenderImportModel.optional(),
2183
2217
  origin: ComponentOrigin
2184
2218
  });
@@ -2191,49 +2225,49 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
2191
2225
  });
2192
2226
 
2193
2227
  // src/dsm/import/theme.ts
2194
- import { z as z91 } from "zod";
2228
+ import { z as z92 } from "zod";
2195
2229
  var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
2196
- z91.object({
2197
- id: z91.string(),
2230
+ z92.object({
2231
+ id: z92.string(),
2198
2232
  meta: ObjectMeta
2199
2233
  })
2200
2234
  );
2201
2235
  var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
2202
- z91.object({
2236
+ z92.object({
2203
2237
  origin: ThemeOverrideOrigin
2204
2238
  })
2205
2239
  );
2206
2240
  var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
2207
- z91.object({
2208
- originId: z91.string(),
2241
+ z92.object({
2242
+ originId: z92.string(),
2209
2243
  originMetadata: ThemeOverrideOriginPart
2210
2244
  })
2211
2245
  );
2212
- var ThemeImportModel = z91.object({
2246
+ var ThemeImportModel = z92.object({
2213
2247
  meta: ObjectMeta,
2214
- brandPersistentId: z91.string(),
2248
+ brandPersistentId: z92.string(),
2215
2249
  originSource: ThemeOriginSource,
2216
- overrides: z91.array(ThemeOverrideImportModel),
2217
- sortOrder: z91.number()
2250
+ overrides: z92.array(ThemeOverrideImportModel),
2251
+ sortOrder: z92.number()
2218
2252
  });
2219
- var ThemeImportModelInput = z91.object({
2253
+ var ThemeImportModelInput = z92.object({
2220
2254
  meta: ObjectMeta,
2221
- originObjects: z91.array(ThemeOriginObject),
2222
- overrides: z91.array(ThemeOverrideImportModelInput)
2255
+ originObjects: z92.array(ThemeOriginObject),
2256
+ overrides: z92.array(ThemeOverrideImportModelInput)
2223
2257
  });
2224
- var ThemeUpdateImportModel = z91.object({
2225
- themePersistentId: z91.string(),
2226
- overrides: z91.array(ThemeOverrideImportModel)
2258
+ var ThemeUpdateImportModel = z92.object({
2259
+ themePersistentId: z92.string(),
2260
+ overrides: z92.array(ThemeOverrideImportModel)
2227
2261
  });
2228
- var ThemeUpdateImportModelInput = z91.object({
2229
- themePersistentId: z91.string(),
2230
- overrides: z91.array(ThemeOverrideImportModelInput)
2262
+ var ThemeUpdateImportModelInput = z92.object({
2263
+ themePersistentId: z92.string(),
2264
+ overrides: z92.array(ThemeOverrideImportModelInput)
2231
2265
  });
2232
2266
 
2233
2267
  // src/dsm/import/tokens.ts
2234
- import { z as z92 } from "zod";
2235
- var DesignTokenImportModelPart = z92.object({
2236
- collection: z92.string().optional()
2268
+ import { z as z93 } from "zod";
2269
+ var DesignTokenImportModelPart = z93.object({
2270
+ collection: z93.string().optional()
2237
2271
  });
2238
2272
  var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
2239
2273
  origin: DesignTokenOrigin
@@ -2251,15 +2285,15 @@ function designTokenImportModelTypeFilter(type) {
2251
2285
  }
2252
2286
 
2253
2287
  // src/dsm/import/figma-frames.ts
2254
- import { z as z93 } from "zod";
2288
+ import { z as z94 } from "zod";
2255
2289
  var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
2256
2290
  image: FigmaPngRenderImportModel
2257
2291
  });
2258
2292
  var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
2259
- children: z93.lazy(() => FigmaFileStructureNodeImportModel.array())
2293
+ children: z94.lazy(() => FigmaFileStructureNodeImportModel.array())
2260
2294
  });
2261
- var FigmaFileStructureImportModelPart = z93.object({
2262
- data: z93.object({
2295
+ var FigmaFileStructureImportModelPart = z94.object({
2296
+ data: z94.object({
2263
2297
  rootNode: FigmaFileStructureNodeImportModel,
2264
2298
  assetsInFile: FigmaFileStructureStatistics
2265
2299
  })
@@ -2270,7 +2304,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
2270
2304
  var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
2271
2305
  FigmaFileStructureImportModelPart.shape
2272
2306
  ).extend({
2273
- fileVersionId: z93.string()
2307
+ fileVersionId: z94.string()
2274
2308
  });
2275
2309
  function figmaFileStructureImportModelToMap(root) {
2276
2310
  const map = /* @__PURE__ */ new Map();
@@ -2284,30 +2318,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
2284
2318
  }
2285
2319
 
2286
2320
  // src/dsm/import/data-source.ts
2287
- import { z as z94 } from "zod";
2288
- var DataSourceImportModel = z94.object({
2289
- id: z94.string(),
2290
- fileName: z94.string().optional(),
2291
- thumbnailUrl: z94.string().optional()
2321
+ import { z as z95 } from "zod";
2322
+ var DataSourceImportModel = z95.object({
2323
+ id: z95.string(),
2324
+ fileName: z95.string().optional(),
2325
+ thumbnailUrl: z95.string().optional()
2292
2326
  });
2293
2327
 
2294
2328
  // src/dsm/import/support/import-model-collections.ts
2295
- var ImportModelInputCollection = z95.object({
2329
+ var ImportModelInputCollection = z96.object({
2296
2330
  source: DataSourceImportModel,
2297
- tokens: z95.array(DesignTokenImportModelInput).default([]),
2298
- components: z95.array(ComponentImportModelInput).default([]),
2299
- assets: z95.array(AssetImportModelInput).default([]),
2300
- themeUpdates: z95.array(ThemeUpdateImportModelInput).default([]),
2301
- themes: z95.array(ThemeImportModelInput).default([]),
2331
+ tokens: z96.array(DesignTokenImportModelInput).default([]),
2332
+ components: z96.array(ComponentImportModelInput).default([]),
2333
+ assets: z96.array(AssetImportModelInput).default([]),
2334
+ themeUpdates: z96.array(ThemeUpdateImportModelInput).default([]),
2335
+ themes: z96.array(ThemeImportModelInput).default([]),
2302
2336
  figmaFileStructure: FigmaFileStructureImportModelInput.optional()
2303
2337
  });
2304
- var ImportModelCollection = z95.object({
2305
- sources: z95.array(DataSourceImportModel),
2306
- tokens: z95.array(DesignTokenImportModel).default([]),
2307
- components: z95.array(ComponentImportModel).default([]),
2308
- themeUpdates: z95.array(ThemeUpdateImportModel).default([]),
2309
- themes: z95.array(ThemeImportModel).default([]),
2310
- figmaFileStructures: z95.array(FigmaFileStructureImportModel)
2338
+ var ImportModelCollection = z96.object({
2339
+ sources: z96.array(DataSourceImportModel),
2340
+ tokens: z96.array(DesignTokenImportModel).default([]),
2341
+ components: z96.array(ComponentImportModel).default([]),
2342
+ themeUpdates: z96.array(ThemeUpdateImportModel).default([]),
2343
+ themes: z96.array(ThemeImportModel).default([]),
2344
+ figmaFileStructures: z96.array(FigmaFileStructureImportModel)
2311
2345
  });
2312
2346
  function addImportModelCollections(lhs, rhs) {
2313
2347
  return {
@@ -2320,31 +2354,6 @@ function addImportModelCollections(lhs, rhs) {
2320
2354
  };
2321
2355
  }
2322
2356
 
2323
- // src/dsm/import/warning.ts
2324
- import { z as z96 } from "zod";
2325
- var ImportWarningType = z96.enum([
2326
- "NoVersionFound",
2327
- "UnsupportedFill",
2328
- "UnsupportedStroke",
2329
- "UnsupportedEffect",
2330
- "NoPublishedElements",
2331
- "NoPublishedStyles",
2332
- "NoPublishedComponents",
2333
- "NoPublishedAssets",
2334
- "StyleNotApplied",
2335
- "ComponentHasNoThumbnail",
2336
- "DuplicateImportedStyleId",
2337
- "DuplicateImportedStylePath"
2338
- ]);
2339
- var ImportWarning = z96.object({
2340
- warningType: ImportWarningType,
2341
- componentId: z96.string().optional(),
2342
- componentName: z96.string().optional(),
2343
- styleId: z96.string().optional(),
2344
- styleName: z96.string().optional(),
2345
- unsupportedStyleValueType: z96.string().optional()
2346
- });
2347
-
2348
2357
  // src/dsm/data-sources/import-summary.ts
2349
2358
  var FileStructureStats = z97.object({
2350
2359
  frames: zeroNumberByDefault2(),
@@ -3437,7 +3446,7 @@ var Integration = z140.object({
3437
3446
  integrationCredentials: z140.array(IntegrationCredentials).optional()
3438
3447
  });
3439
3448
  var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
3440
- var IntegrationTokenResponse = z140.object({
3449
+ var IntegrationToken = z140.object({
3441
3450
  access_token: z140.string(),
3442
3451
  refresh_token: z140.string().optional(),
3443
3452
  expires_in: z140.union([z140.number().optional(), z140.string().optional()]),
@@ -3474,7 +3483,7 @@ var IntegrationTokenResponse = z140.object({
3474
3483
 
3475
3484
  // src/integrations/oauth-token.ts
3476
3485
  import { z as z141 } from "zod";
3477
- var IntegrationTokenSchema = z141.object({
3486
+ var IntegrationTokenSchemaOld = z141.object({
3478
3487
  id: z141.string(),
3479
3488
  provider: OAuthProviderSchema,
3480
3489
  scope: z141.string(),
@@ -4696,8 +4705,8 @@ export {
4696
4705
  IntegrationCredentialsProfile,
4697
4706
  IntegrationCredentialsType,
4698
4707
  IntegrationDesignSystem,
4699
- IntegrationTokenResponse,
4700
- IntegrationTokenSchema,
4708
+ IntegrationToken,
4709
+ IntegrationTokenSchemaOld,
4701
4710
  IntegrationType,
4702
4711
  IntegrationUserInfo,
4703
4712
  InternalStatus,