@scalar/cli 2.1.0 → 2.5.2

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.
Files changed (88) hide show
  1. package/README.md +28 -24
  2. package/chunks/action-42D2C47G.js +18 -0
  3. package/chunks/{action-DFKHSDFV.js → action-6FAJNP6C.js} +7 -3
  4. package/chunks/{action-5R5FDF6S.js → action-6MZZHPVQ.js} +120 -22
  5. package/chunks/{action-BYZUBXVB.js → action-7H3XARJP.js} +8 -4
  6. package/chunks/{action-H5OHT2GV.js → action-AMNYOA4B.js} +7 -3
  7. package/chunks/{action-ANU5HGC4.js → action-DCINFQ57.js} +17 -14
  8. package/chunks/{action-GB6DM53B.js → action-DGD6Q6Y5.js} +21 -10
  9. package/chunks/{action-TPBKPHNS.js → action-EPNE5XCM.js} +22 -22
  10. package/chunks/{action-C5VB4ITT.js → action-FF2OMGAS.js} +36 -18
  11. package/chunks/{action-Q5UJ32D6.js → action-H3RTILLM.js} +1 -1
  12. package/chunks/action-HIL5ZFNB.js +84 -0
  13. package/chunks/{action-MENXFJH3.js → action-HXHBU7XC.js} +9 -9
  14. package/chunks/{action-F4Y6Q2VB.js → action-LFL3ZZKN.js} +21 -21
  15. package/chunks/action-LUVBQEIQ.js +250 -0
  16. package/chunks/{action-TZ5KGAQT.js → action-OILGZAMK.js} +17 -14
  17. package/chunks/{action-HD2T6BFJ.js → action-OK55BFGM.js} +10 -10
  18. package/chunks/{action-HNKM3Q65.js → action-P7RFXIC7.js} +17 -14
  19. package/chunks/action-PAA4NWUJ.js +374 -0
  20. package/chunks/action-PHLOE27S.js +522 -0
  21. package/chunks/{action-CYP4VDK3.js → action-RBVPKCRI.js} +12 -35
  22. package/chunks/action-SJYAMXYI.js +244 -0
  23. package/chunks/{action-45OGQB2M.js → action-TWHLZW4V.js} +17 -8
  24. package/chunks/{action-GEBRPNRT.js → action-V5KYG7XD.js} +15 -16
  25. package/chunks/{action-BNEGJBUH.js → action-W62AIEBN.js} +8 -9
  26. package/chunks/{action-PVDDRIM6.js → action-X7TZA3RE.js} +65 -26
  27. package/chunks/{action-CLSD7O2R.js → action-XUQ7TKKJ.js} +10 -10
  28. package/chunks/{action-BMFXENMX.js → action-Y6CEKYEK.js} +39 -34
  29. package/chunks/{action-STIEAXOE.js → action-YRWHX2AE.js} +16 -5
  30. package/chunks/{action-W5BATF4Q.js → action-ZLTUMRO2.js} +24 -24
  31. package/chunks/{action-UDZUUJSI.js → action-ZWQLQENM.js} +18 -7
  32. package/chunks/{agent-XGLOHXNA.js → agent-JAXLLDPE.js} +25 -5
  33. package/chunks/asyncapi-P6Y3L7RG.js +105 -0
  34. package/chunks/{build.action-LKOILPA6.js → build.action-AZ5ECU4B.js} +22 -22
  35. package/chunks/chunk-3BWGTPPT.js +27022 -0
  36. package/chunks/{chunk-ZTVWAKNJ.js → chunk-3DJ2GKEG.js} +1 -1
  37. package/chunks/chunk-3ZJYGGAA.js +30 -0
  38. package/chunks/{chunk-IX7LJ3AD.js → chunk-4ORL4MST.js} +2 -3
  39. package/chunks/{chunk-ASMHW5AY.js → chunk-6ZMT63IV.js} +1 -1
  40. package/chunks/{chunk-B6QZJWCQ.js → chunk-B2MHTD3R.js} +4 -6
  41. package/chunks/{chunk-P646T2WH.js → chunk-CIFOFSZ3.js} +131 -13
  42. package/chunks/chunk-CX7ZRMTC.js +404 -0
  43. package/chunks/{chunk-HQKBZOYU.js → chunk-FOKFF4EP.js} +3 -3
  44. package/chunks/{chunk-UPUTMFD4.js → chunk-FQVVKQPU.js} +185 -13
  45. package/chunks/{chunk-P2VH7DOC.js → chunk-HUCR333E.js} +6 -6
  46. package/chunks/{chunk-KWOL7A6J.js → chunk-HXIDUCSZ.js} +2 -2
  47. package/chunks/{chunk-H2WRMLYY.js → chunk-IKT5F47M.js} +3571 -7
  48. package/chunks/{chunk-OAXFCOJV.js → chunk-JV7TUEXQ.js} +2 -1
  49. package/chunks/{chunk-2BSG2QHO.js → chunk-KEOCJ3NJ.js} +133 -20
  50. package/chunks/{chunk-AHWWJ3MD.js → chunk-LCPFHE4Z.js} +1 -1
  51. package/chunks/{chunk-TLFMATXR.js → chunk-LQN4S62O.js} +33 -25
  52. package/chunks/chunk-M622VXRQ.js +14 -0
  53. package/chunks/chunk-M6Q3ARBV.js +210 -0
  54. package/chunks/{chunk-4QS7SJTG.js → chunk-MNLXYOVF.js} +51 -36
  55. package/chunks/{chunk-5BISXQX4.js → chunk-NIXG4KDE.js} +11 -13
  56. package/chunks/{chunk-47Y4L5IT.js → chunk-NNMSZVAB.js} +1031 -481
  57. package/chunks/chunk-OQKDBLOZ.js +741 -0
  58. package/chunks/{chunk-NUXPNUSS.js → chunk-RAO7VUGM.js} +1 -1
  59. package/chunks/{chunk-SHSHFGA7.js → chunk-RPVHJMQT.js} +4 -6
  60. package/chunks/{chunk-23I5PKZZ.js → chunk-SWWWYWHC.js} +32 -5
  61. package/chunks/{chunk-X4QLDBB5.js → chunk-T5HJUAWB.js} +24 -3
  62. package/chunks/chunk-TYLWJ2UL.js +25 -0
  63. package/chunks/{chunk-SXYALPYK.js → chunk-UB3XGOUW.js} +498 -60
  64. package/chunks/{chunk-TQ5XC2E3.js → chunk-UMPODUJO.js} +77 -11
  65. package/chunks/{chunk-4DGQIAJX.js → chunk-VNYE4R7N.js} +154 -14
  66. package/chunks/{create.action-FFQLBSJH.js → create.action-34OTO2SB.js} +22 -22
  67. package/chunks/{delete.action-QNN3LC2F.js → delete.action-6LRT4M3S.js} +22 -22
  68. package/chunks/{delete.action-STHQHP4F.js → delete.action-ZYXFMIOW.js} +22 -22
  69. package/chunks/{get.action-OTKYOP3Z.js → get.action-XP36SA2J.js} +15 -16
  70. package/chunks/{list.action-KDM5RHEH.js → list.action-6LF6KSD5.js} +19 -19
  71. package/chunks/{list.action-6I5EZAVB.js → list.action-WVRVLX5E.js} +22 -22
  72. package/chunks/{publish.action-PODTVRXS.js → publish.action-AHFUBT5C.js} +44 -36
  73. package/chunks/{update.action-KMD4ZM75.js → update.action-YQTVUDYE.js} +22 -22
  74. package/chunks/{update.action-4F6STTEQ.js → update.action-ZREAFJVG.js} +22 -22
  75. package/docs.html +107 -104
  76. package/index.js +84 -68
  77. package/package.json +19 -15
  78. package/chunks/action-CCW66QJN.js +0 -72
  79. package/chunks/action-CQ56FVES.js +0 -65
  80. package/chunks/action-JOSVV6YA.js +0 -71
  81. package/chunks/action-P7LN6FGY.js +0 -13
  82. package/chunks/action-R6ZZO26F.js +0 -299
  83. package/chunks/action-TWFJNQ2R.js +0 -95
  84. package/chunks/chunk-5BPPGTUU.js +0 -463
  85. package/chunks/chunk-DOVIWNKQ.js +0 -108
  86. package/chunks/chunk-ISGLWBXZ.js +0 -4265
  87. package/chunks/chunk-T7MDADON.js +0 -17
  88. package/chunks/chunk-VTYTPSXO.js +0 -161
@@ -1,14 +1,17 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+ import {
3
+ displayError
4
+ } from "./chunk-3ZJYGGAA.js";
2
5
  import {
3
6
  ISOLATE_DIR,
4
7
  ISOLATE_EXTRACTION_DIR
5
- } from "./chunk-KWOL7A6J.js";
8
+ } from "./chunk-HXIDUCSZ.js";
6
9
  import {
7
10
  config
8
- } from "./chunk-OAXFCOJV.js";
11
+ } from "./chunk-JV7TUEXQ.js";
9
12
  import {
10
13
  output
11
- } from "./chunk-X4QLDBB5.js";
14
+ } from "./chunk-T5HJUAWB.js";
12
15
 
13
16
  // src/domains/project/download-isolate/action.ts
14
17
  import { execFile } from "node:child_process";
@@ -40,6 +43,12 @@ function getIsolateDownloadUrls(options) {
40
43
 
41
44
  // src/domains/project/download-isolate/action.ts
42
45
  var execFileAsync = promisify(execFile);
46
+ var IsolateDownloadError = class extends Error {
47
+ constructor(message, options) {
48
+ super(message, options);
49
+ this.name = "IsolateDownloadError";
50
+ }
51
+ };
43
52
  var DOWNLOAD_TIMEOUT_MS = 10 * 60 * 1e3;
44
53
  var EXTRACTION_ALLOWANCE_MS = 5 * 60 * 1e3;
45
54
  async function getExistingIsolateVersion() {
@@ -128,10 +137,53 @@ async function assertIsolateLayout(destinationDir, url) {
128
137
  await fs.access(path.join(destinationDir, "isolate", "package.json"));
129
138
  } catch {
130
139
  throw new Error(
131
- `The isolate tarball downloaded from ${url} did not contain an isolate directory.`
140
+ `The download from ${url} did not contain a valid docs preview server.`
132
141
  );
133
142
  }
134
143
  }
144
+ var DISK_WRITE_ERROR_CODES = /* @__PURE__ */ new Set([
145
+ "ENOSPC",
146
+ // No space left on device
147
+ "EACCES",
148
+ // Permission denied
149
+ "EPERM",
150
+ // Operation not permitted
151
+ "EBUSY",
152
+ // Resource busy or locked
153
+ "EROFS",
154
+ // Read-only filesystem
155
+ "EDQUOT",
156
+ // Disk quota exceeded
157
+ "EMFILE",
158
+ // Too many open files
159
+ "ENFILE"
160
+ // File table overflow
161
+ ]);
162
+ var DISK_WRITE_ERROR_MESSAGES = [
163
+ "no space left on device",
164
+ // ENOSPC / bsdtar
165
+ "not enough space",
166
+ // Windows disk-full phrasing
167
+ "disk quota exceeded",
168
+ // EDQUOT
169
+ "permission denied",
170
+ // EACCES
171
+ "access is denied",
172
+ // Windows permission phrasing
173
+ "operation not permitted",
174
+ // EPERM
175
+ "read-only file system"
176
+ // EROFS
177
+ ];
178
+ function isDiskWriteError(error) {
179
+ if (!(error instanceof Error)) return false;
180
+ const code = error.code;
181
+ if (typeof code === "string" && DISK_WRITE_ERROR_CODES.has(code)) {
182
+ return true;
183
+ }
184
+ const details = `${error.message} ${error.stderr ?? ""}`.toLowerCase();
185
+ return DISK_WRITE_ERROR_MESSAGES.some((phrase) => details.includes(phrase));
186
+ }
135
187
  async function downloadFirstAvailable(urls, destinationDir, options) {
136
188
  const failures = [];
137
189
  for (const url of urls) {
@@ -141,15 +193,16 @@ async function downloadFirstAvailable(urls, destinationDir, options) {
141
193
  await assertIsolateLayout(destinationDir, url);
142
194
  return url;
143
195
  } catch (error) {
196
+ if (isDiskWriteError(error)) throw error;
144
197
  failures.push(
145
198
  ` - ${url}: ${error instanceof Error ? error.message : String(error)}`
146
199
  );
147
200
  }
148
201
  }
149
- throw new Error(
150
- `Failed to download the docs isolate. Attempted:
202
+ throw new IsolateDownloadError(
203
+ `Failed to download the docs preview server. Attempted:
151
204
  ${failures.join("\n")}
152
- Your existing isolate (if any) was left untouched. Check your network connection and try again.`
205
+ Your existing preview server (if any) was left untouched. Check your network connection and try again.`
153
206
  );
154
207
  }
155
208
  async function removeQuarantineAttributes(isolateDir) {
@@ -177,7 +230,7 @@ async function swapIsolateDirectory(newIsolateDir, isolateDir) {
177
230
  await fs.rename(backupDir, isolateDir);
178
231
  } catch {
179
232
  throw new Error(
180
- `Failed to install the new isolate and could not restore the previous one. Your previous isolate is preserved at ${backupDir} \u2014 rename it back to ${isolateDir} to recover.`,
233
+ `Failed to install the new docs preview server and could not restore the previous one. Your previous preview server is preserved at ${backupDir} \u2014 rename it back to ${isolateDir} to recover.`,
181
234
  { cause: error }
182
235
  );
183
236
  }
@@ -260,7 +313,7 @@ async function updateIsolate(options) {
260
313
  async function downloadIsolate() {
261
314
  const existingIsolateVersion = await getExistingIsolateVersion();
262
315
  if (config.ssgDocsIsolateVersion === existingIsolateVersion) return;
263
- const logger = output.info({ animate: true }).loader("Downloading docs isolate. This may take a minute...");
316
+ const logger = output.info({ animate: true }).loader("Downloading the docs preview server. This may take a minute...");
264
317
  const urls = getIsolateDownloadUrls({
265
318
  cdnUrl: config.cdnUrl,
266
319
  version: config.ssgDocsIsolateVersion,
@@ -270,15 +323,28 @@ async function downloadIsolate() {
270
323
  try {
271
324
  await updateIsolate({ urls, extractionDir: ISOLATE_EXTRACTION_DIR });
272
325
  } catch (error) {
273
- logger.update("loader", 0, { content: "Download failed." });
326
+ const isDownloadFailure = error instanceof IsolateDownloadError;
327
+ logger.update("loader", 0, {
328
+ content: isDownloadFailure ? "Download failed." : "Installation failed.",
329
+ status: "error"
330
+ });
274
331
  logger.finish();
275
- throw error;
332
+ return output.error().title(
333
+ isDownloadFailure ? "Could not download the docs preview server" : "Could not install the docs preview server"
334
+ ).message(
335
+ [
336
+ displayError(error),
337
+ error instanceof Error && error.cause ? displayError(error.cause) : ""
338
+ ].filter(Boolean).join("\n\n")
339
+ ).exit("error");
276
340
  }
277
341
  logger.update("loader", 0, { content: "Download complete." });
278
342
  logger.finish();
279
343
  }
280
344
 
281
345
  export {
346
+ IsolateDownloadError,
347
+ isDiskWriteError,
282
348
  updateIsolate,
283
349
  downloadIsolate
284
350
  };
@@ -1,18 +1,20 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+ import {
3
+ customProjectIconSchema
4
+ } from "./chunk-OQKDBLOZ.js";
2
5
  import {
3
6
  brandedUid,
4
- customProjectIconSchema,
5
7
  emailSchema,
6
8
  entitySchema,
9
+ external_exports,
7
10
  mintUid,
8
11
  namespaceSchema,
9
12
  nanoidSchema,
10
13
  schemaModel,
11
- slugSchema
12
- } from "./chunk-ISGLWBXZ.js";
13
- import {
14
- external_exports
15
- } from "./chunk-H2WRMLYY.js";
14
+ slugSchema,
15
+ timestampSchema,
16
+ unixTimestamp
17
+ } from "./chunk-IKT5F47M.js";
16
18
 
17
19
  // ../../packages/entities/dist/team/access.js
18
20
  var ExternalAccessMethod;
@@ -55,14 +57,18 @@ var BillingPlan;
55
57
  BillingPlan2["ProMonthly"] = "pro_monthly";
56
58
  BillingPlan2["ProYearly"] = "pro_yearly";
57
59
  BillingPlan2["Premium"] = "premium";
60
+ BillingPlan2["BusinessMonthly"] = "business_monthly";
61
+ BillingPlan2["BusinessYearly"] = "business_yearly";
58
62
  BillingPlan2["Enterprise"] = "enterprise";
59
63
  })(BillingPlan || (BillingPlan = {}));
60
64
  var billingPlanLabels = {
61
65
  [BillingPlan.Free]: "Free",
62
66
  [BillingPlan.Trial]: "Trial",
63
- [BillingPlan.ProMonthly]: "Monthly",
64
- [BillingPlan.Premium]: "Monthly",
65
- [BillingPlan.ProYearly]: "Yearly",
67
+ [BillingPlan.ProMonthly]: "Pro (Monthly)",
68
+ [BillingPlan.Premium]: "Pro (Monthly)",
69
+ [BillingPlan.ProYearly]: "Pro (Yearly)",
70
+ [BillingPlan.BusinessMonthly]: "Business (Monthly)",
71
+ [BillingPlan.BusinessYearly]: "Business (Yearly)",
66
72
  [BillingPlan.Enterprise]: "Enterprise"
67
73
  };
68
74
 
@@ -81,6 +87,7 @@ var FeatureFlag;
81
87
  FeatureFlag2["DocsMCP"] = "docsMcp";
82
88
  FeatureFlag2["DisableApiSSR"] = "disableApiSSR";
83
89
  FeatureFlag2["UnifiedDocs"] = "unifiedDocs";
90
+ FeatureFlag2["UnifiedMcp"] = "unifiedMcp";
84
91
  FeatureFlag2["DocsAnalytics"] = "docsAnalytics";
85
92
  FeatureFlag2["McpAnalytics"] = "mcpAnalytics";
86
93
  FeatureFlag2["MicrosoftLogin"] = "microsoftLogin";
@@ -88,6 +95,8 @@ var FeatureFlag;
88
95
  FeatureFlag2["RegistryGit"] = "registryGit";
89
96
  FeatureFlag2["AutoBillSeats"] = "autoBillSeats";
90
97
  FeatureFlag2["AutoBillSdks"] = "autoBillSdks";
98
+ FeatureFlag2["SdkOpenApiEditor"] = "sdkOpenApiEditor";
99
+ FeatureFlag2["DashboardChat"] = "dashboardChat";
91
100
  })(FeatureFlag || (FeatureFlag = {}));
92
101
  var featureSchema = external_exports.boolean().optional().meta({ id: "feature" });
93
102
  var featureUpdateSchema = external_exports.boolean().nullable().optional();
@@ -104,13 +113,16 @@ var featureFlagSchema = external_exports.object({
104
113
  [FeatureFlag.DocsMCP]: featureSchema,
105
114
  [FeatureFlag.DisableApiSSR]: featureSchema,
106
115
  [FeatureFlag.UnifiedDocs]: featureSchema,
116
+ [FeatureFlag.UnifiedMcp]: featureSchema,
107
117
  [FeatureFlag.DocsAnalytics]: featureSchema,
108
118
  [FeatureFlag.McpAnalytics]: featureSchema,
109
119
  [FeatureFlag.MicrosoftLogin]: featureSchema,
110
120
  [FeatureFlag.EditorPreview]: featureSchema,
111
121
  [FeatureFlag.RegistryGit]: featureSchema,
112
122
  [FeatureFlag.AutoBillSeats]: featureSchema,
113
- [FeatureFlag.AutoBillSdks]: featureSchema
123
+ [FeatureFlag.AutoBillSdks]: featureSchema,
124
+ [FeatureFlag.SdkOpenApiEditor]: featureSchema,
125
+ [FeatureFlag.DashboardChat]: featureSchema
114
126
  }).meta({ id: "feature-flag" });
115
127
  var featureFlagUpdateSchema = external_exports.object(Object.fromEntries(Object.values(FeatureFlag).map((featureFlag) => [
116
128
  featureFlag,
@@ -128,7 +140,38 @@ var DEFAULT_ON_FLAGS = /* @__PURE__ */ new Set([
128
140
  * this grants read access to records that already exist rather than starting
129
141
  * any new collection.
130
142
  */
131
- FeatureFlag.McpAnalytics
143
+ FeatureFlag.McpAnalytics,
144
+ /**
145
+ * The dashboard assistant is on for everyone; an explicit per-team false
146
+ * remains the kill switch, which also hides the docs editor's Ask AI entry
147
+ * points since the editor's chat is a plug-in of the assistant. Listed here
148
+ * so the server-side gate and the admin flag editor's "Default (On)" label
149
+ * agree with the dashboard's client default.
150
+ */
151
+ FeatureFlag.DashboardChat,
152
+ /**
153
+ * The MCP studio is on for everyone; an explicit per-team false remains the
154
+ * kill switch back to the legacy MCP pages. Listed here so the server-side
155
+ * gate and the admin flag editor's "Default (On)" label agree with the
156
+ * dashboard's client default.
157
+ */
158
+ FeatureFlag.UnifiedMcp,
159
+ /**
160
+ * The unified editor is on for everyone: the legacy dashboard surfaces are
161
+ * deleted, so the dashboard serves the studios regardless. Listed here so
162
+ * the server-side gate and the admin flag editor's "Default (On)" label
163
+ * agree with the dashboard's client default; an explicit per-team false
164
+ * remains the kill switch.
165
+ */
166
+ FeatureFlag.UnifiedDocs,
167
+ /**
168
+ * Editing an SDK's OpenAPI document is on for everyone; an explicit per-team
169
+ * false remains the kill switch, and the dashboard still gates the surface on
170
+ * the flag, so withdrawing it withdraws the panel. Listed here so the
171
+ * server-side gate and the admin flag editor's "Default (On)" label agree
172
+ * with the dashboard's client default.
173
+ */
174
+ FeatureFlag.SdkOpenApiEditor
132
175
  ]);
133
176
 
134
177
  // ../../packages/entities/dist/team/schema.js
@@ -159,7 +202,10 @@ var billingInfoSchema = external_exports.preprocess((arg) => {
159
202
  if (typeof arg?.hasTrial === "boolean" && ![
160
203
  BillingPlan.Premium,
161
204
  BillingPlan.ProMonthly,
162
- BillingPlan.ProYearly
205
+ BillingPlan.ProYearly,
206
+ BillingPlan.BusinessMonthly,
207
+ BillingPlan.BusinessYearly,
208
+ BillingPlan.Enterprise
163
209
  ].includes(arg?.plan)) {
164
210
  arg.plan = "trial";
165
211
  }
@@ -172,7 +218,9 @@ var billingInfoSchema = external_exports.preprocess((arg) => {
172
218
  sdkTrialReminderSentAt: external_exports.number().optional(),
173
219
  trialEndedReminderSentAt: external_exports.number().optional(),
174
220
  trialExtendedAt: external_exports.number().optional(),
175
- includedCreditsOverride: external_exports.number().optional()
221
+ includedCreditsOverride: external_exports.number().optional(),
222
+ pastDue: external_exports.boolean().optional(),
223
+ pricingModel: external_exports.enum(["flat_2026"]).nullish()
176
224
  })).meta({ id: "billing-info" });
177
225
  var invoiceStatusSchema = external_exports.enum(["open", "paid", "draft", "void", "uncollectible"]).meta({ id: "invoice-status" });
178
226
  var billingInvoiceSchema = external_exports.object({
@@ -202,6 +250,39 @@ var teamBillingSummary = external_exports.object({
202
250
  /** Basic Scalar billing info from team record */
203
251
  billingInfo: billingInfoSchema
204
252
  }).meta({ id: "team-billing-summary" });
253
+ var sdkPriceBandLiterals = {
254
+ standard: "standard",
255
+ large: "large"
256
+ };
257
+ var sdkPriceBandSchema = external_exports.enum(sdkPriceBandLiterals);
258
+ var requiredTierLiterals = {
259
+ pro: "pro",
260
+ business: "business",
261
+ enterprise: "enterprise"
262
+ };
263
+ var teamSdkPricing = external_exports.object({
264
+ sdks: external_exports.object({
265
+ uid: nanoidSchema,
266
+ /** Endpoints in the document this SDK builds against; null when unmeasured. */
267
+ endpointCount: external_exports.number().int().nullable(),
268
+ /** Targets this SDK currently bills. */
269
+ billedTargets: external_exports.number().int(),
270
+ band: sdkPriceBandSchema
271
+ }).array().default([]),
272
+ /**
273
+ * Managed APIs with the size of the version they serve, for quoting an SDK
274
+ * that does not exist yet.
275
+ */
276
+ apis: external_exports.object({
277
+ uid: nanoidSchema,
278
+ endpointCount: external_exports.number().int().nullable(),
279
+ band: sdkPriceBandSchema
280
+ }).array().default([]),
281
+ /** Billable targets per band, after the plan's included unit is comped. */
282
+ bands: external_exports.record(sdkPriceBandSchema, external_exports.number().int()),
283
+ /** The lowest tier the team's largest SDK requires. */
284
+ requiredTier: external_exports.enum(requiredTierLiterals)
285
+ }).meta({ id: "team-sdk-pricing" });
205
286
  var pendingInviteSchema = external_exports.object({
206
287
  uid: nanoidSchema,
207
288
  role: roleSchema.default(TeamUserRole.Editor),
@@ -215,6 +296,27 @@ var TeamOnboardingState;
215
296
  TeamOnboardingState2["Setup"] = "setup";
216
297
  TeamOnboardingState2["Complete"] = "complete";
217
298
  })(TeamOnboardingState || (TeamOnboardingState = {}));
299
+ var UnifiedDocsMigrationStatus;
300
+ (function(UnifiedDocsMigrationStatus2) {
301
+ UnifiedDocsMigrationStatus2["Requested"] = "requested";
302
+ UnifiedDocsMigrationStatus2["InProgress"] = "in-progress";
303
+ UnifiedDocsMigrationStatus2["Completed"] = "completed";
304
+ UnifiedDocsMigrationStatus2["Failed"] = "failed";
305
+ })(UnifiedDocsMigrationStatus || (UnifiedDocsMigrationStatus = {}));
306
+ var unifiedDocsMigrationSchema = external_exports.object({
307
+ status: external_exports.enum(UnifiedDocsMigrationStatus),
308
+ /** When the current status was entered, not when the team first asked */
309
+ updatedAt: timestampSchema.default(unixTimestamp).meta({ default: "unixTimestamp()" }),
310
+ /**
311
+ * The user who pressed the button, or null when ops started the migration.
312
+ * Only used to attribute the request — permissions are checked at the route.
313
+ */
314
+ requestedBy: external_exports.string().nullable().default(null),
315
+ /** Populated on `Failed` so the dashboard can show why without a log dive */
316
+ error: external_exports.string().nullable().default(null),
317
+ projectsMigrated: external_exports.number().int().default(0),
318
+ projectsTotal: external_exports.number().int().default(0)
319
+ });
218
320
  var TeamAuthenticationMethod;
219
321
  (function(TeamAuthenticationMethod2) {
220
322
  TeamAuthenticationMethod2["Password"] = "password";
@@ -271,6 +373,12 @@ var teamSchema = entitySchema.extend({
271
373
  authentication: teamAuthenticationSchema.default(schemaModel({}, teamAuthenticationSchema)),
272
374
  externalAccess: externalAccessSchema.default(schemaModel({}, externalAccessSchema)),
273
375
  features: featureFlagSchema.default({}),
376
+ /**
377
+ * Progress through the move off the legacy WYSIWYG editor. Absent on teams
378
+ * that have never been touched by the migration — including every team that
379
+ * signed up already on Unified Docs, which has nothing to migrate.
380
+ */
381
+ unifiedDocsMigration: unifiedDocsMigrationSchema.optional(),
274
382
  /**
275
383
  * Teams can be manually verified when they need to upload documents
276
384
  * containing prohibited text or links. This is manually set by request.
@@ -285,6 +393,12 @@ var billingFeatures = {
285
393
  },
286
394
  authentication: {
287
395
  sso: "sso"
396
+ },
397
+ access: {
398
+ groups: "accessGroups"
399
+ },
400
+ publishing: {
401
+ subpath: "subpathHosting"
288
402
  }
289
403
  };
290
404
  var teamBillingFeatures = {
@@ -292,9 +406,31 @@ var teamBillingFeatures = {
292
406
  [BillingPlan.Enterprise]: true,
293
407
  [BillingPlan.Premium]: true,
294
408
  [BillingPlan.ProMonthly]: true,
295
- [BillingPlan.ProYearly]: true
409
+ [BillingPlan.ProYearly]: true,
410
+ [BillingPlan.BusinessMonthly]: true,
411
+ [BillingPlan.BusinessYearly]: true
296
412
  },
413
+ // SSO/SAML starts on Business under the four-plan model.
297
414
  [billingFeatures.authentication.sso]: {
415
+ [BillingPlan.BusinessMonthly]: true,
416
+ [BillingPlan.BusinessYearly]: true,
417
+ [BillingPlan.Enterprise]: true
418
+ },
419
+ // Access groups start on Pro; Trial is included so it keeps demoing the Pro
420
+ // experience (expiry already short-circuits in hasTeamBillingFeature).
421
+ [billingFeatures.access.groups]: {
422
+ [BillingPlan.Trial]: true,
423
+ [BillingPlan.Premium]: true,
424
+ [BillingPlan.ProMonthly]: true,
425
+ [BillingPlan.ProYearly]: true,
426
+ [BillingPlan.BusinessMonthly]: true,
427
+ [BillingPlan.BusinessYearly]: true,
428
+ [BillingPlan.Enterprise]: true
429
+ },
430
+ // Subpath hosting starts on Business.
431
+ [billingFeatures.publishing.subpath]: {
432
+ [BillingPlan.BusinessMonthly]: true,
433
+ [BillingPlan.BusinessYearly]: true,
298
434
  [BillingPlan.Enterprise]: true
299
435
  }
300
436
  };
@@ -351,9 +487,13 @@ var teamPermissions = {
351
487
 
352
488
  export {
353
489
  roleSchema,
490
+ userRefSchema,
354
491
  billingPlanSchema,
355
492
  teamBillingSummary,
493
+ teamSdkPricing,
494
+ pendingInviteSchema,
356
495
  teamNameSchema,
357
496
  teamImageSchema,
497
+ UnifiedDocsMigrationStatus,
358
498
  teamSchema
359
499
  };
@@ -1,43 +1,43 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  apiService
4
- } from "./chunk-SXYALPYK.js";
4
+ } from "./chunk-UB3XGOUW.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-2BSG2QHO.js";
7
+ } from "./chunk-KEOCJ3NJ.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-SHSHFGA7.js";
11
- import "./chunk-UPUTMFD4.js";
12
- import "./chunk-B6QZJWCQ.js";
10
+ } from "./chunk-RPVHJMQT.js";
11
+ import "./chunk-FQVVKQPU.js";
12
+ import "./chunk-B2MHTD3R.js";
13
13
  import {
14
14
  SdkLanguage
15
- } from "./chunk-5BPPGTUU.js";
16
- import "./chunk-P646T2WH.js";
17
- import "./chunk-4QS7SJTG.js";
18
- import "./chunk-VTYTPSXO.js";
15
+ } from "./chunk-3BWGTPPT.js";
16
+ import "./chunk-M622VXRQ.js";
17
+ import "./chunk-CIFOFSZ3.js";
19
18
  import {
20
19
  getAuthData
21
- } from "./chunk-5BISXQX4.js";
20
+ } from "./chunk-NIXG4KDE.js";
22
21
  import {
23
22
  config
24
- } from "./chunk-OAXFCOJV.js";
25
- import "./chunk-TLFMATXR.js";
23
+ } from "./chunk-JV7TUEXQ.js";
26
24
  import {
27
25
  teamSchema
28
- } from "./chunk-4DGQIAJX.js";
29
- import {
30
- namespaceSchema,
31
- slugSchema
32
- } from "./chunk-ISGLWBXZ.js";
33
- import {
34
- external_exports
35
- } from "./chunk-H2WRMLYY.js";
26
+ } from "./chunk-VNYE4R7N.js";
27
+ import "./chunk-OQKDBLOZ.js";
36
28
  import "./chunk-K74E42RV.js";
37
- import "./chunk-IX7LJ3AD.js";
29
+ import "./chunk-MNLXYOVF.js";
30
+ import "./chunk-CX7ZRMTC.js";
31
+ import "./chunk-4ORL4MST.js";
38
32
  import {
39
33
  output
40
- } from "./chunk-X4QLDBB5.js";
34
+ } from "./chunk-T5HJUAWB.js";
35
+ import "./chunk-LQN4S62O.js";
36
+ import {
37
+ external_exports,
38
+ namespaceSchema,
39
+ slugSchema
40
+ } from "./chunk-IKT5F47M.js";
41
41
  import "./chunk-3MZYUBJ6.js";
42
42
 
43
43
  // src/domains/sdk/create.action.ts
@@ -1,41 +1,41 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  apiService
4
- } from "./chunk-SXYALPYK.js";
4
+ } from "./chunk-UB3XGOUW.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-2BSG2QHO.js";
7
+ } from "./chunk-KEOCJ3NJ.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-SHSHFGA7.js";
11
- import "./chunk-UPUTMFD4.js";
12
- import "./chunk-B6QZJWCQ.js";
10
+ } from "./chunk-RPVHJMQT.js";
11
+ import "./chunk-FQVVKQPU.js";
12
+ import "./chunk-B2MHTD3R.js";
13
13
  import {
14
14
  sdkSchema
15
- } from "./chunk-5BPPGTUU.js";
16
- import "./chunk-P646T2WH.js";
17
- import "./chunk-4QS7SJTG.js";
18
- import "./chunk-VTYTPSXO.js";
15
+ } from "./chunk-3BWGTPPT.js";
16
+ import "./chunk-M622VXRQ.js";
17
+ import "./chunk-CIFOFSZ3.js";
19
18
  import {
20
19
  getAuthData
21
- } from "./chunk-5BISXQX4.js";
22
- import "./chunk-OAXFCOJV.js";
23
- import "./chunk-TLFMATXR.js";
20
+ } from "./chunk-NIXG4KDE.js";
21
+ import "./chunk-JV7TUEXQ.js";
24
22
  import {
25
23
  teamSchema
26
- } from "./chunk-4DGQIAJX.js";
27
- import {
28
- namespaceSchema,
29
- slugSchema
30
- } from "./chunk-ISGLWBXZ.js";
31
- import {
32
- external_exports
33
- } from "./chunk-H2WRMLYY.js";
24
+ } from "./chunk-VNYE4R7N.js";
25
+ import "./chunk-OQKDBLOZ.js";
34
26
  import "./chunk-K74E42RV.js";
35
- import "./chunk-IX7LJ3AD.js";
27
+ import "./chunk-MNLXYOVF.js";
28
+ import "./chunk-CX7ZRMTC.js";
29
+ import "./chunk-4ORL4MST.js";
36
30
  import {
37
31
  output
38
- } from "./chunk-X4QLDBB5.js";
32
+ } from "./chunk-T5HJUAWB.js";
33
+ import "./chunk-LQN4S62O.js";
34
+ import {
35
+ external_exports,
36
+ namespaceSchema,
37
+ slugSchema
38
+ } from "./chunk-IKT5F47M.js";
39
39
  import "./chunk-3MZYUBJ6.js";
40
40
 
41
41
  // src/domains/sdk/delete.action.ts
@@ -1,39 +1,39 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  apiService
4
- } from "./chunk-SXYALPYK.js";
4
+ } from "./chunk-UB3XGOUW.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-2BSG2QHO.js";
7
+ } from "./chunk-KEOCJ3NJ.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-SHSHFGA7.js";
11
- import "./chunk-UPUTMFD4.js";
12
- import "./chunk-B6QZJWCQ.js";
13
- import "./chunk-5BPPGTUU.js";
14
- import "./chunk-P646T2WH.js";
15
- import "./chunk-4QS7SJTG.js";
16
- import "./chunk-VTYTPSXO.js";
10
+ } from "./chunk-RPVHJMQT.js";
11
+ import "./chunk-FQVVKQPU.js";
12
+ import "./chunk-B2MHTD3R.js";
13
+ import "./chunk-3BWGTPPT.js";
14
+ import "./chunk-M622VXRQ.js";
15
+ import "./chunk-CIFOFSZ3.js";
17
16
  import {
18
17
  getAuthData
19
- } from "./chunk-5BISXQX4.js";
20
- import "./chunk-OAXFCOJV.js";
21
- import "./chunk-TLFMATXR.js";
18
+ } from "./chunk-NIXG4KDE.js";
19
+ import "./chunk-JV7TUEXQ.js";
22
20
  import {
23
21
  teamSchema
24
- } from "./chunk-4DGQIAJX.js";
25
- import {
26
- namespaceSchema,
27
- slugSchema
28
- } from "./chunk-ISGLWBXZ.js";
29
- import {
30
- external_exports
31
- } from "./chunk-H2WRMLYY.js";
22
+ } from "./chunk-VNYE4R7N.js";
23
+ import "./chunk-OQKDBLOZ.js";
32
24
  import "./chunk-K74E42RV.js";
33
- import "./chunk-IX7LJ3AD.js";
25
+ import "./chunk-MNLXYOVF.js";
26
+ import "./chunk-CX7ZRMTC.js";
27
+ import "./chunk-4ORL4MST.js";
34
28
  import {
35
29
  output
36
- } from "./chunk-X4QLDBB5.js";
30
+ } from "./chunk-T5HJUAWB.js";
31
+ import "./chunk-LQN4S62O.js";
32
+ import {
33
+ external_exports,
34
+ namespaceSchema,
35
+ slugSchema
36
+ } from "./chunk-IKT5F47M.js";
37
37
  import "./chunk-3MZYUBJ6.js";
38
38
 
39
39
  // src/domains/schema/delete.action.ts
@@ -1,29 +1,28 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  fetchFromRegistry
4
- } from "./chunk-NUXPNUSS.js";
5
- import "./chunk-T7MDADON.js";
4
+ } from "./chunk-RAO7VUGM.js";
5
+ import "./chunk-TYLWJ2UL.js";
6
6
  import {
7
7
  registry
8
- } from "./chunk-DOVIWNKQ.js";
9
- import "./chunk-4QS7SJTG.js";
10
- import "./chunk-VTYTPSXO.js";
8
+ } from "./chunk-M6Q3ARBV.js";
11
9
  import {
12
10
  getAuthData
13
- } from "./chunk-5BISXQX4.js";
14
- import "./chunk-OAXFCOJV.js";
15
- import "./chunk-TLFMATXR.js";
16
- import "./chunk-4DGQIAJX.js";
11
+ } from "./chunk-NIXG4KDE.js";
12
+ import "./chunk-JV7TUEXQ.js";
13
+ import "./chunk-VNYE4R7N.js";
14
+ import "./chunk-OQKDBLOZ.js";
15
+ import "./chunk-MNLXYOVF.js";
16
+ import "./chunk-CX7ZRMTC.js";
17
+ import "./chunk-4ORL4MST.js";
17
18
  import {
18
- docVersionSchema
19
- } from "./chunk-ISGLWBXZ.js";
19
+ output
20
+ } from "./chunk-T5HJUAWB.js";
21
+ import "./chunk-LQN4S62O.js";
20
22
  import {
23
+ docVersionSchema,
21
24
  external_exports
22
- } from "./chunk-H2WRMLYY.js";
23
- import "./chunk-IX7LJ3AD.js";
24
- import {
25
- output
26
- } from "./chunk-X4QLDBB5.js";
25
+ } from "./chunk-IKT5F47M.js";
27
26
  import "./chunk-3MZYUBJ6.js";
28
27
 
29
28
  // src/domains/schema/get.action.ts