tuturuuu 0.27.0 → 0.28.0

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 (539) hide show
  1. package/dist/_portable/internal-api/client.d.ts +56 -0
  2. package/dist/_portable/internal-api/client.d.ts.map +1 -0
  3. package/dist/_portable/internal-api/client.js +601 -0
  4. package/dist/_portable/internal-api/client.js.map +1 -0
  5. package/dist/_portable/internal-api/external-projects.d.ts +620 -0
  6. package/dist/_portable/internal-api/external-projects.d.ts.map +1 -0
  7. package/dist/_portable/internal-api/external-projects.js +652 -0
  8. package/dist/_portable/internal-api/external-projects.js.map +1 -0
  9. package/dist/_portable/internal-api/hidden-workspaces.d.ts +10 -0
  10. package/dist/_portable/internal-api/hidden-workspaces.d.ts.map +1 -0
  11. package/dist/_portable/internal-api/hidden-workspaces.js +17 -0
  12. package/dist/_portable/internal-api/hidden-workspaces.js.map +1 -0
  13. package/dist/_portable/internal-api/internal-api-error.d.ts +7 -0
  14. package/dist/_portable/internal-api/internal-api-error.d.ts.map +1 -0
  15. package/dist/_portable/internal-api/internal-api-error.js +53 -0
  16. package/dist/_portable/internal-api/internal-api-error.js.map +1 -0
  17. package/dist/_portable/internal-api/product-feedback.d.ts +45 -0
  18. package/dist/_portable/internal-api/product-feedback.d.ts.map +1 -0
  19. package/dist/_portable/internal-api/product-feedback.js +60 -0
  20. package/dist/_portable/internal-api/product-feedback.js.map +1 -0
  21. package/dist/_portable/internal-api/profile-banner.d.ts +13 -0
  22. package/dist/_portable/internal-api/profile-banner.d.ts.map +1 -0
  23. package/dist/_portable/internal-api/profile-banner.js +76 -0
  24. package/dist/_portable/internal-api/profile-banner.js.map +1 -0
  25. package/dist/_portable/internal-api/profile-media-optimize.d.ts +12 -0
  26. package/dist/_portable/internal-api/profile-media-optimize.d.ts.map +1 -0
  27. package/dist/_portable/internal-api/profile-media-optimize.js +64 -0
  28. package/dist/_portable/internal-api/profile-media-optimize.js.map +1 -0
  29. package/dist/_portable/internal-api/profile-media.d.ts +21 -0
  30. package/dist/_portable/internal-api/profile-media.d.ts.map +1 -0
  31. package/dist/_portable/internal-api/profile-media.js +80 -0
  32. package/dist/_portable/internal-api/profile-media.js.map +1 -0
  33. package/dist/_portable/internal-api/request-headers.d.ts +2 -0
  34. package/dist/_portable/internal-api/request-headers.d.ts.map +1 -0
  35. package/dist/_portable/internal-api/request-headers.js +22 -0
  36. package/dist/_portable/internal-api/request-headers.js.map +1 -0
  37. package/dist/_portable/internal-api/storage.d.ts +210 -0
  38. package/dist/_portable/internal-api/storage.d.ts.map +1 -0
  39. package/dist/_portable/internal-api/storage.js +418 -0
  40. package/dist/_portable/internal-api/storage.js.map +1 -0
  41. package/dist/_portable/internal-api/task-list-options.d.ts +41 -0
  42. package/dist/_portable/internal-api/task-list-options.d.ts.map +1 -0
  43. package/dist/_portable/internal-api/task-list-options.js +3 -0
  44. package/dist/_portable/internal-api/task-list-options.js.map +1 -0
  45. package/dist/_portable/internal-api/task-media-filename.d.ts +2 -0
  46. package/dist/_portable/internal-api/task-media-filename.d.ts.map +1 -0
  47. package/dist/_portable/internal-api/task-media-filename.js +34 -0
  48. package/dist/_portable/internal-api/task-media-filename.js.map +1 -0
  49. package/dist/_portable/internal-api/tasks-dashboard.d.ts +21 -0
  50. package/dist/_portable/internal-api/tasks-dashboard.d.ts.map +1 -0
  51. package/dist/_portable/internal-api/tasks-dashboard.js +34 -0
  52. package/dist/_portable/internal-api/tasks-dashboard.js.map +1 -0
  53. package/dist/_portable/internal-api/tasks.d.ts +936 -0
  54. package/dist/_portable/internal-api/tasks.d.ts.map +1 -0
  55. package/dist/_portable/internal-api/tasks.js +937 -0
  56. package/dist/_portable/internal-api/tasks.js.map +1 -0
  57. package/dist/_portable/internal-api/user-config-types.d.ts +7 -0
  58. package/dist/_portable/internal-api/user-config-types.d.ts.map +1 -0
  59. package/dist/_portable/internal-api/user-config-types.js +3 -0
  60. package/dist/_portable/internal-api/user-config-types.js.map +1 -0
  61. package/dist/_portable/internal-api/user-profile-types.d.ts +22 -0
  62. package/dist/_portable/internal-api/user-profile-types.d.ts.map +1 -0
  63. package/dist/_portable/internal-api/user-profile-types.js +3 -0
  64. package/dist/_portable/internal-api/user-profile-types.js.map +1 -0
  65. package/dist/_portable/internal-api/users.d.ts +378 -0
  66. package/dist/_portable/internal-api/users.d.ts.map +1 -0
  67. package/dist/_portable/internal-api/users.js +556 -0
  68. package/dist/_portable/internal-api/users.js.map +1 -0
  69. package/dist/_portable/internal-api/workspaces.d.ts +176 -0
  70. package/dist/_portable/internal-api/workspaces.d.ts.map +1 -0
  71. package/dist/_portable/internal-api/workspaces.js +275 -0
  72. package/dist/_portable/internal-api/workspaces.js.map +1 -0
  73. package/dist/_portable/utils/playground-schema.d.ts +92 -0
  74. package/dist/_portable/utils/playground-schema.d.ts.map +1 -0
  75. package/dist/_portable/utils/playground-schema.js +140 -0
  76. package/dist/_portable/utils/playground-schema.js.map +1 -0
  77. package/dist/_portable/utils/task-description-codec.d.ts +31 -0
  78. package/dist/_portable/utils/task-description-codec.d.ts.map +1 -0
  79. package/dist/_portable/utils/task-description-codec.js +435 -0
  80. package/dist/_portable/utils/task-description-codec.js.map +1 -0
  81. package/dist/_portable/utils/task-description-content.d.ts +7 -0
  82. package/dist/_portable/utils/task-description-content.d.ts.map +1 -0
  83. package/dist/_portable/utils/task-description-content.js +227 -0
  84. package/dist/_portable/utils/task-description-content.js.map +1 -0
  85. package/dist/_portable/utils/text-helper.d.ts +33 -0
  86. package/dist/_portable/utils/text-helper.d.ts.map +1 -0
  87. package/dist/_portable/utils/text-helper.js +423 -0
  88. package/dist/_portable/utils/text-helper.js.map +1 -0
  89. package/dist/_portable/utils/yjs-helper.d.ts +5 -0
  90. package/dist/_portable/utils/yjs-helper.d.ts.map +1 -0
  91. package/dist/_portable/utils/yjs-helper.js +186 -0
  92. package/dist/_portable/utils/yjs-helper.js.map +1 -0
  93. package/dist/cli/args.d.ts.map +1 -1
  94. package/dist/cli/args.js.map +1 -1
  95. package/dist/cli/auth.d.ts +1 -1
  96. package/dist/cli/auth.d.ts.map +1 -1
  97. package/dist/cli/auth.js +6 -6
  98. package/dist/cli/auth.js.map +1 -1
  99. package/dist/cli/browser.d.ts.map +1 -1
  100. package/dist/cli/browser.js.map +1 -1
  101. package/dist/cli/calendar-admin.d.ts +1 -1
  102. package/dist/cli/calendar-admin.d.ts.map +1 -1
  103. package/dist/cli/calendar-admin.js +21 -21
  104. package/dist/cli/calendar-admin.js.map +1 -1
  105. package/dist/cli/calendar-feedback-dispatch.d.ts +9 -0
  106. package/dist/cli/calendar-feedback-dispatch.d.ts.map +1 -0
  107. package/dist/cli/calendar-feedback-dispatch.js +23 -0
  108. package/dist/cli/calendar-feedback-dispatch.js.map +1 -0
  109. package/dist/cli/calendar-integrations.d.ts +1 -1
  110. package/dist/cli/calendar-integrations.d.ts.map +1 -1
  111. package/dist/cli/calendar-integrations.js +21 -21
  112. package/dist/cli/calendar-integrations.js.map +1 -1
  113. package/dist/cli/calendar-payloads.d.ts +3 -3
  114. package/dist/cli/calendar-payloads.d.ts.map +1 -1
  115. package/dist/cli/calendar-payloads.js +3 -3
  116. package/dist/cli/calendar-payloads.js.map +1 -1
  117. package/dist/cli/calendar.d.ts +1 -1
  118. package/dist/cli/calendar.d.ts.map +1 -1
  119. package/dist/cli/calendar.js +15 -15
  120. package/dist/cli/calendar.js.map +1 -1
  121. package/dist/cli/commands.d.ts +5 -5
  122. package/dist/cli/commands.d.ts.map +1 -1
  123. package/dist/cli/commands.js +243 -247
  124. package/dist/cli/commands.js.map +1 -1
  125. package/dist/cli/config.d.ts.map +1 -1
  126. package/dist/cli/config.js.map +1 -1
  127. package/dist/cli/devbox-agent-capabilities.d.ts +1 -1
  128. package/dist/cli/devbox-agent-capabilities.d.ts.map +1 -1
  129. package/dist/cli/devbox-agent-capabilities.js +6 -6
  130. package/dist/cli/devbox-agent-capabilities.js.map +1 -1
  131. package/dist/cli/devbox-agent.d.ts.map +1 -1
  132. package/dist/cli/devbox-agent.js +14 -14
  133. package/dist/cli/devbox-agent.js.map +1 -1
  134. package/dist/cli/devbox-auto-upgrade.d.ts.map +1 -1
  135. package/dist/cli/devbox-auto-upgrade.js +6 -6
  136. package/dist/cli/devbox-auto-upgrade.js.map +1 -1
  137. package/dist/cli/devbox-command-templates.d.ts +1 -1
  138. package/dist/cli/devbox-command-templates.d.ts.map +1 -1
  139. package/dist/cli/devbox-command-templates.js +10 -10
  140. package/dist/cli/devbox-command-templates.js.map +1 -1
  141. package/dist/cli/devbox-connect.d.ts +2 -2
  142. package/dist/cli/devbox-connect.d.ts.map +1 -1
  143. package/dist/cli/devbox-connect.js +16 -16
  144. package/dist/cli/devbox-connect.js.map +1 -1
  145. package/dist/cli/devbox-docker-metadata-diagnostic.d.ts +12 -0
  146. package/dist/cli/devbox-docker-metadata-diagnostic.d.ts.map +1 -0
  147. package/dist/cli/devbox-docker-metadata-diagnostic.js +110 -0
  148. package/dist/cli/devbox-docker-metadata-diagnostic.js.map +1 -0
  149. package/dist/cli/devbox-docker-metadata.d.ts.map +1 -1
  150. package/dist/cli/devbox-docker-metadata.js +20 -1
  151. package/dist/cli/devbox-docker-metadata.js.map +1 -1
  152. package/dist/cli/devbox-doctor.d.ts +1 -1
  153. package/dist/cli/devbox-doctor.d.ts.map +1 -1
  154. package/dist/cli/devbox-doctor.js +2 -2
  155. package/dist/cli/devbox-doctor.js.map +1 -1
  156. package/dist/cli/devbox-duration.d.ts.map +1 -1
  157. package/dist/cli/devbox-duration.js.map +1 -1
  158. package/dist/cli/devbox-fleet.d.ts +2 -2
  159. package/dist/cli/devbox-fleet.d.ts.map +1 -1
  160. package/dist/cli/devbox-fleet.js +12 -12
  161. package/dist/cli/devbox-fleet.js.map +1 -1
  162. package/dist/cli/devbox-host-protection.d.ts +1 -1
  163. package/dist/cli/devbox-host-protection.d.ts.map +1 -1
  164. package/dist/cli/devbox-host-protection.js.map +1 -1
  165. package/dist/cli/devbox-judge-case-batch.d.ts.map +1 -1
  166. package/dist/cli/devbox-judge-case-batch.js +2 -2
  167. package/dist/cli/devbox-judge-case-batch.js.map +1 -1
  168. package/dist/cli/devbox-judge-languages.d.ts.map +1 -1
  169. package/dist/cli/devbox-judge-languages.js.map +1 -1
  170. package/dist/cli/devbox-judge-sandbox.d.ts +2 -2
  171. package/dist/cli/devbox-judge-sandbox.d.ts.map +1 -1
  172. package/dist/cli/devbox-judge-sandbox.js +20 -20
  173. package/dist/cli/devbox-judge-sandbox.js.map +1 -1
  174. package/dist/cli/devbox-maintenance.d.ts +1 -1
  175. package/dist/cli/devbox-maintenance.d.ts.map +1 -1
  176. package/dist/cli/devbox-maintenance.js +5 -5
  177. package/dist/cli/devbox-maintenance.js.map +1 -1
  178. package/dist/cli/devbox-persisted-setting.d.ts.map +1 -1
  179. package/dist/cli/devbox-persisted-setting.js.map +1 -1
  180. package/dist/cli/devbox-playground-files.d.ts.map +1 -1
  181. package/dist/cli/devbox-playground-files.js.map +1 -1
  182. package/dist/cli/devbox-playground-runtime-diagnostics.d.ts +1 -1
  183. package/dist/cli/devbox-playground-runtime-diagnostics.d.ts.map +1 -1
  184. package/dist/cli/devbox-playground-runtime-diagnostics.js +2 -2
  185. package/dist/cli/devbox-playground-runtime-diagnostics.js.map +1 -1
  186. package/dist/cli/devbox-playground-sandbox.d.ts +1 -1
  187. package/dist/cli/devbox-playground-sandbox.d.ts.map +1 -1
  188. package/dist/cli/devbox-playground-sandbox.js +30 -30
  189. package/dist/cli/devbox-playground-sandbox.js.map +1 -1
  190. package/dist/cli/devbox-repair.d.ts +5 -5
  191. package/dist/cli/devbox-repair.d.ts.map +1 -1
  192. package/dist/cli/devbox-repair.js +25 -25
  193. package/dist/cli/devbox-repair.js.map +1 -1
  194. package/dist/cli/devbox-runner.d.ts +1 -1
  195. package/dist/cli/devbox-runner.d.ts.map +1 -1
  196. package/dist/cli/devbox-runner.js +10 -10
  197. package/dist/cli/devbox-runner.js.map +1 -1
  198. package/dist/cli/devbox-sandbox-pids.d.ts.map +1 -1
  199. package/dist/cli/devbox-sandbox-pids.js.map +1 -1
  200. package/dist/cli/devbox-sandbox-process.d.ts.map +1 -1
  201. package/dist/cli/devbox-sandbox-process.js.map +1 -1
  202. package/dist/cli/devbox-sandbox-slots.d.ts.map +1 -1
  203. package/dist/cli/devbox-sandbox-slots.js.map +1 -1
  204. package/dist/cli/devbox-session.d.ts +2 -2
  205. package/dist/cli/devbox-session.d.ts.map +1 -1
  206. package/dist/cli/devbox-session.js +2 -2
  207. package/dist/cli/devbox-session.js.map +1 -1
  208. package/dist/cli/devbox-setup-checkout.d.ts +1 -1
  209. package/dist/cli/devbox-setup-checkout.d.ts.map +1 -1
  210. package/dist/cli/devbox-setup-checkout.js.map +1 -1
  211. package/dist/cli/devbox-setup-command.d.ts.map +1 -1
  212. package/dist/cli/devbox-setup-command.js.map +1 -1
  213. package/dist/cli/devbox-setup-env.d.ts.map +1 -1
  214. package/dist/cli/devbox-setup-env.js.map +1 -1
  215. package/dist/cli/devbox-setup-service-templates.d.ts +1 -1
  216. package/dist/cli/devbox-setup-service-templates.d.ts.map +1 -1
  217. package/dist/cli/devbox-setup-service-templates.js +2 -2
  218. package/dist/cli/devbox-setup-service-templates.js.map +1 -1
  219. package/dist/cli/devbox-setup-service.d.ts +6 -6
  220. package/dist/cli/devbox-setup-service.d.ts.map +1 -1
  221. package/dist/cli/devbox-setup-service.js +20 -20
  222. package/dist/cli/devbox-setup-service.js.map +1 -1
  223. package/dist/cli/devbox-setup.d.ts +8 -8
  224. package/dist/cli/devbox-setup.d.ts.map +1 -1
  225. package/dist/cli/devbox-setup.js +27 -27
  226. package/dist/cli/devbox-setup.js.map +1 -1
  227. package/dist/cli/devbox-upgrade-lock.d.ts.map +1 -1
  228. package/dist/cli/devbox-upgrade-lock.js.map +1 -1
  229. package/dist/cli/devbox.d.ts +4 -4
  230. package/dist/cli/devbox.d.ts.map +1 -1
  231. package/dist/cli/devbox.js +47 -47
  232. package/dist/cli/devbox.js.map +1 -1
  233. package/dist/cli/external-admin.d.ts +2 -2
  234. package/dist/cli/external-admin.d.ts.map +1 -1
  235. package/dist/cli/external-admin.js +8 -8
  236. package/dist/cli/external-admin.js.map +1 -1
  237. package/dist/cli/external-projects.d.ts +2 -2
  238. package/dist/cli/external-projects.d.ts.map +1 -1
  239. package/dist/cli/external-projects.js +5 -5
  240. package/dist/cli/external-projects.js.map +1 -1
  241. package/dist/cli/feedback.d.ts +26 -0
  242. package/dist/cli/feedback.d.ts.map +1 -0
  243. package/dist/cli/feedback.js +233 -0
  244. package/dist/cli/feedback.js.map +1 -0
  245. package/dist/cli/finance-pagination.d.ts +1 -1
  246. package/dist/cli/finance-pagination.d.ts.map +1 -1
  247. package/dist/cli/finance-pagination.js.map +1 -1
  248. package/dist/cli/finance-payloads.d.ts +2 -2
  249. package/dist/cli/finance-payloads.d.ts.map +1 -1
  250. package/dist/cli/finance-payloads.js +18 -18
  251. package/dist/cli/finance-payloads.js.map +1 -1
  252. package/dist/cli/finance-recurring.d.ts +1 -1
  253. package/dist/cli/finance-recurring.d.ts.map +1 -1
  254. package/dist/cli/finance-recurring.js +9 -9
  255. package/dist/cli/finance-recurring.js.map +1 -1
  256. package/dist/cli/finance-resources.d.ts.map +1 -1
  257. package/dist/cli/finance-resources.js.map +1 -1
  258. package/dist/cli/finance.d.ts +2 -2
  259. package/dist/cli/finance.d.ts.map +1 -1
  260. package/dist/cli/finance.js +48 -48
  261. package/dist/cli/finance.js.map +1 -1
  262. package/dist/cli/help-devbox.d.ts.map +1 -1
  263. package/dist/cli/help-devbox.js.map +1 -1
  264. package/dist/cli/help-format.d.ts +9 -0
  265. package/dist/cli/help-format.d.ts.map +1 -0
  266. package/dist/cli/help-format.js +26 -0
  267. package/dist/cli/help-format.js.map +1 -0
  268. package/dist/cli/help-global.d.ts.map +1 -1
  269. package/dist/cli/help-global.js.map +1 -1
  270. package/dist/cli/help.d.ts +1 -1
  271. package/dist/cli/help.d.ts.map +1 -1
  272. package/dist/cli/help.js +16 -35
  273. package/dist/cli/help.js.map +1 -1
  274. package/dist/cli/index.d.ts.map +1 -1
  275. package/dist/cli/index.js +8 -2
  276. package/dist/cli/index.js.map +1 -1
  277. package/dist/cli/operational-cli.d.ts +3 -0
  278. package/dist/cli/operational-cli.d.ts.map +1 -0
  279. package/dist/cli/operational-cli.js +272 -0
  280. package/dist/cli/operational-cli.js.map +1 -0
  281. package/dist/cli/operational-domain.d.ts +156 -0
  282. package/dist/cli/operational-domain.d.ts.map +1 -0
  283. package/dist/cli/operational-domain.js +159 -0
  284. package/dist/cli/operational-domain.js.map +1 -0
  285. package/dist/cli/operational-evidence.d.ts +13 -0
  286. package/dist/cli/operational-evidence.d.ts.map +1 -0
  287. package/dist/cli/operational-evidence.js +57 -0
  288. package/dist/cli/operational-evidence.js.map +1 -0
  289. package/dist/cli/operational-files.d.ts +6 -0
  290. package/dist/cli/operational-files.d.ts.map +1 -0
  291. package/dist/cli/operational-files.js +70 -0
  292. package/dist/cli/operational-files.js.map +1 -0
  293. package/dist/cli/operational-graph.d.ts +2 -0
  294. package/dist/cli/operational-graph.d.ts.map +1 -0
  295. package/dist/cli/operational-graph.js +118 -0
  296. package/dist/cli/operational-graph.js.map +1 -0
  297. package/dist/cli/operational-receipts.d.ts +609 -0
  298. package/dist/cli/operational-receipts.d.ts.map +1 -0
  299. package/dist/cli/operational-receipts.js +218 -0
  300. package/dist/cli/operational-receipts.js.map +1 -0
  301. package/dist/cli/operational-schema.d.ts +274 -0
  302. package/dist/cli/operational-schema.d.ts.map +1 -0
  303. package/dist/cli/operational-schema.js +180 -0
  304. package/dist/cli/operational-schema.js.map +1 -0
  305. package/dist/cli/operational-search.d.ts +228 -0
  306. package/dist/cli/operational-search.d.ts.map +1 -0
  307. package/dist/cli/operational-search.js +291 -0
  308. package/dist/cli/operational-search.js.map +1 -0
  309. package/dist/cli/operational-store.d.ts +121 -0
  310. package/dist/cli/operational-store.d.ts.map +1 -0
  311. package/dist/cli/operational-store.js +321 -0
  312. package/dist/cli/operational-store.js.map +1 -0
  313. package/dist/cli/operational-transfer.d.ts +289 -0
  314. package/dist/cli/operational-transfer.d.ts.map +1 -0
  315. package/dist/cli/operational-transfer.js +254 -0
  316. package/dist/cli/operational-transfer.js.map +1 -0
  317. package/dist/cli/render.d.ts.map +1 -1
  318. package/dist/cli/render.js +8 -8
  319. package/dist/cli/render.js.map +1 -1
  320. package/dist/cli/resources-command.d.ts +1 -1
  321. package/dist/cli/resources-command.d.ts.map +1 -1
  322. package/dist/cli/resources-command.js +29 -1
  323. package/dist/cli/resources-command.js.map +1 -1
  324. package/dist/cli/resources-config.d.ts +17 -9
  325. package/dist/cli/resources-config.d.ts.map +1 -1
  326. package/dist/cli/resources-config.js +47 -11
  327. package/dist/cli/resources-config.js.map +1 -1
  328. package/dist/cli/resources-diagnostics.d.ts.map +1 -1
  329. package/dist/cli/resources-diagnostics.js.map +1 -1
  330. package/dist/cli/resources-entry.d.ts.map +1 -1
  331. package/dist/cli/resources-entry.js +2 -2
  332. package/dist/cli/resources-entry.js.map +1 -1
  333. package/dist/cli/resources-queue.d.ts +49 -16
  334. package/dist/cli/resources-queue.d.ts.map +1 -1
  335. package/dist/cli/resources-queue.js +193 -154
  336. package/dist/cli/resources-queue.js.map +1 -1
  337. package/dist/cli/resources-setup.d.ts +19 -6
  338. package/dist/cli/resources-setup.d.ts.map +1 -1
  339. package/dist/cli/resources-setup.js +103 -35
  340. package/dist/cli/resources-setup.js.map +1 -1
  341. package/dist/cli/resources-slots.d.ts +87 -0
  342. package/dist/cli/resources-slots.d.ts.map +1 -0
  343. package/dist/cli/resources-slots.js +369 -0
  344. package/dist/cli/resources-slots.js.map +1 -0
  345. package/dist/cli/resources-test-fixtures.d.ts +50 -0
  346. package/dist/cli/resources-test-fixtures.d.ts.map +1 -0
  347. package/dist/cli/resources-test-fixtures.js +165 -0
  348. package/dist/cli/resources-test-fixtures.js.map +1 -0
  349. package/dist/cli/resources.d.ts.map +1 -1
  350. package/dist/cli/resources.js +72 -34
  351. package/dist/cli/resources.js.map +1 -1
  352. package/dist/cli/select.d.ts.map +1 -1
  353. package/dist/cli/select.js.map +1 -1
  354. package/dist/cli/selection.d.ts +6 -6
  355. package/dist/cli/selection.d.ts.map +1 -1
  356. package/dist/cli/selection.js +32 -32
  357. package/dist/cli/selection.js.map +1 -1
  358. package/dist/cli/task-description.d.ts +5 -5
  359. package/dist/cli/task-description.d.ts.map +1 -1
  360. package/dist/cli/task-description.js +28 -28
  361. package/dist/cli/task-description.js.map +1 -1
  362. package/dist/cli/task-template-command.d.ts +6 -6
  363. package/dist/cli/task-template-command.d.ts.map +1 -1
  364. package/dist/cli/task-template-command.js +34 -34
  365. package/dist/cli/task-template-command.js.map +1 -1
  366. package/dist/cli/task-templates.d.ts +1 -1
  367. package/dist/cli/task-templates.d.ts.map +1 -1
  368. package/dist/cli/task-templates.js +2 -2
  369. package/dist/cli/task-templates.js.map +1 -1
  370. package/dist/cli/timezone.d.ts +1 -1
  371. package/dist/cli/timezone.d.ts.map +1 -1
  372. package/dist/cli/timezone.js.map +1 -1
  373. package/dist/cli/tiptap.d.ts +1 -1
  374. package/dist/cli/tiptap.d.ts.map +1 -1
  375. package/dist/cli/tiptap.js +22 -22
  376. package/dist/cli/tiptap.js.map +1 -1
  377. package/dist/cli/update.d.ts +1 -1
  378. package/dist/cli/update.d.ts.map +1 -1
  379. package/dist/cli/update.js.map +1 -1
  380. package/dist/cli/upgrade.d.ts.map +1 -1
  381. package/dist/cli/upgrade.js.map +1 -1
  382. package/dist/cms-site.d.ts.map +1 -1
  383. package/dist/cms-site.js.map +1 -1
  384. package/dist/epm.d.ts +1 -1
  385. package/dist/epm.d.ts.map +1 -1
  386. package/dist/epm.js +12 -12
  387. package/dist/epm.js.map +1 -1
  388. package/dist/errors.d.ts +1 -1
  389. package/dist/errors.d.ts.map +1 -1
  390. package/dist/errors.js.map +1 -1
  391. package/dist/external-projects-public-assets-node.d.ts +5 -5
  392. package/dist/external-projects-public-assets-node.d.ts.map +1 -1
  393. package/dist/external-projects-public-assets-node.js +11 -11
  394. package/dist/external-projects-public-assets-node.js.map +1 -1
  395. package/dist/external-projects-public-assets.d.ts +1 -1
  396. package/dist/external-projects-public-assets.d.ts.map +1 -1
  397. package/dist/external-projects-public-assets.js.map +1 -1
  398. package/dist/external-projects.d.ts +5 -5
  399. package/dist/external-projects.d.ts.map +1 -1
  400. package/dist/external-projects.js +14 -14
  401. package/dist/external-projects.js.map +1 -1
  402. package/dist/index.d.ts +25 -25
  403. package/dist/index.d.ts.map +1 -1
  404. package/dist/index.js +68 -68
  405. package/dist/index.js.map +1 -1
  406. package/dist/operational-graph/contracts.d.ts +461 -0
  407. package/dist/operational-graph/contracts.d.ts.map +1 -0
  408. package/dist/operational-graph/contracts.js +144 -0
  409. package/dist/operational-graph/contracts.js.map +1 -0
  410. package/dist/operational-graph/domain.d.ts +181 -0
  411. package/dist/operational-graph/domain.d.ts.map +1 -0
  412. package/dist/operational-graph/domain.js +166 -0
  413. package/dist/operational-graph/domain.js.map +1 -0
  414. package/dist/operational-graph/duplicate.d.ts +218 -0
  415. package/dist/operational-graph/duplicate.d.ts.map +1 -0
  416. package/dist/operational-graph/duplicate.js +161 -0
  417. package/dist/operational-graph/duplicate.js.map +1 -0
  418. package/dist/operational-graph/projection.d.ts +5 -0
  419. package/dist/operational-graph/projection.d.ts.map +1 -0
  420. package/dist/operational-graph/projection.js +111 -0
  421. package/dist/operational-graph/projection.js.map +1 -0
  422. package/dist/operational-graph/reader.d.ts +333 -0
  423. package/dist/operational-graph/reader.d.ts.map +1 -0
  424. package/dist/operational-graph/reader.js +52 -0
  425. package/dist/operational-graph/reader.js.map +1 -0
  426. package/dist/operational-graph/store.d.ts +118 -0
  427. package/dist/operational-graph/store.d.ts.map +1 -0
  428. package/dist/operational-graph/store.js +58 -0
  429. package/dist/operational-graph/store.js.map +1 -0
  430. package/dist/operational-planner/assignment.d.ts +14 -0
  431. package/dist/operational-planner/assignment.d.ts.map +1 -0
  432. package/dist/operational-planner/assignment.js +146 -0
  433. package/dist/operational-planner/assignment.js.map +1 -0
  434. package/dist/operational-planner/contracts.d.ts +563 -0
  435. package/dist/operational-planner/contracts.d.ts.map +1 -0
  436. package/dist/operational-planner/contracts.js +127 -0
  437. package/dist/operational-planner/contracts.js.map +1 -0
  438. package/dist/operational-planner/planner.d.ts +24 -0
  439. package/dist/operational-planner/planner.d.ts.map +1 -0
  440. package/dist/operational-planner/planner.js +96 -0
  441. package/dist/operational-planner/planner.js.map +1 -0
  442. package/dist/operational-search/artifact.d.ts +70 -0
  443. package/dist/operational-search/artifact.d.ts.map +1 -0
  444. package/dist/operational-search/artifact.js +97 -0
  445. package/dist/operational-search/artifact.js.map +1 -0
  446. package/dist/operational-search/cache.d.ts +46 -0
  447. package/dist/operational-search/cache.d.ts.map +1 -0
  448. package/dist/operational-search/cache.js +248 -0
  449. package/dist/operational-search/cache.js.map +1 -0
  450. package/dist/operational-search/download.d.ts +17 -0
  451. package/dist/operational-search/download.d.ts.map +1 -0
  452. package/dist/operational-search/download.js +283 -0
  453. package/dist/operational-search/download.js.map +1 -0
  454. package/dist/operational-search/index.d.ts +58 -0
  455. package/dist/operational-search/index.d.ts.map +1 -0
  456. package/dist/operational-search/index.js +156 -0
  457. package/dist/operational-search/index.js.map +1 -0
  458. package/dist/operational-search/lexical.d.ts +28 -0
  459. package/dist/operational-search/lexical.d.ts.map +1 -0
  460. package/dist/operational-search/lexical.js +88 -0
  461. package/dist/operational-search/lexical.js.map +1 -0
  462. package/dist/operational-search/python-adapter-code.d.ts +58 -0
  463. package/dist/operational-search/python-adapter-code.d.ts.map +1 -0
  464. package/dist/operational-search/python-adapter-code.js +12 -0
  465. package/dist/operational-search/python-adapter-code.js.map +1 -0
  466. package/dist/operational-search/python-runtime.d.ts +65 -0
  467. package/dist/operational-search/python-runtime.d.ts.map +1 -0
  468. package/dist/operational-search/python-runtime.js +348 -0
  469. package/dist/operational-search/python-runtime.js.map +1 -0
  470. package/dist/operational-search/query.d.ts +42 -0
  471. package/dist/operational-search/query.d.ts.map +1 -0
  472. package/dist/operational-search/query.js +89 -0
  473. package/dist/operational-search/query.js.map +1 -0
  474. package/dist/operational-search/runtime.d.ts +6 -0
  475. package/dist/operational-search/runtime.d.ts.map +1 -0
  476. package/dist/operational-search/runtime.js +13 -0
  477. package/dist/operational-search/runtime.js.map +1 -0
  478. package/dist/operational-sync/engine.d.ts +9 -0
  479. package/dist/operational-sync/engine.d.ts.map +1 -0
  480. package/dist/operational-sync/engine.js +191 -0
  481. package/dist/operational-sync/engine.js.map +1 -0
  482. package/dist/operational-sync/protocol.d.ts +985 -0
  483. package/dist/operational-sync/protocol.d.ts.map +1 -0
  484. package/dist/operational-sync/protocol.js +212 -0
  485. package/dist/operational-sync/protocol.js.map +1 -0
  486. package/dist/operational-sync/replica.d.ts +595 -0
  487. package/dist/operational-sync/replica.d.ts.map +1 -0
  488. package/dist/operational-sync/replica.js +214 -0
  489. package/dist/operational-sync/replica.js.map +1 -0
  490. package/dist/platform-calendar-types.d.ts +1 -1
  491. package/dist/platform-calendar-types.d.ts.map +1 -1
  492. package/dist/platform-calendar-types.js.map +1 -1
  493. package/dist/platform-calendar.d.ts +3 -3
  494. package/dist/platform-calendar.d.ts.map +1 -1
  495. package/dist/platform-calendar.js +23 -23
  496. package/dist/platform-calendar.js.map +1 -1
  497. package/dist/platform-devbox-fleet.d.ts +1 -1
  498. package/dist/platform-devbox-fleet.d.ts.map +1 -1
  499. package/dist/platform-devbox-fleet.js +2 -2
  500. package/dist/platform-devbox-fleet.js.map +1 -1
  501. package/dist/platform-devbox.d.ts +2 -2
  502. package/dist/platform-devbox.d.ts.map +1 -1
  503. package/dist/platform-devbox.js +8 -8
  504. package/dist/platform-devbox.js.map +1 -1
  505. package/dist/platform-external-admin.d.ts +2 -2
  506. package/dist/platform-external-admin.d.ts.map +1 -1
  507. package/dist/platform-external-admin.js +6 -6
  508. package/dist/platform-external-admin.js.map +1 -1
  509. package/dist/platform-finance-pagination.d.ts.map +1 -1
  510. package/dist/platform-finance-pagination.js.map +1 -1
  511. package/dist/platform-finance.d.ts +3 -3
  512. package/dist/platform-finance.d.ts.map +1 -1
  513. package/dist/platform-finance.js +46 -46
  514. package/dist/platform-finance.js.map +1 -1
  515. package/dist/platform-sdk-auth.d.ts.map +1 -1
  516. package/dist/platform-sdk-auth.js.map +1 -1
  517. package/dist/platform.d.ts +46 -46
  518. package/dist/platform.d.ts.map +1 -1
  519. package/dist/platform.js +90 -90
  520. package/dist/platform.js.map +1 -1
  521. package/dist/portable-sources.json +25 -0
  522. package/dist/query.d.ts +2 -2
  523. package/dist/query.d.ts.map +1 -1
  524. package/dist/query.js.map +1 -1
  525. package/dist/storage.d.ts +3 -3
  526. package/dist/storage.d.ts.map +1 -1
  527. package/dist/storage.js +43 -43
  528. package/dist/storage.js.map +1 -1
  529. package/dist/task-templates.d.ts +1 -1
  530. package/dist/task-templates.d.ts.map +1 -1
  531. package/dist/task-templates.js +13 -13
  532. package/dist/task-templates.js.map +1 -1
  533. package/dist/types.d.ts.map +1 -1
  534. package/dist/types.js.map +1 -1
  535. package/package.json +13 -7
  536. package/dist/cli/devbox-playground-runtime.acceptance.d.ts +0 -2
  537. package/dist/cli/devbox-playground-runtime.acceptance.d.ts.map +0 -1
  538. package/dist/cli/devbox-playground-runtime.acceptance.js +0 -216
  539. package/dist/cli/devbox-playground-runtime.acceptance.js.map +0 -1
@@ -0,0 +1,56 @@
1
+ export type InternalApiQueryValue = string | number | boolean | null | undefined;
2
+ export type InternalApiQuery = Record<string, InternalApiQueryValue>;
3
+ export type InternalApiFetchInit = Omit<RequestInit, 'headers'> & {
4
+ baseUrl?: string;
5
+ headers?: HeadersInit;
6
+ query?: InternalApiQuery;
7
+ };
8
+ export type InternalApiClientOptions = {
9
+ baseUrl?: string;
10
+ defaultHeaders?: HeadersInit;
11
+ fetch?: typeof fetch;
12
+ };
13
+ type HeaderAccessor = Pick<Headers, 'get'>;
14
+ export { InternalApiError } from "./internal-api-error.js";
15
+ export declare function encodePathSegment(value: string): string;
16
+ export declare function getConfiguredInternalApiBaseUrl(): string;
17
+ export declare function getConfiguredTasksApiBaseUrl(): string;
18
+ export declare function withTaskApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
19
+ export declare function getConfiguredMailApiBaseUrl(): string;
20
+ export declare function withMailApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
21
+ export declare function getConfiguredLearnApiBaseUrl(): string;
22
+ export declare function withLearnApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
23
+ export declare function getConfiguredTeachApiBaseUrl(): string;
24
+ export declare function withTeachApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
25
+ export declare function getConfiguredPayApiBaseUrl(): string;
26
+ export declare function withPayApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
27
+ export declare function getConfiguredContactsApiBaseUrl(): string;
28
+ export declare function withContactsApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
29
+ /**
30
+ * `/api/v1/tulearn/bootstrap` is owned by apps/learn but is also consumed by
31
+ * apps/teach. Pin the call to the CALLING app's own origin so its app-session
32
+ * audience (learn or teach) matches — never cross-pin teach → learn (learn's
33
+ * proxy would reject a teach-audience session).
34
+ */
35
+ export declare function withEducationBootstrapBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
36
+ export declare function getConfiguredFinanceApiBaseUrl(): string;
37
+ export declare function withFinanceApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
38
+ export declare function resolveInternalApiUrl(path: string, baseUrl?: string): string;
39
+ export declare function createInternalApiClient(options?: InternalApiClientOptions): {
40
+ fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
41
+ json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
42
+ };
43
+ /**
44
+ * Creates Internal API client options that forward auth-relevant headers
45
+ * from an incoming request context (for example `next/headers()` in RSC).
46
+ */
47
+ export declare function withForwardedInternalApiAuth(requestHeaders: HeaderAccessor, options?: InternalApiClientOptions): InternalApiClientOptions;
48
+ export declare const internalApiClient: {
49
+ fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
50
+ json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
51
+ };
52
+ export declare function getInternalApiClient(options?: InternalApiClientOptions): {
53
+ fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
54
+ json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
55
+ };
56
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../node_modules/.cache/sdk-portable-OgYuDt/src/_portable/internal-api/client.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,CAAC;AACd,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF,KAAK,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AA0D3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAwE3D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,UAE9C;AAiDD,wBAAgB,+BAA+B,WAY9C;AA+BD,wBAAgB,4BAA4B,WAW3C;AAED,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,2BAA2B,WAS1C;AAED,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AA8CD,wBAAgB,4BAA4B,WAS3C;AAED,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,4BAA4B,WAS3C;AAED,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AASD,wBAAgB,0BAA0B,WASzC;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAWD,wBAAgB,+BAA+B,WAS9C;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAgB1B;AASD,wBAAgB,8BAA8B,WAS7C;AAED,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,UAkBnE;AAqGD,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,wBAA6B;IAgBpC,KAAK,SAdgB,MAAM,SAAQ,oBAAoB;IAgBjD,IAAI,CAAC,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;EAY3E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,cAAc,EAC9B,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAgJ1B;AAED,eAAO,MAAM,iBAAiB;kBAvLL,MAAM,SAAQ,oBAAoB;SAgB5C,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;CAuKlB,CAAC;AAE3D,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,wBAAwB;kBAzL9C,MAAM,SAAQ,oBAAoB;SAgB5C,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;EA2K3E"}
@@ -0,0 +1,601 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.internalApiClient = exports.InternalApiError = void 0;
4
+ exports.encodePathSegment = encodePathSegment;
5
+ exports.getConfiguredInternalApiBaseUrl = getConfiguredInternalApiBaseUrl;
6
+ exports.getConfiguredTasksApiBaseUrl = getConfiguredTasksApiBaseUrl;
7
+ exports.withTaskApiBaseUrl = withTaskApiBaseUrl;
8
+ exports.getConfiguredMailApiBaseUrl = getConfiguredMailApiBaseUrl;
9
+ exports.withMailApiBaseUrl = withMailApiBaseUrl;
10
+ exports.getConfiguredLearnApiBaseUrl = getConfiguredLearnApiBaseUrl;
11
+ exports.withLearnApiBaseUrl = withLearnApiBaseUrl;
12
+ exports.getConfiguredTeachApiBaseUrl = getConfiguredTeachApiBaseUrl;
13
+ exports.withTeachApiBaseUrl = withTeachApiBaseUrl;
14
+ exports.getConfiguredPayApiBaseUrl = getConfiguredPayApiBaseUrl;
15
+ exports.withPayApiBaseUrl = withPayApiBaseUrl;
16
+ exports.getConfiguredContactsApiBaseUrl = getConfiguredContactsApiBaseUrl;
17
+ exports.withContactsApiBaseUrl = withContactsApiBaseUrl;
18
+ exports.withEducationBootstrapBaseUrl = withEducationBootstrapBaseUrl;
19
+ exports.getConfiguredFinanceApiBaseUrl = getConfiguredFinanceApiBaseUrl;
20
+ exports.withFinanceApiBaseUrl = withFinanceApiBaseUrl;
21
+ exports.resolveInternalApiUrl = resolveInternalApiUrl;
22
+ exports.createInternalApiClient = createInternalApiClient;
23
+ exports.withForwardedInternalApiAuth = withForwardedInternalApiAuth;
24
+ exports.getInternalApiClient = getInternalApiClient;
25
+ const internal_api_error_js_1 = require("./internal-api-error.js");
26
+ const request_headers_js_1 = require("./request-headers.js");
27
+ const APP_SESSION_COOKIE_NAME = 'tuturuuu_app_session';
28
+ const SUPABASE_AUTH_COOKIE_PATTERN = /^sb-[a-z0-9-]+-auth-token(?:\.\d+)?$/i;
29
+ const KNOWN_CUSTOM_SATELLITE_HOSTS = new Set(['nova.ai.vn', 'rewise.me']);
30
+ const KNOWN_NON_PLATFORM_TUTURUUU_HOSTS = new Set([
31
+ 'apps.tuturuuu.com',
32
+ 'cms.tuturuuu.com',
33
+ 'calendar.tuturuuu.com',
34
+ 'chat.tuturuuu.com',
35
+ 'drive.tuturuuu.com',
36
+ 'mail.tuturuuu.com',
37
+ 'meet.tuturuuu.com',
38
+ 'qr.tuturuuu.com',
39
+ 'mira.tuturuuu.com',
40
+ 'tasks.tuturuuu.com',
41
+ 'finance.tuturuuu.com',
42
+ 'inventory.tuturuuu.com',
43
+ 'storefront.tuturuuu.com',
44
+ 'tanstack.tuturuuu.com',
45
+ 'track.tuturuuu.com',
46
+ 'learn.tuturuuu.com',
47
+ 'teach.tuturuuu.com',
48
+ 'pay.tuturuuu.com',
49
+ 'contacts.tuturuuu.com',
50
+ 'forms.tuturuuu.com',
51
+ 'lettin.tuturuuu.com',
52
+ 'git.tuturuuu.com',
53
+ 'hive.tuturuuu.com',
54
+ 'mind.tuturuuu.com',
55
+ ]);
56
+ const KNOWN_NON_PLATFORM_LOCALHOST_PORTS = new Set([
57
+ '7804',
58
+ '7805',
59
+ '7806',
60
+ '7807',
61
+ '7808',
62
+ '7809',
63
+ '7810',
64
+ '7811',
65
+ '7812',
66
+ '7813',
67
+ '7814',
68
+ '7815',
69
+ '7816',
70
+ '7817',
71
+ '7818',
72
+ '7819',
73
+ '7820',
74
+ '7821',
75
+ '7822',
76
+ '7824',
77
+ '7826',
78
+ '7827',
79
+ '7828',
80
+ '7830',
81
+ '7833',
82
+ ]);
83
+ var internal_api_error_js_2 = require("./internal-api-error.js");
84
+ Object.defineProperty(exports, "InternalApiError", { enumerable: true, get: function () { return internal_api_error_js_2.InternalApiError; } });
85
+ function tryParseAbsoluteUrl(value) {
86
+ try {
87
+ return new URL(value);
88
+ }
89
+ catch {
90
+ return null;
91
+ }
92
+ }
93
+ function resolveConfiguredOrigin(value) {
94
+ if (!value) {
95
+ return null;
96
+ }
97
+ const [firstValue] = value
98
+ .split(/[,\n]/u)
99
+ .map((entry) => entry.trim())
100
+ .filter(Boolean);
101
+ if (!firstValue) {
102
+ return null;
103
+ }
104
+ const normalized = /^[a-z]+:\/\//iu.test(firstValue)
105
+ ? firstValue
106
+ : `https://${firstValue}`;
107
+ return tryParseAbsoluteUrl(normalized)?.origin ?? null;
108
+ }
109
+ function isKnownNonPlatformSatelliteOrigin(origin) {
110
+ const url = tryParseAbsoluteUrl(origin);
111
+ if (!url) {
112
+ return false;
113
+ }
114
+ const hostname = url.hostname.toLowerCase();
115
+ if (KNOWN_CUSTOM_SATELLITE_HOSTS.has(hostname)) {
116
+ return true;
117
+ }
118
+ if (KNOWN_NON_PLATFORM_TUTURUUU_HOSTS.has(hostname)) {
119
+ return true;
120
+ }
121
+ if (hostname.endsWith('.tuturuuu.localhost')) {
122
+ return true;
123
+ }
124
+ if (['localhost', '127.0.0.1', '::1', '[::1]'].includes(hostname) &&
125
+ KNOWN_NON_PLATFORM_LOCALHOST_PORTS.has(url.port)) {
126
+ return true;
127
+ }
128
+ return false;
129
+ }
130
+ function resolveNextPublicAppUrlAsWebOrigin() {
131
+ const origin = resolveConfiguredOrigin(process.env.NEXT_PUBLIC_APP_URL);
132
+ if (!origin || isKnownNonPlatformSatelliteOrigin(origin)) {
133
+ return null;
134
+ }
135
+ return origin;
136
+ }
137
+ function encodePathSegment(value) {
138
+ return encodeURIComponent(value);
139
+ }
140
+ function normalizeBaseUrl(baseUrl) {
141
+ let end = baseUrl.length;
142
+ while (end > 0 && baseUrl.charCodeAt(end - 1) === 47) {
143
+ end -= 1;
144
+ }
145
+ return end === baseUrl.length ? baseUrl : baseUrl.slice(0, end);
146
+ }
147
+ function isProductionDeployment() {
148
+ if (process.env.VERCEL_ENV) {
149
+ return process.env.VERCEL_ENV === 'production';
150
+ }
151
+ return process.env.NODE_ENV === 'production';
152
+ }
153
+ function normalizePath(path) {
154
+ if (/^https?:\/\//.test(path)) {
155
+ return path;
156
+ }
157
+ return path.startsWith('/') ? path : `/${path}`;
158
+ }
159
+ function appendQuery(path, query) {
160
+ if (!query || Object.keys(query).length === 0) {
161
+ return path;
162
+ }
163
+ const normalizedPath = normalizePath(path);
164
+ const isAbsoluteUrl = /^https?:\/\//.test(normalizedPath);
165
+ const url = isAbsoluteUrl
166
+ ? new URL(normalizedPath)
167
+ : new URL(normalizedPath, 'http://internal-api.local');
168
+ for (const [key, value] of Object.entries(query)) {
169
+ if (value === undefined || value === null) {
170
+ continue;
171
+ }
172
+ url.searchParams.set(key, String(value));
173
+ }
174
+ return isAbsoluteUrl ? url.toString() : `${url.pathname}${url.search}`;
175
+ }
176
+ function getConfiguredInternalApiBaseUrl() {
177
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.INTERNAL_WEB_API_ORIGIN) ||
178
+ resolveConfiguredOrigin(process.env.WEB_APP_URL) ||
179
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_WEB_APP_URL) ||
180
+ resolveNextPublicAppUrlAsWebOrigin() ||
181
+ resolveConfiguredOrigin(process.env.COOLIFY_URL) ||
182
+ resolveConfiguredOrigin(process.env.COOLIFY_FQDN) ||
183
+ (isProductionDeployment()
184
+ ? 'https://tuturuuu.com'
185
+ : 'https://tuturuuu.localhost'));
186
+ }
187
+ function isTasksApiProxyBrowserRuntime() {
188
+ const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
189
+ ? globalThis.location
190
+ : undefined;
191
+ const hostname = runtimeLocation?.hostname?.toLowerCase();
192
+ return /^(?:tasks|calendar)\.tuturuuu\.(?:com|localhost)$/u.test(hostname ?? '');
193
+ }
194
+ function isMailAppRuntime() {
195
+ if (typeof process === 'undefined') {
196
+ return false;
197
+ }
198
+ const packageName = process.env.npm_package_name;
199
+ if (packageName === '@tuturuuu/mail') {
200
+ return true;
201
+ }
202
+ try {
203
+ return process.cwd().replace(/\\/gu, '/').endsWith('/apps/mail');
204
+ }
205
+ catch {
206
+ return false;
207
+ }
208
+ }
209
+ function getConfiguredTasksApiBaseUrl() {
210
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.TASKS_APP_URL) ||
211
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TASKS_APP_URL) ||
212
+ resolveConfiguredOrigin(process.env.TUTURUUU_TASKS_BASE_URL) ||
213
+ resolveConfiguredOrigin(process.env.TUDO_APP_URL) ||
214
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TUDO_APP_URL) ||
215
+ (isProductionDeployment()
216
+ ? 'https://tasks.tuturuuu.com'
217
+ : 'https://tasks.tuturuuu.localhost'));
218
+ }
219
+ function withTaskApiBaseUrl(options = {}) {
220
+ if (options.baseUrl || isTasksApiProxyBrowserRuntime()) {
221
+ return options;
222
+ }
223
+ return {
224
+ ...options,
225
+ baseUrl: getConfiguredTasksApiBaseUrl(),
226
+ };
227
+ }
228
+ function getConfiguredMailApiBaseUrl() {
229
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.MAIL_APP_URL) ||
230
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_MAIL_APP_URL) ||
231
+ resolveConfiguredOrigin(process.env.TUTURUUU_MAIL_BASE_URL) ||
232
+ (isProductionDeployment()
233
+ ? 'https://mail.tuturuuu.com'
234
+ : 'https://mail.tuturuuu.localhost'));
235
+ }
236
+ function withMailApiBaseUrl(options = {}) {
237
+ if (options.baseUrl || isMailAppRuntime()) {
238
+ return options;
239
+ }
240
+ return {
241
+ ...options,
242
+ baseUrl: getConfiguredMailApiBaseUrl(),
243
+ };
244
+ }
245
+ function isCurrentBrowserHostname(...hostnames) {
246
+ const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
247
+ ? globalThis.location
248
+ : undefined;
249
+ const hostname = runtimeLocation?.hostname?.toLowerCase();
250
+ return hostname !== undefined && hostnames.includes(hostname);
251
+ }
252
+ function isCurrentAppServerRuntime(packageName, appDir) {
253
+ if (typeof process === 'undefined') {
254
+ return false;
255
+ }
256
+ if (process.env.npm_package_name === packageName) {
257
+ return true;
258
+ }
259
+ try {
260
+ return process.cwd().replace(/\\/gu, '/').endsWith(appDir);
261
+ }
262
+ catch {
263
+ return false;
264
+ }
265
+ }
266
+ function isLearnAppRuntime() {
267
+ return (isCurrentBrowserHostname('learn.tuturuuu.com', 'learn.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/learn', '/apps/learn'));
268
+ }
269
+ function isTeachAppRuntime() {
270
+ return (isCurrentBrowserHostname('teach.tuturuuu.com', 'teach.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/teach', '/apps/teach'));
271
+ }
272
+ function getConfiguredLearnApiBaseUrl() {
273
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.LEARN_APP_URL) ||
274
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_LEARN_APP_URL) ||
275
+ resolveConfiguredOrigin(process.env.TUTURUUU_LEARN_BASE_URL) ||
276
+ (isProductionDeployment()
277
+ ? 'https://learn.tuturuuu.com'
278
+ : 'https://learn.tuturuuu.localhost'));
279
+ }
280
+ function withLearnApiBaseUrl(options = {}) {
281
+ if (options.baseUrl || isLearnAppRuntime()) {
282
+ return options;
283
+ }
284
+ return {
285
+ ...options,
286
+ baseUrl: getConfiguredLearnApiBaseUrl(),
287
+ };
288
+ }
289
+ function getConfiguredTeachApiBaseUrl() {
290
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.TEACH_APP_URL) ||
291
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TEACH_APP_URL) ||
292
+ resolveConfiguredOrigin(process.env.TUTURUUU_TEACH_BASE_URL) ||
293
+ (isProductionDeployment()
294
+ ? 'https://teach.tuturuuu.com'
295
+ : 'https://teach.tuturuuu.localhost'));
296
+ }
297
+ function withTeachApiBaseUrl(options = {}) {
298
+ if (options.baseUrl || isTeachAppRuntime()) {
299
+ return options;
300
+ }
301
+ return {
302
+ ...options,
303
+ baseUrl: getConfiguredTeachApiBaseUrl(),
304
+ };
305
+ }
306
+ function isPayAppRuntime() {
307
+ return (isCurrentBrowserHostname('pay.tuturuuu.com', 'pay.tuturuuu.localhost') ||
308
+ isCurrentAppServerRuntime('@tuturuuu/pay', '/apps/pay'));
309
+ }
310
+ function getConfiguredPayApiBaseUrl() {
311
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.PAY_APP_URL) ||
312
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_PAY_APP_URL) ||
313
+ resolveConfiguredOrigin(process.env.TUTURUUU_PAY_BASE_URL) ||
314
+ (isProductionDeployment()
315
+ ? 'https://pay.tuturuuu.com'
316
+ : 'https://pay.tuturuuu.localhost'));
317
+ }
318
+ function withPayApiBaseUrl(options = {}) {
319
+ if (options.baseUrl || isPayAppRuntime()) {
320
+ return options;
321
+ }
322
+ return {
323
+ ...options,
324
+ baseUrl: getConfiguredPayApiBaseUrl(),
325
+ };
326
+ }
327
+ function isContactsAppRuntime() {
328
+ return (isCurrentBrowserHostname('contacts.tuturuuu.com', 'contacts.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/contacts', '/apps/contacts'));
329
+ }
330
+ function getConfiguredContactsApiBaseUrl() {
331
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.CONTACTS_APP_URL) ||
332
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_CONTACTS_APP_URL) ||
333
+ resolveConfiguredOrigin(process.env.TUTURUUU_CONTACTS_BASE_URL) ||
334
+ (isProductionDeployment()
335
+ ? 'https://contacts.tuturuuu.com'
336
+ : 'https://contacts.tuturuuu.localhost'));
337
+ }
338
+ function withContactsApiBaseUrl(options = {}) {
339
+ if (options.baseUrl || isContactsAppRuntime()) {
340
+ return options;
341
+ }
342
+ return {
343
+ ...options,
344
+ baseUrl: getConfiguredContactsApiBaseUrl(),
345
+ };
346
+ }
347
+ /**
348
+ * `/api/v1/tulearn/bootstrap` is owned by apps/learn but is also consumed by
349
+ * apps/teach. Pin the call to the CALLING app's own origin so its app-session
350
+ * audience (learn or teach) matches — never cross-pin teach → learn (learn's
351
+ * proxy would reject a teach-audience session).
352
+ */
353
+ function withEducationBootstrapBaseUrl(options = {}) {
354
+ if (options.baseUrl) {
355
+ return options;
356
+ }
357
+ if (isTeachAppRuntime()) {
358
+ return {
359
+ ...options,
360
+ baseUrl: getConfiguredTeachApiBaseUrl(),
361
+ };
362
+ }
363
+ return {
364
+ ...options,
365
+ baseUrl: getConfiguredLearnApiBaseUrl(),
366
+ };
367
+ }
368
+ function isFinanceBrowserRuntime() {
369
+ return isCurrentBrowserHostname('finance.tuturuuu.com', 'finance.tuturuuu.localhost');
370
+ }
371
+ function getConfiguredFinanceApiBaseUrl() {
372
+ return normalizeBaseUrl(resolveConfiguredOrigin(process.env.FINANCE_APP_URL) ||
373
+ resolveConfiguredOrigin(process.env.NEXT_PUBLIC_FINANCE_APP_URL) ||
374
+ resolveConfiguredOrigin(process.env.TUTURUUU_FINANCE_BASE_URL) ||
375
+ (isProductionDeployment()
376
+ ? 'https://finance.tuturuuu.com'
377
+ : 'https://finance.tuturuuu.localhost'));
378
+ }
379
+ function withFinanceApiBaseUrl(options = {}) {
380
+ if (options.baseUrl || isFinanceBrowserRuntime()) {
381
+ return options;
382
+ }
383
+ return {
384
+ ...options,
385
+ baseUrl: getConfiguredFinanceApiBaseUrl(),
386
+ };
387
+ }
388
+ function resolveInternalApiUrl(path, baseUrl) {
389
+ const normalizedPath = normalizePath(path);
390
+ if (/^https?:\/\//.test(normalizedPath)) {
391
+ return normalizedPath;
392
+ }
393
+ const resolvedBaseUrl = baseUrl
394
+ ? normalizeBaseUrl(baseUrl)
395
+ : typeof window === 'undefined'
396
+ ? getConfiguredInternalApiBaseUrl()
397
+ : undefined;
398
+ if (!resolvedBaseUrl) {
399
+ return normalizedPath;
400
+ }
401
+ return new URL(normalizedPath, resolvedBaseUrl).toString();
402
+ }
403
+ function getCookieName(cookiePart) {
404
+ return cookiePart.trim().split('=')[0]?.trim() ?? '';
405
+ }
406
+ function hasAppSessionCookie(cookieHeader) {
407
+ return cookieHeader
408
+ .split(';')
409
+ .some((part) => getCookieName(part) === APP_SESSION_COOKIE_NAME);
410
+ }
411
+ function getSupabaseAuthStorageKey(url) {
412
+ return `sb-${new URL(url).hostname.split('.')[0]}-auth-token`;
413
+ }
414
+ function getConfiguredSupabaseAuthStorageKeys() {
415
+ return [
416
+ process.env.NEXT_PUBLIC_SUPABASE_URL,
417
+ process.env.SUPABASE_SERVER_URL,
418
+ process.env.SUPABASE_URL,
419
+ ]
420
+ .flatMap((url) => {
421
+ if (!url) {
422
+ return [];
423
+ }
424
+ try {
425
+ return [getSupabaseAuthStorageKey(url)];
426
+ }
427
+ catch {
428
+ return [];
429
+ }
430
+ })
431
+ .filter((value, index, values) => values.indexOf(value) === index);
432
+ }
433
+ function isSupabaseAuthCookieChunkForStorageKey(cookieName, storageKey) {
434
+ if (cookieName === storageKey) {
435
+ return true;
436
+ }
437
+ if (!cookieName.startsWith(`${storageKey}.`)) {
438
+ return false;
439
+ }
440
+ return /^\d+$/u.test(cookieName.slice(storageKey.length + 1));
441
+ }
442
+ function isSharedSupabaseCookieHostname(hostname) {
443
+ return (hostname === 'tuturuuu.com' ||
444
+ hostname.endsWith('.tuturuuu.com') ||
445
+ hostname === 'tuturuuu.localhost' ||
446
+ hostname.endsWith('.tuturuuu.localhost'));
447
+ }
448
+ function shouldPreserveSupabaseAuthCookie(cookieName, targetOrigin) {
449
+ if (!targetOrigin) {
450
+ return false;
451
+ }
452
+ const targetUrl = tryParseAbsoluteUrl(targetOrigin);
453
+ if (!targetUrl || !isSharedSupabaseCookieHostname(targetUrl.hostname)) {
454
+ return false;
455
+ }
456
+ return getConfiguredSupabaseAuthStorageKeys().some((storageKey) => isSupabaseAuthCookieChunkForStorageKey(cookieName, storageKey));
457
+ }
458
+ function sanitizeForwardedCookieHeader(cookieHeader, targetOrigin) {
459
+ if (!cookieHeader || !hasAppSessionCookie(cookieHeader)) {
460
+ return cookieHeader;
461
+ }
462
+ const cookies = cookieHeader
463
+ .split(';')
464
+ .map((part) => part.trim())
465
+ .filter(Boolean)
466
+ .filter((part) => {
467
+ const cookieName = getCookieName(part);
468
+ return (!SUPABASE_AUTH_COOKIE_PATTERN.test(cookieName) ||
469
+ shouldPreserveSupabaseAuthCookie(cookieName, targetOrigin));
470
+ });
471
+ return cookies.length > 0 ? cookies.join('; ') : null;
472
+ }
473
+ function createInternalApiClient(options = {}) {
474
+ const doFetch = (path, init = {}) => {
475
+ const fetchImpl = options.fetch ?? globalThis.fetch;
476
+ const { baseUrl, headers: requestHeaders, query, ...requestInit } = init;
477
+ const requestPath = appendQuery(path, query);
478
+ const url = resolveInternalApiUrl(requestPath, baseUrl || options.baseUrl);
479
+ const headers = (0, request_headers_js_1.mergeHeaders)(options.defaultHeaders, requestHeaders);
480
+ return fetchImpl(url, {
481
+ ...requestInit,
482
+ headers,
483
+ });
484
+ };
485
+ return {
486
+ fetch: doFetch,
487
+ async json(path, init = {}) {
488
+ const response = await doFetch(path, init);
489
+ if (!response.ok)
490
+ throw await (0, internal_api_error_js_1.parseInternalApiError)(response);
491
+ if (response.status === 204) {
492
+ return undefined;
493
+ }
494
+ return (await response.json());
495
+ },
496
+ };
497
+ }
498
+ /**
499
+ * Creates Internal API client options that forward auth-relevant headers
500
+ * from an incoming request context (for example `next/headers()` in RSC).
501
+ */
502
+ function withForwardedInternalApiAuth(requestHeaders, options = {}) {
503
+ const authorizationHeader = requestHeaders.get('authorization');
504
+ const allowedOrigins = new Set();
505
+ if (options.baseUrl) {
506
+ const parsed = tryParseAbsoluteUrl(normalizeBaseUrl(options.baseUrl));
507
+ if (parsed) {
508
+ allowedOrigins.add(parsed.origin);
509
+ }
510
+ }
511
+ const configuredBaseUrl = tryParseAbsoluteUrl(getConfiguredInternalApiBaseUrl());
512
+ if (configuredBaseUrl) {
513
+ allowedOrigins.add(configuredBaseUrl.origin);
514
+ }
515
+ const configuredTasksBaseUrl = tryParseAbsoluteUrl(getConfiguredTasksApiBaseUrl());
516
+ if (configuredTasksBaseUrl) {
517
+ allowedOrigins.add(configuredTasksBaseUrl.origin);
518
+ }
519
+ const configuredMailBaseUrl = tryParseAbsoluteUrl(getConfiguredMailApiBaseUrl());
520
+ if (configuredMailBaseUrl) {
521
+ allowedOrigins.add(configuredMailBaseUrl.origin);
522
+ }
523
+ const configuredLearnBaseUrl = tryParseAbsoluteUrl(getConfiguredLearnApiBaseUrl());
524
+ if (configuredLearnBaseUrl) {
525
+ allowedOrigins.add(configuredLearnBaseUrl.origin);
526
+ }
527
+ const configuredTeachBaseUrl = tryParseAbsoluteUrl(getConfiguredTeachApiBaseUrl());
528
+ if (configuredTeachBaseUrl) {
529
+ allowedOrigins.add(configuredTeachBaseUrl.origin);
530
+ }
531
+ const configuredFinanceBaseUrl = tryParseAbsoluteUrl(getConfiguredFinanceApiBaseUrl());
532
+ if (configuredFinanceBaseUrl) {
533
+ allowedOrigins.add(configuredFinanceBaseUrl.origin);
534
+ }
535
+ const configuredPayBaseUrl = tryParseAbsoluteUrl(getConfiguredPayApiBaseUrl());
536
+ if (configuredPayBaseUrl) {
537
+ allowedOrigins.add(configuredPayBaseUrl.origin);
538
+ }
539
+ const configuredContactsBaseUrl = tryParseAbsoluteUrl(getConfiguredContactsApiBaseUrl());
540
+ if (configuredContactsBaseUrl) {
541
+ allowedOrigins.add(configuredContactsBaseUrl.origin);
542
+ }
543
+ const targetOrigin = (options.baseUrl
544
+ ? tryParseAbsoluteUrl(normalizeBaseUrl(options.baseUrl))?.origin
545
+ : null) ??
546
+ configuredBaseUrl?.origin ??
547
+ null;
548
+ const cookieHeader = sanitizeForwardedCookieHeader(requestHeaders.get('cookie'), targetOrigin);
549
+ if (!cookieHeader && !authorizationHeader) {
550
+ return options;
551
+ }
552
+ const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
553
+ ? globalThis.location
554
+ : undefined;
555
+ if (runtimeLocation?.origin) {
556
+ allowedOrigins.add(runtimeLocation.origin);
557
+ }
558
+ const baseFetch = options.fetch || globalThis.fetch;
559
+ const forwardedFetch = async (input, init) => {
560
+ const requestUrl = typeof input === 'string'
561
+ ? input
562
+ : input instanceof URL
563
+ ? input.toString()
564
+ : input.url;
565
+ const isRelativeRequest = typeof requestUrl === 'string' && requestUrl.startsWith('/');
566
+ const parsedRequestUrl = isRelativeRequest
567
+ ? null
568
+ : tryParseAbsoluteUrl(requestUrl);
569
+ const shouldForwardAuth = isRelativeRequest ||
570
+ (parsedRequestUrl ? allowedOrigins.has(parsedRequestUrl.origin) : false);
571
+ if (!shouldForwardAuth) {
572
+ return baseFetch(input, init);
573
+ }
574
+ const headers = new Headers(input instanceof Request ? input.headers : undefined);
575
+ if (init?.headers) {
576
+ const initHeaders = new Headers(init.headers);
577
+ initHeaders.forEach((value, key) => {
578
+ headers.set(key, value);
579
+ });
580
+ }
581
+ if (cookieHeader && !headers.has('cookie')) {
582
+ headers.set('cookie', cookieHeader);
583
+ }
584
+ if (authorizationHeader && !headers.has('authorization')) {
585
+ headers.set('authorization', authorizationHeader);
586
+ }
587
+ return baseFetch(input, {
588
+ ...init,
589
+ headers,
590
+ });
591
+ };
592
+ return {
593
+ ...options,
594
+ fetch: forwardedFetch,
595
+ };
596
+ }
597
+ exports.internalApiClient = createInternalApiClient();
598
+ function getInternalApiClient(options) {
599
+ return options ? createInternalApiClient(options) : exports.internalApiClient;
600
+ }
601
+ //# sourceMappingURL=client.js.map