@prismicio/client 7.21.0-alpha.1 → 7.21.0-canary.147e3f2

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 (820) hide show
  1. package/dist/Client.cjs +920 -1268
  2. package/dist/Client.cjs.map +1 -1
  3. package/dist/Client.d.cts +704 -0
  4. package/dist/Client.d.cts.map +1 -0
  5. package/dist/Client.d.ts +678 -955
  6. package/dist/Client.d.ts.map +1 -0
  7. package/dist/Client.js +913 -1261
  8. package/dist/Client.js.map +1 -1
  9. package/dist/Migration.cjs +281 -312
  10. package/dist/Migration.cjs.map +1 -1
  11. package/dist/Migration.d.cts +216 -0
  12. package/dist/Migration.d.cts.map +1 -0
  13. package/dist/Migration.d.ts +197 -194
  14. package/dist/Migration.d.ts.map +1 -0
  15. package/dist/Migration.js +280 -311
  16. package/dist/Migration.js.map +1 -1
  17. package/dist/WriteClient.cjs +486 -558
  18. package/dist/WriteClient.cjs.map +1 -1
  19. package/dist/WriteClient.d.cts +262 -0
  20. package/dist/WriteClient.d.cts.map +1 -0
  21. package/dist/WriteClient.d.ts +226 -245
  22. package/dist/WriteClient.d.ts.map +1 -0
  23. package/dist/WriteClient.js +482 -554
  24. package/dist/WriteClient.js.map +1 -1
  25. package/dist/_virtual/rolldown_runtime.cjs +14 -0
  26. package/dist/_virtual/rolldown_runtime.js +13 -0
  27. package/dist/buildQueryURL.cjs +89 -59
  28. package/dist/buildQueryURL.cjs.map +1 -1
  29. package/dist/buildQueryURL.d.cts +212 -0
  30. package/dist/buildQueryURL.d.cts.map +1 -0
  31. package/dist/buildQueryURL.d.ts +164 -161
  32. package/dist/buildQueryURL.d.ts.map +1 -0
  33. package/dist/buildQueryURL.js +89 -59
  34. package/dist/buildQueryURL.js.map +1 -1
  35. package/dist/cookie.cjs +17 -3
  36. package/dist/cookie.cjs.map +1 -1
  37. package/dist/cookie.d.cts +11 -0
  38. package/dist/cookie.d.cts.map +1 -0
  39. package/dist/cookie.d.ts +7 -1
  40. package/dist/cookie.d.ts.map +1 -0
  41. package/dist/cookie.js +12 -4
  42. package/dist/cookie.js.map +1 -1
  43. package/dist/createClient.cjs +32 -5
  44. package/dist/createClient.cjs.map +1 -1
  45. package/dist/createClient.d.cts +41 -0
  46. package/dist/createClient.d.cts.map +1 -0
  47. package/dist/createClient.d.ts +22 -13
  48. package/dist/createClient.d.ts.map +1 -0
  49. package/dist/createClient.js +31 -4
  50. package/dist/createClient.js.map +1 -1
  51. package/dist/createMigration.cjs +21 -5
  52. package/dist/createMigration.cjs.map +1 -1
  53. package/dist/createMigration.d.cts +30 -0
  54. package/dist/createMigration.d.cts.map +1 -0
  55. package/dist/createMigration.d.ts +11 -5
  56. package/dist/createMigration.d.ts.map +1 -0
  57. package/dist/createMigration.js +20 -4
  58. package/dist/createMigration.js.map +1 -1
  59. package/dist/createWriteClient.cjs +29 -5
  60. package/dist/createWriteClient.cjs.map +1 -1
  61. package/dist/createWriteClient.d.cts +38 -0
  62. package/dist/createWriteClient.d.cts.map +1 -0
  63. package/dist/createWriteClient.d.ts +11 -5
  64. package/dist/createWriteClient.d.ts.map +1 -0
  65. package/dist/createWriteClient.js +28 -4
  66. package/dist/createWriteClient.js.map +1 -1
  67. package/dist/errors.cjs +31 -0
  68. package/dist/errors.cjs.map +1 -0
  69. package/dist/errors.d.cts +46 -0
  70. package/dist/errors.d.cts.map +1 -0
  71. package/dist/errors.d.ts +46 -0
  72. package/dist/errors.d.ts.map +1 -0
  73. package/dist/errors.js +22 -0
  74. package/dist/errors.js.map +1 -0
  75. package/dist/filter.cjs +93 -236
  76. package/dist/filter.cjs.map +1 -1
  77. package/dist/filter.d.cts +213 -0
  78. package/dist/filter.d.cts.map +1 -0
  79. package/dist/filter.d.ts +212 -208
  80. package/dist/filter.d.ts.map +1 -0
  81. package/dist/filter.js +93 -237
  82. package/dist/filter.js.map +1 -1
  83. package/dist/getGraphQLEndpoint.cjs +18 -10
  84. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  85. package/dist/getGraphQLEndpoint.d.cts +14 -0
  86. package/dist/getGraphQLEndpoint.d.cts.map +1 -0
  87. package/dist/getGraphQLEndpoint.d.ts +5 -1
  88. package/dist/getGraphQLEndpoint.d.ts.map +1 -0
  89. package/dist/getGraphQLEndpoint.js +18 -10
  90. package/dist/getGraphQLEndpoint.js.map +1 -1
  91. package/dist/getRepositoryEndpoint.cjs +27 -10
  92. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  93. package/dist/getRepositoryEndpoint.d.cts +23 -0
  94. package/dist/getRepositoryEndpoint.d.cts.map +1 -0
  95. package/dist/getRepositoryEndpoint.d.ts +14 -3
  96. package/dist/getRepositoryEndpoint.d.ts.map +1 -0
  97. package/dist/getRepositoryEndpoint.js +27 -10
  98. package/dist/getRepositoryEndpoint.js.map +1 -1
  99. package/dist/getRepositoryName.cjs +22 -14
  100. package/dist/getRepositoryName.cjs.map +1 -1
  101. package/dist/getRepositoryName.d.cts +16 -0
  102. package/dist/getRepositoryName.d.cts.map +1 -0
  103. package/dist/getRepositoryName.d.ts +5 -1
  104. package/dist/getRepositoryName.d.ts.map +1 -0
  105. package/dist/getRepositoryName.js +23 -15
  106. package/dist/getRepositoryName.js.map +1 -1
  107. package/dist/getToolbarSrc.cjs +42 -10
  108. package/dist/getToolbarSrc.cjs.map +1 -1
  109. package/dist/getToolbarSrc.d.cts +38 -0
  110. package/dist/getToolbarSrc.d.cts.map +1 -0
  111. package/dist/getToolbarSrc.d.ts +5 -1
  112. package/dist/getToolbarSrc.d.ts.map +1 -0
  113. package/dist/getToolbarSrc.js +42 -10
  114. package/dist/getToolbarSrc.js.map +1 -1
  115. package/dist/helpers/asDate.cjs +36 -11
  116. package/dist/helpers/asDate.cjs.map +1 -1
  117. package/dist/helpers/asDate.d.cts +29 -0
  118. package/dist/helpers/asDate.d.cts.map +1 -0
  119. package/dist/helpers/asDate.d.ts +20 -8
  120. package/dist/helpers/asDate.d.ts.map +1 -0
  121. package/dist/helpers/asDate.js +36 -12
  122. package/dist/helpers/asDate.js.map +1 -1
  123. package/dist/helpers/asHTML.cjs +76 -79
  124. package/dist/helpers/asHTML.cjs.map +1 -1
  125. package/dist/helpers/asHTML.d.cts +147 -0
  126. package/dist/helpers/asHTML.d.cts.map +1 -0
  127. package/dist/helpers/asHTML.d.ts +84 -78
  128. package/dist/helpers/asHTML.d.ts.map +1 -0
  129. package/dist/helpers/asHTML.js +74 -77
  130. package/dist/helpers/asHTML.js.map +1 -1
  131. package/dist/helpers/asImagePixelDensitySrcSet.cjs +57 -18
  132. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
  133. package/dist/helpers/asImagePixelDensitySrcSet.d.cts +59 -0
  134. package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -0
  135. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +31 -25
  136. package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -0
  137. package/dist/helpers/asImagePixelDensitySrcSet.js +57 -18
  138. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
  139. package/dist/helpers/asImageSrc.cjs +30 -10
  140. package/dist/helpers/asImageSrc.cjs.map +1 -1
  141. package/dist/helpers/asImageSrc.d.cts +34 -0
  142. package/dist/helpers/asImageSrc.d.cts.map +1 -0
  143. package/dist/helpers/asImageSrc.d.ts +20 -14
  144. package/dist/helpers/asImageSrc.d.ts.map +1 -0
  145. package/dist/helpers/asImageSrc.js +30 -10
  146. package/dist/helpers/asImageSrc.js.map +1 -1
  147. package/dist/helpers/asImageWidthSrcSet.cjs +76 -42
  148. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
  149. package/dist/helpers/asImageWidthSrcSet.d.cts +67 -0
  150. package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -0
  151. package/dist/helpers/asImageWidthSrcSet.d.ts +34 -28
  152. package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -0
  153. package/dist/helpers/asImageWidthSrcSet.js +76 -42
  154. package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
  155. package/dist/helpers/asLink.cjs +26 -44
  156. package/dist/helpers/asLink.cjs.map +1 -1
  157. package/dist/helpers/asLink.d.cts +83 -0
  158. package/dist/helpers/asLink.d.cts.map +1 -0
  159. package/dist/helpers/asLink.d.ts +64 -58
  160. package/dist/helpers/asLink.d.ts.map +1 -0
  161. package/dist/helpers/asLink.js +25 -43
  162. package/dist/helpers/asLink.js.map +1 -1
  163. package/dist/helpers/asLinkAttrs.cjs +44 -25
  164. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  165. package/dist/helpers/asLinkAttrs.d.cts +51 -0
  166. package/dist/helpers/asLinkAttrs.d.cts.map +1 -0
  167. package/dist/helpers/asLinkAttrs.d.ts +29 -28
  168. package/dist/helpers/asLinkAttrs.d.ts.map +1 -0
  169. package/dist/helpers/asLinkAttrs.js +43 -24
  170. package/dist/helpers/asLinkAttrs.js.map +1 -1
  171. package/dist/helpers/asText.cjs +15 -20
  172. package/dist/helpers/asText.cjs.map +1 -1
  173. package/dist/helpers/asText.d.cts +62 -0
  174. package/dist/helpers/asText.d.cts.map +1 -0
  175. package/dist/helpers/asText.d.ts +48 -33
  176. package/dist/helpers/asText.d.ts.map +1 -0
  177. package/dist/helpers/asText.js +15 -20
  178. package/dist/helpers/asText.js.map +1 -1
  179. package/dist/helpers/documentToLinkField.cjs +30 -24
  180. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  181. package/dist/helpers/documentToLinkField.d.cts +21 -0
  182. package/dist/helpers/documentToLinkField.d.cts.map +1 -0
  183. package/dist/helpers/documentToLinkField.d.ts +8 -4
  184. package/dist/helpers/documentToLinkField.d.ts.map +1 -0
  185. package/dist/helpers/documentToLinkField.js +30 -24
  186. package/dist/helpers/documentToLinkField.js.map +1 -1
  187. package/dist/helpers/isFilled.cjs +215 -42
  188. package/dist/helpers/isFilled.cjs.map +1 -1
  189. package/dist/helpers/isFilled.d.cts +199 -0
  190. package/dist/helpers/isFilled.d.cts.map +1 -0
  191. package/dist/helpers/isFilled.d.ts +65 -56
  192. package/dist/helpers/isFilled.d.ts.map +1 -0
  193. package/dist/helpers/isFilled.js +210 -44
  194. package/dist/helpers/isFilled.js.map +1 -1
  195. package/dist/helpers/mapSliceZone.cjs +50 -39
  196. package/dist/helpers/mapSliceZone.cjs.map +1 -1
  197. package/dist/helpers/mapSliceZone.d.cts +139 -0
  198. package/dist/helpers/mapSliceZone.d.cts.map +1 -0
  199. package/dist/helpers/mapSliceZone.d.ts +47 -44
  200. package/dist/helpers/mapSliceZone.d.ts.map +1 -0
  201. package/dist/helpers/mapSliceZone.js +50 -40
  202. package/dist/helpers/mapSliceZone.js.map +1 -1
  203. package/dist/index.cjs +109 -94
  204. package/dist/index.cjs.map +1 -1
  205. package/dist/index.d.cts +173 -0
  206. package/dist/index.d.cts.map +1 -0
  207. package/dist/index.d.ts +143 -173
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +31 -73
  210. package/dist/index.js.map +1 -1
  211. package/dist/isRepositoryEndpoint.cjs +20 -9
  212. package/dist/isRepositoryEndpoint.cjs.map +1 -1
  213. package/dist/isRepositoryEndpoint.d.cts +14 -0
  214. package/dist/isRepositoryEndpoint.d.cts.map +1 -0
  215. package/dist/isRepositoryEndpoint.d.ts +7 -3
  216. package/dist/isRepositoryEndpoint.d.ts.map +1 -0
  217. package/dist/isRepositoryEndpoint.js +20 -10
  218. package/dist/isRepositoryEndpoint.js.map +1 -1
  219. package/dist/isRepositoryName.cjs +14 -4
  220. package/dist/isRepositoryName.cjs.map +1 -1
  221. package/dist/isRepositoryName.d.cts +13 -0
  222. package/dist/isRepositoryName.d.cts.map +1 -0
  223. package/dist/isRepositoryName.d.ts +5 -1
  224. package/dist/isRepositoryName.d.ts.map +1 -0
  225. package/dist/isRepositoryName.js +14 -5
  226. package/dist/isRepositoryName.js.map +1 -1
  227. package/dist/lib/devMsg.cjs +22 -5
  228. package/dist/lib/devMsg.cjs.map +1 -1
  229. package/dist/lib/devMsg.js +23 -6
  230. package/dist/lib/devMsg.js.map +1 -1
  231. package/dist/lib/escapeHTML.cjs +36 -39
  232. package/dist/lib/escapeHTML.cjs.map +1 -1
  233. package/dist/lib/escapeHTML.js +36 -40
  234. package/dist/lib/escapeHTML.js.map +1 -1
  235. package/dist/lib/getOptionalLinkProperties.cjs +19 -11
  236. package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
  237. package/dist/lib/getOptionalLinkProperties.js +19 -12
  238. package/dist/lib/getOptionalLinkProperties.js.map +1 -1
  239. package/dist/lib/getPreviewCookie.cjs +25 -16
  240. package/dist/lib/getPreviewCookie.cjs.map +1 -1
  241. package/dist/lib/getPreviewCookie.js +25 -16
  242. package/dist/lib/getPreviewCookie.js.map +1 -1
  243. package/dist/lib/isInternalURL.cjs +15 -6
  244. package/dist/lib/isInternalURL.cjs.map +1 -1
  245. package/dist/lib/isInternalURL.js +15 -7
  246. package/dist/lib/isInternalURL.js.map +1 -1
  247. package/dist/lib/isMigrationValue.cjs +65 -12
  248. package/dist/lib/isMigrationValue.cjs.map +1 -1
  249. package/dist/lib/isMigrationValue.js +63 -13
  250. package/dist/lib/isMigrationValue.js.map +1 -1
  251. package/dist/lib/isValue.cjs +93 -36
  252. package/dist/lib/isValue.cjs.map +1 -1
  253. package/dist/lib/isValue.js +93 -40
  254. package/dist/lib/isValue.js.map +1 -1
  255. package/dist/lib/pLimit.cjs +51 -45
  256. package/dist/lib/pLimit.cjs.map +1 -1
  257. package/dist/lib/pLimit.js +51 -46
  258. package/dist/lib/pLimit.js.map +1 -1
  259. package/dist/lib/request.cjs +54 -37
  260. package/dist/lib/request.cjs.map +1 -1
  261. package/dist/lib/request.d.cts +61 -0
  262. package/dist/lib/request.d.cts.map +1 -0
  263. package/dist/lib/request.d.ts +38 -50
  264. package/dist/lib/request.d.ts.map +1 -0
  265. package/dist/lib/request.js +54 -37
  266. package/dist/lib/request.js.map +1 -1
  267. package/dist/lib/resolveMigrationDocumentData.cjs +147 -125
  268. package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
  269. package/dist/lib/resolveMigrationDocumentData.js +143 -122
  270. package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
  271. package/dist/lib/serializerHelpers.cjs +73 -91
  272. package/dist/lib/serializerHelpers.cjs.map +1 -1
  273. package/dist/lib/serializerHelpers.js +71 -94
  274. package/dist/lib/serializerHelpers.js.map +1 -1
  275. package/dist/lib/throttledWarn.cjs +27 -0
  276. package/dist/lib/throttledWarn.cjs.map +1 -0
  277. package/dist/lib/throttledWarn.js +26 -0
  278. package/dist/lib/throttledWarn.js.map +1 -0
  279. package/dist/lib/validateAssetMetadata.cjs +40 -20
  280. package/dist/lib/validateAssetMetadata.cjs.map +1 -1
  281. package/dist/lib/validateAssetMetadata.js +41 -21
  282. package/dist/lib/validateAssetMetadata.js.map +1 -1
  283. package/dist/package.cjs +19 -0
  284. package/dist/package.cjs.map +1 -0
  285. package/dist/package.js +7 -0
  286. package/dist/package.js.map +1 -0
  287. package/dist/richtext/asText.cjs +18 -10
  288. package/dist/richtext/asText.cjs.map +1 -1
  289. package/dist/richtext/asText.d.cts +18 -0
  290. package/dist/richtext/asText.d.cts.map +1 -0
  291. package/dist/richtext/asText.d.ts +13 -7
  292. package/dist/richtext/asText.d.ts.map +1 -0
  293. package/dist/richtext/asText.js +18 -11
  294. package/dist/richtext/asText.js.map +1 -1
  295. package/dist/richtext/asTree.cjs +106 -107
  296. package/dist/richtext/asTree.cjs.map +1 -1
  297. package/dist/richtext/asTree.d.cts +20 -0
  298. package/dist/richtext/asTree.d.cts.map +1 -0
  299. package/dist/richtext/asTree.d.ts +9 -3
  300. package/dist/richtext/asTree.d.ts.map +1 -0
  301. package/dist/richtext/asTree.js +106 -107
  302. package/dist/richtext/asTree.js.map +1 -1
  303. package/dist/richtext/composeSerializers.cjs +28 -14
  304. package/dist/richtext/composeSerializers.cjs.map +1 -1
  305. package/dist/richtext/composeSerializers.d.cts +22 -0
  306. package/dist/richtext/composeSerializers.d.cts.map +1 -0
  307. package/dist/richtext/composeSerializers.d.ts +8 -2
  308. package/dist/richtext/composeSerializers.d.ts.map +1 -0
  309. package/dist/richtext/composeSerializers.js +28 -15
  310. package/dist/richtext/composeSerializers.js.map +1 -1
  311. package/dist/richtext/serialize.cjs +30 -14
  312. package/dist/richtext/serialize.cjs.map +1 -1
  313. package/dist/richtext/serialize.d.cts +25 -0
  314. package/dist/richtext/serialize.d.cts.map +1 -0
  315. package/dist/richtext/serialize.d.ts +17 -11
  316. package/dist/richtext/serialize.d.ts.map +1 -0
  317. package/dist/richtext/serialize.js +30 -14
  318. package/dist/richtext/serialize.js.map +1 -1
  319. package/dist/richtext/types.cjs +10 -8
  320. package/dist/richtext/types.cjs.map +1 -1
  321. package/dist/richtext/types.d.cts +71 -0
  322. package/dist/richtext/types.d.cts.map +1 -0
  323. package/dist/richtext/types.d.ts +49 -49
  324. package/dist/richtext/types.d.ts.map +1 -0
  325. package/dist/richtext/types.js +10 -8
  326. package/dist/richtext/types.js.map +1 -1
  327. package/dist/richtext/wrapMapSerializer.cjs +29 -21
  328. package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
  329. package/dist/richtext/wrapMapSerializer.d.cts +21 -0
  330. package/dist/richtext/wrapMapSerializer.d.cts.map +1 -0
  331. package/dist/richtext/wrapMapSerializer.d.ts +8 -2
  332. package/dist/richtext/wrapMapSerializer.d.ts.map +1 -0
  333. package/dist/richtext/wrapMapSerializer.js +29 -21
  334. package/dist/richtext/wrapMapSerializer.js.map +1 -1
  335. package/dist/richtext.cjs +13 -15
  336. package/dist/richtext.d.cts +8 -0
  337. package/dist/richtext.d.ts +8 -0
  338. package/dist/richtext.js +4 -11
  339. package/dist/types/api/asset/asset.d.cts +97 -0
  340. package/dist/types/api/asset/asset.d.cts.map +1 -0
  341. package/dist/types/api/asset/asset.d.ts +87 -167
  342. package/dist/types/api/asset/asset.d.ts.map +1 -0
  343. package/dist/types/api/asset/tag.d.cts +35 -0
  344. package/dist/types/api/asset/tag.d.cts.map +1 -0
  345. package/dist/types/api/asset/tag.d.ts +29 -47
  346. package/dist/types/api/asset/tag.d.ts.map +1 -0
  347. package/dist/types/api/integration.d.cts +34 -0
  348. package/dist/types/api/integration.d.cts.map +1 -0
  349. package/dist/types/api/integration.d.ts +17 -11
  350. package/dist/types/api/integration.d.ts.map +1 -0
  351. package/dist/types/api/query.d.cts +49 -0
  352. package/dist/types/api/query.d.cts.map +1 -0
  353. package/dist/types/api/query.d.ts +40 -34
  354. package/dist/types/api/query.d.ts.map +1 -0
  355. package/dist/types/api/ref.d.cts +36 -0
  356. package/dist/types/api/ref.d.cts.map +1 -0
  357. package/dist/types/api/ref.d.ts +30 -26
  358. package/dist/types/api/ref.d.ts.map +1 -0
  359. package/dist/types/api/release.d.cts +17 -0
  360. package/dist/types/api/release.d.cts.map +1 -0
  361. package/dist/types/api/release.d.ts +8 -2
  362. package/dist/types/api/release.d.ts.map +1 -0
  363. package/dist/types/api/repository.d.cts +115 -0
  364. package/dist/types/api/repository.d.cts.map +1 -0
  365. package/dist/types/api/repository.d.ts +90 -84
  366. package/dist/types/api/repository.d.ts.map +1 -0
  367. package/dist/types/api/tags.d.cts +13 -0
  368. package/dist/types/api/tags.d.cts.map +1 -0
  369. package/dist/types/api/tags.d.ts +5 -1
  370. package/dist/types/api/tags.d.ts.map +1 -0
  371. package/dist/types/migration/Asset.cjs +34 -32
  372. package/dist/types/migration/Asset.cjs.map +1 -1
  373. package/dist/types/migration/Asset.d.cts +109 -0
  374. package/dist/types/migration/Asset.d.cts.map +1 -0
  375. package/dist/types/migration/Asset.d.ts +89 -88
  376. package/dist/types/migration/Asset.d.ts.map +1 -0
  377. package/dist/types/migration/Asset.js +33 -32
  378. package/dist/types/migration/Asset.js.map +1 -1
  379. package/dist/types/migration/ContentRelationship.d.cts +15 -0
  380. package/dist/types/migration/ContentRelationship.d.cts.map +1 -0
  381. package/dist/types/migration/ContentRelationship.d.ts +10 -11
  382. package/dist/types/migration/ContentRelationship.d.ts.map +1 -0
  383. package/dist/types/migration/Document.cjs +50 -46
  384. package/dist/types/migration/Document.cjs.map +1 -1
  385. package/dist/types/migration/Document.d.cts +97 -0
  386. package/dist/types/migration/Document.d.cts.map +1 -0
  387. package/dist/types/migration/Document.d.ts +62 -59
  388. package/dist/types/migration/Document.d.ts.map +1 -0
  389. package/dist/types/migration/Document.js +49 -46
  390. package/dist/types/migration/Document.js.map +1 -1
  391. package/dist/types/model/boolean.d.cts +21 -0
  392. package/dist/types/model/boolean.d.cts.map +1 -0
  393. package/dist/types/model/boolean.d.ts +15 -9
  394. package/dist/types/model/boolean.d.ts.map +1 -0
  395. package/dist/types/model/color.d.cts +19 -0
  396. package/dist/types/model/color.d.cts.map +1 -0
  397. package/dist/types/model/color.d.ts +13 -7
  398. package/dist/types/model/color.d.ts.map +1 -0
  399. package/dist/types/model/contentRelationship.d.cts +59 -0
  400. package/dist/types/model/contentRelationship.d.cts.map +1 -0
  401. package/dist/types/model/contentRelationship.d.ts +33 -26
  402. package/dist/types/model/contentRelationship.d.ts.map +1 -0
  403. package/dist/types/model/customType.d.cts +54 -0
  404. package/dist/types/model/customType.d.cts.map +1 -0
  405. package/dist/types/model/customType.d.ts +36 -30
  406. package/dist/types/model/customType.d.ts.map +1 -0
  407. package/dist/types/model/date.d.cts +20 -0
  408. package/dist/types/model/date.d.cts.map +1 -0
  409. package/dist/types/model/date.d.ts +14 -8
  410. package/dist/types/model/date.d.ts.map +1 -0
  411. package/dist/types/model/embed.d.cts +19 -0
  412. package/dist/types/model/embed.d.cts.map +1 -0
  413. package/dist/types/model/embed.d.ts +13 -7
  414. package/dist/types/model/embed.d.ts.map +1 -0
  415. package/dist/types/model/geoPoint.d.cts +18 -0
  416. package/dist/types/model/geoPoint.d.cts.map +1 -0
  417. package/dist/types/model/geoPoint.d.ts +12 -6
  418. package/dist/types/model/geoPoint.d.ts.map +1 -0
  419. package/dist/types/model/group.d.cts +29 -0
  420. package/dist/types/model/group.d.cts.map +1 -0
  421. package/dist/types/model/group.d.ts +14 -8
  422. package/dist/types/model/group.d.ts.map +1 -0
  423. package/dist/types/model/image.d.cts +37 -0
  424. package/dist/types/model/image.d.cts.map +1 -0
  425. package/dist/types/model/image.d.ts +19 -13
  426. package/dist/types/model/image.d.ts.map +1 -0
  427. package/dist/types/model/integration.d.cts +20 -0
  428. package/dist/types/model/integration.d.cts.map +1 -0
  429. package/dist/types/model/integration.d.ts +14 -8
  430. package/dist/types/model/integration.d.ts.map +1 -0
  431. package/dist/types/model/keyText.d.cts +19 -0
  432. package/dist/types/model/keyText.d.cts.map +1 -0
  433. package/dist/types/model/keyText.d.ts +13 -7
  434. package/dist/types/model/keyText.d.ts.map +1 -0
  435. package/dist/types/model/link.cjs +13 -6
  436. package/dist/types/model/link.cjs.map +1 -1
  437. package/dist/types/model/link.d.cts +34 -0
  438. package/dist/types/model/link.d.cts.map +1 -0
  439. package/dist/types/model/link.d.ts +22 -16
  440. package/dist/types/model/link.d.ts.map +1 -0
  441. package/dist/types/model/link.js +13 -7
  442. package/dist/types/model/link.js.map +1 -1
  443. package/dist/types/model/linkToMedia.d.cts +23 -0
  444. package/dist/types/model/linkToMedia.d.cts.map +1 -0
  445. package/dist/types/model/linkToMedia.d.ts +17 -11
  446. package/dist/types/model/linkToMedia.d.ts.map +1 -0
  447. package/dist/types/model/number.d.cts +21 -0
  448. package/dist/types/model/number.d.cts.map +1 -0
  449. package/dist/types/model/number.d.ts +15 -9
  450. package/dist/types/model/number.d.ts.map +1 -0
  451. package/dist/types/model/range.d.cts +20 -0
  452. package/dist/types/model/range.d.cts.map +1 -0
  453. package/dist/types/model/range.d.ts +16 -10
  454. package/dist/types/model/range.d.ts.map +1 -0
  455. package/dist/types/model/richText.d.cts +43 -0
  456. package/dist/types/model/richText.d.cts.map +1 -0
  457. package/dist/types/model/richText.d.ts +26 -20
  458. package/dist/types/model/richText.d.ts.map +1 -0
  459. package/dist/types/model/select.d.cts +24 -0
  460. package/dist/types/model/select.d.cts.map +1 -0
  461. package/dist/types/model/select.d.ts +15 -9
  462. package/dist/types/model/select.d.ts.map +1 -0
  463. package/dist/types/model/separator.d.cts +16 -0
  464. package/dist/types/model/separator.d.cts.map +1 -0
  465. package/dist/types/model/separator.d.ts +12 -6
  466. package/dist/types/model/separator.d.ts.map +1 -0
  467. package/dist/types/model/sharedSlice.d.cts +22 -0
  468. package/dist/types/model/sharedSlice.d.cts.map +1 -0
  469. package/dist/types/model/sharedSlice.d.ts +14 -8
  470. package/dist/types/model/sharedSlice.d.ts.map +1 -0
  471. package/dist/types/model/sharedSliceVariation.d.cts +25 -0
  472. package/dist/types/model/sharedSliceVariation.d.cts.map +1 -0
  473. package/dist/types/model/sharedSliceVariation.d.ts +16 -10
  474. package/dist/types/model/sharedSliceVariation.d.ts.map +1 -0
  475. package/dist/types/model/slice.cjs +12 -5
  476. package/dist/types/model/slice.cjs.map +1 -1
  477. package/dist/types/model/slice.d.cts +39 -0
  478. package/dist/types/model/slice.d.cts.map +1 -0
  479. package/dist/types/model/slice.d.ts +21 -15
  480. package/dist/types/model/slice.d.ts.map +1 -0
  481. package/dist/types/model/slice.js +12 -6
  482. package/dist/types/model/slice.js.map +1 -1
  483. package/dist/types/model/sliceZone.cjs +12 -5
  484. package/dist/types/model/sliceZone.cjs.map +1 -1
  485. package/dist/types/model/sliceZone.d.cts +47 -0
  486. package/dist/types/model/sliceZone.d.cts.map +1 -0
  487. package/dist/types/model/sliceZone.d.ts +23 -17
  488. package/dist/types/model/sliceZone.d.ts.map +1 -0
  489. package/dist/types/model/sliceZone.js +12 -6
  490. package/dist/types/model/sliceZone.js.map +1 -1
  491. package/dist/types/model/table.d.cts +18 -0
  492. package/dist/types/model/table.d.cts.map +1 -0
  493. package/dist/types/model/table.d.ts +12 -6
  494. package/dist/types/model/table.d.ts.map +1 -0
  495. package/dist/types/model/timestamp.d.cts +20 -0
  496. package/dist/types/model/timestamp.d.cts.map +1 -0
  497. package/dist/types/model/timestamp.d.ts +14 -8
  498. package/dist/types/model/timestamp.d.ts.map +1 -0
  499. package/dist/types/model/title.d.cts +13 -0
  500. package/dist/types/model/title.d.cts.map +1 -0
  501. package/dist/types/model/title.d.ts +8 -2
  502. package/dist/types/model/title.d.ts.map +1 -0
  503. package/dist/types/model/types.cjs +29 -36
  504. package/dist/types/model/types.cjs.map +1 -1
  505. package/dist/types/model/types.d.cts +82 -0
  506. package/dist/types/model/types.d.cts.map +1 -0
  507. package/dist/types/model/types.d.ts +66 -61
  508. package/dist/types/model/types.d.ts.map +1 -0
  509. package/dist/types/model/types.js +29 -37
  510. package/dist/types/model/types.js.map +1 -1
  511. package/dist/types/model/uid.d.cts +19 -0
  512. package/dist/types/model/uid.d.cts.map +1 -0
  513. package/dist/types/model/uid.d.ts +13 -7
  514. package/dist/types/model/uid.d.ts.map +1 -0
  515. package/dist/types/value/boolean.d.cts +10 -0
  516. package/dist/types/value/boolean.d.cts.map +1 -0
  517. package/dist/types/value/boolean.d.ts +5 -1
  518. package/dist/types/value/boolean.d.ts.map +1 -0
  519. package/dist/types/value/color.d.cts +15 -0
  520. package/dist/types/value/color.d.cts.map +1 -0
  521. package/dist/types/value/color.d.ts +8 -2
  522. package/dist/types/value/color.d.ts.map +1 -0
  523. package/dist/types/value/contentRelationship.d.cts +37 -0
  524. package/dist/types/value/contentRelationship.d.cts.map +1 -0
  525. package/dist/types/value/contentRelationship.d.ts +23 -17
  526. package/dist/types/value/contentRelationship.d.ts.map +1 -0
  527. package/dist/types/value/date.d.cts +15 -0
  528. package/dist/types/value/date.d.cts.map +1 -0
  529. package/dist/types/value/date.d.ts +8 -2
  530. package/dist/types/value/date.d.ts.map +1 -0
  531. package/dist/types/value/document.d.cts +120 -0
  532. package/dist/types/value/document.d.cts.map +1 -0
  533. package/dist/types/value/document.d.ts +90 -84
  534. package/dist/types/value/document.d.ts.map +1 -0
  535. package/dist/types/value/embed.cjs +14 -7
  536. package/dist/types/value/embed.cjs.map +1 -1
  537. package/dist/types/value/embed.d.cts +173 -0
  538. package/dist/types/value/embed.d.cts.map +1 -0
  539. package/dist/types/value/embed.d.ts +110 -105
  540. package/dist/types/value/embed.d.ts.map +1 -0
  541. package/dist/types/value/embed.js +14 -8
  542. package/dist/types/value/embed.js.map +1 -1
  543. package/dist/types/value/geoPoint.d.cts +18 -0
  544. package/dist/types/value/geoPoint.d.cts.map +1 -0
  545. package/dist/types/value/geoPoint.d.ts +10 -4
  546. package/dist/types/value/geoPoint.d.ts.map +1 -0
  547. package/dist/types/value/group.d.cts +19 -0
  548. package/dist/types/value/group.d.cts.map +1 -0
  549. package/dist/types/value/group.d.ts +9 -3
  550. package/dist/types/value/group.d.ts.map +1 -0
  551. package/dist/types/value/image.d.cts +53 -0
  552. package/dist/types/value/image.d.cts.map +1 -0
  553. package/dist/types/value/image.d.ts +31 -25
  554. package/dist/types/value/image.d.ts.map +1 -0
  555. package/dist/types/value/integration.d.cts +22 -0
  556. package/dist/types/value/integration.d.cts.map +1 -0
  557. package/dist/types/value/integration.d.ts +9 -3
  558. package/dist/types/value/integration.d.ts.map +1 -0
  559. package/dist/types/value/keyText.d.cts +15 -0
  560. package/dist/types/value/keyText.d.cts.map +1 -0
  561. package/dist/types/value/keyText.d.ts +8 -2
  562. package/dist/types/value/keyText.d.ts.map +1 -0
  563. package/dist/types/value/link.cjs +12 -7
  564. package/dist/types/value/link.cjs.map +1 -1
  565. package/dist/types/value/link.d.cts +74 -0
  566. package/dist/types/value/link.d.cts.map +1 -0
  567. package/dist/types/value/link.d.ts +27 -21
  568. package/dist/types/value/link.d.ts.map +1 -0
  569. package/dist/types/value/link.js +12 -8
  570. package/dist/types/value/link.js.map +1 -1
  571. package/dist/types/value/linkToMedia.d.cts +33 -0
  572. package/dist/types/value/linkToMedia.d.cts.map +1 -0
  573. package/dist/types/value/linkToMedia.d.ts +19 -14
  574. package/dist/types/value/linkToMedia.d.ts.map +1 -0
  575. package/dist/types/value/number.d.cts +15 -0
  576. package/dist/types/value/number.d.cts.map +1 -0
  577. package/dist/types/value/number.d.ts +8 -2
  578. package/dist/types/value/number.d.ts.map +1 -0
  579. package/dist/types/value/richText.cjs +29 -22
  580. package/dist/types/value/richText.cjs.map +1 -1
  581. package/dist/types/value/richText.d.cts +221 -0
  582. package/dist/types/value/richText.d.cts.map +1 -0
  583. package/dist/types/value/richText.d.ts +103 -97
  584. package/dist/types/value/richText.d.ts.map +1 -0
  585. package/dist/types/value/richText.js +29 -23
  586. package/dist/types/value/richText.js.map +1 -1
  587. package/dist/types/value/select.d.cts +16 -0
  588. package/dist/types/value/select.d.cts.map +1 -0
  589. package/dist/types/value/select.d.ts +8 -2
  590. package/dist/types/value/select.d.ts.map +1 -0
  591. package/dist/types/value/sharedSlice.d.cts +17 -0
  592. package/dist/types/value/sharedSlice.d.cts.map +1 -0
  593. package/dist/types/value/sharedSlice.d.ts +11 -5
  594. package/dist/types/value/sharedSlice.d.ts.map +1 -0
  595. package/dist/types/value/sharedSliceVariation.d.cts +16 -0
  596. package/dist/types/value/sharedSliceVariation.d.cts.map +1 -0
  597. package/dist/types/value/sharedSliceVariation.d.ts +12 -6
  598. package/dist/types/value/sharedSliceVariation.d.ts.map +1 -0
  599. package/dist/types/value/slice.d.cts +19 -0
  600. package/dist/types/value/slice.d.cts.map +1 -0
  601. package/dist/types/value/slice.d.ts +13 -7
  602. package/dist/types/value/slice.d.ts.map +1 -0
  603. package/dist/types/value/sliceZone.d.cts +18 -0
  604. package/dist/types/value/sliceZone.d.cts.map +1 -0
  605. package/dist/types/value/sliceZone.d.ts +10 -4
  606. package/dist/types/value/sliceZone.d.ts.map +1 -0
  607. package/dist/types/value/table.d.cts +97 -0
  608. package/dist/types/value/table.d.cts.map +1 -0
  609. package/dist/types/value/table.d.ts +65 -59
  610. package/dist/types/value/table.d.ts.map +1 -0
  611. package/dist/types/value/timestamp.d.cts +13 -0
  612. package/dist/types/value/timestamp.d.cts.map +1 -0
  613. package/dist/types/value/timestamp.d.ts +8 -3
  614. package/dist/types/value/timestamp.d.ts.map +1 -0
  615. package/dist/types/value/title.d.cts +16 -0
  616. package/dist/types/value/title.d.cts.map +1 -0
  617. package/dist/types/value/title.d.ts +11 -7
  618. package/dist/types/value/title.d.ts.map +1 -0
  619. package/dist/types/value/types.d.cts +61 -0
  620. package/dist/types/value/types.d.cts.map +1 -0
  621. package/dist/types/value/types.d.ts +31 -28
  622. package/dist/types/value/types.d.ts.map +1 -0
  623. package/dist/types/webhook/apiUpdate.d.cts +57 -0
  624. package/dist/types/webhook/apiUpdate.d.cts.map +1 -0
  625. package/dist/types/webhook/apiUpdate.d.ts +28 -23
  626. package/dist/types/webhook/apiUpdate.d.ts.map +1 -0
  627. package/dist/types/webhook/testTrigger.d.cts +15 -0
  628. package/dist/types/webhook/testTrigger.d.cts.map +1 -0
  629. package/dist/types/webhook/testTrigger.d.ts +9 -3
  630. package/dist/types/webhook/testTrigger.d.ts.map +1 -0
  631. package/dist/types/webhook/types.cjs +12 -5
  632. package/dist/types/webhook/types.cjs.map +1 -1
  633. package/dist/types/webhook/types.d.cts +23 -0
  634. package/dist/types/webhook/types.d.cts.map +1 -0
  635. package/dist/types/webhook/types.d.ts +16 -11
  636. package/dist/types/webhook/types.d.ts.map +1 -0
  637. package/dist/types/webhook/types.js +12 -6
  638. package/dist/types/webhook/types.js.map +1 -1
  639. package/package.json +20 -49
  640. package/src/Client.ts +682 -1028
  641. package/src/WriteClient.ts +44 -46
  642. package/src/buildQueryURL.ts +41 -39
  643. package/src/createClient.ts +11 -8
  644. package/src/errors.ts +94 -0
  645. package/src/getGraphQLEndpoint.ts +1 -1
  646. package/src/getRepositoryEndpoint.ts +10 -3
  647. package/src/getRepositoryName.ts +1 -1
  648. package/src/getToolbarSrc.ts +1 -1
  649. package/src/helpers/asDate.ts +11 -4
  650. package/src/helpers/asHTML.ts +38 -30
  651. package/src/helpers/asImagePixelDensitySrcSet.ts +16 -15
  652. package/src/helpers/asImageSrc.ts +11 -10
  653. package/src/helpers/asImageWidthSrcSet.ts +19 -22
  654. package/src/helpers/asLink.ts +33 -35
  655. package/src/helpers/asLinkAttrs.ts +6 -13
  656. package/src/helpers/asText.ts +20 -10
  657. package/src/helpers/isFilled.ts +15 -14
  658. package/src/helpers/mapSliceZone.ts +15 -15
  659. package/src/index.ts +13 -10
  660. package/src/isRepositoryEndpoint.ts +2 -2
  661. package/src/lib/isValue.ts +0 -6
  662. package/src/lib/pLimit.ts +1 -1
  663. package/src/lib/request.ts +3 -3
  664. package/src/lib/{throttledLog.ts → throttledWarn.ts} +3 -14
  665. package/src/lib/validateAssetMetadata.ts +1 -1
  666. package/src/richtext/asText.ts +5 -5
  667. package/src/richtext/serialize.ts +8 -8
  668. package/src/richtext/types.ts +6 -6
  669. package/src/types/migration/Asset.ts +10 -2
  670. package/src/types/migration/Document.ts +1 -1
  671. package/src/types/model/contentRelationship.ts +1 -0
  672. package/src/types/model/types.ts +0 -2
  673. package/src/types/value/date.ts +1 -1
  674. package/src/types/value/document.ts +3 -3
  675. package/src/types/value/timestamp.ts +1 -5
  676. package/dist/errors/ForbiddenError.cjs +0 -7
  677. package/dist/errors/ForbiddenError.cjs.map +0 -1
  678. package/dist/errors/ForbiddenError.d.ts +0 -11
  679. package/dist/errors/ForbiddenError.js +0 -7
  680. package/dist/errors/ForbiddenError.js.map +0 -1
  681. package/dist/errors/InvalidDataError.cjs +0 -7
  682. package/dist/errors/InvalidDataError.cjs.map +0 -1
  683. package/dist/errors/InvalidDataError.d.ts +0 -3
  684. package/dist/errors/InvalidDataError.js +0 -7
  685. package/dist/errors/InvalidDataError.js.map +0 -1
  686. package/dist/errors/NotFoundError.cjs +0 -7
  687. package/dist/errors/NotFoundError.cjs.map +0 -1
  688. package/dist/errors/NotFoundError.d.ts +0 -3
  689. package/dist/errors/NotFoundError.js +0 -7
  690. package/dist/errors/NotFoundError.js.map +0 -1
  691. package/dist/errors/ParsingError.cjs +0 -7
  692. package/dist/errors/ParsingError.cjs.map +0 -1
  693. package/dist/errors/ParsingError.d.ts +0 -14
  694. package/dist/errors/ParsingError.js +0 -7
  695. package/dist/errors/ParsingError.js.map +0 -1
  696. package/dist/errors/PreviewTokenExpired.cjs +0 -7
  697. package/dist/errors/PreviewTokenExpired.cjs.map +0 -1
  698. package/dist/errors/PreviewTokenExpired.d.ts +0 -8
  699. package/dist/errors/PreviewTokenExpired.js +0 -7
  700. package/dist/errors/PreviewTokenExpired.js.map +0 -1
  701. package/dist/errors/PrismicError.cjs +0 -16
  702. package/dist/errors/PrismicError.cjs.map +0 -1
  703. package/dist/errors/PrismicError.d.ts +0 -5
  704. package/dist/errors/PrismicError.js +0 -16
  705. package/dist/errors/PrismicError.js.map +0 -1
  706. package/dist/errors/RefExpiredError.cjs +0 -7
  707. package/dist/errors/RefExpiredError.cjs.map +0 -1
  708. package/dist/errors/RefExpiredError.d.ts +0 -8
  709. package/dist/errors/RefExpiredError.js +0 -7
  710. package/dist/errors/RefExpiredError.js.map +0 -1
  711. package/dist/errors/RefNotFoundError.cjs +0 -7
  712. package/dist/errors/RefNotFoundError.cjs.map +0 -1
  713. package/dist/errors/RefNotFoundError.d.ts +0 -8
  714. package/dist/errors/RefNotFoundError.js +0 -7
  715. package/dist/errors/RefNotFoundError.js.map +0 -1
  716. package/dist/errors/RepositoryNotFoundError.cjs +0 -7
  717. package/dist/errors/RepositoryNotFoundError.cjs.map +0 -1
  718. package/dist/errors/RepositoryNotFoundError.d.ts +0 -3
  719. package/dist/errors/RepositoryNotFoundError.js +0 -7
  720. package/dist/errors/RepositoryNotFoundError.js.map +0 -1
  721. package/dist/lib/appendFilters.cjs +0 -11
  722. package/dist/lib/appendFilters.cjs.map +0 -1
  723. package/dist/lib/appendFilters.d.ts +0 -18
  724. package/dist/lib/appendFilters.js +0 -11
  725. package/dist/lib/appendFilters.js.map +0 -1
  726. package/dist/lib/castArray.cjs +0 -7
  727. package/dist/lib/castArray.cjs.map +0 -1
  728. package/dist/lib/castArray.d.ts +0 -12
  729. package/dist/lib/castArray.js +0 -7
  730. package/dist/lib/castArray.js.map +0 -1
  731. package/dist/lib/castThunk.cjs +0 -7
  732. package/dist/lib/castThunk.cjs.map +0 -1
  733. package/dist/lib/castThunk.d.ts +0 -11
  734. package/dist/lib/castThunk.js +0 -7
  735. package/dist/lib/castThunk.js.map +0 -1
  736. package/dist/lib/devMsg.d.ts +0 -16
  737. package/dist/lib/escapeHTML.d.ts +0 -1
  738. package/dist/lib/everyTagFilter.cjs +0 -9
  739. package/dist/lib/everyTagFilter.cjs.map +0 -1
  740. package/dist/lib/everyTagFilter.d.ts +0 -9
  741. package/dist/lib/everyTagFilter.js +0 -9
  742. package/dist/lib/everyTagFilter.js.map +0 -1
  743. package/dist/lib/findMasterRef.cjs +0 -8
  744. package/dist/lib/findMasterRef.cjs.map +0 -1
  745. package/dist/lib/findMasterRef.d.ts +0 -11
  746. package/dist/lib/findMasterRef.js +0 -8
  747. package/dist/lib/findMasterRef.js.map +0 -1
  748. package/dist/lib/findRef.cjs +0 -12
  749. package/dist/lib/findRef.cjs.map +0 -1
  750. package/dist/lib/findRef.d.ts +0 -14
  751. package/dist/lib/findRef.js +0 -12
  752. package/dist/lib/findRef.js.map +0 -1
  753. package/dist/lib/findRefByID.cjs +0 -8
  754. package/dist/lib/findRefByID.cjs.map +0 -1
  755. package/dist/lib/findRefByID.d.ts +0 -12
  756. package/dist/lib/findRefByID.js +0 -8
  757. package/dist/lib/findRefByID.js.map +0 -1
  758. package/dist/lib/findRefByLabel.cjs +0 -8
  759. package/dist/lib/findRefByLabel.cjs.map +0 -1
  760. package/dist/lib/findRefByLabel.d.ts +0 -12
  761. package/dist/lib/findRefByLabel.js +0 -8
  762. package/dist/lib/findRefByLabel.js.map +0 -1
  763. package/dist/lib/getOptionalLinkProperties.d.ts +0 -12
  764. package/dist/lib/getPreviewCookie.d.ts +0 -9
  765. package/dist/lib/isInternalURL.d.ts +0 -8
  766. package/dist/lib/isMigrationValue.d.ts +0 -71
  767. package/dist/lib/isValue.d.ts +0 -78
  768. package/dist/lib/minifyGraphQLQuery.cjs +0 -7
  769. package/dist/lib/minifyGraphQLQuery.cjs.map +0 -1
  770. package/dist/lib/minifyGraphQLQuery.d.ts +0 -8
  771. package/dist/lib/minifyGraphQLQuery.js +0 -7
  772. package/dist/lib/minifyGraphQLQuery.js.map +0 -1
  773. package/dist/lib/pLimit.d.ts +0 -22
  774. package/dist/lib/resolveMigrationDocumentData.d.ts +0 -54
  775. package/dist/lib/serializerHelpers.d.ts +0 -9
  776. package/dist/lib/someTagsFilter.cjs +0 -9
  777. package/dist/lib/someTagsFilter.cjs.map +0 -1
  778. package/dist/lib/someTagsFilter.d.ts +0 -9
  779. package/dist/lib/someTagsFilter.js +0 -9
  780. package/dist/lib/someTagsFilter.js.map +0 -1
  781. package/dist/lib/throttledLog.cjs +0 -17
  782. package/dist/lib/throttledLog.cjs.map +0 -1
  783. package/dist/lib/throttledLog.d.ts +0 -15
  784. package/dist/lib/throttledLog.js +0 -17
  785. package/dist/lib/throttledLog.js.map +0 -1
  786. package/dist/lib/typeFilter.cjs +0 -8
  787. package/dist/lib/typeFilter.cjs.map +0 -1
  788. package/dist/lib/typeFilter.d.ts +0 -8
  789. package/dist/lib/typeFilter.js +0 -8
  790. package/dist/lib/typeFilter.js.map +0 -1
  791. package/dist/lib/validateAssetMetadata.d.ts +0 -10
  792. package/dist/package.json.cjs +0 -7
  793. package/dist/package.json.cjs.map +0 -1
  794. package/dist/package.json.js +0 -7
  795. package/dist/package.json.js.map +0 -1
  796. package/dist/richtext/index.d.ts +0 -7
  797. package/dist/richtext.cjs.map +0 -1
  798. package/dist/richtext.js.map +0 -1
  799. package/dist/types/api/migration/document.d.ts +0 -60
  800. package/dist/types/migration/Link.d.ts +0 -19
  801. package/src/errors/ForbiddenError.ts +0 -16
  802. package/src/errors/InvalidDataError.ts +0 -5
  803. package/src/errors/NotFoundError.ts +0 -5
  804. package/src/errors/ParsingError.ts +0 -16
  805. package/src/errors/PreviewTokenExpired.ts +0 -12
  806. package/src/errors/PrismicError.ts +0 -15
  807. package/src/errors/RefExpiredError.ts +0 -14
  808. package/src/errors/RefNotFoundError.ts +0 -14
  809. package/src/errors/RepositoryNotFoundError.ts +0 -5
  810. package/src/lib/appendFilters.ts +0 -26
  811. package/src/lib/castArray.ts +0 -14
  812. package/src/lib/castThunk.ts +0 -13
  813. package/src/lib/everyTagFilter.ts +0 -15
  814. package/src/lib/findMasterRef.ts +0 -16
  815. package/src/lib/findRef.ts +0 -25
  816. package/src/lib/findRefByID.ts +0 -17
  817. package/src/lib/findRefByLabel.ts +0 -17
  818. package/src/lib/minifyGraphQLQuery.ts +0 -13
  819. package/src/lib/someTagsFilter.ts +0 -15
  820. package/src/lib/typeFilter.ts +0 -12
@@ -81,11 +81,11 @@ export const title = richText as (
81
81
  ) => field is TitleField<"filled">
82
82
 
83
83
  /**
84
- * Determines if an Image thumbnail is filled.
84
+ * Determines if an image thumbnail is filled.
85
85
  *
86
86
  * @param thumbnail - Image thumbnail to check.
87
87
  *
88
- * @returns `true` if `field` is filled, `false` otherwise.
88
+ * @returns `true` if the thumbnail is filled, `false` otherwise.
89
89
  */
90
90
  export const imageThumbnail = (
91
91
  thumbnail: ImageFieldImage | null | undefined,
@@ -139,9 +139,9 @@ export const linkToMedia = link as (
139
139
  /**
140
140
  * Determines if a content relationship field is filled.
141
141
  *
142
- * @param field - Content Relationship field to check.
142
+ * @param field - Content relationship field to check.
143
143
  *
144
- * @returns `true` if `field` is filled, `false` otherwise.
144
+ * @returns `true` if the field is filled, `false` otherwise.
145
145
  */
146
146
  export const contentRelationship = link as <
147
147
  Field extends ContentRelationshipField,
@@ -196,14 +196,14 @@ export const number = isNonNullish as (
196
196
  /**
197
197
  * Determines if a key text field is filled.
198
198
  *
199
- * @param field - Key Text field to check.
199
+ * @param field - Key text field to check.
200
200
  *
201
- * @returns `true` if `field` is filled, `false` otherwise.
201
+ * @returns `true` if the field is filled, `false` otherwise.
202
202
  */
203
203
  export const keyText = (
204
204
  field: KeyTextField | null | undefined,
205
205
  ): field is KeyTextField<"filled"> => {
206
- return isNonNullish(keyText) && !!field
206
+ return !!field
207
207
  }
208
208
 
209
209
  /**
@@ -233,9 +233,9 @@ export const embed = <Field extends EmbedField<AnyOEmbed>>(
233
233
  /**
234
234
  * Determines if a geopoint field is filled.
235
235
  *
236
- * @param field - GeoPoint field to check.
236
+ * @param field - Geopoint field to check.
237
237
  *
238
- * @returns `true` if `field` is filled, `false` otherwise.
238
+ * @returns `true` if the field is filled, `false` otherwise.
239
239
  */
240
240
  export const geoPoint = (
241
241
  field: GeoPointField | null | undefined,
@@ -290,11 +290,11 @@ export const repeatable = <T extends LinkField>(
290
290
  }
291
291
 
292
292
  /**
293
- * Determines if a Group has at least one item.
293
+ * Determines if a group has at least one item.
294
294
  *
295
295
  * @param group - Group to check.
296
296
  *
297
- * @returns `true` if `group` contains at least one item, `false` otherwise.
297
+ * @returns `true` if the group contains at least one item, `false` otherwise.
298
298
  */
299
299
  export const group = <
300
300
  Fields extends Record<string, AnyRegularField | NestedGroupField>,
@@ -305,11 +305,12 @@ export const group = <
305
305
  }
306
306
 
307
307
  /**
308
- * Determines if a Slice Zone has at least one Slice.
308
+ * Determines if a slice zone has at least one slice.
309
309
  *
310
- * @param slices - Slice Zone to check.
310
+ * @param slices - Slice zone to check.
311
311
  *
312
- * @returns `true` if `slices` contains at least one Slice, `false` otherwise.
312
+ * @returns `true` if the slice zone contains at least one slice, `false`
313
+ * otherwise.
313
314
  */
314
315
  export const sliceZone = <Slices extends Slice | SharedSlice>(
315
316
  slices: SliceZone<Slices> | null | undefined,
@@ -11,7 +11,7 @@ type LazyModule<T> = () => Promise<T | { default: T }>
11
11
  */
12
12
  type MaybeLazyModule<T> = T | LazyModule<T>
13
13
 
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ // oxlint-disable-next-line no-explicit-any
15
15
  type AnyFunction = (...args: any[]) => any
16
16
 
17
17
  /**
@@ -26,10 +26,10 @@ type ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2
26
26
  : never
27
27
 
28
28
  /**
29
- * The minimum required properties to represent a Prismic Slice from the Prismic
30
- * Rest API V2 for the `mapSliceZone()` helper.
29
+ * The minimum required properties to represent a Prismic slice from the Prismic
30
+ * Content API for the `mapSliceZone()` helper.
31
31
  *
32
- * @typeParam SliceType - Type name of the Slice.
32
+ * @typeParam SliceType - Type name of the slice.
33
33
  */
34
34
  type SliceLikeRestV2<TSliceType extends string = string> = Pick<
35
35
  Slice<TSliceType>,
@@ -37,23 +37,23 @@ type SliceLikeRestV2<TSliceType extends string = string> = Pick<
37
37
  >
38
38
 
39
39
  /**
40
- * The minimum required properties to represent a Prismic Slice from the Prismic
40
+ * The minimum required properties to represent a Prismic slice from the Prismic
41
41
  * GraphQL API for the `mapSliceZone()` helper.
42
42
  *
43
- * @typeParam SliceType - Type name of the Slice.
43
+ * @typeParam SliceType - Type name of the slice.
44
44
  */
45
45
  type SliceLikeGraphQL<TSliceType extends string = string> = {
46
46
  type: Slice<TSliceType>["slice_type"]
47
47
  }
48
48
 
49
49
  /**
50
- * The minimum required properties to represent a Prismic Slice for the
50
+ * The minimum required properties to represent a Prismic slice for the
51
51
  * `mapSliceZone()` helper.
52
52
  *
53
- * If using Prismic's Rest API V2, use the `Slice` export from
53
+ * If using Prismic's Content API, use the `Slice` export from
54
54
  * `@prismicio/client` for a full interface.
55
55
  *
56
- * @typeParam SliceType - Type name of the Slice.
56
+ * @typeParam SliceType - Type name of the slice.
57
57
  */
58
58
  type SliceLike<TSliceType extends string = string> =
59
59
  | SliceLikeRestV2<TSliceType>
@@ -63,10 +63,10 @@ type SliceLike<TSliceType extends string = string> =
63
63
  * A looser version of the `SliceZone` type from `@prismicio/client` using
64
64
  * `SliceLike`.
65
65
  *
66
- * If using Prismic's Rest API V2, use the `SliceZone` export from
66
+ * If using Prismic's Content API, use the `SliceZone` export from
67
67
  * `@prismicio/client` for the full type.
68
68
  *
69
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
69
+ * @typeParam TSlice - The type(s) of a slice in the slice zone.
70
70
  */
71
71
  type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[]
72
72
 
@@ -132,7 +132,7 @@ type SliceMappers<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
132
132
  [P in ExtractSliceType<TSlice>]?: MaybeLazyModule<
133
133
  SliceMapper<
134
134
  Extract<TSlice, SliceLike<P>>,
135
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
135
+ // oxlint-disable-next-line no-explicit-any
136
136
  any,
137
137
  TContext
138
138
  >
@@ -158,7 +158,7 @@ export type SliceMapper<
158
158
  * Unwraps a lazily loaded mapper module.
159
159
  */
160
160
  type ResolveLazySliceMapperModule<
161
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
161
+ // oxlint-disable-next-line no-explicit-any
162
162
  TSliceMapper extends SliceMapper<any, any> | LazyModule<SliceMapper>,
163
163
  > =
164
164
  TSliceMapper extends LazyModule<SliceMapper>
@@ -173,11 +173,11 @@ type ResolveLazySliceMapperModule<
173
173
  * Transforms a Slice into its mapped version.
174
174
  */
175
175
  type MapSliceLike<
176
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
176
+ // oxlint-disable-next-line no-explicit-any
177
177
  TSliceLike extends SliceLike<any>,
178
178
  TSliceMappers extends SliceMappers<
179
179
  TSliceLike,
180
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
180
+ // oxlint-disable-next-line no-explicit-any
181
181
  any
182
182
  >,
183
183
  > = TSliceLike extends Slice
package/src/index.ts CHANGED
@@ -117,14 +117,17 @@ export type { HTMLRichTextSerializer } from "./helpers/asHTML"
117
117
  //=============================================================================
118
118
 
119
119
  // Client Errors
120
- export { PrismicError } from "./errors/PrismicError"
121
- export { ForbiddenError } from "./errors/ForbiddenError"
122
- export { NotFoundError } from "./errors/NotFoundError"
123
- export { RefNotFoundError } from "./errors/RefNotFoundError"
124
- export { RefExpiredError } from "./errors/RefExpiredError"
125
- export { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired"
126
- export { ParsingError } from "./errors/ParsingError"
127
- export { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError"
120
+ export {
121
+ ForbiddenError,
122
+ InvalidDataError,
123
+ NotFoundError,
124
+ ParsingError,
125
+ PreviewTokenExpiredError,
126
+ PrismicError,
127
+ RefExpiredError,
128
+ RefNotFoundError,
129
+ RepositoryNotFoundError,
130
+ } from "./errors"
128
131
 
129
132
  //=============================================================================
130
133
  // Types - Types representing Prismic content, models, and API payloads.
@@ -360,7 +363,7 @@ export type {
360
363
  } from "./types/migration/Asset"
361
364
  export type { MigrationContentRelationship } from "./types/migration/ContentRelationship"
362
365
 
363
- // API - Types representing Prismic Rest API V2 responses.
366
+ // API - Types representing Prismic Content API responses.
364
367
  export type { Query } from "./types/api/query"
365
368
 
366
369
  export type { Ref } from "./types/api/ref"
@@ -377,7 +380,7 @@ export type {
377
380
  export type { Tags } from "./types/api/tags"
378
381
 
379
382
  // Integration - Types representing Prismic's integration API.
380
- export {
383
+ export type {
381
384
  IntegrationAPIItem,
382
385
  IntegrationAPIResults,
383
386
  } from "./types/api/integration"
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid
2
+ * Determines if a string is a Prismic Content API endpoint. Note that any valid
3
3
  * URL is a valid endpoint to support network proxies.
4
4
  *
5
5
  * @param input - Input to test.
6
6
  *
7
- * @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`
7
+ * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
8
8
  * otherwise.
9
9
  */
10
10
  export const isRepositoryEndpoint = (input: string): boolean => {
@@ -44,8 +44,6 @@ export const filledLinkToMedia = (
44
44
  "url" in value &&
45
45
  "size" in value
46
46
  ) {
47
- value
48
-
49
47
  return true
50
48
  }
51
49
  }
@@ -104,8 +102,6 @@ export const filledImage = (
104
102
  imageLike(value) &&
105
103
  (!("type" in value) || value.type !== RichTextNodeType.image)
106
104
  ) {
107
- value
108
-
109
105
  return true
110
106
  }
111
107
 
@@ -128,8 +124,6 @@ export const rtImageNode = (value: UnknownValue): value is RTImageNode => {
128
124
  "type" in value &&
129
125
  value.type === RichTextNodeType.image
130
126
  ) {
131
- value
132
-
133
127
  return true
134
128
  }
135
129
 
package/src/lib/pLimit.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  ** Many thanks to @sindresorhus
4
4
  */
5
5
 
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
+ // oxlint-disable-next-line no-explicit-any
7
7
  type AnyFunction = (...arguments_: readonly any[]) => unknown
8
8
 
9
9
  const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
@@ -40,7 +40,7 @@ export type FetchLike = (
40
40
  // different AbortSignal implementations. The types of each property are not
41
41
  // important to validate since it is blindly passed to a given `fetch()`
42
42
  // function.
43
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
+ // oxlint-disable-next-line no-explicit-any
44
44
  export type AbortSignalLike = any
45
45
 
46
46
  /**
@@ -62,7 +62,7 @@ export interface RequestInitLike extends Pick<RequestInit, "cache"> {
62
62
  */
63
63
  // We want to keep the body type as compatible as possible, so
64
64
  // we only declare the type we need and accept anything else.
65
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
65
+ // oxlint-disable-next-line no-explicit-any
66
66
  body?: any | FormData | string
67
67
 
68
68
  /**
@@ -90,7 +90,7 @@ export interface ResponseLike {
90
90
  status: number
91
91
  headers: HeadersLike
92
92
  url: string
93
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
+ // oxlint-disable-next-line no-explicit-any
94
94
  json(): Promise<any>
95
95
  text(): Promise<string>
96
96
  blob(): Promise<Blob>
@@ -4,7 +4,7 @@ let lastMessage: string | undefined
4
4
  let lastCalledAt = 0
5
5
 
6
6
  /**
7
- * Logs a message. If the message is identical the immediate previous logged
7
+ * Logs a warning. If the message is identical the immediate previous logged
8
8
  * message and that message was logged within 5 seconds of the current call, the
9
9
  * log is ignored. This throttle behavior prevents identical messages from
10
10
  * flooding the console.
@@ -12,17 +12,7 @@ let lastCalledAt = 0
12
12
  * @param message - A message to log.
13
13
  * @param config - Configuration for the log.
14
14
  */
15
- export const throttledLog = (
16
- message: string,
17
- config: {
18
- /**
19
- * The log level. Matches the global `console` log levels.
20
- */
21
- level?: "log" | "warn" | "error"
22
- } = {},
23
- ): void => {
24
- const { level = "log" } = config
25
-
15
+ export const throttledWarn = (message: string): void => {
26
16
  if (
27
17
  message === lastMessage &&
28
18
  Date.now() - lastCalledAt < THROTTLE_THRESHOLD_MS
@@ -35,6 +25,5 @@ export const throttledLog = (
35
25
  lastCalledAt = Date.now()
36
26
  lastMessage = message
37
27
 
38
- // eslint-disable-next-line no-console
39
- console[level](message)
28
+ console.warn(message)
40
29
  }
@@ -1,4 +1,4 @@
1
- import { PrismicError } from "../errors/PrismicError"
1
+ import { PrismicError } from "../errors"
2
2
 
3
3
  import type { CreateAssetParams } from "../WriteClient"
4
4
 
@@ -1,14 +1,14 @@
1
1
  import type { RTTextNode, RichTextField } from "../types/value/richText"
2
2
 
3
3
  /**
4
- * Serializes a rich text or title field to a plain text string
4
+ * Converts a rich text field to a plain text string.
5
5
  *
6
- * @param richTextField - A rich text or title field from Prismic
7
- * @param separator - Separator used to join each element, defaults to a space
6
+ * @param richTextField - A rich text field from Prismic.
7
+ * @param separator - Separator used to join each element. Defaults to a space.
8
8
  *
9
- * @returns Plain text equivalent of the provided rich text or title field
9
+ * @returns Plain text equivalent of the rich text field.
10
10
  *
11
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
11
+ * @see Learn how to work with rich text fields: {@link https://prismic.io/docs/fields/rich-text}
12
12
  */
13
13
  export const asText = (
14
14
  richTextField: RichTextField,
@@ -4,20 +4,20 @@ import type { RichTextFunctionSerializer, TreeNode } from "./types"
4
4
  import { asTree } from "./asTree"
5
5
 
6
6
  /**
7
- * Serializes a rich text or title field with a given serializer
7
+ * Serializes a rich text field with a given serializer.
8
8
  *
9
9
  * @remarks
10
- * This is a low level helper mainly intended to be used by higher level
11
- * packages Most users aren't expected to this function directly
10
+ * This is a low-level helper mainly intended to be used by higher-level
11
+ * packages. Most users aren't expected to use this function directly.
12
12
  *
13
- * @typeParam SerializerReturnType - Return type of the serializer
13
+ * @typeParam SerializerReturnType - Return type of the serializer.
14
14
  *
15
- * @param richTextField - A rich text or title field from Prismic
16
- * @param serializer - A function serializer to apply
15
+ * @param richTextField - A rich text field from Prismic.
16
+ * @param serializer - A function serializer to apply.
17
17
  *
18
- * @returns An array of serialized nodes
18
+ * @returns An array of serialized nodes.
19
19
  *
20
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
20
+ * @see Learn how to work with rich text fields: {@link https://prismic.io/docs/fields/rich-text}
21
21
  */
22
22
  export const serialize = <SerializerReturnType>(
23
23
  richTextField: RichTextField,
@@ -28,9 +28,9 @@ import { RichTextNodeType } from "../types/value/richText"
28
28
  /**
29
29
  * Serializes a node from a rich text or title field with a function
30
30
  *
31
- * @typeParam ReturnType - Return type of the function serializer
31
+ * @typeParam ReturnType - Return type of the function serializer.
32
32
  *
33
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
33
+ * @see Learn how to work with rich text fields: {@link https://prismic.io/docs/fields/rich-text}
34
34
  */
35
35
  export type RichTextFunctionSerializer<ReturnType> = (
36
36
  type: RichTextNodeTypes,
@@ -59,15 +59,15 @@ export type RichTextMapSerializerFunction<
59
59
  }) => ReturnType | null | undefined
60
60
 
61
61
  /**
62
- * Serializes a node from a rich text or title field with a map
62
+ * Serializes a node from a rich text field with a map.
63
63
  *
64
64
  * @remarks
65
65
  * This type of serializer needs to be processed through
66
- * {@link wrapMapSerializer} before being used with {@link serialize}
66
+ * {@link wrapMapSerializer} before being used with {@link serialize}.
67
67
  *
68
- * @typeParam ReturnType - Return type of the map serializer
68
+ * @typeParam ReturnType - Return type of the map serializer.
69
69
  *
70
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
70
+ * @see Learn how to work with rich text fields: {@link https://prismic.io/docs/fields/rich-text}
71
71
  */
72
72
  export type RichTextMapSerializer<ReturnType> = {
73
73
  heading1?: RichTextMapSerializerFunction<
@@ -17,12 +17,20 @@ export type MigrationAssetConfig = {
17
17
  * `file` property. It is mainly used for deduplication within a `Migration`
18
18
  * instance.
19
19
  */
20
- id: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0]
20
+ id:
21
+ | string
22
+ | URL
23
+ | File
24
+ | NonNullable<ConstructorParameters<typeof File>[0]>[0]
21
25
 
22
26
  /**
23
27
  * File to be uploaded as an asset.
24
28
  */
25
- file: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0]
29
+ file:
30
+ | string
31
+ | URL
32
+ | File
33
+ | NonNullable<ConstructorParameters<typeof File>[0]>[0]
26
34
 
27
35
  /**
28
36
  * Filename of the asset.
@@ -39,7 +39,7 @@ export type InjectMigrationSpecificTypes<T> = T extends RTImageNode
39
39
  | InjectMigrationSpecificTypes<
40
40
  Omit<T, "id" | "slice_label" | "version">
41
41
  >
42
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ : // oxlint-disable-next-line no-explicit-any
43
43
  T extends Record<any, any>
44
44
  ? { [P in keyof T]: InjectMigrationSpecificTypes<T[P]> }
45
45
  : T extends Array<infer U>
@@ -58,6 +58,7 @@ export interface CustomTypeModelContentRelationshipField<
58
58
  Tags extends string = string,
59
59
  > {
60
60
  type: typeof CustomTypeModelFieldType.Link
61
+ fieldset?: string | null
61
62
  config?: {
62
63
  label?: string | null
63
64
  placeholder?: string
@@ -63,8 +63,6 @@ export const CustomTypeModelFieldType = {
63
63
  LegacySlices: "Choice",
64
64
  } as const
65
65
 
66
- export type CustomTypeModelFieldType = typeof CustomTypeModelFieldType
67
-
68
66
  /**
69
67
  * A custom type field.
70
68
  */
@@ -8,4 +8,4 @@ import type { FieldState } from "./types"
8
8
  * @see More details: {@link https://prismic.io/docs/date}
9
9
  */
10
10
  export type DateField<State extends FieldState = FieldState> =
11
- State extends "empty" ? null : `${number}-${number}-${number}`
11
+ State extends "empty" ? null : string
@@ -83,7 +83,7 @@ export interface PrismicDocument<
83
83
  DataInterface extends Record<
84
84
  string,
85
85
  AnyRegularField | GroupField | SliceZone
86
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
+ // oxlint-disable-next-line no-explicit-any
87
87
  > = Record<string, any>,
88
88
  TypeEnum = string,
89
89
  LangEnum = string,
@@ -105,7 +105,7 @@ export interface PrismicDocumentWithoutUID<
105
105
  DataInterface extends Record<
106
106
  string,
107
107
  AnyRegularField | GroupField | SliceZone
108
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
108
+ // oxlint-disable-next-line no-explicit-any
109
109
  > = Record<string, any>,
110
110
  TypeEnum = string,
111
111
  LangEnum = string,
@@ -131,7 +131,7 @@ export interface PrismicDocumentWithUID<
131
131
  DataInterface extends Record<
132
132
  string,
133
133
  AnyRegularField | GroupField | SliceZone
134
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
134
+ // oxlint-disable-next-line no-explicit-any
135
135
  > = Record<string, any>,
136
136
  TypeEnum = string,
137
137
  LangEnum = string,
@@ -1,13 +1,9 @@
1
1
  import type { FieldState } from "./types"
2
2
 
3
- import type { DateField } from "./date"
4
-
5
3
  /**
6
4
  * A timestamp field.
7
5
  *
8
6
  * @typeParam State - State of the field which determines its shape.
9
7
  */
10
8
  export type TimestampField<State extends FieldState = FieldState> =
11
- State extends "empty"
12
- ? null
13
- : `${DateField<"filled">}T${number}:${number}:${number}+${number}`
9
+ State extends "empty" ? null : string
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PrismicError = require("./PrismicError.cjs");
4
- class ForbiddenError extends PrismicError.PrismicError {
5
- }
6
- exports.ForbiddenError = ForbiddenError;
7
- //# sourceMappingURL=ForbiddenError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForbiddenError.cjs","sources":["../../../src/errors/ForbiddenError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\ntype ForbiddenErrorRepositoryAPIResponse = {\n\ttype: string\n\tmessage: string\n}\n\ntype ForbiddenErrorQueryAPIResponse = {\n\terror: string\n}\n\nexport class ForbiddenError<\n\tTResponse =\n\t\t| ForbiddenErrorRepositoryAPIResponse\n\t\t| ForbiddenErrorQueryAPIResponse,\n> extends PrismicError<TResponse> {}\n"],"names":["PrismicError"],"mappings":";;;AAWM,MAAO,uBAIHA,aAAAA,aAAuB;AAAG;;"}
@@ -1,11 +0,0 @@
1
- import { PrismicError } from "./PrismicError";
2
- type ForbiddenErrorRepositoryAPIResponse = {
3
- type: string;
4
- message: string;
5
- };
6
- type ForbiddenErrorQueryAPIResponse = {
7
- error: string;
8
- };
9
- export declare class ForbiddenError<TResponse = ForbiddenErrorRepositoryAPIResponse | ForbiddenErrorQueryAPIResponse> extends PrismicError<TResponse> {
10
- }
11
- export {};
@@ -1,7 +0,0 @@
1
- import { PrismicError } from "./PrismicError.js";
2
- class ForbiddenError extends PrismicError {
3
- }
4
- export {
5
- ForbiddenError
6
- };
7
- //# sourceMappingURL=ForbiddenError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForbiddenError.js","sources":["../../../src/errors/ForbiddenError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\ntype ForbiddenErrorRepositoryAPIResponse = {\n\ttype: string\n\tmessage: string\n}\n\ntype ForbiddenErrorQueryAPIResponse = {\n\terror: string\n}\n\nexport class ForbiddenError<\n\tTResponse =\n\t\t| ForbiddenErrorRepositoryAPIResponse\n\t\t| ForbiddenErrorQueryAPIResponse,\n> extends PrismicError<TResponse> {}\n"],"names":[],"mappings":";AAWM,MAAO,uBAIH,aAAuB;AAAG;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PrismicError = require("./PrismicError.cjs");
4
- class InvalidDataError extends PrismicError.PrismicError {
5
- }
6
- exports.InvalidDataError = InvalidDataError;
7
- //# sourceMappingURL=InvalidDataError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InvalidDataError.cjs","sources":["../../../src/errors/InvalidDataError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\nexport class InvalidDataError<\n\tTResponse = undefined,\n> extends PrismicError<TResponse> {}\n"],"names":["PrismicError"],"mappings":";;;AAEM,MAAO,yBAEHA,aAAAA,aAAuB;AAAG;;"}
@@ -1,3 +0,0 @@
1
- import { PrismicError } from "./PrismicError";
2
- export declare class InvalidDataError<TResponse = undefined> extends PrismicError<TResponse> {
3
- }
@@ -1,7 +0,0 @@
1
- import { PrismicError } from "./PrismicError.js";
2
- class InvalidDataError extends PrismicError {
3
- }
4
- export {
5
- InvalidDataError
6
- };
7
- //# sourceMappingURL=InvalidDataError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InvalidDataError.js","sources":["../../../src/errors/InvalidDataError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\nexport class InvalidDataError<\n\tTResponse = undefined,\n> extends PrismicError<TResponse> {}\n"],"names":[],"mappings":";AAEM,MAAO,yBAEH,aAAuB;AAAG;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PrismicError = require("./PrismicError.cjs");
4
- class NotFoundError extends PrismicError.PrismicError {
5
- }
6
- exports.NotFoundError = NotFoundError;
7
- //# sourceMappingURL=NotFoundError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFoundError.cjs","sources":["../../../src/errors/NotFoundError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\nexport class NotFoundError<\n\tTResponse = undefined,\n> extends PrismicError<TResponse> {}\n"],"names":["PrismicError"],"mappings":";;;AAEM,MAAO,sBAEHA,aAAAA,aAAuB;AAAG;;"}
@@ -1,3 +0,0 @@
1
- import { PrismicError } from "./PrismicError";
2
- export declare class NotFoundError<TResponse = undefined> extends PrismicError<TResponse> {
3
- }
@@ -1,7 +0,0 @@
1
- import { PrismicError } from "./PrismicError.js";
2
- class NotFoundError extends PrismicError {
3
- }
4
- export {
5
- NotFoundError
6
- };
7
- //# sourceMappingURL=NotFoundError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFoundError.js","sources":["../../../src/errors/NotFoundError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\nexport class NotFoundError<\n\tTResponse = undefined,\n> extends PrismicError<TResponse> {}\n"],"names":[],"mappings":";AAEM,MAAO,sBAEH,aAAuB;AAAG;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PrismicError = require("./PrismicError.cjs");
4
- class ParsingError extends PrismicError.PrismicError {
5
- }
6
- exports.ParsingError = ParsingError;
7
- //# sourceMappingURL=ParsingError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParsingError.cjs","sources":["../../../src/errors/ParsingError.ts"],"sourcesContent":["import { PrismicError } from \"./PrismicError\"\n\ntype ParsingErrorAPIResponse = {\n\ttype: \"parsing-error\"\n\tmessage: string\n\tpos: {\n\t\tline: number\n\t\tcolumn: number\n\t\tid: number\n\t\tlocation: string\n\t}\n}\n\nexport class ParsingError<\n\tTResponse = ParsingErrorAPIResponse,\n> extends PrismicError<TResponse> {}\n"],"names":["PrismicError"],"mappings":";;;AAaM,MAAO,qBAEHA,aAAAA,aAAuB;AAAG;;"}