@prismicio/client 7.21.7 → 7.21.8

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 (593) hide show
  1. package/dist/Client.cjs +190 -263
  2. package/dist/Client.cjs.map +1 -1
  3. package/dist/Client.d.cts +175 -241
  4. package/dist/Client.d.cts.map +1 -1
  5. package/dist/Client.d.ts +175 -241
  6. package/dist/Client.d.ts.map +1 -1
  7. package/dist/Client.js +190 -263
  8. package/dist/Client.js.map +1 -1
  9. package/dist/Migration.cjs +54 -86
  10. package/dist/Migration.cjs.map +1 -1
  11. package/dist/Migration.d.cts +50 -84
  12. package/dist/Migration.d.cts.map +1 -1
  13. package/dist/Migration.d.ts +50 -84
  14. package/dist/Migration.d.ts.map +1 -1
  15. package/dist/Migration.js +54 -86
  16. package/dist/Migration.js.map +1 -1
  17. package/dist/WriteClient.cjs +39 -77
  18. package/dist/WriteClient.cjs.map +1 -1
  19. package/dist/WriteClient.d.cts +24 -63
  20. package/dist/WriteClient.d.cts.map +1 -1
  21. package/dist/WriteClient.d.ts +24 -63
  22. package/dist/WriteClient.d.ts.map +1 -1
  23. package/dist/WriteClient.js +39 -77
  24. package/dist/WriteClient.js.map +1 -1
  25. package/dist/buildQueryURL.cjs +15 -22
  26. package/dist/buildQueryURL.cjs.map +1 -1
  27. package/dist/buildQueryURL.d.cts +53 -63
  28. package/dist/buildQueryURL.d.cts.map +1 -1
  29. package/dist/buildQueryURL.d.ts +53 -63
  30. package/dist/buildQueryURL.d.ts.map +1 -1
  31. package/dist/buildQueryURL.js +15 -22
  32. package/dist/buildQueryURL.js.map +1 -1
  33. package/dist/cookie.cjs +1 -4
  34. package/dist/cookie.cjs.map +1 -1
  35. package/dist/cookie.d.cts +1 -4
  36. package/dist/cookie.d.cts.map +1 -1
  37. package/dist/cookie.d.ts +1 -4
  38. package/dist/cookie.d.ts.map +1 -1
  39. package/dist/cookie.js +1 -4
  40. package/dist/cookie.js.map +1 -1
  41. package/dist/createClient.cjs +10 -14
  42. package/dist/createClient.cjs.map +1 -1
  43. package/dist/createClient.d.cts +11 -18
  44. package/dist/createClient.d.cts.map +1 -1
  45. package/dist/createClient.d.ts +11 -18
  46. package/dist/createClient.d.ts.map +1 -1
  47. package/dist/createClient.js +10 -14
  48. package/dist/createClient.js.map +1 -1
  49. package/dist/createMigration.cjs +4 -7
  50. package/dist/createMigration.cjs.map +1 -1
  51. package/dist/createMigration.d.cts +5 -11
  52. package/dist/createMigration.d.cts.map +1 -1
  53. package/dist/createMigration.d.ts +5 -11
  54. package/dist/createMigration.d.ts.map +1 -1
  55. package/dist/createMigration.js +4 -7
  56. package/dist/createMigration.js.map +1 -1
  57. package/dist/createWriteClient.cjs +8 -13
  58. package/dist/createWriteClient.cjs.map +1 -1
  59. package/dist/createWriteClient.d.cts +10 -15
  60. package/dist/createWriteClient.d.cts.map +1 -1
  61. package/dist/createWriteClient.d.ts +10 -15
  62. package/dist/createWriteClient.d.ts.map +1 -1
  63. package/dist/createWriteClient.js +8 -13
  64. package/dist/createWriteClient.js.map +1 -1
  65. package/dist/errors.cjs.map +1 -1
  66. package/dist/errors.d.cts.map +1 -1
  67. package/dist/errors.d.ts.map +1 -1
  68. package/dist/errors.js.map +1 -1
  69. package/dist/filter.cjs +5 -18
  70. package/dist/filter.cjs.map +1 -1
  71. package/dist/filter.d.cts +59 -63
  72. package/dist/filter.d.cts.map +1 -1
  73. package/dist/filter.d.ts +59 -63
  74. package/dist/filter.d.ts.map +1 -1
  75. package/dist/filter.js +5 -18
  76. package/dist/filter.js.map +1 -1
  77. package/dist/getGraphQLEndpoint.cjs +0 -2
  78. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  79. package/dist/getGraphQLEndpoint.d.cts +0 -2
  80. package/dist/getGraphQLEndpoint.d.cts.map +1 -1
  81. package/dist/getGraphQLEndpoint.d.ts +0 -2
  82. package/dist/getGraphQLEndpoint.d.ts.map +1 -1
  83. package/dist/getGraphQLEndpoint.js +0 -2
  84. package/dist/getGraphQLEndpoint.js.map +1 -1
  85. package/dist/getRepositoryEndpoint.cjs +4 -8
  86. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  87. package/dist/getRepositoryEndpoint.d.cts +4 -8
  88. package/dist/getRepositoryEndpoint.d.cts.map +1 -1
  89. package/dist/getRepositoryEndpoint.d.ts +4 -8
  90. package/dist/getRepositoryEndpoint.d.ts.map +1 -1
  91. package/dist/getRepositoryEndpoint.js +4 -8
  92. package/dist/getRepositoryEndpoint.js.map +1 -1
  93. package/dist/getRepositoryName.cjs +2 -5
  94. package/dist/getRepositoryName.cjs.map +1 -1
  95. package/dist/getRepositoryName.d.cts +2 -5
  96. package/dist/getRepositoryName.d.cts.map +1 -1
  97. package/dist/getRepositoryName.d.ts +2 -5
  98. package/dist/getRepositoryName.d.ts.map +1 -1
  99. package/dist/getRepositoryName.js +2 -5
  100. package/dist/getRepositoryName.js.map +1 -1
  101. package/dist/getToolbarSrc.cjs +17 -19
  102. package/dist/getToolbarSrc.cjs.map +1 -1
  103. package/dist/getToolbarSrc.d.cts +17 -19
  104. package/dist/getToolbarSrc.d.cts.map +1 -1
  105. package/dist/getToolbarSrc.d.ts +17 -19
  106. package/dist/getToolbarSrc.d.ts.map +1 -1
  107. package/dist/getToolbarSrc.js +17 -19
  108. package/dist/getToolbarSrc.js.map +1 -1
  109. package/dist/helpers/asDate.cjs +6 -9
  110. package/dist/helpers/asDate.cjs.map +1 -1
  111. package/dist/helpers/asDate.d.cts +5 -10
  112. package/dist/helpers/asDate.d.cts.map +1 -1
  113. package/dist/helpers/asDate.d.ts +5 -10
  114. package/dist/helpers/asDate.d.ts.map +1 -1
  115. package/dist/helpers/asDate.js +6 -9
  116. package/dist/helpers/asDate.js.map +1 -1
  117. package/dist/helpers/asHTML.cjs +25 -26
  118. package/dist/helpers/asHTML.cjs.map +1 -1
  119. package/dist/helpers/asHTML.d.cts +29 -55
  120. package/dist/helpers/asHTML.d.cts.map +1 -1
  121. package/dist/helpers/asHTML.d.ts +29 -55
  122. package/dist/helpers/asHTML.d.ts.map +1 -1
  123. package/dist/helpers/asHTML.js +25 -26
  124. package/dist/helpers/asHTML.js.map +1 -1
  125. package/dist/helpers/asImagePixelDensitySrcSet.cjs +21 -27
  126. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
  127. package/dist/helpers/asImagePixelDensitySrcSet.d.cts +25 -36
  128. package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
  129. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +25 -36
  130. package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
  131. package/dist/helpers/asImagePixelDensitySrcSet.js +21 -27
  132. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
  133. package/dist/helpers/asImageSrc.cjs +7 -12
  134. package/dist/helpers/asImageSrc.cjs.map +1 -1
  135. package/dist/helpers/asImageSrc.d.cts +8 -15
  136. package/dist/helpers/asImageSrc.d.cts.map +1 -1
  137. package/dist/helpers/asImageSrc.d.ts +8 -15
  138. package/dist/helpers/asImageSrc.d.ts.map +1 -1
  139. package/dist/helpers/asImageSrc.js +7 -12
  140. package/dist/helpers/asImageSrc.js.map +1 -1
  141. package/dist/helpers/asImageWidthSrcSet.cjs +25 -32
  142. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
  143. package/dist/helpers/asImageWidthSrcSet.d.cts +29 -41
  144. package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
  145. package/dist/helpers/asImageWidthSrcSet.d.ts +29 -41
  146. package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
  147. package/dist/helpers/asImageWidthSrcSet.js +25 -32
  148. package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
  149. package/dist/helpers/asLink.cjs.map +1 -1
  150. package/dist/helpers/asLink.d.cts +15 -32
  151. package/dist/helpers/asLink.d.cts.map +1 -1
  152. package/dist/helpers/asLink.d.ts +15 -32
  153. package/dist/helpers/asLink.d.ts.map +1 -1
  154. package/dist/helpers/asLink.js.map +1 -1
  155. package/dist/helpers/asLinkAttrs.cjs +8 -11
  156. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  157. package/dist/helpers/asLinkAttrs.d.cts +9 -14
  158. package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
  159. package/dist/helpers/asLinkAttrs.d.ts +9 -14
  160. package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
  161. package/dist/helpers/asLinkAttrs.js +8 -11
  162. package/dist/helpers/asLinkAttrs.js.map +1 -1
  163. package/dist/helpers/asText.cjs.map +1 -1
  164. package/dist/helpers/asText.d.cts +10 -23
  165. package/dist/helpers/asText.d.cts.map +1 -1
  166. package/dist/helpers/asText.d.ts +10 -23
  167. package/dist/helpers/asText.d.ts.map +1 -1
  168. package/dist/helpers/asText.js.map +1 -1
  169. package/dist/helpers/documentToLinkField.cjs +2 -7
  170. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  171. package/dist/helpers/documentToLinkField.d.cts +1 -5
  172. package/dist/helpers/documentToLinkField.d.cts.map +1 -1
  173. package/dist/helpers/documentToLinkField.d.ts +1 -5
  174. package/dist/helpers/documentToLinkField.d.ts.map +1 -1
  175. package/dist/helpers/documentToLinkField.js +2 -7
  176. package/dist/helpers/documentToLinkField.js.map +1 -1
  177. package/dist/helpers/isFilled.cjs +8 -35
  178. package/dist/helpers/isFilled.cjs.map +1 -1
  179. package/dist/helpers/isFilled.d.cts +8 -32
  180. package/dist/helpers/isFilled.d.cts.map +1 -1
  181. package/dist/helpers/isFilled.d.ts +8 -32
  182. package/dist/helpers/isFilled.d.ts.map +1 -1
  183. package/dist/helpers/isFilled.js +8 -35
  184. package/dist/helpers/isFilled.js.map +1 -1
  185. package/dist/helpers/mapSliceZone.cjs +8 -10
  186. package/dist/helpers/mapSliceZone.cjs.map +1 -1
  187. package/dist/helpers/mapSliceZone.d.cts +35 -63
  188. package/dist/helpers/mapSliceZone.d.cts.map +1 -1
  189. package/dist/helpers/mapSliceZone.d.ts +35 -63
  190. package/dist/helpers/mapSliceZone.d.ts.map +1 -1
  191. package/dist/helpers/mapSliceZone.js +8 -10
  192. package/dist/helpers/mapSliceZone.js.map +1 -1
  193. package/dist/index.cjs +11 -17
  194. package/dist/index.cjs.map +1 -1
  195. package/dist/index.d.cts +36 -50
  196. package/dist/index.d.cts.map +1 -1
  197. package/dist/index.d.ts +36 -50
  198. package/dist/index.d.ts.map +1 -1
  199. package/dist/index.js +11 -17
  200. package/dist/index.js.map +1 -1
  201. package/dist/isRepositoryEndpoint.cjs +3 -4
  202. package/dist/isRepositoryEndpoint.cjs.map +1 -1
  203. package/dist/isRepositoryEndpoint.d.cts +3 -4
  204. package/dist/isRepositoryEndpoint.d.cts.map +1 -1
  205. package/dist/isRepositoryEndpoint.d.ts +3 -4
  206. package/dist/isRepositoryEndpoint.d.ts.map +1 -1
  207. package/dist/isRepositoryEndpoint.js +3 -4
  208. package/dist/isRepositoryEndpoint.js.map +1 -1
  209. package/dist/isRepositoryName.cjs +1 -2
  210. package/dist/isRepositoryName.cjs.map +1 -1
  211. package/dist/isRepositoryName.d.cts +1 -2
  212. package/dist/isRepositoryName.d.cts.map +1 -1
  213. package/dist/isRepositoryName.d.ts +1 -2
  214. package/dist/isRepositoryName.d.ts.map +1 -1
  215. package/dist/isRepositoryName.js +1 -2
  216. package/dist/isRepositoryName.js.map +1 -1
  217. package/dist/lib/devMsg.cjs +6 -8
  218. package/dist/lib/devMsg.cjs.map +1 -1
  219. package/dist/lib/devMsg.js +6 -8
  220. package/dist/lib/devMsg.js.map +1 -1
  221. package/dist/lib/getOptionalLinkProperties.cjs +5 -6
  222. package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
  223. package/dist/lib/getOptionalLinkProperties.js +5 -6
  224. package/dist/lib/getOptionalLinkProperties.js.map +1 -1
  225. package/dist/lib/getPreviewCookie.cjs +1 -3
  226. package/dist/lib/getPreviewCookie.cjs.map +1 -1
  227. package/dist/lib/getPreviewCookie.js +1 -3
  228. package/dist/lib/getPreviewCookie.js.map +1 -1
  229. package/dist/lib/isInternalURL.cjs +0 -1
  230. package/dist/lib/isInternalURL.cjs.map +1 -1
  231. package/dist/lib/isInternalURL.js +0 -1
  232. package/dist/lib/isInternalURL.js.map +1 -1
  233. package/dist/lib/isMigrationValue.cjs +7 -17
  234. package/dist/lib/isMigrationValue.cjs.map +1 -1
  235. package/dist/lib/isMigrationValue.js +7 -17
  236. package/dist/lib/isMigrationValue.js.map +1 -1
  237. package/dist/lib/isValue.cjs +2 -16
  238. package/dist/lib/isValue.cjs.map +1 -1
  239. package/dist/lib/isValue.js +2 -16
  240. package/dist/lib/isValue.js.map +1 -1
  241. package/dist/lib/pLimit.cjs +5 -7
  242. package/dist/lib/pLimit.cjs.map +1 -1
  243. package/dist/lib/pLimit.js +5 -7
  244. package/dist/lib/pLimit.js.map +1 -1
  245. package/dist/lib/request.cjs +12 -23
  246. package/dist/lib/request.cjs.map +1 -1
  247. package/dist/lib/request.d.cts +7 -20
  248. package/dist/lib/request.d.cts.map +1 -1
  249. package/dist/lib/request.d.ts +7 -20
  250. package/dist/lib/request.d.ts.map +1 -1
  251. package/dist/lib/request.js +12 -23
  252. package/dist/lib/request.js.map +1 -1
  253. package/dist/lib/resolveMigrationDocumentData.cjs +7 -15
  254. package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
  255. package/dist/lib/resolveMigrationDocumentData.js +7 -15
  256. package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
  257. package/dist/lib/serializerHelpers.cjs.map +1 -1
  258. package/dist/lib/serializerHelpers.js.map +1 -1
  259. package/dist/lib/throttledWarn.cjs +3 -4
  260. package/dist/lib/throttledWarn.cjs.map +1 -1
  261. package/dist/lib/throttledWarn.js +3 -4
  262. package/dist/lib/throttledWarn.js.map +1 -1
  263. package/dist/lib/validateAssetMetadata.cjs +6 -18
  264. package/dist/lib/validateAssetMetadata.cjs.map +1 -1
  265. package/dist/lib/validateAssetMetadata.js +6 -18
  266. package/dist/lib/validateAssetMetadata.js.map +1 -1
  267. package/dist/package.cjs +1 -1
  268. package/dist/package.js +1 -1
  269. package/dist/richtext/asText.cjs +0 -2
  270. package/dist/richtext/asText.cjs.map +1 -1
  271. package/dist/richtext/asText.d.cts +0 -2
  272. package/dist/richtext/asText.d.cts.map +1 -1
  273. package/dist/richtext/asText.d.ts +0 -2
  274. package/dist/richtext/asText.d.ts.map +1 -1
  275. package/dist/richtext/asText.js +0 -2
  276. package/dist/richtext/asText.js.map +1 -1
  277. package/dist/richtext/asTree.cjs +2 -4
  278. package/dist/richtext/asTree.cjs.map +1 -1
  279. package/dist/richtext/asTree.d.cts +2 -4
  280. package/dist/richtext/asTree.d.cts.map +1 -1
  281. package/dist/richtext/asTree.d.ts +2 -4
  282. package/dist/richtext/asTree.d.ts.map +1 -1
  283. package/dist/richtext/asTree.js +2 -4
  284. package/dist/richtext/asTree.js.map +1 -1
  285. package/dist/richtext/composeSerializers.cjs +4 -7
  286. package/dist/richtext/composeSerializers.cjs.map +1 -1
  287. package/dist/richtext/composeSerializers.d.cts +4 -7
  288. package/dist/richtext/composeSerializers.d.cts.map +1 -1
  289. package/dist/richtext/composeSerializers.d.ts +4 -7
  290. package/dist/richtext/composeSerializers.d.ts.map +1 -1
  291. package/dist/richtext/composeSerializers.js +4 -7
  292. package/dist/richtext/composeSerializers.js.map +1 -1
  293. package/dist/richtext/serialize.cjs +2 -6
  294. package/dist/richtext/serialize.cjs.map +1 -1
  295. package/dist/richtext/serialize.d.cts +2 -6
  296. package/dist/richtext/serialize.d.cts.map +1 -1
  297. package/dist/richtext/serialize.d.ts +2 -6
  298. package/dist/richtext/serialize.d.ts.map +1 -1
  299. package/dist/richtext/serialize.js +2 -6
  300. package/dist/richtext/serialize.js.map +1 -1
  301. package/dist/richtext/types.cjs.map +1 -1
  302. package/dist/richtext/types.d.cts +3 -7
  303. package/dist/richtext/types.d.cts.map +1 -1
  304. package/dist/richtext/types.d.ts +3 -7
  305. package/dist/richtext/types.d.ts.map +1 -1
  306. package/dist/richtext/types.js.map +1 -1
  307. package/dist/richtext/wrapMapSerializer.cjs +2 -5
  308. package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
  309. package/dist/richtext/wrapMapSerializer.d.cts +2 -5
  310. package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
  311. package/dist/richtext/wrapMapSerializer.d.ts +2 -5
  312. package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
  313. package/dist/richtext/wrapMapSerializer.js +2 -5
  314. package/dist/richtext/wrapMapSerializer.js.map +1 -1
  315. package/dist/types/api/asset/asset.d.cts +17 -70
  316. package/dist/types/api/asset/asset.d.cts.map +1 -1
  317. package/dist/types/api/asset/asset.d.ts +17 -70
  318. package/dist/types/api/asset/asset.d.ts.map +1 -1
  319. package/dist/types/api/asset/tag.d.cts +5 -23
  320. package/dist/types/api/asset/tag.d.cts.map +1 -1
  321. package/dist/types/api/asset/tag.d.ts +5 -23
  322. package/dist/types/api/asset/tag.d.ts.map +1 -1
  323. package/dist/types/api/integration.d.cts +2 -4
  324. package/dist/types/api/integration.d.cts.map +1 -1
  325. package/dist/types/api/integration.d.ts +2 -4
  326. package/dist/types/api/integration.d.ts.map +1 -1
  327. package/dist/types/api/query.d.cts +10 -27
  328. package/dist/types/api/query.d.cts.map +1 -1
  329. package/dist/types/api/query.d.ts +10 -27
  330. package/dist/types/api/query.d.ts.map +1 -1
  331. package/dist/types/api/ref.d.cts +6 -16
  332. package/dist/types/api/ref.d.cts.map +1 -1
  333. package/dist/types/api/ref.d.ts +6 -16
  334. package/dist/types/api/ref.d.ts.map +1 -1
  335. package/dist/types/api/release.d.cts +1 -2
  336. package/dist/types/api/release.d.cts.map +1 -1
  337. package/dist/types/api/release.d.ts +1 -2
  338. package/dist/types/api/release.d.ts.map +1 -1
  339. package/dist/types/api/repository.d.cts +18 -45
  340. package/dist/types/api/repository.d.cts.map +1 -1
  341. package/dist/types/api/repository.d.ts +18 -45
  342. package/dist/types/api/repository.d.ts.map +1 -1
  343. package/dist/types/api/tags.d.cts +2 -3
  344. package/dist/types/api/tags.d.cts.map +1 -1
  345. package/dist/types/api/tags.d.ts +2 -3
  346. package/dist/types/api/tags.d.ts.map +1 -1
  347. package/dist/types/migration/Asset.cjs +4 -13
  348. package/dist/types/migration/Asset.cjs.map +1 -1
  349. package/dist/types/migration/Asset.d.cts +20 -66
  350. package/dist/types/migration/Asset.d.cts.map +1 -1
  351. package/dist/types/migration/Asset.d.ts +20 -66
  352. package/dist/types/migration/Asset.d.ts.map +1 -1
  353. package/dist/types/migration/Asset.js +4 -13
  354. package/dist/types/migration/Asset.js.map +1 -1
  355. package/dist/types/migration/ContentRelationship.d.cts +1 -3
  356. package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
  357. package/dist/types/migration/ContentRelationship.d.ts +1 -3
  358. package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
  359. package/dist/types/migration/Document.cjs +10 -19
  360. package/dist/types/migration/Document.cjs.map +1 -1
  361. package/dist/types/migration/Document.d.cts +12 -31
  362. package/dist/types/migration/Document.d.cts.map +1 -1
  363. package/dist/types/migration/Document.d.ts +12 -31
  364. package/dist/types/migration/Document.d.ts.map +1 -1
  365. package/dist/types/migration/Document.js +10 -19
  366. package/dist/types/migration/Document.js.map +1 -1
  367. package/dist/types/model/contentRelationship.d.cts +5 -15
  368. package/dist/types/model/contentRelationship.d.cts.map +1 -1
  369. package/dist/types/model/contentRelationship.d.ts +5 -15
  370. package/dist/types/model/contentRelationship.d.ts.map +1 -1
  371. package/dist/types/model/customType.d.cts +6 -17
  372. package/dist/types/model/customType.d.cts.map +1 -1
  373. package/dist/types/model/customType.d.ts +6 -17
  374. package/dist/types/model/customType.d.ts.map +1 -1
  375. package/dist/types/model/image.d.cts.map +1 -1
  376. package/dist/types/model/image.d.ts.map +1 -1
  377. package/dist/types/model/linkToMedia.d.cts.map +1 -1
  378. package/dist/types/model/linkToMedia.d.ts.map +1 -1
  379. package/dist/types/model/range.d.cts +1 -3
  380. package/dist/types/model/range.d.cts.map +1 -1
  381. package/dist/types/model/range.d.ts +1 -3
  382. package/dist/types/model/range.d.ts.map +1 -1
  383. package/dist/types/model/separator.d.cts +1 -3
  384. package/dist/types/model/separator.d.cts.map +1 -1
  385. package/dist/types/model/separator.d.ts +1 -3
  386. package/dist/types/model/separator.d.ts.map +1 -1
  387. package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
  388. package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
  389. package/dist/types/model/slice.cjs.map +1 -1
  390. package/dist/types/model/slice.d.cts +1 -3
  391. package/dist/types/model/slice.d.cts.map +1 -1
  392. package/dist/types/model/slice.d.ts +1 -3
  393. package/dist/types/model/slice.d.ts.map +1 -1
  394. package/dist/types/model/slice.js.map +1 -1
  395. package/dist/types/model/sliceZone.cjs.map +1 -1
  396. package/dist/types/model/sliceZone.d.cts.map +1 -1
  397. package/dist/types/model/sliceZone.d.ts.map +1 -1
  398. package/dist/types/model/sliceZone.js.map +1 -1
  399. package/dist/types/model/types.cjs +1 -3
  400. package/dist/types/model/types.cjs.map +1 -1
  401. package/dist/types/model/types.d.cts +9 -31
  402. package/dist/types/model/types.d.cts.map +1 -1
  403. package/dist/types/model/types.d.ts +9 -31
  404. package/dist/types/model/types.d.ts.map +1 -1
  405. package/dist/types/model/types.js +1 -3
  406. package/dist/types/model/types.js.map +1 -1
  407. package/dist/types/value/color.d.cts +0 -1
  408. package/dist/types/value/color.d.cts.map +1 -1
  409. package/dist/types/value/color.d.ts +0 -1
  410. package/dist/types/value/color.d.ts.map +1 -1
  411. package/dist/types/value/contentRelationship.d.cts +3 -5
  412. package/dist/types/value/contentRelationship.d.cts.map +1 -1
  413. package/dist/types/value/contentRelationship.d.ts +3 -5
  414. package/dist/types/value/contentRelationship.d.ts.map +1 -1
  415. package/dist/types/value/date.d.cts +0 -1
  416. package/dist/types/value/date.d.cts.map +1 -1
  417. package/dist/types/value/date.d.ts +0 -1
  418. package/dist/types/value/date.d.ts.map +1 -1
  419. package/dist/types/value/document.d.cts +23 -50
  420. package/dist/types/value/document.d.cts.map +1 -1
  421. package/dist/types/value/document.d.ts +23 -50
  422. package/dist/types/value/document.d.ts.map +1 -1
  423. package/dist/types/value/embed.cjs +1 -1
  424. package/dist/types/value/embed.cjs.map +1 -1
  425. package/dist/types/value/embed.d.cts +28 -95
  426. package/dist/types/value/embed.d.cts.map +1 -1
  427. package/dist/types/value/embed.d.ts +28 -95
  428. package/dist/types/value/embed.d.ts.map +1 -1
  429. package/dist/types/value/embed.js +1 -1
  430. package/dist/types/value/embed.js.map +1 -1
  431. package/dist/types/value/geoPoint.d.cts +0 -1
  432. package/dist/types/value/geoPoint.d.cts.map +1 -1
  433. package/dist/types/value/geoPoint.d.ts +0 -1
  434. package/dist/types/value/geoPoint.d.ts.map +1 -1
  435. package/dist/types/value/group.d.cts.map +1 -1
  436. package/dist/types/value/group.d.ts.map +1 -1
  437. package/dist/types/value/image.d.cts +5 -8
  438. package/dist/types/value/image.d.cts.map +1 -1
  439. package/dist/types/value/image.d.ts +5 -8
  440. package/dist/types/value/image.d.ts.map +1 -1
  441. package/dist/types/value/integration.d.cts +0 -1
  442. package/dist/types/value/integration.d.cts.map +1 -1
  443. package/dist/types/value/integration.d.ts +0 -1
  444. package/dist/types/value/integration.d.ts.map +1 -1
  445. package/dist/types/value/keyText.d.cts +0 -1
  446. package/dist/types/value/keyText.d.cts.map +1 -1
  447. package/dist/types/value/keyText.d.ts +0 -1
  448. package/dist/types/value/keyText.d.ts.map +1 -1
  449. package/dist/types/value/link.cjs +1 -3
  450. package/dist/types/value/link.cjs.map +1 -1
  451. package/dist/types/value/link.d.cts +8 -12
  452. package/dist/types/value/link.d.cts.map +1 -1
  453. package/dist/types/value/link.d.ts +8 -12
  454. package/dist/types/value/link.d.ts.map +1 -1
  455. package/dist/types/value/link.js +1 -3
  456. package/dist/types/value/link.js.map +1 -1
  457. package/dist/types/value/linkToMedia.d.cts.map +1 -1
  458. package/dist/types/value/linkToMedia.d.ts.map +1 -1
  459. package/dist/types/value/number.d.cts +0 -1
  460. package/dist/types/value/number.d.cts.map +1 -1
  461. package/dist/types/value/number.d.ts +0 -1
  462. package/dist/types/value/number.d.ts.map +1 -1
  463. package/dist/types/value/richText.cjs.map +1 -1
  464. package/dist/types/value/richText.d.cts +26 -77
  465. package/dist/types/value/richText.d.cts.map +1 -1
  466. package/dist/types/value/richText.d.ts +26 -77
  467. package/dist/types/value/richText.d.ts.map +1 -1
  468. package/dist/types/value/richText.js.map +1 -1
  469. package/dist/types/value/select.d.cts +0 -1
  470. package/dist/types/value/select.d.cts.map +1 -1
  471. package/dist/types/value/select.d.ts +0 -1
  472. package/dist/types/value/select.d.ts.map +1 -1
  473. package/dist/types/value/sharedSliceVariation.d.cts +1 -3
  474. package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
  475. package/dist/types/value/sharedSliceVariation.d.ts +1 -3
  476. package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
  477. package/dist/types/value/slice.d.cts.map +1 -1
  478. package/dist/types/value/slice.d.ts.map +1 -1
  479. package/dist/types/value/sliceZone.d.cts +3 -4
  480. package/dist/types/value/sliceZone.d.cts.map +1 -1
  481. package/dist/types/value/sliceZone.d.ts +3 -4
  482. package/dist/types/value/sliceZone.d.ts.map +1 -1
  483. package/dist/types/value/table.d.cts +14 -63
  484. package/dist/types/value/table.d.cts.map +1 -1
  485. package/dist/types/value/table.d.ts +14 -63
  486. package/dist/types/value/table.d.ts.map +1 -1
  487. package/dist/types/value/timestamp.d.cts.map +1 -1
  488. package/dist/types/value/timestamp.d.ts.map +1 -1
  489. package/dist/types/value/title.d.cts +1 -1
  490. package/dist/types/value/title.d.cts.map +1 -1
  491. package/dist/types/value/title.d.ts +1 -1
  492. package/dist/types/value/title.d.ts.map +1 -1
  493. package/dist/types/value/types.d.cts +11 -24
  494. package/dist/types/value/types.d.cts.map +1 -1
  495. package/dist/types/value/types.d.ts +11 -24
  496. package/dist/types/value/types.d.ts.map +1 -1
  497. package/dist/types/webhook/apiUpdate.d.cts +1 -3
  498. package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
  499. package/dist/types/webhook/apiUpdate.d.ts +1 -3
  500. package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
  501. package/package.json +32 -34
  502. package/src/Client.ts +236 -399
  503. package/src/Migration.ts +80 -139
  504. package/src/WriteClient.ts +64 -174
  505. package/src/buildQueryURL.ts +68 -100
  506. package/src/cookie.ts +1 -4
  507. package/src/createClient.ts +12 -20
  508. package/src/createMigration.ts +8 -16
  509. package/src/createWriteClient.ts +11 -19
  510. package/src/errors.ts +5 -15
  511. package/src/filter.ts +79 -122
  512. package/src/getGraphQLEndpoint.ts +0 -3
  513. package/src/getRepositoryEndpoint.ts +4 -9
  514. package/src/getRepositoryName.ts +2 -5
  515. package/src/getToolbarSrc.ts +17 -20
  516. package/src/helpers/asDate.ts +13 -18
  517. package/src/helpers/asHTML.ts +55 -102
  518. package/src/helpers/asImagePixelDensitySrcSet.ts +29 -49
  519. package/src/helpers/asImageSrc.ts +8 -16
  520. package/src/helpers/asImageWidthSrcSet.ts +33 -52
  521. package/src/helpers/asLink.ts +26 -54
  522. package/src/helpers/asLinkAttrs.ts +14 -29
  523. package/src/helpers/asText.ts +15 -31
  524. package/src/helpers/documentToLinkField.ts +4 -15
  525. package/src/helpers/isFilled.ts +14 -51
  526. package/src/helpers/mapSliceZone.ts +42 -84
  527. package/src/index.ts +18 -68
  528. package/src/isRepositoryEndpoint.ts +3 -4
  529. package/src/isRepositoryName.ts +1 -2
  530. package/src/lib/devMsg.ts +6 -8
  531. package/src/lib/getOptionalLinkProperties.ts +5 -6
  532. package/src/lib/getPreviewCookie.ts +1 -3
  533. package/src/lib/isInternalURL.ts +0 -1
  534. package/src/lib/isMigrationValue.ts +9 -22
  535. package/src/lib/isValue.ts +9 -38
  536. package/src/lib/pLimit.ts +9 -16
  537. package/src/lib/request.ts +15 -40
  538. package/src/lib/resolveMigrationDocumentData.ts +8 -27
  539. package/src/lib/serializerHelpers.ts +9 -29
  540. package/src/lib/throttledWarn.ts +4 -8
  541. package/src/lib/validateAssetMetadata.ts +17 -43
  542. package/src/richtext/asText.ts +2 -8
  543. package/src/richtext/asTree.ts +8 -26
  544. package/src/richtext/composeSerializers.ts +5 -11
  545. package/src/richtext/serialize.ts +4 -12
  546. package/src/richtext/types.ts +13 -57
  547. package/src/richtext/wrapMapSerializer.ts +4 -8
  548. package/src/types/api/asset/asset.ts +26 -77
  549. package/src/types/api/asset/tag.ts +6 -18
  550. package/src/types/api/integration.ts +4 -10
  551. package/src/types/api/migration/document.ts +11 -27
  552. package/src/types/api/query.ts +10 -27
  553. package/src/types/api/ref.ts +6 -16
  554. package/src/types/api/release.ts +1 -2
  555. package/src/types/api/repository.ts +18 -45
  556. package/src/types/api/tags.ts +2 -3
  557. package/src/types/migration/Asset.ts +26 -82
  558. package/src/types/migration/ContentRelationship.ts +5 -12
  559. package/src/types/migration/Document.ts +26 -52
  560. package/src/types/migration/Link.ts +7 -9
  561. package/src/types/model/contentRelationship.ts +7 -20
  562. package/src/types/model/customType.ts +7 -21
  563. package/src/types/model/image.ts +4 -5
  564. package/src/types/model/linkToMedia.ts +1 -2
  565. package/src/types/model/range.ts +1 -3
  566. package/src/types/model/separator.ts +1 -3
  567. package/src/types/model/sharedSliceVariation.ts +4 -4
  568. package/src/types/model/slice.ts +7 -12
  569. package/src/types/model/sliceZone.ts +4 -11
  570. package/src/types/model/types.ts +10 -31
  571. package/src/types/value/color.ts +3 -3
  572. package/src/types/value/contentRelationship.ts +8 -13
  573. package/src/types/value/date.ts +1 -3
  574. package/src/types/value/document.ts +24 -52
  575. package/src/types/value/embed.ts +33 -80
  576. package/src/types/value/geoPoint.ts +6 -8
  577. package/src/types/value/group.ts +1 -4
  578. package/src/types/value/image.ts +10 -14
  579. package/src/types/value/integration.ts +0 -1
  580. package/src/types/value/keyText.ts +3 -3
  581. package/src/types/value/link.ts +14 -22
  582. package/src/types/value/linkToMedia.ts +2 -5
  583. package/src/types/value/number.ts +3 -3
  584. package/src/types/value/richText.ts +30 -82
  585. package/src/types/value/select.ts +0 -1
  586. package/src/types/value/sharedSliceVariation.ts +3 -11
  587. package/src/types/value/slice.ts +2 -8
  588. package/src/types/value/sliceZone.ts +4 -6
  589. package/src/types/value/table.ts +25 -64
  590. package/src/types/value/timestamp.ts +3 -2
  591. package/src/types/value/title.ts +16 -18
  592. package/src/types/value/types.ts +8 -21
  593. package/src/types/webhook/apiUpdate.ts +1 -3
package/dist/index.d.ts CHANGED
@@ -1,27 +1,4 @@
1
- import { CustomTypeModelBooleanField } from "./types/model/boolean.js";
2
- import { CustomTypeModelColorField } from "./types/model/color.js";
3
- import { CustomTypeModelLinkField, CustomTypeModelLinkSelectType } from "./types/model/link.js";
4
- import { CustomTypeModelContentRelationshipField, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchGroupLevel2 } from "./types/model/contentRelationship.js";
5
- import { CustomTypeModelDateField } from "./types/model/date.js";
6
- import { CustomTypeModelEmbedField } from "./types/model/embed.js";
7
- import { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
8
- import { CustomTypeModelGroupField, CustomTypeModelNestedGroupField } from "./types/model/group.js";
9
- import { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail } from "./types/model/image.js";
10
- import { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
11
- import { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
12
- import { CustomTypeModelNumberField } from "./types/model/number.js";
13
- import { CustomTypeModelRangeField } from "./types/model/range.js";
14
- import { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField } from "./types/model/richText.js";
15
- import { CustomTypeModelSelectField } from "./types/model/select.js";
16
- import { CustomTypeModelSeparatorField } from "./types/model/separator.js";
17
- import { CustomTypeModelLegacySlice, CustomTypeModelSlice, CustomTypeModelSliceDisplay } from "./types/model/slice.js";
18
- import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel, CustomTypeModelSliceType, CustomTypeModelSliceZoneField } from "./types/model/sliceZone.js";
19
- import { CustomTypeModelTableField } from "./types/model/table.js";
20
- import { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
21
- import { CustomTypeModelTitleField } from "./types/model/title.js";
22
- import { CustomTypeModelUIDField } from "./types/model/uid.js";
23
- import { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType } from "./types/model/types.js";
24
- import { CustomTypeModelIntegrationField } from "./types/model/integration.js";
1
+ import { filter } from "./filter.js";
25
2
  import { BooleanField } from "./types/value/boolean.js";
26
3
  import { ColorField } from "./types/value/color.js";
27
4
  import { GroupField, NestedGroupField } from "./types/value/group.js";
@@ -31,30 +8,53 @@ import { Slice } from "./types/value/slice.js";
31
8
  import { SliceZone } from "./types/value/sliceZone.js";
32
9
  import { ContentRelationshipField, FilledContentRelationshipField } from "./types/value/contentRelationship.js";
33
10
  import { DateField } from "./types/value/date.js";
34
- import { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed } from "./types/value/embed.js";
35
11
  import { GeoPointField } from "./types/value/geoPoint.js";
36
12
  import { EmptyImageFieldImage, FilledImageFieldImage, ImageField, ImageFieldImage } from "./types/value/image.js";
13
+ import { IntegrationField, IntegrationFieldData } from "./types/value/integration.js";
37
14
  import { KeyTextField } from "./types/value/keyText.js";
38
15
  import { FilledLinkToMediaField, LinkToMediaField } from "./types/value/linkToMedia.js";
39
16
  import { EmptyLinkField, FilledLinkToWebField, LinkField, LinkType } from "./types/value/link.js";
40
17
  import { NumberField } from "./types/value/number.js";
41
- import { RTAnyNode, RTBlockNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTInlineNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTSpanNodeBase, RTStrongNode, RTTextNode, RTTextNodeBase, RichTextField, RichTextNodeType, RichTextNodeTypes } from "./types/value/richText.js";
42
18
  import { SelectField } from "./types/value/select.js";
43
19
  import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "./types/value/table.js";
44
20
  import { TimestampField } from "./types/value/timestamp.js";
45
21
  import { TitleField } from "./types/value/title.js";
46
22
  import { AnyRegularField, AnySlicePrimaryField, FieldState, Repeatable } from "./types/value/types.js";
47
- import { IntegrationField, IntegrationFieldData } from "./types/value/integration.js";
23
+ import { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed } from "./types/value/embed.js";
24
+ import { RTAnyNode, RTBlockNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTInlineNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTSpanNodeBase, RTStrongNode, RTTextNode, RTTextNodeBase, RichTextField, RichTextNodeType, RichTextNodeTypes } from "./types/value/richText.js";
48
25
  import { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID } from "./types/value/document.js";
49
26
  import { LinkResolverFunction, asLink } from "./helpers/asLink.js";
50
27
  import { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer, HTMLRichTextSerializer, asHTML } from "./helpers/asHTML.js";
51
28
  import { SliceMapper, mapSliceZone } from "./helpers/mapSliceZone.js";
52
- import { filter } from "./filter.js";
29
+ import { CustomTypeModelBooleanField } from "./types/model/boolean.js";
30
+ import { CustomTypeModelColorField } from "./types/model/color.js";
31
+ import { CustomTypeModelLinkField, CustomTypeModelLinkSelectType } from "./types/model/link.js";
32
+ import { CustomTypeModelContentRelationshipField, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchGroupLevel2 } from "./types/model/contentRelationship.js";
33
+ import { CustomTypeModelDateField } from "./types/model/date.js";
34
+ import { CustomTypeModelEmbedField } from "./types/model/embed.js";
35
+ import { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
36
+ import { CustomTypeModelGroupField, CustomTypeModelNestedGroupField } from "./types/model/group.js";
37
+ import { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail } from "./types/model/image.js";
38
+ import { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
39
+ import { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
40
+ import { CustomTypeModelNumberField } from "./types/model/number.js";
41
+ import { CustomTypeModelRangeField } from "./types/model/range.js";
42
+ import { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField } from "./types/model/richText.js";
43
+ import { CustomTypeModelSelectField } from "./types/model/select.js";
44
+ import { CustomTypeModelSeparatorField } from "./types/model/separator.js";
45
+ import { CustomTypeModelLegacySlice, CustomTypeModelSlice, CustomTypeModelSliceDisplay } from "./types/model/slice.js";
46
+ import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel, CustomTypeModelSliceType, CustomTypeModelSliceZoneField } from "./types/model/sliceZone.js";
47
+ import { CustomTypeModelTableField } from "./types/model/table.js";
48
+ import { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
49
+ import { CustomTypeModelTitleField } from "./types/model/title.js";
50
+ import { CustomTypeModelUIDField } from "./types/model/uid.js";
51
+ import { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType } from "./types/model/types.js";
52
+ import { CustomTypeModelIntegrationField } from "./types/model/integration.js";
53
+ import { BuildQueryURLArgs, Ordering, QueryParams, Route, buildQueryURL } from "./buildQueryURL.js";
53
54
  import { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike } from "./lib/request.js";
54
55
  import { Query } from "./types/api/query.js";
55
56
  import { Ref } from "./types/api/ref.js";
56
57
  import { Form, FormField, Language, Repository } from "./types/api/repository.js";
57
- import { BuildQueryURLArgs, Ordering, QueryParams, Route, buildQueryURL } from "./buildQueryURL.js";
58
58
  import { Client, ClientConfig, HttpRequestLike } from "./Client.js";
59
59
  import { CreateClient, createClient } from "./createClient.js";
60
60
  import { MigrationContentRelationship } from "./types/migration/ContentRelationship.js";
@@ -91,9 +91,7 @@ import { WebhookBodyTestTrigger } from "./types/webhook/testTrigger.js";
91
91
  import { WebhookBody, WebhookType } from "./types/webhook/types.js";
92
92
 
93
93
  //#region src/index.d.ts
94
- /**
95
- * @deprecated Renamed to `filter`
96
- */
94
+ /** @deprecated Renamed to `filter` */
97
95
  declare const predicate: {
98
96
  at: (path: string, value: string | number | boolean | Date | string[]) => string;
99
97
  not: (path: string, value: string | number | boolean | Date | string[]) => string;
@@ -124,21 +122,13 @@ declare const predicate: {
124
122
  dateHourAfter: (path: string, hour: number) => string;
125
123
  dateHourBefore: (path: string, hour: number) => string;
126
124
  };
127
- /**
128
- * @deprecated Renamed to `mapSliceZone`
129
- */
125
+ /** @deprecated Renamed to `mapSliceZone` */
130
126
  declare const unstable_mapSliceZone: typeof mapSliceZone;
131
- /**
132
- * @deprecated Renamed to `HTMLRichTextMapSerializer`
133
- */
127
+ /** @deprecated Renamed to `HTMLRichTextMapSerializer` */
134
128
  type HTMLMapSerializer = HTMLRichTextMapSerializer;
135
- /**
136
- * @deprecated Renamed to `HTMLRichTextFunctionSerializer`
137
- */
129
+ /** @deprecated Renamed to `HTMLRichTextFunctionSerializer` */
138
130
  type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
139
- /**
140
- * @deprecated Use {@link RichTextNodeType} instead.
141
- */
131
+ /** @deprecated Use {@link RichTextNodeType} instead. */
142
132
  declare const Element: {
143
133
  readonly heading1: "heading1";
144
134
  readonly heading2: "heading2";
@@ -160,13 +150,9 @@ declare const Element: {
160
150
  readonly label: "label";
161
151
  readonly span: "span";
162
152
  };
163
- /**
164
- * @deprecated Renamed to `IntegrationField`
165
- */
153
+ /** @deprecated Renamed to `IntegrationField` */
166
154
  type IntegrationFields = IntegrationField;
167
- /**
168
- * @deprecated Renamed to `CustomTypeModelIntegrationField`.
169
- */
155
+ /** @deprecated Renamed to `CustomTypeModelIntegrationField`. */
170
156
  type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;
171
157
  //#endregion
172
158
  export { type AbortSignalLike, type AlternateLanguage, type AnyOEmbed, type AnyRegularField, type AnySlicePrimaryField, type AsLinkAttrsConfig, type BooleanField, type BuildQueryURLArgs, Client, type ClientConfig, type ColorField, type ContentRelationshipField, type CreateClient, type CreateMigration, type CreateWriteClient, type CustomTypeModel, type CustomTypeModelBooleanField, type CustomTypeModelColorField, type CustomTypeModelContentRelationshipField, type CustomTypeModelDateField, type CustomTypeModelDefinition, type CustomTypeModelEmbedField, type CustomTypeModelFetchContentRelationshipLevel1, type CustomTypeModelFetchCustomTypeLevel1, type CustomTypeModelFetchCustomTypeLevel2, type CustomTypeModelFetchGroupLevel1, type CustomTypeModelFetchGroupLevel2, type CustomTypeModelField, type CustomTypeModelFieldForGroup, type CustomTypeModelFieldForNestedGroup, type CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType, type CustomTypeModelGeoPointField, type CustomTypeModelGroupField, type CustomTypeModelImageConstraint, type CustomTypeModelImageField, type CustomTypeModelImageThumbnail, CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, type CustomTypeModelKeyTextField, type CustomTypeModelLegacySlice, type CustomTypeModelLinkField, CustomTypeModelLinkSelectType, type CustomTypeModelLinkToMediaField, type CustomTypeModelNestedGroupField, type CustomTypeModelNumberField, type CustomTypeModelRangeField, type CustomTypeModelRichTextField, type CustomTypeModelRichTextMultiField, type CustomTypeModelRichTextSingleField, type CustomTypeModelSelectField, type CustomTypeModelSeparatorField, type CustomTypeModelSharedSlice, type CustomTypeModelSlice, CustomTypeModelSliceDisplay, type CustomTypeModelSliceLabel, CustomTypeModelSliceType, type CustomTypeModelSliceZoneField, type CustomTypeModelTab, type CustomTypeModelTableField, type CustomTypeModelTimestampField, type CustomTypeModelTitleField, type CustomTypeModelUIDField, type DateField, Element, type EmbedField, type EmptyImageFieldImage, type EmptyLinkField, type ExistingPrismicDocument, type FetchLike, type FieldState, type FilledContentRelationshipField, type FilledImageFieldImage, type FilledLinkToMediaField, type FilledLinkToWebField, ForbiddenError, type Form, type FormField, type GeoPointField, type GroupField, type HTMLFunctionSerializer, type HTMLMapSerializer, type HTMLRichTextFunctionSerializer, type HTMLRichTextMapSerializer, type HTMLRichTextSerializer, type HttpRequestLike, type ImageField, type ImageFieldImage, type InjectMigrationSpecificTypes, type IntegrationAPIItem, type IntegrationAPIResults, type IntegrationField, type IntegrationFieldData, type IntegrationFields, InvalidDataError, type KeyTextField, type Language, type LinkField, type LinkOEmbed, type LinkResolverFunction, type LinkToMediaField, LinkType, type MigrateReporterEvents, Migration, type MigrationContentRelationship, type MigrationImage, type MigrationLinkToMedia, type MigrationRTImageNode, type NestedGroupField, NotFoundError, type NumberField, type OEmbedExtra, OEmbedType, type Ordering, ParsingError, type PendingPrismicDocument, type PhotoOEmbed, PreviewTokenExpiredError, type PrismicDocument, type PrismicDocumentHeader, type PrismicDocumentWithUID, type PrismicDocumentWithoutUID, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, type Query, type QueryParams, type RTAnyNode, type RTBlockNode, type RTEmNode, type RTEmbedNode, type RTHeading1Node, type RTHeading2Node, type RTHeading3Node, type RTHeading4Node, type RTHeading5Node, type RTHeading6Node, type RTImageNode, type RTInlineNode, type RTLabelNode, type RTLinkNode, type RTListItemNode, type RTListNode, type RTNode, type RTOListItemNode, type RTOListNode, type RTParagraphNode, type RTPreformattedNode, type RTSpanNode, type RTSpanNodeBase, type RTStrongNode, type RTTextNode, type RTTextNodeBase, type Ref, RefExpiredError, RefNotFoundError, type Release, type Repeatable, type Repository, RepositoryNotFoundError, type RequestInitLike, type ResponseLike, type RichOEmbed, type RichTextField, RichTextNodeType, type RichTextNodeTypes, type Route, type SelectField, type SharedSlice, type SharedSliceModel, type SharedSliceModelVariation, type SharedSliceVariation, type Slice, type SliceMapper, type SliceZone, type TableField, type TableFieldBody, type TableFieldBodyRow, type TableFieldDataCell, type TableFieldHead, type TableFieldHeadRow, type TableFieldHeaderCell, type Tags, type TimestampField, type TitleField, type VideoOEmbed, type WebhookBody, type WebhookBodyAPIUpdate, type WebhookBodyTestTrigger, WebhookType, WriteClient, type WriteClientConfig, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_d_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_d_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CM,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2CA,qBAAA,SAAqB,YAAA;;;;KAatB,iBAAA,GAAoB,yBAAA;;;;KAIpB,sBAAA,GAAyB,8BAAA;;;;cAmCxB,OAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;KA0GD,iBAAA,GAAoB,gBAAA;;;;KAsEpB,qCAAA,GAAwC,+BAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsCM,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BA,qBAAA,SAAqB,YAAA;;KAWtB,iBAAA,GAAoB,yBAAA;;KAEpB,sBAAA,GAAyB,8BAAA;;cAiCxB,OAAA;EAAA;;;;;;;;;;;;;;;;;;;;;KAiGD,iBAAA,GAAoB,gBAAA;;KAoEpB,qCAAA,GAAwC,+BAAA"}
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- import { RichTextNodeType } from "./types/value/richText.js";
2
- import { mapSliceZone } from "./helpers/mapSliceZone.js";
3
1
  import { filter } from "./filter.js";
4
- import { cookie_exports } from "./cookie.js";
5
- import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
6
- import { LinkType } from "./types/value/link.js";
7
- import { documentToLinkField } from "./helpers/documentToLinkField.js";
8
- import { asLink } from "./helpers/asLink.js";
2
+ import { mapSliceZone } from "./helpers/mapSliceZone.js";
3
+ import { RichTextNodeType } from "./types/value/richText.js";
9
4
  import { buildQueryURL } from "./buildQueryURL.js";
5
+ import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
10
6
  import { isRepositoryName } from "./isRepositoryName.js";
11
7
  import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
12
8
  import { getRepositoryName } from "./getRepositoryName.js";
9
+ import { LinkType } from "./types/value/link.js";
10
+ import { documentToLinkField } from "./helpers/documentToLinkField.js";
11
+ import { asLink } from "./helpers/asLink.js";
13
12
  import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
13
+ import { cookie_exports } from "./cookie.js";
14
14
  import { Client } from "./Client.js";
15
15
  import { createClient } from "./createClient.js";
16
+ import { isFilled_exports } from "./helpers/isFilled.js";
16
17
  import { PrismicMigrationAsset } from "./types/migration/Asset.js";
17
18
  import { PrismicMigrationDocument } from "./types/migration/Document.js";
18
- import { isFilled_exports } from "./helpers/isFilled.js";
19
19
  import { WriteClient } from "./WriteClient.js";
20
20
  import { createWriteClient } from "./createWriteClient.js";
21
21
  import { Migration } from "./Migration.js";
@@ -36,17 +36,11 @@ import { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
36
36
  import { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
37
37
  import { WebhookType } from "./types/webhook/types.js";
38
38
  //#region src/index.ts
39
- /**
40
- * @deprecated Renamed to `filter`
41
- */
39
+ /** @deprecated Renamed to `filter` */
42
40
  const predicate = filter;
43
- /**
44
- * @deprecated Renamed to `mapSliceZone`
45
- */
41
+ /** @deprecated Renamed to `mapSliceZone` */
46
42
  const unstable_mapSliceZone = mapSliceZone;
47
- /**
48
- * @deprecated Use {@link RichTextNodeType} instead.
49
- */
43
+ /** @deprecated Use {@link RichTextNodeType} instead. */
50
44
  const Element = RichTextNodeType;
51
45
  //#endregion
52
46
  export { Client, CustomTypeModelFieldType, CustomTypeModelLinkSelectType, CustomTypeModelSliceDisplay, CustomTypeModelSliceType, Element, ForbiddenError, InvalidDataError, LinkType, Migration, NotFoundError, OEmbedType, ParsingError, PreviewTokenExpiredError, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, RefExpiredError, RefNotFoundError, RepositoryNotFoundError, RichTextNodeType, WebhookType, WriteClient, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n\nimport { filter } from \"./filter\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\"\nexport { getRepositoryName } from \"./getRepositoryName\"\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\"\nexport { isRepositoryName } from \"./isRepositoryName\"\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\"\nexport { buildQueryURL } from \"./buildQueryURL\"\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\"\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter\nexport { filter, predicate }\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\"\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type {\n\tAbortSignalLike,\n\tFetchLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./lib/request\"\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\"\nexport { asLink } from \"./helpers/asLink\"\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\"\nexport { asText } from \"./helpers/asText\"\nexport { asHTML } from \"./helpers/asHTML\"\nexport { asImageSrc } from \"./helpers/asImageSrc\"\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\"\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\"\nexport * as isFilled from \"./helpers/isFilled\"\n\n/**\n * @deprecated Renamed to `mapSliceZone`\n */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n}\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\"\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\n// Client Errors\nexport {\n\tForbiddenError,\n\tInvalidDataError,\n\tNotFoundError,\n\tParsingError,\n\tPreviewTokenExpiredError,\n\tPrismicError,\n\tRefExpiredError,\n\tRefNotFoundError,\n\tRepositoryNotFoundError,\n} from \"./errors\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/**\n * @deprecated Use {@link RichTextNodeType} instead.\n */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\nexport { LinkType } from \"./types/value/link\"\nexport { OEmbedType } from \"./types/value/embed\"\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\"\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n\tRichTextNodeTypes,\n} from \"./types/value/richText\"\nexport type { TitleField } from \"./types/value/title\"\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\"\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\"\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\"\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\"\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\"\n\nexport type {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\n\nexport type { BooleanField } from \"./types/value/boolean\"\nexport type { ColorField } from \"./types/value/color\"\nexport type { DateField } from \"./types/value/date\"\nexport type { KeyTextField } from \"./types/value/keyText\"\nexport type { NumberField } from \"./types/value/number\"\nexport type { SelectField } from \"./types/value/select\"\nexport type { TimestampField } from \"./types/value/timestamp\"\nexport type { GeoPointField } from \"./types/value/geoPoint\"\n\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } from \"./types/value/group\"\n\nexport type { SliceZone } from \"./types/value/sliceZone\"\nexport type { Slice } from \"./types/value/slice\"\nexport type { SharedSlice } from \"./types/value/sharedSlice\"\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\"\n\nexport type {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} from \"./types/value/types\"\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\"\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\"\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\"\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\"\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\"\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\"\nexport type { CustomTypeModelTitleField } from \"./types/model/title\"\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\"\n\nexport type {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} from \"./types/model/contentRelationship\"\nexport type { CustomTypeModelLinkField } from \"./types/model/link\"\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\"\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\"\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\"\nexport type { CustomTypeModelColorField } from \"./types/model/color\"\nexport type { CustomTypeModelDateField } from \"./types/model/date\"\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\"\nexport type { CustomTypeModelNumberField } from \"./types/model/number\"\nexport type { CustomTypeModelSelectField } from \"./types/model/select\"\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\"\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n}\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./types/model/group\"\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\"\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\"\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\"\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\"\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\"\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\"\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\"\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Content API responses.\nexport type { Query } from \"./types/api/query\"\n\nexport type { Ref } from \"./types/api/ref\"\n\nexport type { Release } from \"./types/api/release\"\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\"\n\nexport type { Tags } from \"./types/api/tags\"\n\n// Integration - Types representing Prismic's integration API.\nexport type {\n\tIntegrationAPIItem,\n\tIntegrationAPIResults,\n} from \"./types/api/integration\"\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\"\n\nexport type { WebhookBody } from \"./types/webhook/types\"\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\"\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,YAAY;;;;AA2ClB,MAAM,wBAAwB;;;;AAoD9B,MAAM,UAAU"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { filter } from \"./filter\"\nimport type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\"\nexport { getRepositoryName } from \"./getRepositoryName\"\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\"\nexport { isRepositoryName } from \"./isRepositoryName\"\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\"\nexport { buildQueryURL } from \"./buildQueryURL\"\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\"\n\n// Query filters API.\n/** @deprecated Renamed to `filter` */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter\nexport { filter, predicate }\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\"\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type { BuildQueryURLArgs, Ordering, QueryParams, Route } from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike } from \"./lib/request\"\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\"\nexport { asLink } from \"./helpers/asLink\"\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\"\nexport { asText } from \"./helpers/asText\"\nexport { asHTML } from \"./helpers/asHTML\"\nexport { asImageSrc } from \"./helpers/asImageSrc\"\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\"\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\"\nexport * as isFilled from \"./helpers/isFilled\"\n\n/** @deprecated Renamed to `mapSliceZone` */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\n\n/** @deprecated Renamed to `HTMLRichTextMapSerializer` */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer\n/** @deprecated Renamed to `HTMLRichTextFunctionSerializer` */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n}\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\"\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\n// Client Errors\nexport {\n\tForbiddenError,\n\tInvalidDataError,\n\tNotFoundError,\n\tParsingError,\n\tPreviewTokenExpiredError,\n\tPrismicError,\n\tRefExpiredError,\n\tRefNotFoundError,\n\tRepositoryNotFoundError,\n} from \"./errors\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/** @deprecated Use {@link RichTextNodeType} instead. */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\nexport { LinkType } from \"./types/value/link\"\nexport { OEmbedType } from \"./types/value/embed\"\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\"\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n\tRichTextNodeTypes,\n} from \"./types/value/richText\"\nexport type { TitleField } from \"./types/value/title\"\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\"\n\nexport type { EmptyLinkField, LinkField, FilledLinkToWebField } from \"./types/value/link\"\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\"\nexport type { LinkToMediaField, FilledLinkToMediaField } from \"./types/value/linkToMedia\"\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\"\n\nexport type {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\n\nexport type { BooleanField } from \"./types/value/boolean\"\nexport type { ColorField } from \"./types/value/color\"\nexport type { DateField } from \"./types/value/date\"\nexport type { KeyTextField } from \"./types/value/keyText\"\nexport type { NumberField } from \"./types/value/number\"\nexport type { SelectField } from \"./types/value/select\"\nexport type { TimestampField } from \"./types/value/timestamp\"\nexport type { GeoPointField } from \"./types/value/geoPoint\"\n\n/** @deprecated Renamed to `IntegrationField` */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } from \"./types/value/group\"\n\nexport type { SliceZone } from \"./types/value/sliceZone\"\nexport type { Slice } from \"./types/value/slice\"\nexport type { SharedSlice } from \"./types/value/sharedSlice\"\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\"\n\nexport type {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} from \"./types/value/types\"\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\"\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\"\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\"\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\"\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\"\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\"\nexport type { CustomTypeModelTitleField } from \"./types/model/title\"\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\"\n\nexport type {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} from \"./types/model/contentRelationship\"\nexport type { CustomTypeModelLinkField } from \"./types/model/link\"\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\"\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\"\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\"\nexport type { CustomTypeModelColorField } from \"./types/model/color\"\nexport type { CustomTypeModelDateField } from \"./types/model/date\"\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\"\nexport type { CustomTypeModelNumberField } from \"./types/model/number\"\nexport type { CustomTypeModelSelectField } from \"./types/model/select\"\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\"\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/** @deprecated Renamed to `CustomTypeModelIntegrationField`. */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField }\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./types/model/group\"\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\"\nexport type { CustomTypeModelSlice, CustomTypeModelLegacySlice } from \"./types/model/slice\"\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\"\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\"\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\"\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\"\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\"\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Content API responses.\nexport type { Query } from \"./types/api/query\"\n\nexport type { Ref } from \"./types/api/ref\"\n\nexport type { Release } from \"./types/api/release\"\n\nexport type { Repository, Language, Form, FormField } from \"./types/api/repository\"\n\nexport type { Tags } from \"./types/api/tags\"\n\n// Integration - Types representing Prismic's integration API.\nexport type { IntegrationAPIItem, IntegrationAPIResults } from \"./types/api/integration\"\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\"\n\nexport type { WebhookBody } from \"./types/webhook/types\"\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\"\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,YAAY;;AA+BlB,MAAM,wBAAwB;;AA8C9B,MAAM,UAAU"}
@@ -1,12 +1,11 @@
1
1
  //#region src/isRepositoryEndpoint.ts
2
2
  /**
3
- * Determines if a string is a Prismic Content API endpoint. Note that any valid
4
- * URL is a valid endpoint to support network proxies.
3
+ * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
4
+ * endpoint to support network proxies.
5
5
  *
6
6
  * @param input - Input to test.
7
- *
8
7
  * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
9
- * otherwise.
8
+ * otherwise.
10
9
  */
11
10
  const isRepositoryEndpoint = (input) => {
12
11
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryEndpoint.cjs","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"mappings":";;;;;;;;;;AASA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
1
+ {"version":3,"file":"isRepositoryEndpoint.cjs","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid\n * endpoint to support network proxies.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
@@ -1,12 +1,11 @@
1
1
  //#region src/isRepositoryEndpoint.d.ts
2
2
  /**
3
- * Determines if a string is a Prismic Content API endpoint. Note that any valid
4
- * URL is a valid endpoint to support network proxies.
3
+ * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
4
+ * endpoint to support network proxies.
5
5
  *
6
6
  * @param input - Input to test.
7
- *
8
7
  * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
9
- * otherwise.
8
+ * otherwise.
10
9
  */
11
10
  declare const isRepositoryEndpoint: (input: string) => boolean;
12
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AASA;;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
1
+ {"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AAQA;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
@@ -1,12 +1,11 @@
1
1
  //#region src/isRepositoryEndpoint.d.ts
2
2
  /**
3
- * Determines if a string is a Prismic Content API endpoint. Note that any valid
4
- * URL is a valid endpoint to support network proxies.
3
+ * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
4
+ * endpoint to support network proxies.
5
5
  *
6
6
  * @param input - Input to test.
7
- *
8
7
  * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
9
- * otherwise.
8
+ * otherwise.
10
9
  */
11
10
  declare const isRepositoryEndpoint: (input: string) => boolean;
12
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AASA;;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
1
+ {"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AAQA;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
@@ -1,12 +1,11 @@
1
1
  //#region src/isRepositoryEndpoint.ts
2
2
  /**
3
- * Determines if a string is a Prismic Content API endpoint. Note that any valid
4
- * URL is a valid endpoint to support network proxies.
3
+ * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
4
+ * endpoint to support network proxies.
5
5
  *
6
6
  * @param input - Input to test.
7
- *
8
7
  * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
9
- * otherwise.
8
+ * otherwise.
10
9
  */
11
10
  const isRepositoryEndpoint = (input) => {
12
11
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryEndpoint.js","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"mappings":";;;;;;;;;;AASA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
1
+ {"version":3,"file":"isRepositoryEndpoint.js","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid\n * endpoint to support network proxies.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
@@ -3,9 +3,8 @@
3
3
  * Determines if an input is a valid Prismic repository name.
4
4
  *
5
5
  * @param input - Input to test.
6
- *
7
6
  * @returns `true` if `input` is a valid Prismic repository name, `false`
8
- * otherwise.
7
+ * otherwise.
9
8
  */
10
9
  const isRepositoryName = (input) => {
11
10
  return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryName.cjs","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
1
+ {"version":3,"file":"isRepositoryName.cjs","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"mappings":";;;;;;;;AAOA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
@@ -3,9 +3,8 @@
3
3
  * Determines if an input is a valid Prismic repository name.
4
4
  *
5
5
  * @param input - Input to test.
6
- *
7
6
  * @returns `true` if `input` is a valid Prismic repository name, `false`
8
- * otherwise.
7
+ * otherwise.
9
8
  */
10
9
  declare const isRepositoryName: (input: string) => boolean;
11
10
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAQA;;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
1
+ {"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAOA;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
@@ -3,9 +3,8 @@
3
3
  * Determines if an input is a valid Prismic repository name.
4
4
  *
5
5
  * @param input - Input to test.
6
- *
7
6
  * @returns `true` if `input` is a valid Prismic repository name, `false`
8
- * otherwise.
7
+ * otherwise.
9
8
  */
10
9
  declare const isRepositoryName: (input: string) => boolean;
11
10
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAQA;;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
1
+ {"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAOA;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
@@ -3,9 +3,8 @@
3
3
  * Determines if an input is a valid Prismic repository name.
4
4
  *
5
5
  * @param input - Input to test.
6
- *
7
6
  * @returns `true` if `input` is a valid Prismic repository name, `false`
8
- * otherwise.
7
+ * otherwise.
9
8
  */
10
9
  const isRepositoryName = (input) => {
11
10
  return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
@@ -1 +1 @@
1
- {"version":3,"file":"isRepositoryName.js","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
1
+ {"version":3,"file":"isRepositoryName.js","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"mappings":";;;;;;;;AAOA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
@@ -4,15 +4,13 @@ const require_package = require("../package.cjs");
4
4
  * Returns a `prismic.dev/msg` URL for a given message slug.
5
5
  *
6
6
  * @example
7
+ * ;```ts
8
+ * devMsg("missing-param")
9
+ * // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
10
+ * ```
7
11
  *
8
- * ```ts
9
- * devMsg("missing-param")
10
- * // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
11
- * ```
12
- *
13
- * @param slug - Slug for the message. This corresponds to a Markdown file in
14
- * the Git repository's `/messages` directory.
15
- *
12
+ * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's
13
+ * `/messages` directory.
16
14
  * @returns The `prismic.dev/msg` URL for the given slug.
17
15
  */
18
16
  const devMsg = (slug) => {
@@ -1 +1 @@
1
- {"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmCA,gBAAAA,QAAQ,GAAG"}
1
+ {"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t;```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmCA,gBAAAA,QAAQ,GAAG"}
@@ -4,15 +4,13 @@ import { version } from "../package.js";
4
4
  * Returns a `prismic.dev/msg` URL for a given message slug.
5
5
  *
6
6
  * @example
7
+ * ;```ts
8
+ * devMsg("missing-param")
9
+ * // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
10
+ * ```
7
11
  *
8
- * ```ts
9
- * devMsg("missing-param")
10
- * // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
11
- * ```
12
- *
13
- * @param slug - Slug for the message. This corresponds to a Markdown file in
14
- * the Git repository's `/messages` directory.
15
- *
12
+ * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's
13
+ * `/messages` directory.
16
14
  * @returns The `prismic.dev/msg` URL for the given slug.
17
15
  */
18
16
  const devMsg = (slug) => {
@@ -1 +1 @@
1
- {"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmC,QAAQ,GAAG"}
1
+ {"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t;```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmC,QAAQ,GAAG"}
@@ -1,12 +1,11 @@
1
1
  //#region src/lib/getOptionalLinkProperties.ts
2
2
  /**
3
- * Returns optional properties only available to link fields. Link fields can
4
- * have the same shape as content relationship and link to media fields,
5
- * requiring special treatment to extract link-specific properties.
6
- *
7
- * @param input - The content relationship or link to media field from which the
8
- * link properties will be extracted.
3
+ * Returns optional properties only available to link fields. Link fields can have the same shape as
4
+ * content relationship and link to media fields, requiring special treatment to extract
5
+ * link-specific properties.
9
6
  *
7
+ * @param input - The content relationship or link to media field from which the link properties
8
+ * will be extracted.
10
9
  * @returns Optional link properties that `input` might have.
11
10
  */
12
11
  const getOptionalLinkProperties = (input) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getOptionalLinkProperties.cjs","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can\n * have the same shape as content relationship and link to media fields,\n * requiring special treatment to extract link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the\n * link properties will be extracted.\n *\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
1
+ {"version":3,"file":"getOptionalLinkProperties.cjs","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can have the same shape as\n * content relationship and link to media fields, requiring special treatment to extract\n * link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the link properties\n * will be extracted.\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
@@ -1,12 +1,11 @@
1
1
  //#region src/lib/getOptionalLinkProperties.ts
2
2
  /**
3
- * Returns optional properties only available to link fields. Link fields can
4
- * have the same shape as content relationship and link to media fields,
5
- * requiring special treatment to extract link-specific properties.
6
- *
7
- * @param input - The content relationship or link to media field from which the
8
- * link properties will be extracted.
3
+ * Returns optional properties only available to link fields. Link fields can have the same shape as
4
+ * content relationship and link to media fields, requiring special treatment to extract
5
+ * link-specific properties.
9
6
  *
7
+ * @param input - The content relationship or link to media field from which the link properties
8
+ * will be extracted.
10
9
  * @returns Optional link properties that `input` might have.
11
10
  */
12
11
  const getOptionalLinkProperties = (input) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getOptionalLinkProperties.js","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can\n * have the same shape as content relationship and link to media fields,\n * requiring special treatment to extract link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the\n * link properties will be extracted.\n *\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
1
+ {"version":3,"file":"getOptionalLinkProperties.js","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can have the same shape as\n * content relationship and link to media fields, requiring special treatment to extract\n * link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the link properties\n * will be extracted.\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
@@ -6,9 +6,7 @@ const readValue = (value) => {
6
6
  /**
7
7
  * Returns the value of a cookie from a given cookie store.
8
8
  *
9
- * @param cookieJar - The stringified cookie store from which to read the
10
- * cookie.
11
- *
9
+ * @param cookieJar - The stringified cookie store from which to read the cookie.
12
10
  * @returns The value of the cookie, if it exists.
13
11
  */
14
12
  const getPreviewCookie = (cookieJar) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getPreviewCookie.cjs","names":[],"sources":["../../src/lib/getPreviewCookie.ts"],"sourcesContent":["import { preview as previewCookieName } from \"../cookie\"\n\nconst readValue = (value: string): string => {\n\treturn value.replace(/%3B/g, \";\")\n}\n\n/**\n * Returns the value of a cookie from a given cookie store.\n *\n * @param cookieJar - The stringified cookie store from which to read the\n * cookie.\n *\n * @returns The value of the cookie, if it exists.\n */\nexport const getPreviewCookie = (cookieJar: string): string | undefined => {\n\tconst cookies = cookieJar.split(\"; \")\n\n\tlet value: string | undefined\n\n\tfor (const cookie of cookies) {\n\t\tconst parts = cookie.split(\"=\")\n\t\tconst name = readValue(parts[0]).replace(/%3D/g, \"=\")\n\n\t\tif (name === previewCookieName) {\n\t\t\tvalue = readValue(parts.slice(1).join(\"=\"))\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn value\n}\n"],"mappings":";;AAEA,MAAM,aAAa,UAA0B;AAC5C,QAAO,MAAM,QAAQ,QAAQ,IAAI;;;;;;;;;;AAWlC,MAAa,oBAAoB,cAA0C;CAC1E,MAAM,UAAU,UAAU,MAAM,KAAK;CAErC,IAAI;AAEJ,MAAK,MAAM,UAAU,SAAS;EAC7B,MAAM,QAAQ,OAAO,MAAM,IAAI;AAG/B,MAFa,UAAU,MAAM,GAAG,CAAC,QAAQ,QAAQ,IAAI,KAAA,sBAErB;AAC/B,WAAQ,UAAU,MAAM,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AAC3C;;;AAIF,QAAO"}
1
+ {"version":3,"file":"getPreviewCookie.cjs","names":[],"sources":["../../src/lib/getPreviewCookie.ts"],"sourcesContent":["import { preview as previewCookieName } from \"../cookie\"\n\nconst readValue = (value: string): string => {\n\treturn value.replace(/%3B/g, \";\")\n}\n\n/**\n * Returns the value of a cookie from a given cookie store.\n *\n * @param cookieJar - The stringified cookie store from which to read the cookie.\n * @returns The value of the cookie, if it exists.\n */\nexport const getPreviewCookie = (cookieJar: string): string | undefined => {\n\tconst cookies = cookieJar.split(\"; \")\n\n\tlet value: string | undefined\n\n\tfor (const cookie of cookies) {\n\t\tconst parts = cookie.split(\"=\")\n\t\tconst name = readValue(parts[0]).replace(/%3D/g, \"=\")\n\n\t\tif (name === previewCookieName) {\n\t\t\tvalue = readValue(parts.slice(1).join(\"=\"))\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn value\n}\n"],"mappings":";;AAEA,MAAM,aAAa,UAA0B;AAC5C,QAAO,MAAM,QAAQ,QAAQ,IAAI;;;;;;;;AASlC,MAAa,oBAAoB,cAA0C;CAC1E,MAAM,UAAU,UAAU,MAAM,KAAK;CAErC,IAAI;AAEJ,MAAK,MAAM,UAAU,SAAS;EAC7B,MAAM,QAAQ,OAAO,MAAM,IAAI;AAG/B,MAFa,UAAU,MAAM,GAAG,CAAC,QAAQ,QAAQ,IAAI,KAAA,sBAErB;AAC/B,WAAQ,UAAU,MAAM,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AAC3C;;;AAIF,QAAO"}
@@ -6,9 +6,7 @@ const readValue = (value) => {
6
6
  /**
7
7
  * Returns the value of a cookie from a given cookie store.
8
8
  *
9
- * @param cookieJar - The stringified cookie store from which to read the
10
- * cookie.
11
- *
9
+ * @param cookieJar - The stringified cookie store from which to read the cookie.
12
10
  * @returns The value of the cookie, if it exists.
13
11
  */
14
12
  const getPreviewCookie = (cookieJar) => {