@seshuk/payload-plugin-openapi 0.2.3 → 1.0.0-beta.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 (407) hide show
  1. package/README.md +72 -26
  2. package/dist/_tooling/telemetry.js +168 -0
  3. package/dist/_tooling/telemetry.js.map +1 -0
  4. package/dist/cli/generateSpec.d.ts +2 -0
  5. package/dist/cli/generateSpec.js +40 -0
  6. package/dist/cli/generateSpec.js.map +1 -0
  7. package/dist/index.d.ts +8 -9
  8. package/dist/index.js +76 -65
  9. package/dist/index.js.map +1 -0
  10. package/dist/{endpoints → server/endpoints}/interactiveAuth.d.ts +2 -2
  11. package/dist/server/endpoints/interactiveAuth.js +25 -0
  12. package/dist/server/endpoints/interactiveAuth.js.map +1 -0
  13. package/dist/server/endpoints/spec.d.ts +5 -0
  14. package/dist/server/endpoints/spec.js +39 -0
  15. package/dist/server/endpoints/spec.js.map +1 -0
  16. package/dist/server/options/resolveOptions.d.ts +4 -0
  17. package/dist/server/options/resolveOptions.js +65 -0
  18. package/dist/server/options/resolveOptions.js.map +1 -0
  19. package/dist/server/spec/build.d.ts +14 -0
  20. package/dist/server/spec/build.js +40 -0
  21. package/dist/server/spec/build.js.map +1 -0
  22. package/dist/server/spec/buildDocument.d.ts +16 -0
  23. package/dist/server/spec/buildDocument.js +340 -0
  24. package/dist/server/spec/buildDocument.js.map +1 -0
  25. package/dist/server/spec/components.d.ts +61 -0
  26. package/dist/server/spec/components.js +265 -0
  27. package/dist/server/spec/components.js.map +1 -0
  28. package/dist/{spec → server/spec}/downconvert.d.ts +2 -1
  29. package/dist/server/spec/downconvert.js +69 -0
  30. package/dist/server/spec/downconvert.js.map +1 -0
  31. package/dist/server/spec/entitySchemas.d.ts +15 -0
  32. package/dist/server/spec/entitySchemas.js +207 -0
  33. package/dist/server/spec/entitySchemas.js.map +1 -0
  34. package/dist/{spec → server/spec}/fields.d.ts +2 -1
  35. package/dist/server/spec/fields.js +47 -0
  36. package/dist/server/spec/fields.js.map +1 -0
  37. package/dist/server/spec/filters.d.ts +16 -0
  38. package/dist/server/spec/filters.js +102 -0
  39. package/dist/server/spec/filters.js.map +1 -0
  40. package/dist/server/spec/hierarchy.d.ts +11 -0
  41. package/dist/server/spec/hierarchy.js +43 -0
  42. package/dist/server/spec/hierarchy.js.map +1 -0
  43. package/dist/{spec → server/spec}/names.d.ts +2 -2
  44. package/dist/server/spec/names.js +43 -0
  45. package/dist/server/spec/names.js.map +1 -0
  46. package/dist/server/spec/params.d.ts +57 -0
  47. package/dist/server/spec/params.js +394 -0
  48. package/dist/server/spec/params.js.map +1 -0
  49. package/dist/server/spec/paths/auth.d.ts +10 -0
  50. package/dist/server/spec/paths/auth.js +190 -0
  51. package/dist/server/spec/paths/auth.js.map +1 -0
  52. package/dist/server/spec/paths/collections.d.ts +11 -0
  53. package/dist/server/spec/paths/collections.js +418 -0
  54. package/dist/server/spec/paths/collections.js.map +1 -0
  55. package/dist/server/spec/paths/custom.d.ts +12 -0
  56. package/dist/server/spec/paths/custom.js +42 -0
  57. package/dist/server/spec/paths/custom.js.map +1 -0
  58. package/dist/server/spec/paths/globals.d.ts +11 -0
  59. package/dist/server/spec/paths/globals.js +87 -0
  60. package/dist/server/spec/paths/globals.js.map +1 -0
  61. package/dist/server/spec/paths/jobs.d.ts +9 -0
  62. package/dist/server/spec/paths/jobs.js +98 -0
  63. package/dist/server/spec/paths/jobs.js.map +1 -0
  64. package/dist/server/spec/paths/system.d.ts +9 -0
  65. package/dist/server/spec/paths/system.js +203 -0
  66. package/dist/server/spec/paths/system.js.map +1 -0
  67. package/dist/server/spec/paths/versions.d.ts +22 -0
  68. package/dist/server/spec/paths/versions.js +185 -0
  69. package/dist/server/spec/paths/versions.js.map +1 -0
  70. package/dist/server/spec/plugins/ecommerce.d.ts +3 -0
  71. package/dist/server/spec/plugins/ecommerce.js +270 -0
  72. package/dist/server/spec/plugins/ecommerce.js.map +1 -0
  73. package/dist/server/spec/plugins/importExport.d.ts +3 -0
  74. package/dist/server/spec/plugins/importExport.js +202 -0
  75. package/dist/server/spec/plugins/importExport.js.map +1 -0
  76. package/dist/server/spec/plugins/index.d.ts +3 -0
  77. package/dist/server/spec/plugins/index.js +21 -0
  78. package/dist/server/spec/plugins/index.js.map +1 -0
  79. package/dist/server/spec/plugins/mcp.d.ts +3 -0
  80. package/dist/server/spec/plugins/mcp.js +118 -0
  81. package/dist/server/spec/plugins/mcp.js.map +1 -0
  82. package/dist/server/spec/plugins/multiTenant.d.ts +3 -0
  83. package/dist/server/spec/plugins/multiTenant.js +39 -0
  84. package/dist/server/spec/plugins/multiTenant.js.map +1 -0
  85. package/dist/server/spec/plugins/search.d.ts +3 -0
  86. package/dist/server/spec/plugins/search.js +43 -0
  87. package/dist/server/spec/plugins/search.js.map +1 -0
  88. package/dist/server/spec/plugins/seo.d.ts +3 -0
  89. package/dist/server/spec/plugins/seo.js +83 -0
  90. package/dist/server/spec/plugins/seo.js.map +1 -0
  91. package/dist/server/spec/plugins/shared.d.ts +35 -0
  92. package/dist/server/spec/plugins/shared.js +37 -0
  93. package/dist/server/spec/plugins/shared.js.map +1 -0
  94. package/dist/server/spec/plugins/storageR2.d.ts +3 -0
  95. package/dist/server/spec/plugins/storageR2.js +91 -0
  96. package/dist/server/spec/plugins/storageR2.js.map +1 -0
  97. package/dist/server/spec/plugins/stripe.d.ts +10 -0
  98. package/dist/server/spec/plugins/stripe.js +102 -0
  99. package/dist/server/spec/plugins/stripe.js.map +1 -0
  100. package/dist/server/spec/security.d.ts +34 -0
  101. package/dist/server/spec/security.js +100 -0
  102. package/dist/server/spec/security.js.map +1 -0
  103. package/dist/server/spec/tags.d.ts +37 -0
  104. package/dist/server/spec/tags.js +99 -0
  105. package/dist/server/spec/tags.js.map +1 -0
  106. package/dist/server/telemetry.d.ts +31 -0
  107. package/dist/server/telemetry.js +33 -0
  108. package/dist/server/telemetry.js.map +1 -0
  109. package/dist/server/ui/createUiPlugin.d.ts +16 -0
  110. package/dist/server/ui/createUiPlugin.js +33 -0
  111. package/dist/server/ui/createUiPlugin.js.map +1 -0
  112. package/dist/{ui → server/ui}/html.d.ts +5 -3
  113. package/dist/server/ui/html.js +11 -0
  114. package/dist/server/ui/html.js.map +1 -0
  115. package/dist/server/ui/scalar.d.ts +4 -0
  116. package/dist/server/ui/scalar.js +17 -0
  117. package/dist/server/ui/scalar.js.map +1 -0
  118. package/dist/server/ui/swagger.d.ts +4 -0
  119. package/dist/server/ui/swagger.js +18 -0
  120. package/dist/server/ui/swagger.js.map +1 -0
  121. package/dist/shared/constants.d.ts +4 -0
  122. package/dist/shared/constants.js +6 -0
  123. package/dist/shared/constants.js.map +1 -0
  124. package/dist/shared/translations/index.d.ts +5 -0
  125. package/dist/{translations → shared/translations}/index.js +49 -47
  126. package/dist/shared/translations/index.js.map +1 -0
  127. package/dist/shared/translations/locales/ar.d.ts +3 -0
  128. package/dist/shared/translations/locales/ar.js +173 -0
  129. package/dist/shared/translations/locales/ar.js.map +1 -0
  130. package/dist/shared/translations/locales/az.d.ts +3 -0
  131. package/dist/shared/translations/locales/az.js +173 -0
  132. package/dist/shared/translations/locales/az.js.map +1 -0
  133. package/dist/shared/translations/locales/bg.d.ts +3 -0
  134. package/dist/shared/translations/locales/bg.js +173 -0
  135. package/dist/shared/translations/locales/bg.js.map +1 -0
  136. package/dist/shared/translations/locales/bnBd.d.ts +3 -0
  137. package/dist/shared/translations/locales/bnBd.js +173 -0
  138. package/dist/shared/translations/locales/bnBd.js.map +1 -0
  139. package/dist/shared/translations/locales/bnIn.d.ts +3 -0
  140. package/dist/shared/translations/locales/bnIn.js +173 -0
  141. package/dist/shared/translations/locales/bnIn.js.map +1 -0
  142. package/dist/shared/translations/locales/ca.d.ts +3 -0
  143. package/dist/shared/translations/locales/ca.js +173 -0
  144. package/dist/shared/translations/locales/ca.js.map +1 -0
  145. package/dist/shared/translations/locales/cs.d.ts +3 -0
  146. package/dist/shared/translations/locales/cs.js +173 -0
  147. package/dist/shared/translations/locales/cs.js.map +1 -0
  148. package/dist/shared/translations/locales/da.d.ts +3 -0
  149. package/dist/shared/translations/locales/da.js +173 -0
  150. package/dist/shared/translations/locales/da.js.map +1 -0
  151. package/dist/shared/translations/locales/de.d.ts +3 -0
  152. package/dist/shared/translations/locales/de.js +173 -0
  153. package/dist/shared/translations/locales/de.js.map +1 -0
  154. package/dist/shared/translations/locales/en.d.ts +3 -0
  155. package/dist/shared/translations/locales/en.js +173 -0
  156. package/dist/shared/translations/locales/en.js.map +1 -0
  157. package/dist/shared/translations/locales/es.d.ts +3 -0
  158. package/dist/shared/translations/locales/es.js +173 -0
  159. package/dist/shared/translations/locales/es.js.map +1 -0
  160. package/dist/shared/translations/locales/et.d.ts +3 -0
  161. package/dist/shared/translations/locales/et.js +173 -0
  162. package/dist/shared/translations/locales/et.js.map +1 -0
  163. package/dist/shared/translations/locales/fa.d.ts +3 -0
  164. package/dist/shared/translations/locales/fa.js +173 -0
  165. package/dist/shared/translations/locales/fa.js.map +1 -0
  166. package/dist/shared/translations/locales/fr.d.ts +3 -0
  167. package/dist/shared/translations/locales/fr.js +173 -0
  168. package/dist/shared/translations/locales/fr.js.map +1 -0
  169. package/dist/shared/translations/locales/he.d.ts +3 -0
  170. package/dist/shared/translations/locales/he.js +173 -0
  171. package/dist/shared/translations/locales/he.js.map +1 -0
  172. package/dist/shared/translations/locales/hr.d.ts +3 -0
  173. package/dist/shared/translations/locales/hr.js +173 -0
  174. package/dist/shared/translations/locales/hr.js.map +1 -0
  175. package/dist/shared/translations/locales/hu.d.ts +3 -0
  176. package/dist/shared/translations/locales/hu.js +173 -0
  177. package/dist/shared/translations/locales/hu.js.map +1 -0
  178. package/dist/shared/translations/locales/hy.d.ts +3 -0
  179. package/dist/shared/translations/locales/hy.js +173 -0
  180. package/dist/shared/translations/locales/hy.js.map +1 -0
  181. package/dist/shared/translations/locales/id.d.ts +3 -0
  182. package/dist/shared/translations/locales/id.js +173 -0
  183. package/dist/shared/translations/locales/id.js.map +1 -0
  184. package/dist/shared/translations/locales/is.d.ts +3 -0
  185. package/dist/shared/translations/locales/is.js +173 -0
  186. package/dist/shared/translations/locales/is.js.map +1 -0
  187. package/dist/shared/translations/locales/it.d.ts +3 -0
  188. package/dist/shared/translations/locales/it.js +173 -0
  189. package/dist/shared/translations/locales/it.js.map +1 -0
  190. package/dist/shared/translations/locales/ja.d.ts +3 -0
  191. package/dist/shared/translations/locales/ja.js +173 -0
  192. package/dist/shared/translations/locales/ja.js.map +1 -0
  193. package/dist/shared/translations/locales/ko.d.ts +3 -0
  194. package/dist/shared/translations/locales/ko.js +173 -0
  195. package/dist/shared/translations/locales/ko.js.map +1 -0
  196. package/dist/shared/translations/locales/lt.d.ts +3 -0
  197. package/dist/shared/translations/locales/lt.js +173 -0
  198. package/dist/shared/translations/locales/lt.js.map +1 -0
  199. package/dist/shared/translations/locales/lv.d.ts +3 -0
  200. package/dist/shared/translations/locales/lv.js +173 -0
  201. package/dist/shared/translations/locales/lv.js.map +1 -0
  202. package/dist/shared/translations/locales/my.d.ts +3 -0
  203. package/dist/shared/translations/locales/my.js +173 -0
  204. package/dist/shared/translations/locales/my.js.map +1 -0
  205. package/dist/shared/translations/locales/nb.d.ts +3 -0
  206. package/dist/shared/translations/locales/nb.js +173 -0
  207. package/dist/shared/translations/locales/nb.js.map +1 -0
  208. package/dist/shared/translations/locales/nl.d.ts +3 -0
  209. package/dist/shared/translations/locales/nl.js +173 -0
  210. package/dist/shared/translations/locales/nl.js.map +1 -0
  211. package/dist/shared/translations/locales/pl.d.ts +3 -0
  212. package/dist/shared/translations/locales/pl.js +173 -0
  213. package/dist/shared/translations/locales/pl.js.map +1 -0
  214. package/dist/shared/translations/locales/pt.d.ts +3 -0
  215. package/dist/shared/translations/locales/pt.js +173 -0
  216. package/dist/shared/translations/locales/pt.js.map +1 -0
  217. package/dist/shared/translations/locales/ro.d.ts +3 -0
  218. package/dist/shared/translations/locales/ro.js +173 -0
  219. package/dist/shared/translations/locales/ro.js.map +1 -0
  220. package/dist/shared/translations/locales/rs.d.ts +3 -0
  221. package/dist/shared/translations/locales/rs.js +173 -0
  222. package/dist/shared/translations/locales/rs.js.map +1 -0
  223. package/dist/shared/translations/locales/rsLatin.d.ts +3 -0
  224. package/dist/shared/translations/locales/rsLatin.js +173 -0
  225. package/dist/shared/translations/locales/rsLatin.js.map +1 -0
  226. package/dist/shared/translations/locales/ru.d.ts +3 -0
  227. package/dist/shared/translations/locales/ru.js +173 -0
  228. package/dist/shared/translations/locales/ru.js.map +1 -0
  229. package/dist/shared/translations/locales/sk.d.ts +3 -0
  230. package/dist/shared/translations/locales/sk.js +173 -0
  231. package/dist/shared/translations/locales/sk.js.map +1 -0
  232. package/dist/shared/translations/locales/sl.d.ts +3 -0
  233. package/dist/shared/translations/locales/sl.js +173 -0
  234. package/dist/shared/translations/locales/sl.js.map +1 -0
  235. package/dist/shared/translations/locales/sv.d.ts +3 -0
  236. package/dist/shared/translations/locales/sv.js +173 -0
  237. package/dist/shared/translations/locales/sv.js.map +1 -0
  238. package/dist/shared/translations/locales/ta.d.ts +3 -0
  239. package/dist/shared/translations/locales/ta.js +173 -0
  240. package/dist/shared/translations/locales/ta.js.map +1 -0
  241. package/dist/shared/translations/locales/th.d.ts +3 -0
  242. package/dist/shared/translations/locales/th.js +173 -0
  243. package/dist/shared/translations/locales/th.js.map +1 -0
  244. package/dist/shared/translations/locales/tr.d.ts +3 -0
  245. package/dist/shared/translations/locales/tr.js +173 -0
  246. package/dist/shared/translations/locales/tr.js.map +1 -0
  247. package/dist/shared/translations/locales/uk.d.ts +3 -0
  248. package/dist/shared/translations/locales/uk.js +173 -0
  249. package/dist/shared/translations/locales/uk.js.map +1 -0
  250. package/dist/shared/translations/locales/vi.d.ts +3 -0
  251. package/dist/shared/translations/locales/vi.js +173 -0
  252. package/dist/shared/translations/locales/vi.js.map +1 -0
  253. package/dist/shared/translations/locales/zh.d.ts +3 -0
  254. package/dist/shared/translations/locales/zh.js +173 -0
  255. package/dist/shared/translations/locales/zh.js.map +1 -0
  256. package/dist/shared/translations/locales/zhTw.d.ts +3 -0
  257. package/dist/shared/translations/locales/zhTw.js +173 -0
  258. package/dist/shared/translations/locales/zhTw.js.map +1 -0
  259. package/dist/shared/translations/types.d.ts +180 -0
  260. package/dist/shared/translations/types.js +1 -0
  261. package/dist/shared/types/index.d.ts +412 -0
  262. package/dist/shared/types/index.js +1 -0
  263. package/dist/{utils.d.ts → shared/utils.d.ts} +1 -0
  264. package/dist/shared/utils.js +13 -0
  265. package/dist/shared/utils.js.map +1 -0
  266. package/package.json +70 -39
  267. package/dist/bin/generateSpec.d.ts +0 -25
  268. package/dist/bin/generateSpec.js +0 -61
  269. package/dist/constants.d.ts +0 -1
  270. package/dist/constants.js +0 -2
  271. package/dist/endpoints/interactiveAuth.js +0 -27
  272. package/dist/endpoints/spec.d.ts +0 -5
  273. package/dist/endpoints/spec.js +0 -39
  274. package/dist/options.d.ts +0 -2
  275. package/dist/options.js +0 -45
  276. package/dist/spec/build.d.ts +0 -14
  277. package/dist/spec/build.js +0 -36
  278. package/dist/spec/buildDocument.d.ts +0 -15
  279. package/dist/spec/buildDocument.js +0 -268
  280. package/dist/spec/components.d.ts +0 -44
  281. package/dist/spec/components.js +0 -265
  282. package/dist/spec/downconvert.js +0 -74
  283. package/dist/spec/entitySchemas.d.ts +0 -15
  284. package/dist/spec/entitySchemas.js +0 -250
  285. package/dist/spec/fields.js +0 -44
  286. package/dist/spec/filters.d.ts +0 -11
  287. package/dist/spec/filters.js +0 -83
  288. package/dist/spec/names.js +0 -37
  289. package/dist/spec/params.d.ts +0 -55
  290. package/dist/spec/params.js +0 -436
  291. package/dist/spec/paths/auth.d.ts +0 -9
  292. package/dist/spec/paths/auth.js +0 -274
  293. package/dist/spec/paths/collections.d.ts +0 -9
  294. package/dist/spec/paths/collections.js +0 -278
  295. package/dist/spec/paths/custom.d.ts +0 -9
  296. package/dist/spec/paths/custom.js +0 -41
  297. package/dist/spec/paths/globals.d.ts +0 -9
  298. package/dist/spec/paths/globals.js +0 -78
  299. package/dist/spec/paths/jobs.d.ts +0 -7
  300. package/dist/spec/paths/jobs.js +0 -130
  301. package/dist/spec/paths/versions.d.ts +0 -19
  302. package/dist/spec/paths/versions.js +0 -252
  303. package/dist/spec/security.d.ts +0 -19
  304. package/dist/spec/security.js +0 -96
  305. package/dist/spec/tags.d.ts +0 -27
  306. package/dist/spec/tags.js +0 -79
  307. package/dist/translations/index.d.ts +0 -6
  308. package/dist/translations/locales/ar.d.ts +0 -2
  309. package/dist/translations/locales/ar.js +0 -81
  310. package/dist/translations/locales/az.d.ts +0 -2
  311. package/dist/translations/locales/az.js +0 -81
  312. package/dist/translations/locales/bg.d.ts +0 -2
  313. package/dist/translations/locales/bg.js +0 -81
  314. package/dist/translations/locales/bnBd.d.ts +0 -2
  315. package/dist/translations/locales/bnBd.js +0 -81
  316. package/dist/translations/locales/bnIn.d.ts +0 -2
  317. package/dist/translations/locales/bnIn.js +0 -81
  318. package/dist/translations/locales/ca.d.ts +0 -2
  319. package/dist/translations/locales/ca.js +0 -81
  320. package/dist/translations/locales/cs.d.ts +0 -2
  321. package/dist/translations/locales/cs.js +0 -81
  322. package/dist/translations/locales/da.d.ts +0 -2
  323. package/dist/translations/locales/da.js +0 -81
  324. package/dist/translations/locales/de.d.ts +0 -2
  325. package/dist/translations/locales/de.js +0 -81
  326. package/dist/translations/locales/en.d.ts +0 -2
  327. package/dist/translations/locales/en.js +0 -81
  328. package/dist/translations/locales/es.d.ts +0 -2
  329. package/dist/translations/locales/es.js +0 -81
  330. package/dist/translations/locales/et.d.ts +0 -2
  331. package/dist/translations/locales/et.js +0 -81
  332. package/dist/translations/locales/fa.d.ts +0 -2
  333. package/dist/translations/locales/fa.js +0 -81
  334. package/dist/translations/locales/fr.d.ts +0 -2
  335. package/dist/translations/locales/fr.js +0 -81
  336. package/dist/translations/locales/he.d.ts +0 -2
  337. package/dist/translations/locales/he.js +0 -81
  338. package/dist/translations/locales/hr.d.ts +0 -2
  339. package/dist/translations/locales/hr.js +0 -81
  340. package/dist/translations/locales/hu.d.ts +0 -2
  341. package/dist/translations/locales/hu.js +0 -81
  342. package/dist/translations/locales/hy.d.ts +0 -2
  343. package/dist/translations/locales/hy.js +0 -81
  344. package/dist/translations/locales/id.d.ts +0 -2
  345. package/dist/translations/locales/id.js +0 -81
  346. package/dist/translations/locales/is.d.ts +0 -2
  347. package/dist/translations/locales/is.js +0 -81
  348. package/dist/translations/locales/it.d.ts +0 -2
  349. package/dist/translations/locales/it.js +0 -81
  350. package/dist/translations/locales/ja.d.ts +0 -2
  351. package/dist/translations/locales/ja.js +0 -81
  352. package/dist/translations/locales/ko.d.ts +0 -2
  353. package/dist/translations/locales/ko.js +0 -81
  354. package/dist/translations/locales/lt.d.ts +0 -2
  355. package/dist/translations/locales/lt.js +0 -81
  356. package/dist/translations/locales/lv.d.ts +0 -2
  357. package/dist/translations/locales/lv.js +0 -81
  358. package/dist/translations/locales/my.d.ts +0 -2
  359. package/dist/translations/locales/my.js +0 -81
  360. package/dist/translations/locales/nb.d.ts +0 -2
  361. package/dist/translations/locales/nb.js +0 -81
  362. package/dist/translations/locales/nl.d.ts +0 -2
  363. package/dist/translations/locales/nl.js +0 -81
  364. package/dist/translations/locales/pl.d.ts +0 -2
  365. package/dist/translations/locales/pl.js +0 -81
  366. package/dist/translations/locales/pt.d.ts +0 -2
  367. package/dist/translations/locales/pt.js +0 -81
  368. package/dist/translations/locales/ro.d.ts +0 -2
  369. package/dist/translations/locales/ro.js +0 -81
  370. package/dist/translations/locales/rs.d.ts +0 -2
  371. package/dist/translations/locales/rs.js +0 -81
  372. package/dist/translations/locales/rsLatin.d.ts +0 -2
  373. package/dist/translations/locales/rsLatin.js +0 -81
  374. package/dist/translations/locales/ru.d.ts +0 -2
  375. package/dist/translations/locales/ru.js +0 -81
  376. package/dist/translations/locales/sk.d.ts +0 -2
  377. package/dist/translations/locales/sk.js +0 -81
  378. package/dist/translations/locales/sl.d.ts +0 -2
  379. package/dist/translations/locales/sl.js +0 -81
  380. package/dist/translations/locales/sv.d.ts +0 -2
  381. package/dist/translations/locales/sv.js +0 -81
  382. package/dist/translations/locales/ta.d.ts +0 -2
  383. package/dist/translations/locales/ta.js +0 -81
  384. package/dist/translations/locales/th.d.ts +0 -2
  385. package/dist/translations/locales/th.js +0 -81
  386. package/dist/translations/locales/tr.d.ts +0 -2
  387. package/dist/translations/locales/tr.js +0 -81
  388. package/dist/translations/locales/uk.d.ts +0 -2
  389. package/dist/translations/locales/uk.js +0 -81
  390. package/dist/translations/locales/vi.d.ts +0 -2
  391. package/dist/translations/locales/vi.js +0 -81
  392. package/dist/translations/locales/zh.d.ts +0 -2
  393. package/dist/translations/locales/zh.js +0 -81
  394. package/dist/translations/locales/zhTw.d.ts +0 -2
  395. package/dist/translations/locales/zhTw.js +0 -81
  396. package/dist/translations/types.d.ts +0 -87
  397. package/dist/translations/types.js +0 -1
  398. package/dist/types.d.ts +0 -192
  399. package/dist/types.js +0 -1
  400. package/dist/ui/createUiPlugin.d.ts +0 -14
  401. package/dist/ui/createUiPlugin.js +0 -28
  402. package/dist/ui/html.js +0 -8
  403. package/dist/ui/scalar.d.ts +0 -1
  404. package/dist/ui/scalar.js +0 -12
  405. package/dist/ui/swagger.d.ts +0 -1
  406. package/dist/ui/swagger.js +0 -12
  407. package/dist/utils.js +0 -13
@@ -0,0 +1,412 @@
1
+ import { BasePayload, PayloadRequest, SanitizedCollectionConfig, SanitizedGlobalConfig } from "payload";
2
+ import { I18n } from "@payloadcms/translations";
3
+ import { ComponentsObject, Document, InfoObject, PathsObject, SchemaObject, SecurityRequirementObject, ServerObject, TagObject } from "@scalar/openapi-types/3.2";
4
+ export type OpenApiVersion = '3.0' | '3.1' | '3.2';
5
+ export type EntityKind = 'collection' | 'global';
6
+ export type OperationKind = EntityKind | 'custom' | 'jobs' | 'system' | 'plugin';
7
+ export type HttpMethod = 'get' | 'post' | 'patch' | 'put' | 'delete';
8
+ export type IDType = 'text' | 'number';
9
+ export type Schema = Exclude<SchemaObject, boolean>;
10
+ export type Entity = SanitizedCollectionConfig | SanitizedGlobalConfig;
11
+ export type EntityOperation = 'read' | 'create' | 'update' | 'delete' | 'validate';
12
+ export type SecurityMarking = 'public' | 'secured';
13
+ /**
14
+ * Marking for a collection or global, set in its `custom.openapi.security`:
15
+ * one marking for every operation, or one per operation. Operations you leave
16
+ * out keep the marking the access probe found. `read` also marks the version
17
+ * reads. `validate` falls back to `update` when you leave it out.
18
+ */
19
+ export type EntitySecurityOverride = SecurityMarking | Partial<Record<EntityOperation, SecurityMarking>>;
20
+ /**
21
+ * Text that follows the request language: a string, a map of language to
22
+ * string (`{ en: '…', de: '…' }`), or a function that gets `{ t, i18n }`.
23
+ */
24
+ export type LocalizedText = string | Record<string, string> | ((args: {
25
+ t: (key: string, vars?: Record<string, unknown>) => string;
26
+ i18n: I18n;
27
+ }) => string);
28
+ /** `custom.openapi` on a collection or global. */
29
+ export interface EntityOpenApiMeta {
30
+ /** Overrides the public or secured marking. See {@link EntitySecurityOverride}. */
31
+ security?: EntitySecurityOverride;
32
+ }
33
+ /**
34
+ * `custom.openapi` on a field: a partial Schema Object deep-merged on top of
35
+ * the inferred one. `description`, `title` and `summary` follow the
36
+ * request language.
37
+ */
38
+ export interface FieldOpenApiMeta {
39
+ description?: LocalizedText;
40
+ title?: LocalizedText;
41
+ summary?: LocalizedText;
42
+ [keyword: string]: unknown;
43
+ }
44
+ declare module 'payload' {
45
+ interface CollectionCustom {
46
+ openapi?: EntityOpenApiMeta;
47
+ }
48
+ interface GlobalCustom {
49
+ openapi?: EntityOpenApiMeta;
50
+ }
51
+ interface FieldCustom {
52
+ openapi?: FieldOpenApiMeta;
53
+ }
54
+ }
55
+ /**
56
+ * The OpenAPI `info` object. `title` and `version` are required. `description`
57
+ * can follow the request language, see {@link LocalizedText}.
58
+ */
59
+ export type OpenApiInfo = Omit<InfoObject, 'description'> & {
60
+ description?: LocalizedText;
61
+ };
62
+ /**
63
+ * Base URLs for the spec's `servers`: a fixed list, or a function that gets
64
+ * the request.
65
+ */
66
+ export type ServersOption = ServerObject[] | ((args: {
67
+ req: PayloadRequest;
68
+ }) => ServerObject[] | Promise<ServerObject[]>);
69
+ /**
70
+ * Interactive "Authorize" login for the docs UI. When on, the plugin adds a
71
+ * token endpoint and a security scheme so Scalar/Swagger can log in with a
72
+ * username and password instead of pasting a token. Off by default.
73
+ * - `true` — on, at the default path, against the first auth collection.
74
+ * - `{ path, collection }` — on, with a custom token endpoint path or auth collection.
75
+ */
76
+ export type InteractiveAuthOption = boolean | {
77
+ /**
78
+ * Token endpoint path, relative to the API route (`/openapi-auth` → `/api/openapi-auth`).
79
+ * @default '/openapi-auth'
80
+ */
81
+ path?: string;
82
+ /**
83
+ * Auth collection the login runs against.
84
+ * @default the first collection with `auth` enabled, or `'users'`
85
+ */
86
+ collection?: string;
87
+ };
88
+ /**
89
+ * Gate for a plugin route. Return `true` to serve the request; anything else
90
+ * answers 403.
91
+ */
92
+ export type AccessOption = (args: {
93
+ req: PayloadRequest;
94
+ }) => boolean | Promise<boolean>;
95
+ /** Match an entity by slug (any kind), a {kind,slug} pair, or a slug pattern. */
96
+ export type EntityMatcher = string | RegExp | {
97
+ kind: EntityKind;
98
+ slug: string;
99
+ };
100
+ /**
101
+ * Drops generated operations. Within one rule, every set field must match (AND);
102
+ * an operation is removed if any rule matches it. Fields:
103
+ * - `method` — HTTP method(s); omit to match any.
104
+ * - `slug` — collection or global slug, exact string or RegExp; omit to match any.
105
+ * A rule with `slug` never matches custom, jobs or system operations, or plugin
106
+ * operations mounted at the API root.
107
+ * - `kind` — restrict to one operation group; omit to match all.
108
+ * - `path` — RegExp tested against the final route path (e.g. `/api/posts/{id}`).
109
+ * - `plugin` — slug of the plugin that adds the operation (e.g. `'@payloadcms/plugin-seo'`),
110
+ * exact string or RegExp; omit to match any. A rule with `plugin` never matches an
111
+ * operation without one.
112
+ */
113
+ export interface OperationRule {
114
+ method?: HttpMethod | HttpMethod[];
115
+ slug?: string | RegExp;
116
+ kind?: OperationKind;
117
+ path?: RegExp;
118
+ plugin?: string | RegExp;
119
+ }
120
+ /** Context passed to `excludeOperations` functions and `security` for each operation. */
121
+ export interface OperationContext {
122
+ method: HttpMethod;
123
+ path: string;
124
+ /**
125
+ * Collection or global slug. For plugin operations, the collection the plugin
126
+ * mounts them on. Unset for custom, jobs and system operations.
127
+ */
128
+ slug?: string;
129
+ kind: OperationKind;
130
+ /**
131
+ * Slug of the plugin that adds the operation: an official Payload plugin
132
+ * (kind `'plugin'`), or the `x-payload-plugin` value of a custom endpoint's
133
+ * `custom.openapi`.
134
+ */
135
+ plugin?: string;
136
+ }
137
+ /** A rule, or a function that drops the operation when it returns (or resolves to) `true`. */
138
+ export type OperationFilter = OperationRule | ((ctx: OperationContext) => boolean | Promise<boolean>);
139
+ type SecurityDecision = SecurityMarking | SecurityRequirementObject[] | undefined;
140
+ /**
141
+ * Decides the security marking of one operation. `'public'` removes it,
142
+ * `'secured'` sets the default requirement, an array sets that exact
143
+ * requirement, and `undefined` keeps `detected`.
144
+ */
145
+ export type SecurityOption = (ctx: OperationContext & {
146
+ detected: SecurityMarking;
147
+ }) => SecurityDecision | Promise<SecurityDecision>;
148
+ /**
149
+ * Controls what appears in the spec, in one flat object: which entities are
150
+ * documented, which Payload-internal collections to show, which extra endpoint
151
+ * groups to generate, and which operations to drop.
152
+ */
153
+ export interface FilterOptions {
154
+ /**
155
+ * Allowlist of entities; when non-empty, only matching entities are documented.
156
+ * @default []
157
+ */
158
+ include?: EntityMatcher[];
159
+ /**
160
+ * Entities to omit entirely (schemas + paths).
161
+ * @default []
162
+ */
163
+ exclude?: EntityMatcher[];
164
+ /**
165
+ * Include collections flagged `hidden`/`admin.hidden`.
166
+ * @default false
167
+ */
168
+ includeHidden?: boolean;
169
+ /**
170
+ * Include Payload-internal collections and globals (payload-jobs, payload-preferences, payload-jobs-stats, ...).
171
+ * @default false
172
+ */
173
+ includeSystem?: boolean;
174
+ /**
175
+ * Document endpoints carrying `custom.openapi` metadata.
176
+ * @default true
177
+ */
178
+ includeCustom?: boolean;
179
+ /**
180
+ * Document auth operation endpoints (login/logout/me/...).
181
+ * @default true
182
+ */
183
+ includeAuth?: boolean;
184
+ /**
185
+ * Document admin/bootstrap auth endpoints (/init, first-register, root /access) and the document access endpoints (/{slug}/access/{id}, /globals/{slug}/access).
186
+ * @default false
187
+ */
188
+ includeAdminAuth?: boolean;
189
+ /**
190
+ * Document version operation endpoints (/versions, /versions/{id}).
191
+ * @default true
192
+ */
193
+ includeVersions?: boolean;
194
+ /**
195
+ * Document jobs endpoints (/payload-jobs/run, /handle-schedules).
196
+ * @default true
197
+ */
198
+ includeJobs?: boolean;
199
+ /**
200
+ * Drops operations from every group: collection, global, custom, jobs,
201
+ * system and plugin. An operation is removed when any rule matches it or any
202
+ * function returns `true`.
203
+ * @default []
204
+ */
205
+ excludeOperations?: OperationFilter[];
206
+ }
207
+ export interface OpenApiExtension {
208
+ /** Paths merged into the generated ones. An operation here replaces the generated operation with the same path and method. */
209
+ paths?: PathsObject;
210
+ /** Components deep-merged into the generated ones. */
211
+ components?: ComponentsObject;
212
+ /** Tags appended to the list; a tag whose name already exists is skipped. */
213
+ tags?: TagObject[];
214
+ /**
215
+ * Runs on the finished document and returns the document to use. Gets one
216
+ * object: `doc` plus the {@link ExtensionContext}, e.g. `({ doc, payload }) => doc`.
217
+ * It can be `async`. If it throws, the spec request fails: the plugin never
218
+ * serves a document that skipped a transform.
219
+ */
220
+ transform?: (args: ExtensionContext) => Document | Promise<Document>;
221
+ }
222
+ /** What `extensions[].transform` gets: the finished document and the build context. */
223
+ export type ExtensionContext = BuildContext & {
224
+ doc: Document;
225
+ payload: BasePayload;
226
+ options: ResolvedOptions;
227
+ };
228
+ export type OpenApiPluginOptions = {
229
+ /** The document's `info` object. `title` and `version` are required. See {@link OpenApiInfo}. */
230
+ info: OpenApiInfo;
231
+ /**
232
+ * OpenAPI version to serve. The document is always built as 3.2; `3.1` and
233
+ * `3.0` each run a downconversion pass on the result.
234
+ * @default '3.2'
235
+ */
236
+ openapiVersion?: OpenApiVersion;
237
+ /**
238
+ * Where the spec is served, relative to the Payload API route (`routes.api`,
239
+ * `/api` by default). So the `/openapi.json` default is served at
240
+ * `/api/openapi.json`.
241
+ * @default '/openapi.json'
242
+ */
243
+ path?: string;
244
+ /**
245
+ * Set false to turn the plugin off. It then adds no endpoints, no CLI command
246
+ * and no translations. The plugin adds no collections, so the schema stays the same.
247
+ * @default true
248
+ */
249
+ enabled?: boolean;
250
+ /**
251
+ * Mount the runtime spec (and interactive-auth) endpoints. Set false to
252
+ * register only the `openapi:generate` CLI command and skip serving over
253
+ * HTTP — generate the spec to a file and host it however you like (static
254
+ * asset, CDN, committed to the repo). Point the docs UI plugins' `specURL`
255
+ * at wherever the file ends up.
256
+ * @default true
257
+ */
258
+ serve?: boolean;
259
+ /**
260
+ * Who may read the spec endpoint. Runs on every request.
261
+ * @default open to everyone
262
+ */
263
+ access?: AccessOption;
264
+ /**
265
+ * The spec's `servers`. A function runs on every request. See {@link ServersOption}.
266
+ * @default `[{ url: serverURL }]` when the Payload `serverURL` is set, otherwise `[]` (clients use the spec's own origin)
267
+ */
268
+ servers?: ServersOption;
269
+ /**
270
+ * Hosts the spec may echo back as its server URL. When the request `Host`
271
+ * header (`host` or `host:port`) is on this list, `servers` is
272
+ * `https://<host>` (`http` for localhost and 127.*). The `Host` header comes from
273
+ * the client, so the plugin never uses it unless you list it here. A
274
+ * `servers` option wins over this list.
275
+ * @default []
276
+ */
277
+ trustedHosts?: string[];
278
+ /** What appears in the spec. See {@link FilterOptions}. */
279
+ filters?: FilterOptions;
280
+ /**
281
+ * Interactive docs-UI login. See {@link InteractiveAuthOption}.
282
+ * @default false
283
+ */
284
+ interactiveAuth?: InteractiveAuthOption;
285
+ /**
286
+ * Emit an OpenAPI 3.2 nested tag hierarchy (nav groups via `kind`/`parent`,
287
+ * plus per-entity auth/version sub-tags). Off by default: Scalar and Swagger UI
288
+ * don't render 3.2 nested tags yet and would show a confusing flat list of group
289
+ * names. When off, `doc.tags` is a flat list of per-entity tags with their
290
+ * descriptions.
291
+ * @default false
292
+ */
293
+ nestedTags?: boolean;
294
+ /**
295
+ * Override the security marking per operation. Runs last, after
296
+ * `custom.openapi.security` and the access probe, across every operation
297
+ * group. See {@link SecurityOption}.
298
+ */
299
+ security?: SecurityOption;
300
+ /**
301
+ * Cache the built document for the life of the process. The Payload config is
302
+ * static after boot, so the spec is the same every time apart from
303
+ * `servers`, which is set per request. Set false in dev to rebuild on
304
+ * every request, e.g. `cache: process.env.NODE_ENV === 'production'`.
305
+ * @default true
306
+ */
307
+ cache?: boolean;
308
+ /**
309
+ * Extra paths, components and tags merged into the document, plus a final `transform`.
310
+ * @default []
311
+ */
312
+ extensions?: OpenApiExtension[];
313
+ /**
314
+ * Anonymous usage telemetry: plugin, Payload and Node versions and the features in use. On by default.
315
+ * It never sends secrets, IP addresses, keys, URLs, paths, hostnames or collection names.
316
+ * The first run logs a notice.
317
+ *
318
+ * Off when `payload.config.telemetry` is `false`, when `DO_NOT_TRACK` or `OPENAPI_TELEMETRY_DISABLED`
319
+ * is set, in CI or with `NODE_ENV=test`. Set `false` to turn it off. Pass `{ url }` to use your own collector.
320
+ *
321
+ * @see https://payload-plugin-openapi.seshuk.im/v1/configuration/telemetry
322
+ * @default true
323
+ */
324
+ telemetry?: boolean | {
325
+ /**
326
+ * Collector URL that receives the telemetry report.
327
+ * @default the plugin's public collector
328
+ */
329
+ url?: string;
330
+ };
331
+ };
332
+ export interface UiPluginOptions {
333
+ /**
334
+ * Where the docs UI is served, relative to the Payload API route
335
+ * (`routes.api`, `/api` by default). So the `/docs` default is served at
336
+ * `/api/docs`.
337
+ * @default '/docs'
338
+ */
339
+ path?: string;
340
+ /**
341
+ * URL the UI fetches the OpenAPI document from. Any URL reference works:
342
+ * absolute, root-relative, or relative to the docs page.
343
+ * @default the `openapi()` spec route, `<apiRoute>/openapi.json` unless its `path` is set
344
+ */
345
+ specURL?: string;
346
+ /**
347
+ * Where the UI's assets load from: the script URL for Scalar, the folder with
348
+ * `swagger-ui-bundle.js` and `swagger-ui.css` for Swagger UI. Set it to
349
+ * self-host the assets. The default URL is pinned to one version and loads
350
+ * with Subresource Integrity; a custom URL loads without it.
351
+ * @default the pinned jsDelivr URL
352
+ */
353
+ cdnBase?: string;
354
+ /**
355
+ * Extra UI config, merged into the underlying library's init options (Scalar's
356
+ * `createApiReference` config or Swagger UI's `SwaggerUIBundle`). Must be
357
+ * JSON-serializable, functions aren't supported here.
358
+ * @default {}
359
+ */
360
+ configuration?: Record<string, unknown>;
361
+ /**
362
+ * Who may open the docs page. Runs on every request.
363
+ * @default open to everyone
364
+ */
365
+ access?: AccessOption;
366
+ /**
367
+ * Set false to skip mounting the docs UI.
368
+ * @default true
369
+ */
370
+ enabled?: boolean;
371
+ }
372
+ export interface ResolvedFilters {
373
+ include: EntityMatcher[];
374
+ exclude: EntityMatcher[];
375
+ includeHidden: boolean;
376
+ includeSystem: boolean;
377
+ includeCustom: boolean;
378
+ includeAuth: boolean;
379
+ includeAdminAuth: boolean;
380
+ includeVersions: boolean;
381
+ includeJobs: boolean;
382
+ excludeOperations: OperationFilter[];
383
+ }
384
+ export interface ResolvedOptions {
385
+ info: OpenApiInfo;
386
+ openapiVersion: OpenApiVersion;
387
+ path: string;
388
+ serve: boolean;
389
+ access?: AccessOption;
390
+ servers?: ServersOption;
391
+ trustedHosts: string[];
392
+ filters: ResolvedFilters;
393
+ interactiveAuth: {
394
+ enabled: boolean;
395
+ path: string;
396
+ collection?: string;
397
+ };
398
+ nestedTags: boolean;
399
+ security?: SecurityOption;
400
+ cache: boolean;
401
+ extensions: OpenApiExtension[];
402
+ }
403
+ export interface BuildContext {
404
+ defaultIDType: IDType;
405
+ locales: string[];
406
+ apiRoute: string;
407
+ /** Languages the docs are available in (project `i18n.supportedLanguages`). */
408
+ docLanguages: string[];
409
+ /** Request i18n: resolves Payload entity descriptions and, via {@link makeT}, plugin strings. */
410
+ i18n: I18n;
411
+ }
412
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
1
  export declare const upperFirst: (value: string) => string;
2
2
  export declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
3
3
  export declare const deepMerge: (a: Record<string, unknown>, b: Record<string, unknown>) => Record<string, unknown>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,13 @@
1
+ const upperFirst = (value) => value.length === 0 ? value : value[0].toUpperCase() + value.slice(1);
2
+ const isPlainObject = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
3
+ const deepMerge = (a, b) => {
4
+ const out = { ...a };
5
+ for (const [key, value] of Object.entries(b)) {
6
+ const prev = out[key];
7
+ out[key] = isPlainObject(prev) && isPlainObject(value) ? deepMerge(prev, value) : value;
8
+ }
9
+ return out;
10
+ };
11
+ export { deepMerge, isPlainObject, upperFirst };
12
+
13
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/shared/utils.ts"],"sourcesContent":["export const upperFirst = (value: string): string =>\n value.length === 0 ? value : value[0]!.toUpperCase() + value.slice(1)\n\nexport const isPlainObject = (value: unknown): value is Record<string, unknown> =>\n Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n\nexport const deepMerge = (a: Record<string, unknown>, b: Record<string, unknown>): Record<string, unknown> => {\n const out = { ...a }\n for (const [key, value] of Object.entries(b)) {\n const prev = out[key]\n out[key] = isPlainObject(prev) && isPlainObject(value) ? deepMerge(prev, value) : value\n }\n return out\n}\n"],"mappings":"AAAA,MAAa,cAAc,UACzB,MAAM,WAAW,IAAI,QAAQ,MAAM,EAAE,CAAE,YAAY,IAAI,MAAM,MAAM,CAAC;AAEtE,MAAa,iBAAiB,UAC5B,QAAQ,KAAK,KAAK,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAErE,MAAa,aAAa,GAA4B,MAAwD;CAC5G,MAAM,MAAM,EAAE,GAAG,EAAE;CACnB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,CAAC,GAAG;EAC5C,MAAM,OAAO,IAAI;EACjB,IAAI,OAAO,cAAc,IAAI,KAAK,cAAc,KAAK,IAAI,UAAU,MAAM,KAAK,IAAI;CACpF;CACA,OAAO;AACT"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@seshuk/payload-plugin-openapi",
3
- "version": "0.2.3",
4
- "description": "OpenAPI 3.0/3.1/3.2 spec generator for Payload CMS, with Scalar/Swagger UI.",
3
+ "version": "1.0.0-beta.2",
4
+ "description": "Payload plugin that generates OpenAPI 3.0/3.1/3.2 docs, with Scalar or Swagger UI",
5
5
  "keywords": [
6
- "api-docs",
7
- "cms",
6
+ "api-documentation",
8
7
  "openapi",
9
8
  "openapi-spec",
10
9
  "payload",
10
+ "payload-cms",
11
11
  "payload-plugin",
12
12
  "payloadcms",
13
- "plugin",
13
+ "rest-api",
14
14
  "scalar",
15
15
  "swagger",
16
- "typescript"
16
+ "swagger-ui"
17
17
  ],
18
18
  "homepage": "https://github.com/maximseshuk/payload-plugin-openapi#readme",
19
19
  "bugs": "https://github.com/maximseshuk/payload-plugin-openapi/issues",
@@ -23,65 +23,96 @@
23
23
  "type": "git",
24
24
  "url": "git+https://github.com/maximseshuk/payload-plugin-openapi.git"
25
25
  },
26
- "funding": "https://ko-fi.com/V7V61UCT39",
26
+ "funding": {
27
+ "type": "ko-fi",
28
+ "url": "https://ko-fi.com/seshuk"
29
+ },
27
30
  "files": [
28
31
  "dist"
29
32
  ],
30
33
  "type": "module",
31
34
  "main": "./dist/index.js",
35
+ "module": "./dist/index.js",
32
36
  "types": "./dist/index.d.ts",
33
37
  "exports": {
34
38
  ".": {
35
- "import": "./dist/index.js",
36
39
  "types": "./dist/index.d.ts",
40
+ "import": "./dist/index.js",
37
41
  "default": "./dist/index.js"
38
42
  }
39
43
  },
44
+ "publishConfig": {
45
+ "access": "public",
46
+ "registry": "https://registry.npmjs.org/"
47
+ },
40
48
  "dependencies": {
41
- "@scalar/openapi-types": "^0.9.1"
49
+ "@scalar/openapi-types": "^0.9.7"
42
50
  },
43
51
  "devDependencies": {
44
- "@payloadcms/db-sqlite": "^3.85.1",
45
- "@payloadcms/next": "^3.85.1",
46
- "@payloadcms/translations": "^3.85.1",
47
- "@rslib/core": "^0.22.1",
52
+ "@payloadcms/db-sqlite": "4.0.0-beta.0",
53
+ "@payloadcms/next": "4.0.0-beta.0",
54
+ "@payloadcms/plugin-ecommerce": "4.0.0-beta.0",
55
+ "@payloadcms/plugin-import-export": "4.0.0-beta.0",
56
+ "@payloadcms/plugin-mcp": "4.0.0-beta.0",
57
+ "@payloadcms/plugin-multi-tenant": "4.0.0-beta.0",
58
+ "@payloadcms/plugin-search": "4.0.0-beta.0",
59
+ "@payloadcms/plugin-seo": "4.0.0-beta.0",
60
+ "@payloadcms/plugin-stripe": "4.0.0-beta.0",
61
+ "@payloadcms/storage-r2": "4.0.0-beta.0",
62
+ "@payloadcms/translations": "4.0.0-beta.0",
63
+ "@payloadcms/ui": "4.0.0-beta.0",
48
64
  "@seriousme/openapi-schema-validator": "^2.9.0",
65
+ "@seshuk/payload-plugin-tooling": "0.2.3",
66
+ "@types/node": "^26.1.2",
67
+ "@vitest/coverage-v8": "^5.0.3",
49
68
  "cross-env": "^10.1.0",
50
- "next": "^16.2.9",
51
- "oxfmt": "^0.54.0",
52
- "oxlint": "^1.69.0",
53
- "payload": "^3.85.1",
54
- "react": "^19.2.7",
55
- "react-dom": "^19.2.7",
56
- "typescript": "^6.0.3",
57
- "vite-tsconfig-paths": "7.0.0-alpha.1",
58
- "vitest": "^4.1.8"
69
+ "next": "16.4.0",
70
+ "oxfmt": "^0.72.0",
71
+ "oxlint": "^1.86.0",
72
+ "payload": "4.0.0-beta.0",
73
+ "react": "19.3.0",
74
+ "react-dom": "19.3.0",
75
+ "tsdown": "^0.23.0",
76
+ "typescript": "7.0.2",
77
+ "vitest": "^5.0.3"
59
78
  },
60
79
  "peerDependencies": {
61
- "@payloadcms/translations": "^3.53.0",
62
- "payload": "^3.53.0"
80
+ "@payloadcms/translations": "^4.0.0-beta.0",
81
+ "payload": "^4.0.0-beta.0"
82
+ },
83
+ "devEngines": {
84
+ "packageManager": {
85
+ "name": "pnpm",
86
+ "version": "^12.0.0",
87
+ "onFail": "warn"
88
+ },
89
+ "runtime": {
90
+ "name": "node",
91
+ "version": ">=24.15.0",
92
+ "onFail": "warn"
93
+ }
63
94
  },
64
95
  "engines": {
65
- "node": ">=20.9.0"
96
+ "node": ">=24.15.0"
66
97
  },
67
98
  "scripts": {
68
- "build": "rslib build",
69
- "build:watch": "rslib build --watch",
70
- "dev": "cross-env PAYLOAD_CONFIG_PATH=./tests/payload.config.ts next dev tests --turbo",
71
- "dev:safe": "rm -rf .next && cross-env PAYLOAD_CONFIG_PATH=./tests/payload.config.ts next dev tests --turbo --port 3001",
99
+ "build": "tsdown",
100
+ "build:watch": "tsdown --watch",
101
+ "dev": "cross-env PAYLOAD_CONFIG_PATH=./tests/payload.config.ts DATABASE_URL=file:./tests/payload.db next dev tests",
72
102
  "dev:generate-importmap": "cd tests && cross-env PAYLOAD_CONFIG_PATH=./payload.config.ts payload generate:importmap",
103
+ "dev:safe": "rm -rf tests/.next && cross-env PAYLOAD_CONFIG_PATH=./tests/payload.config.ts DATABASE_URL=file:./tests/payload.db next dev tests --port 3001",
73
104
  "docs:check-links": "pnpm --dir docs check-links",
74
105
  "docs:dev": "pnpm --dir docs dev",
75
106
  "docs:validate": "pnpm --dir docs validate",
76
- "lint": "oxlint src tests",
77
- "lint:fix": "oxlint src tests --fix",
78
- "format": "oxfmt .",
79
- "format:check": "oxfmt --check .",
80
- "test": "vitest run",
81
- "test:watch": "vitest",
82
- "typecheck": "tsc --noEmit",
83
- "release:patch": "pnpm version patch -m \"chore(release): v%s\"",
84
- "release:minor": "pnpm version minor -m \"chore(release): v%s\"",
85
- "release:major": "pnpm version major -m \"chore(release): v%s\""
107
+ "format": "oxfmt",
108
+ "format:check": "oxfmt --check",
109
+ "lint": "oxlint",
110
+ "lint:fix": "oxlint --fix",
111
+ "test": "vitest run -c tests/vitest.config.ts",
112
+ "test:coverage": "vitest run -c tests/vitest.config.ts --coverage",
113
+ "test:int": "vitest run -c tests/vitest.config.ts --project int",
114
+ "test:unit": "vitest run -c tests/vitest.config.ts --project unit",
115
+ "test:watch": "vitest -c tests/vitest.config.ts",
116
+ "typecheck": "tsc --noEmit"
86
117
  }
87
118
  }
@@ -1,25 +0,0 @@
1
- import type { SanitizedConfig } from 'payload';
2
- interface CliArgs {
3
- lang?: string;
4
- out?: string;
5
- server?: string;
6
- }
7
- export declare const parseArgs: (argv: string[]) => CliArgs;
8
- /**
9
- * Bin entrypoint registered automatically by the OpenAPI plugin. Reads resolved
10
- * plugin options from `config.custom[PLUGIN_NAME]` (stashed during config build),
11
- * then writes the OpenAPI document(s) to disk — no HTTP request required.
12
- *
13
- * Flags:
14
- * --lang <code|all> locale for translated descriptions; `all` writes one file
15
- * per supported language. Defaults to the i18n fallback.
16
- * --out <path> output file for a single-language run (default openapi.json).
17
- * --server <url> base URL written to the document's `servers`. The HTTP
18
- * endpoint derives this per request; on disk there's no
19
- * request, so pass it here or leave `servers` empty.
20
- *
21
- * Note: the spec reflects public-access marking only (no per-user access),
22
- * identical to the HTTP endpoint.
23
- */
24
- export declare const script: (config: SanitizedConfig) => Promise<void>;
25
- export {};