@prismicio/client 6.7.3 → 7.0.0-alpha.1

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 (400) hide show
  1. package/README.md +4 -4
  2. package/dist/buildQueryURL.cjs +25 -6
  3. package/dist/buildQueryURL.cjs.map +1 -1
  4. package/dist/buildQueryURL.d.ts +207 -130
  5. package/dist/buildQueryURL.js +25 -6
  6. package/dist/buildQueryURL.js.map +1 -1
  7. package/dist/cookie.d.ts +5 -5
  8. package/dist/createClient.cjs +1142 -0
  9. package/dist/createClient.cjs.map +1 -0
  10. package/dist/{client.d.ts → createClient.d.ts} +980 -929
  11. package/dist/createClient.js +1142 -0
  12. package/dist/createClient.js.map +1 -0
  13. package/dist/errors/ForbiddenError.cjs.map +1 -0
  14. package/dist/{ForbiddenError.d.ts → errors/ForbiddenError.d.ts} +11 -11
  15. package/dist/errors/ForbiddenError.js.map +1 -0
  16. package/dist/errors/NotFoundError.cjs.map +1 -0
  17. package/dist/{NotFoundError.d.ts → errors/NotFoundError.d.ts} +3 -3
  18. package/dist/errors/NotFoundError.js.map +1 -0
  19. package/dist/errors/ParsingError.cjs.map +1 -0
  20. package/dist/{ParsingError.d.ts → errors/ParsingError.d.ts} +12 -12
  21. package/dist/errors/ParsingError.js.map +1 -0
  22. package/dist/errors/PrismicError.cjs.map +1 -0
  23. package/dist/{PrismicError.d.ts → errors/PrismicError.d.ts} +5 -5
  24. package/dist/errors/PrismicError.js.map +1 -0
  25. package/dist/filter.cjs +247 -0
  26. package/dist/filter.cjs.map +1 -0
  27. package/dist/filter.d.ts +209 -0
  28. package/dist/filter.js +247 -0
  29. package/dist/filter.js.map +1 -0
  30. package/dist/getGraphQLEndpoint.cjs +1 -1
  31. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  32. package/dist/getGraphQLEndpoint.d.ts +9 -9
  33. package/dist/getGraphQLEndpoint.js +1 -1
  34. package/dist/getGraphQLEndpoint.js.map +1 -1
  35. package/dist/getRepositoryEndpoint.cjs +1 -1
  36. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  37. package/dist/getRepositoryEndpoint.d.ts +10 -10
  38. package/dist/getRepositoryEndpoint.js +1 -1
  39. package/dist/getRepositoryEndpoint.js.map +1 -1
  40. package/dist/getRepositoryName.cjs +1 -1
  41. package/dist/getRepositoryName.cjs.map +1 -1
  42. package/dist/getRepositoryName.d.ts +13 -13
  43. package/dist/getRepositoryName.js +1 -1
  44. package/dist/getRepositoryName.js.map +1 -1
  45. package/dist/getToolbarSrc.cjs +13 -0
  46. package/dist/getToolbarSrc.cjs.map +1 -0
  47. package/dist/getToolbarSrc.d.ts +34 -0
  48. package/dist/getToolbarSrc.js +13 -0
  49. package/dist/getToolbarSrc.js.map +1 -0
  50. package/dist/helpers/asDate.cjs +14 -0
  51. package/dist/helpers/asDate.cjs.map +1 -0
  52. package/dist/helpers/asDate.d.ts +16 -0
  53. package/dist/helpers/asDate.js +14 -0
  54. package/dist/helpers/asDate.js.map +1 -0
  55. package/dist/helpers/asHTML.cjs +80 -0
  56. package/dist/helpers/asHTML.cjs.map +1 -0
  57. package/dist/helpers/asHTML.d.ts +77 -0
  58. package/dist/helpers/asHTML.js +80 -0
  59. package/dist/helpers/asHTML.js.map +1 -0
  60. package/dist/helpers/asImagePixelDensitySrcSet.cjs +21 -0
  61. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -0
  62. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +52 -0
  63. package/dist/helpers/asImagePixelDensitySrcSet.js +21 -0
  64. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -0
  65. package/dist/helpers/asImageSrc.cjs +13 -0
  66. package/dist/helpers/asImageSrc.cjs.map +1 -0
  67. package/dist/helpers/asImageSrc.d.ts +27 -0
  68. package/dist/helpers/asImageSrc.js +13 -0
  69. package/dist/helpers/asImageSrc.js.map +1 -0
  70. package/dist/helpers/asImageWidthSrcSet.cjs +45 -0
  71. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -0
  72. package/dist/helpers/asImageWidthSrcSet.d.ts +60 -0
  73. package/dist/helpers/asImageWidthSrcSet.js +45 -0
  74. package/dist/helpers/asImageWidthSrcSet.js.map +1 -0
  75. package/dist/helpers/asLink.cjs +38 -0
  76. package/dist/helpers/asLink.cjs.map +1 -0
  77. package/dist/helpers/asLink.d.ts +34 -0
  78. package/dist/helpers/asLink.js +38 -0
  79. package/dist/helpers/asLink.js.map +1 -0
  80. package/dist/helpers/asLinkAttrs.cjs +28 -0
  81. package/dist/helpers/asLinkAttrs.cjs.map +1 -0
  82. package/dist/helpers/asLinkAttrs.d.ts +63 -0
  83. package/dist/helpers/asLinkAttrs.js +28 -0
  84. package/dist/helpers/asLinkAttrs.js.map +1 -0
  85. package/dist/helpers/asText.cjs +12 -0
  86. package/dist/helpers/asText.cjs.map +1 -0
  87. package/dist/helpers/asText.d.ts +16 -0
  88. package/dist/helpers/asText.js +12 -0
  89. package/dist/helpers/asText.js.map +1 -0
  90. package/dist/helpers/documentToLinkField.cjs +26 -0
  91. package/dist/helpers/documentToLinkField.cjs.map +1 -0
  92. package/dist/helpers/documentToLinkField.d.ts +15 -0
  93. package/dist/helpers/documentToLinkField.js +26 -0
  94. package/dist/helpers/documentToLinkField.js.map +1 -0
  95. package/dist/helpers/isFilled.cjs +67 -0
  96. package/dist/helpers/isFilled.cjs.map +1 -0
  97. package/dist/helpers/isFilled.d.ts +172 -0
  98. package/dist/helpers/isFilled.js +67 -0
  99. package/dist/helpers/isFilled.js.map +1 -0
  100. package/dist/index.cjs +56 -17
  101. package/dist/index.cjs.map +1 -1
  102. package/dist/index.d.ts +138 -88
  103. package/dist/index.js +50 -16
  104. package/dist/index.js.map +1 -1
  105. package/dist/isRepositoryEndpoint.d.ts +10 -10
  106. package/dist/isRepositoryName.d.ts +9 -9
  107. package/dist/lib/appendFilters.cjs +11 -0
  108. package/dist/lib/appendFilters.cjs.map +1 -0
  109. package/dist/lib/appendFilters.d.ts +18 -0
  110. package/dist/lib/appendFilters.js +11 -0
  111. package/dist/lib/appendFilters.js.map +1 -0
  112. package/dist/lib/castArray.cjs +3 -1
  113. package/dist/lib/castArray.cjs.map +1 -1
  114. package/dist/lib/castArray.d.ts +11 -11
  115. package/dist/lib/castArray.js +3 -1
  116. package/dist/lib/castArray.js.map +1 -1
  117. package/dist/lib/castThunk.cjs +3 -1
  118. package/dist/lib/castThunk.cjs.map +1 -1
  119. package/dist/lib/castThunk.d.ts +10 -10
  120. package/dist/lib/castThunk.js +3 -1
  121. package/dist/lib/castThunk.js.map +1 -1
  122. package/dist/lib/devMsg.cjs +8 -0
  123. package/dist/lib/devMsg.cjs.map +1 -0
  124. package/dist/lib/devMsg.d.ts +16 -0
  125. package/dist/lib/devMsg.js +8 -0
  126. package/dist/lib/devMsg.js.map +1 -0
  127. package/dist/lib/escapeHTML.cjs +43 -0
  128. package/dist/lib/escapeHTML.cjs.map +1 -0
  129. package/dist/lib/escapeHTML.d.ts +1 -0
  130. package/dist/lib/escapeHTML.js +43 -0
  131. package/dist/lib/escapeHTML.js.map +1 -0
  132. package/dist/lib/everyTagFilter.cjs +9 -0
  133. package/dist/lib/everyTagFilter.cjs.map +1 -0
  134. package/dist/lib/everyTagFilter.d.ts +9 -0
  135. package/dist/lib/everyTagFilter.js +9 -0
  136. package/dist/lib/everyTagFilter.js.map +1 -0
  137. package/dist/lib/findMasterRef.cjs.map +1 -1
  138. package/dist/lib/findMasterRef.d.ts +10 -10
  139. package/dist/lib/findMasterRef.js.map +1 -1
  140. package/dist/lib/findRef.cjs +3 -3
  141. package/dist/lib/findRef.cjs.map +1 -1
  142. package/dist/lib/findRef.d.ts +13 -13
  143. package/dist/lib/findRef.js +3 -3
  144. package/dist/lib/findRef.js.map +1 -1
  145. package/dist/lib/findRefByID.cjs.map +1 -1
  146. package/dist/lib/findRefByID.d.ts +11 -11
  147. package/dist/lib/findRefByID.js.map +1 -1
  148. package/dist/lib/findRefByLabel.cjs.map +1 -1
  149. package/dist/lib/findRefByLabel.d.ts +11 -11
  150. package/dist/lib/findRefByLabel.js.map +1 -1
  151. package/dist/lib/getPreviewCookie.cjs +1 -1
  152. package/dist/lib/getPreviewCookie.cjs.map +1 -1
  153. package/dist/lib/getPreviewCookie.d.ts +9 -9
  154. package/dist/lib/getPreviewCookie.js +1 -1
  155. package/dist/lib/getPreviewCookie.js.map +1 -1
  156. package/dist/lib/isInternalURL.cjs +9 -0
  157. package/dist/lib/isInternalURL.cjs.map +1 -0
  158. package/dist/lib/isInternalURL.d.ts +8 -0
  159. package/dist/lib/isInternalURL.js +9 -0
  160. package/dist/lib/isInternalURL.js.map +1 -0
  161. package/dist/lib/minifyGraphQLQuery.d.ts +8 -8
  162. package/dist/lib/serializerHelpers.cjs +54 -0
  163. package/dist/lib/serializerHelpers.cjs.map +1 -0
  164. package/dist/lib/serializerHelpers.d.ts +9 -0
  165. package/dist/lib/serializerHelpers.js +54 -0
  166. package/dist/lib/serializerHelpers.js.map +1 -0
  167. package/dist/lib/someTagsFilter.cjs +9 -0
  168. package/dist/lib/someTagsFilter.cjs.map +1 -0
  169. package/dist/lib/someTagsFilter.d.ts +9 -0
  170. package/dist/lib/someTagsFilter.js +9 -0
  171. package/dist/lib/someTagsFilter.js.map +1 -0
  172. package/dist/lib/typeFilter.cjs +8 -0
  173. package/dist/lib/typeFilter.cjs.map +1 -0
  174. package/dist/lib/typeFilter.d.ts +8 -0
  175. package/dist/lib/typeFilter.js +8 -0
  176. package/dist/lib/typeFilter.js.map +1 -0
  177. package/dist/package.json.cjs +5 -0
  178. package/dist/package.json.cjs.map +1 -0
  179. package/dist/package.json.js +5 -0
  180. package/dist/package.json.js.map +1 -0
  181. package/dist/types/api/query.d.ts +42 -0
  182. package/dist/types/api/ref.d.ts +32 -0
  183. package/dist/types/api/release.d.ts +10 -0
  184. package/dist/types/api/repository.d.ts +100 -0
  185. package/dist/types/api/tags.d.ts +8 -0
  186. package/dist/types/model/boolean.d.ts +15 -0
  187. package/dist/types/model/color.d.ts +13 -0
  188. package/dist/types/model/contentRelationship.d.ts +18 -0
  189. package/dist/types/model/customType.d.ts +42 -0
  190. package/dist/types/model/date.d.ts +14 -0
  191. package/dist/types/model/embed.d.ts +13 -0
  192. package/dist/types/model/geoPoint.d.ts +12 -0
  193. package/dist/types/model/group.d.ts +15 -0
  194. package/dist/types/model/image.d.ts +31 -0
  195. package/dist/types/model/integrationFields.d.ts +14 -0
  196. package/dist/types/model/keyText.d.ts +13 -0
  197. package/dist/types/model/link.cjs +9 -0
  198. package/dist/types/model/link.cjs.map +1 -0
  199. package/dist/types/model/link.d.ts +27 -0
  200. package/dist/types/model/link.js +9 -0
  201. package/dist/types/model/link.js.map +1 -0
  202. package/dist/types/model/linkToMedia.d.ts +16 -0
  203. package/dist/types/model/number.d.ts +15 -0
  204. package/dist/types/model/range.d.ts +14 -0
  205. package/dist/types/model/richText.d.ts +35 -0
  206. package/dist/types/model/select.d.ts +18 -0
  207. package/dist/types/model/separator.d.ts +10 -0
  208. package/dist/types/model/sharedSlice.d.ts +16 -0
  209. package/dist/types/model/sharedSliceVariation.d.ts +19 -0
  210. package/dist/types/model/slice.cjs +8 -0
  211. package/dist/types/model/slice.cjs.map +1 -0
  212. package/dist/types/model/slice.d.ts +33 -0
  213. package/dist/types/model/slice.js +8 -0
  214. package/dist/types/model/slice.js.map +1 -0
  215. package/dist/types/model/sliceZone.cjs +8 -0
  216. package/dist/types/model/sliceZone.cjs.map +1 -0
  217. package/dist/types/model/sliceZone.d.ts +41 -0
  218. package/dist/types/model/sliceZone.js +8 -0
  219. package/dist/types/model/sliceZone.js.map +1 -0
  220. package/dist/types/model/timestamp.d.ts +14 -0
  221. package/dist/types/model/title.d.ts +7 -0
  222. package/dist/types/model/types.cjs +34 -0
  223. package/dist/types/model/types.cjs.map +1 -0
  224. package/dist/types/model/types.d.ts +62 -0
  225. package/dist/types/model/types.js +34 -0
  226. package/dist/types/model/types.js.map +1 -0
  227. package/dist/types/model/uid.d.ts +13 -0
  228. package/dist/types/value/boolean.d.ts +6 -0
  229. package/dist/types/value/color.d.ts +8 -0
  230. package/dist/types/value/contentRelationship.d.ts +29 -0
  231. package/dist/types/value/date.d.ts +8 -0
  232. package/dist/types/value/document.d.ts +113 -0
  233. package/dist/types/value/embed.cjs +10 -0
  234. package/dist/types/value/embed.cjs.map +1 -0
  235. package/dist/types/value/embed.d.ts +167 -0
  236. package/dist/types/value/embed.js +10 -0
  237. package/dist/types/value/embed.js.map +1 -0
  238. package/dist/types/value/geoPoint.d.ts +11 -0
  239. package/dist/types/value/group.d.ts +7 -0
  240. package/dist/types/value/image.d.ts +36 -0
  241. package/dist/types/value/integrationFields.d.ts +9 -0
  242. package/dist/types/value/keyText.d.ts +8 -0
  243. package/dist/types/value/link.cjs +10 -0
  244. package/dist/types/value/link.cjs.map +1 -0
  245. package/dist/types/value/link.d.ts +40 -0
  246. package/dist/types/value/link.js +10 -0
  247. package/dist/types/value/link.js.map +1 -0
  248. package/dist/types/value/linkToMedia.d.ts +20 -0
  249. package/dist/types/value/number.d.ts +8 -0
  250. package/dist/types/value/richText.cjs +25 -0
  251. package/dist/types/value/richText.cjs.map +1 -0
  252. package/dist/types/value/richText.d.ts +203 -0
  253. package/dist/types/value/richText.js +25 -0
  254. package/dist/types/value/richText.js.map +1 -0
  255. package/dist/types/value/select.d.ts +9 -0
  256. package/dist/types/value/sharedSlice.d.ts +11 -0
  257. package/dist/types/value/sharedSliceVariation.d.ts +7 -0
  258. package/dist/types/value/slice.d.ts +13 -0
  259. package/dist/types/value/sliceZone.d.ts +12 -0
  260. package/dist/types/value/timestamp.d.ts +8 -0
  261. package/dist/types/value/title.d.ts +12 -0
  262. package/dist/types/value/types.d.ts +40 -0
  263. package/dist/types/webhook/apiUpdate.d.ts +52 -0
  264. package/dist/types/webhook/testTrigger.d.ts +9 -0
  265. package/dist/types/webhook/types.cjs +8 -0
  266. package/dist/types/webhook/types.cjs.map +1 -0
  267. package/dist/types/webhook/types.d.ts +18 -0
  268. package/dist/types/webhook/types.js +8 -0
  269. package/dist/types/webhook/types.js.map +1 -0
  270. package/package.json +42 -36
  271. package/src/buildQueryURL.ts +179 -32
  272. package/src/{client.ts → createClient.ts} +248 -186
  273. package/src/filter.ts +356 -0
  274. package/src/getGraphQLEndpoint.ts +2 -1
  275. package/src/getRepositoryEndpoint.ts +2 -1
  276. package/src/getRepositoryName.ts +1 -1
  277. package/src/getToolbarSrc.ts +50 -0
  278. package/src/helpers/asDate.ts +48 -0
  279. package/src/helpers/asHTML.ts +249 -0
  280. package/src/helpers/asImagePixelDensitySrcSet.ts +96 -0
  281. package/src/helpers/asImageSrc.ts +41 -0
  282. package/src/helpers/asImageWidthSrcSet.ts +139 -0
  283. package/src/helpers/asLink.ts +118 -0
  284. package/src/helpers/asLinkAttrs.ts +127 -0
  285. package/src/helpers/asText.ts +29 -0
  286. package/src/helpers/documentToLinkField.ts +47 -0
  287. package/src/helpers/isFilled.ts +288 -0
  288. package/src/index.ts +277 -31
  289. package/src/lib/appendFilters.ts +26 -0
  290. package/src/lib/castArray.ts +3 -1
  291. package/src/lib/castThunk.ts +3 -2
  292. package/src/lib/devMsg.ts +20 -0
  293. package/src/lib/escapeHTML.ts +51 -0
  294. package/src/lib/everyTagFilter.ts +15 -0
  295. package/src/lib/findMasterRef.ts +2 -2
  296. package/src/lib/findRef.ts +6 -9
  297. package/src/lib/findRefByID.ts +2 -2
  298. package/src/lib/findRefByLabel.ts +2 -5
  299. package/src/lib/getPreviewCookie.ts +1 -1
  300. package/src/lib/isInternalURL.ts +14 -0
  301. package/src/lib/serializerHelpers.ts +101 -0
  302. package/src/lib/someTagsFilter.ts +15 -0
  303. package/src/lib/typeFilter.ts +12 -0
  304. package/src/types/api/query.ts +50 -0
  305. package/src/types/api/ref.ts +36 -0
  306. package/src/types/api/release.ts +11 -0
  307. package/src/types/api/repository.ts +117 -0
  308. package/src/types/api/tags.ts +8 -0
  309. package/src/types/model/boolean.ts +16 -0
  310. package/src/types/model/color.ts +14 -0
  311. package/src/types/model/contentRelationship.ts +23 -0
  312. package/src/types/model/customType.ts +61 -0
  313. package/src/types/model/date.ts +15 -0
  314. package/src/types/model/embed.ts +14 -0
  315. package/src/types/model/geoPoint.ts +13 -0
  316. package/src/types/model/group.ts +24 -0
  317. package/src/types/model/image.ts +37 -0
  318. package/src/types/model/integrationFields.ts +15 -0
  319. package/src/types/model/keyText.ts +14 -0
  320. package/src/types/model/link.ts +31 -0
  321. package/src/types/model/linkToMedia.ts +18 -0
  322. package/src/types/model/number.ts +16 -0
  323. package/src/types/model/range.ts +15 -0
  324. package/src/types/model/richText.ts +40 -0
  325. package/src/types/model/select.ts +22 -0
  326. package/src/types/model/separator.ts +11 -0
  327. package/src/types/model/sharedSlice.ts +20 -0
  328. package/src/types/model/sharedSliceVariation.ts +30 -0
  329. package/src/types/model/slice.ts +50 -0
  330. package/src/types/model/sliceZone.ts +60 -0
  331. package/src/types/model/timestamp.ts +15 -0
  332. package/src/types/model/title.ts +8 -0
  333. package/src/types/model/types.ts +87 -0
  334. package/src/types/model/uid.ts +14 -0
  335. package/src/types/value/boolean.ts +6 -0
  336. package/src/types/value/color.ts +10 -0
  337. package/src/types/value/contentRelationship.ts +47 -0
  338. package/src/types/value/date.ts +10 -0
  339. package/src/types/value/document.ts +143 -0
  340. package/src/types/value/embed.ts +196 -0
  341. package/src/types/value/geoPoint.ts +15 -0
  342. package/src/types/value/group.ts +14 -0
  343. package/src/types/value/image.ts +67 -0
  344. package/src/types/value/integrationFields.ts +13 -0
  345. package/src/types/value/keyText.ts +10 -0
  346. package/src/types/value/link.ts +59 -0
  347. package/src/types/value/linkToMedia.ts +26 -0
  348. package/src/types/value/number.ts +10 -0
  349. package/src/types/value/richText.ts +287 -0
  350. package/src/types/value/select.ts +13 -0
  351. package/src/types/value/sharedSlice.ts +15 -0
  352. package/src/types/value/sharedSliceVariation.ts +18 -0
  353. package/src/types/value/slice.ts +24 -0
  354. package/src/types/value/sliceZone.ts +17 -0
  355. package/src/types/value/timestamp.ts +13 -0
  356. package/src/types/value/title.ts +32 -0
  357. package/src/types/value/types.ts +58 -0
  358. package/src/types/webhook/apiUpdate.ts +56 -0
  359. package/src/types/webhook/testTrigger.ts +10 -0
  360. package/src/types/webhook/types.ts +21 -0
  361. package/dist/ForbiddenError.cjs.map +0 -1
  362. package/dist/ForbiddenError.js.map +0 -1
  363. package/dist/NotFoundError.cjs.map +0 -1
  364. package/dist/NotFoundError.js.map +0 -1
  365. package/dist/ParsingError.cjs.map +0 -1
  366. package/dist/ParsingError.js.map +0 -1
  367. package/dist/PrismicError.cjs.map +0 -1
  368. package/dist/PrismicError.js.map +0 -1
  369. package/dist/client.cjs +0 -436
  370. package/dist/client.cjs.map +0 -1
  371. package/dist/client.js +0 -419
  372. package/dist/client.js.map +0 -1
  373. package/dist/lib/appendPredicates.cjs +0 -14
  374. package/dist/lib/appendPredicates.cjs.map +0 -1
  375. package/dist/lib/appendPredicates.d.ts +0 -18
  376. package/dist/lib/appendPredicates.js +0 -14
  377. package/dist/lib/appendPredicates.js.map +0 -1
  378. package/dist/lib/orElseThrow.d.ts +0 -11
  379. package/dist/predicate.cjs +0 -68
  380. package/dist/predicate.cjs.map +0 -1
  381. package/dist/predicate.d.ts +0 -209
  382. package/dist/predicate.js +0 -68
  383. package/dist/predicate.js.map +0 -1
  384. package/dist/types.d.ts +0 -156
  385. package/src/lib/appendPredicates.ts +0 -29
  386. package/src/lib/orElseThrow.ts +0 -17
  387. package/src/predicate.ts +0 -359
  388. package/src/types.ts +0 -191
  389. /package/dist/{ForbiddenError.cjs → errors/ForbiddenError.cjs} +0 -0
  390. /package/dist/{ForbiddenError.js → errors/ForbiddenError.js} +0 -0
  391. /package/dist/{NotFoundError.cjs → errors/NotFoundError.cjs} +0 -0
  392. /package/dist/{NotFoundError.js → errors/NotFoundError.js} +0 -0
  393. /package/dist/{ParsingError.cjs → errors/ParsingError.cjs} +0 -0
  394. /package/dist/{ParsingError.js → errors/ParsingError.js} +0 -0
  395. /package/dist/{PrismicError.cjs → errors/PrismicError.cjs} +0 -0
  396. /package/dist/{PrismicError.js → errors/PrismicError.js} +0 -0
  397. /package/src/{ForbiddenError.ts → errors/ForbiddenError.ts} +0 -0
  398. /package/src/{NotFoundError.ts → errors/NotFoundError.ts} +0 -0
  399. /package/src/{ParsingError.ts → errors/ParsingError.ts} +0 -0
  400. /package/src/{PrismicError.ts → errors/PrismicError.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,88 +1,138 @@
1
- import { getRepositoryEndpoint } from "./getRepositoryEndpoint";
2
- export { getRepositoryEndpoint };
3
- /**
4
- * @deprecated Renamed to `getRepositoryEndpoint`.
5
- */
6
- export declare const getEndpoint: <RepositoryName extends string>(repositoryName: RepositoryName) => `https://${RepositoryName}.cdn.prismic.io/api/v2`;
7
- export { getRepositoryName } from "./getRepositoryName";
8
- export { getGraphQLEndpoint } from "./getGraphQLEndpoint";
9
- export { isRepositoryName } from "./isRepositoryName";
10
- export { isRepositoryEndpoint } from "./isRepositoryEndpoint";
11
- export { buildQueryURL } from "./buildQueryURL";
12
- export { createClient, Client } from "./client";
13
- import { predicate } from "./predicate";
14
- export { predicate };
15
- /**
16
- * @deprecated Renamed to `predicate` (without an "s").
17
- */
18
- export declare const predicates: {
19
- at: (path: string, value: string | number | boolean | string[] | Date) => string;
20
- not: (path: string, value: string | number | boolean | string[] | Date) => string;
21
- any: (path: string, values: (string | number | boolean | Date)[]) => string;
22
- in: (path: string, values: string[]) => string;
23
- fulltext: (path: string, searchTerms: string) => string;
24
- has: (path: string) => string;
25
- missing: (path: string) => string;
26
- similar: (id: string, value: number) => string;
27
- geopointNear: (path: string, latitude: number, longitude: number, radius: number) => string;
28
- numberLessThan: (path: string, value: number) => string;
29
- numberGreaterThan: (path: string, value: number) => string;
30
- numberInRange: (path: string, lowerLimit: number, upperLimit: number) => string;
31
- dateAfter: (path: string, date: string | number | Date) => string;
32
- dateBefore: (path: string, date: string | number | Date) => string;
33
- dateBetween: (path: string, startDate: string | number | Date, endDate: string | number | Date) => string;
34
- dateDayOfMonth: (path: string, day: number) => string;
35
- dateDayOfMonthAfter: (path: string, day: number) => string;
36
- dateDayOfMonthBefore: (path: string, day: number) => string;
37
- dateDayOfWeek: (path: string, day: string | number) => string;
38
- dateDayOfWeekAfter: (path: string, day: string | number) => string;
39
- dateDayOfWeekBefore: (path: string, day: string | number) => string;
40
- dateMonth: (path: string, month: string | number) => string;
41
- dateMonthAfter: (path: string, month: string | number) => string;
42
- dateMonthBefore: (path: string, month: string | number) => string;
43
- dateYear: (path: string, year: number) => string;
44
- dateHour: (path: string, hour: number) => string;
45
- dateHourAfter: (path: string, hour: number) => string;
46
- dateHourBefore: (path: string, hour: number) => string;
47
- };
48
- /**
49
- * @deprecated Renamed to `predicate` (lowercase and without an "s").
50
- */
51
- export declare const Predicates: {
52
- at: (path: string, value: string | number | boolean | string[] | Date) => string;
53
- not: (path: string, value: string | number | boolean | string[] | Date) => string;
54
- any: (path: string, values: (string | number | boolean | Date)[]) => string;
55
- in: (path: string, values: string[]) => string;
56
- fulltext: (path: string, searchTerms: string) => string;
57
- has: (path: string) => string;
58
- missing: (path: string) => string;
59
- similar: (id: string, value: number) => string;
60
- geopointNear: (path: string, latitude: number, longitude: number, radius: number) => string;
61
- numberLessThan: (path: string, value: number) => string;
62
- numberGreaterThan: (path: string, value: number) => string;
63
- numberInRange: (path: string, lowerLimit: number, upperLimit: number) => string;
64
- dateAfter: (path: string, date: string | number | Date) => string;
65
- dateBefore: (path: string, date: string | number | Date) => string;
66
- dateBetween: (path: string, startDate: string | number | Date, endDate: string | number | Date) => string;
67
- dateDayOfMonth: (path: string, day: number) => string;
68
- dateDayOfMonthAfter: (path: string, day: number) => string;
69
- dateDayOfMonthBefore: (path: string, day: number) => string;
70
- dateDayOfWeek: (path: string, day: string | number) => string;
71
- dateDayOfWeekAfter: (path: string, day: string | number) => string;
72
- dateDayOfWeekBefore: (path: string, day: string | number) => string;
73
- dateMonth: (path: string, month: string | number) => string;
74
- dateMonthAfter: (path: string, month: string | number) => string;
75
- dateMonthBefore: (path: string, month: string | number) => string;
76
- dateYear: (path: string, year: number) => string;
77
- dateHour: (path: string, hour: number) => string;
78
- dateHourAfter: (path: string, hour: number) => string;
79
- dateHourBefore: (path: string, hour: number) => string;
80
- };
81
- export { PrismicError } from "./PrismicError";
82
- export { ForbiddenError } from "./ForbiddenError";
83
- export { ParsingError } from "./ParsingError";
84
- export { NotFoundError } from "./NotFoundError";
85
- export * as cookie from "./cookie";
86
- export type { CreateClient, ClientConfig } from "./client";
87
- export type { QueryParams, BuildQueryURLArgs } from "./buildQueryURL";
88
- export type { AbortSignalLike, FetchLike, HttpRequestLike, Ordering, RequestInitLike, ResponseLike, Route, } from "./types";
1
+ import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML";
2
+ import { filter } from "./filter";
3
+ export { createClient, Client } from "./createClient";
4
+ export { getRepositoryEndpoint } from "./getRepositoryEndpoint";
5
+ export { getRepositoryName } from "./getRepositoryName";
6
+ export { getGraphQLEndpoint } from "./getGraphQLEndpoint";
7
+ export { isRepositoryName } from "./isRepositoryName";
8
+ export { isRepositoryEndpoint } from "./isRepositoryEndpoint";
9
+ export { buildQueryURL } from "./buildQueryURL";
10
+ export { getToolbarSrc } from "./getToolbarSrc";
11
+ /**
12
+ * @deprecated Renamed to `filter`
13
+ */
14
+ declare const predicate: {
15
+ at: (path: string, value: string | number | boolean | string[] | Date) => string;
16
+ not: (path: string, value: string | number | boolean | string[] | Date) => string;
17
+ any: (path: string, values: (string | number | boolean | Date)[]) => string;
18
+ in: (path: string, values: string[]) => string;
19
+ fulltext: (path: string, searchTerms: string) => string;
20
+ has: (path: string) => string;
21
+ missing: (path: string) => string;
22
+ similar: (id: string, value: number) => string;
23
+ geopointNear: (path: string, latitude: number, longitude: number, radius: number) => string;
24
+ numberLessThan: (path: string, value: number) => string;
25
+ numberGreaterThan: (path: string, value: number) => string;
26
+ numberInRange: (path: string, lowerLimit: number, upperLimit: number) => string;
27
+ dateAfter: (path: string, date: string | number | Date) => string;
28
+ dateBefore: (path: string, date: string | number | Date) => string;
29
+ dateBetween: (path: string, startDate: string | number | Date, endDate: string | number | Date) => string;
30
+ dateDayOfMonth: (path: string, day: number) => string;
31
+ dateDayOfMonthAfter: (path: string, day: number) => string;
32
+ dateDayOfMonthBefore: (path: string, day: number) => string;
33
+ dateDayOfWeek: (path: string, day: string | number) => string;
34
+ dateDayOfWeekAfter: (path: string, day: string | number) => string;
35
+ dateDayOfWeekBefore: (path: string, day: string | number) => string;
36
+ dateMonth: (path: string, month: string | number) => string;
37
+ dateMonthAfter: (path: string, month: string | number) => string;
38
+ dateMonthBefore: (path: string, month: string | number) => string;
39
+ dateYear: (path: string, year: number) => string;
40
+ dateHour: (path: string, hour: number) => string;
41
+ dateHourAfter: (path: string, hour: number) => string;
42
+ dateHourBefore: (path: string, hour: number) => string;
43
+ };
44
+ export { filter, predicate };
45
+ export * as cookie from "./cookie";
46
+ export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, ResponseLike, } from "./createClient";
47
+ export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL";
48
+ export { asDate } from "./helpers/asDate";
49
+ export { asLink } from "./helpers/asLink";
50
+ export { asLinkAttrs } from "./helpers/asLinkAttrs";
51
+ export { asText } from "./helpers/asText";
52
+ export { asHTML } from "./helpers/asHTML";
53
+ export { asImageSrc } from "./helpers/asImageSrc";
54
+ export { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet";
55
+ export { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet";
56
+ export * as isFilled from "./helpers/isFilled";
57
+ export { documentToLinkField } from "./helpers/documentToLinkField";
58
+ export { Element } from "@prismicio/richtext";
59
+ export type { LinkResolverFunction } from "./helpers/asLink";
60
+ /**
61
+ * @deprecated Renamed to `HTMLRichTextMapSerializer`
62
+ */
63
+ type HTMLMapSerializer = HTMLRichTextMapSerializer;
64
+ /**
65
+ * @deprecated Renamed to `HTMLRichTextFunctionSerializer`
66
+ */
67
+ type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
68
+ export type { HTMLRichTextMapSerializer, HTMLRichTextFunctionSerializer, HTMLMapSerializer, HTMLFunctionSerializer, };
69
+ export type { HTMLRichTextSerializer } from "./helpers/asHTML";
70
+ export { PrismicError } from "./errors/PrismicError";
71
+ export { ForbiddenError } from "./errors/ForbiddenError";
72
+ export { NotFoundError } from "./errors/NotFoundError";
73
+ export { ParsingError } from "./errors/ParsingError";
74
+ export { RichTextNodeType } from "./types/value/richText";
75
+ export { LinkType } from "./types/value/link";
76
+ export { OEmbedType } from "./types/value/embed";
77
+ export type { PrismicDocument, PrismicDocumentWithUID, PrismicDocumentWithoutUID, PrismicDocumentHeader, AlternateLanguage, } from "./types/value/document";
78
+ export type { RichTextField, RTTextNodeBase, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTParagraphNode, RTPreformattedNode, RTListItemNode, RTOListItemNode, RTSpanNodeBase, RTStrongNode, RTEmNode, RTLabelNode, RTImageNode, RTEmbedNode, RTLinkNode, RTListNode, RTOListNode, RTSpanNode, RTNode, RTTextNode, RTBlockNode, RTInlineNode, RTAnyNode, } from "./types/value/richText";
79
+ export type { TitleField } from "./types/value/title";
80
+ export type { ImageField, ImageFieldImage, FilledImageFieldImage, EmptyImageFieldImage, } from "./types/value/image";
81
+ export type { EmptyLinkField, LinkField, FilledLinkToWebField, } from "./types/value/link";
82
+ export type { ContentRelationshipField, FilledContentRelationshipField, } from "./types/value/contentRelationship";
83
+ export type { LinkToMediaField, FilledLinkToMediaField, } from "./types/value/linkToMedia";
84
+ export type { OEmbedExtra, PhotoOEmbed, VideoOEmbed, LinkOEmbed, RichOEmbed, AnyOEmbed, EmbedField, } from "./types/value/embed";
85
+ export type { BooleanField } from "./types/value/boolean";
86
+ export type { ColorField } from "./types/value/color";
87
+ export type { DateField } from "./types/value/date";
88
+ export type { KeyTextField } from "./types/value/keyText";
89
+ export type { NumberField } from "./types/value/number";
90
+ export type { SelectField } from "./types/value/select";
91
+ export type { TimestampField } from "./types/value/timestamp";
92
+ export type { GeoPointField } from "./types/value/geoPoint";
93
+ export type { IntegrationFields } from "./types/value/integrationFields";
94
+ export type { GroupField } from "./types/value/group";
95
+ export type { SliceZone } from "./types/value/sliceZone";
96
+ export type { Slice } from "./types/value/slice";
97
+ export type { SharedSlice } from "./types/value/sharedSlice";
98
+ export type { SharedSliceVariation } from "./types/value/sharedSliceVariation";
99
+ export type { FieldState, AnyRegularField } from "./types/value/types";
100
+ export { CustomTypeModelFieldType } from "./types/model/types";
101
+ export { CustomTypeModelLinkSelectType } from "./types/model/link";
102
+ export { CustomTypeModelSliceType } from "./types/model/sliceZone";
103
+ export { CustomTypeModelSliceDisplay } from "./types/model/slice";
104
+ export type { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab, } from "./types/model/customType";
105
+ export type { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField, } from "./types/model/richText";
106
+ export type { CustomTypeModelTitleField } from "./types/model/title";
107
+ export type { CustomTypeModelImageField, CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail, } from "./types/model/image";
108
+ export type { CustomTypeModelContentRelationshipField } from "./types/model/contentRelationship";
109
+ export type { CustomTypeModelLinkField } from "./types/model/link";
110
+ export type { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia";
111
+ export type { CustomTypeModelEmbedField } from "./types/model/embed";
112
+ export type { CustomTypeModelBooleanField } from "./types/model/boolean";
113
+ export type { CustomTypeModelColorField } from "./types/model/color";
114
+ export type { CustomTypeModelDateField } from "./types/model/date";
115
+ export type { CustomTypeModelKeyTextField } from "./types/model/keyText";
116
+ export type { CustomTypeModelNumberField } from "./types/model/number";
117
+ export type { CustomTypeModelSelectField } from "./types/model/select";
118
+ export type { CustomTypeModelTimestampField } from "./types/model/timestamp";
119
+ export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint";
120
+ export type { CustomTypeModelIntegrationFieldsField } from "./types/model/integrationFields";
121
+ export type { CustomTypeModelGroupField } from "./types/model/group";
122
+ export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone";
123
+ export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice";
124
+ export type { SharedSliceModel } from "./types/model/sharedSlice";
125
+ export type { SharedSliceModelVariation } from "./types/model/sharedSliceVariation";
126
+ export type { CustomTypeModelUIDField } from "./types/model/uid";
127
+ export type { CustomTypeModelRangeField } from "./types/model/range";
128
+ export type { CustomTypeModelSeparatorField } from "./types/model/separator";
129
+ export type { CustomTypeModelField, CustomTypeModelFieldForGroup, } from "./types/model/types";
130
+ export type { Query } from "./types/api/query";
131
+ export type { Ref } from "./types/api/ref";
132
+ export type { Release } from "./types/api/release";
133
+ export type { Repository, Language, Form, FormField, } from "./types/api/repository";
134
+ export type { Tags } from "./types/api/tags";
135
+ export { WebhookType } from "./types/webhook/types";
136
+ export type { WebhookBody } from "./types/webhook/types";
137
+ export type { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate";
138
+ export type { WebhookBodyTestTrigger } from "./types/webhook/testTrigger";
package/dist/index.js CHANGED
@@ -1,38 +1,72 @@
1
+ import { filter } from "./filter.js";
2
+ import { Client, createClient } from "./createClient.js";
1
3
  import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
2
- import { getRepositoryEndpoint as getRepositoryEndpoint2 } from "./getRepositoryEndpoint.js";
3
4
  import { getRepositoryName } from "./getRepositoryName.js";
4
5
  import { getGraphQLEndpoint } from "./getGraphQLEndpoint.js";
5
6
  import { isRepositoryName } from "./isRepositoryName.js";
6
7
  import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
7
8
  import { buildQueryURL } from "./buildQueryURL.js";
8
- import { Client, createClient } from "./client.js";
9
- import { predicate } from "./predicate.js";
10
- import { predicate as predicate2 } from "./predicate.js";
11
- import { PrismicError } from "./PrismicError.js";
12
- import { ForbiddenError } from "./ForbiddenError.js";
13
- import { ParsingError } from "./ParsingError.js";
14
- import { NotFoundError } from "./NotFoundError.js";
9
+ import { getToolbarSrc } from "./getToolbarSrc.js";
15
10
  import * as cookie from "./cookie.js";
16
- const getEndpoint = getRepositoryEndpoint;
17
- const predicates = predicate;
18
- const Predicates = predicate;
11
+ import { asDate } from "./helpers/asDate.js";
12
+ import { asLink } from "./helpers/asLink.js";
13
+ import { asLinkAttrs } from "./helpers/asLinkAttrs.js";
14
+ import { asText } from "./helpers/asText.js";
15
+ import { asHTML } from "./helpers/asHTML.js";
16
+ import { asImageSrc } from "./helpers/asImageSrc.js";
17
+ import { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet.js";
18
+ import { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.js";
19
+ import * as isFilled from "./helpers/isFilled.js";
20
+ import { documentToLinkField } from "./helpers/documentToLinkField.js";
21
+ import { Element } from "@prismicio/richtext";
22
+ import { PrismicError } from "./errors/PrismicError.js";
23
+ import { ForbiddenError } from "./errors/ForbiddenError.js";
24
+ import { NotFoundError } from "./errors/NotFoundError.js";
25
+ import { ParsingError } from "./errors/ParsingError.js";
26
+ import { RichTextNodeType } from "./types/value/richText.js";
27
+ import { LinkType } from "./types/value/link.js";
28
+ import { OEmbedType } from "./types/value/embed.js";
29
+ import { CustomTypeModelFieldType } from "./types/model/types.js";
30
+ import { CustomTypeModelLinkSelectType } from "./types/model/link.js";
31
+ import { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
32
+ import { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
33
+ import { WebhookType } from "./types/webhook/types.js";
34
+ const predicate = filter;
19
35
  export {
20
36
  Client,
37
+ CustomTypeModelFieldType,
38
+ CustomTypeModelLinkSelectType,
39
+ CustomTypeModelSliceDisplay,
40
+ CustomTypeModelSliceType,
41
+ Element,
21
42
  ForbiddenError,
43
+ LinkType,
22
44
  NotFoundError,
45
+ OEmbedType,
23
46
  ParsingError,
24
- Predicates,
25
47
  PrismicError,
48
+ RichTextNodeType,
49
+ WebhookType,
50
+ asDate,
51
+ asHTML,
52
+ asImagePixelDensitySrcSet,
53
+ asImageSrc,
54
+ asImageWidthSrcSet,
55
+ asLink,
56
+ asLinkAttrs,
57
+ asText,
26
58
  buildQueryURL,
27
59
  cookie,
28
60
  createClient,
29
- getEndpoint,
61
+ documentToLinkField,
62
+ filter,
30
63
  getGraphQLEndpoint,
31
- getRepositoryEndpoint2 as getRepositoryEndpoint,
64
+ getRepositoryEndpoint,
32
65
  getRepositoryName,
66
+ getToolbarSrc,
67
+ isFilled,
33
68
  isRepositoryEndpoint,
34
69
  isRepositoryName,
35
- predicate2 as predicate,
36
- predicates
70
+ predicate
37
71
  };
38
72
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Primary library API.\nimport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryEndpoint };\n/**\n * @deprecated Renamed to `getRepositoryEndpoint`.\n */\n// TODO: Remove in v3.\nexport const getEndpoint = getRepositoryEndpoint;\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\nexport { createClient, Client } from \"./client\";\n\n// Predicates API.\nimport { predicate } from \"./predicate\";\nexport { predicate };\n/**\n * @deprecated Renamed to `predicate` (without an \"s\").\n */\n// TODO: Remove in v3.\nexport const predicates = predicate;\n/**\n * @deprecated Renamed to `predicate` (lowercase and without an \"s\").\n */\n// TODO: Remove in v3.\nexport const Predicates = predicate;\n\n// Custom errors used by Client.\nexport { PrismicError } from \"./PrismicError\";\nexport { ForbiddenError } from \"./ForbiddenError\";\nexport { ParsingError } from \"./ParsingError\";\nexport { NotFoundError } from \"./NotFoundError\";\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 throughout the project. These are made public to allow users to better type their projects.\nexport type { CreateClient, ClientConfig } from \"./client\";\nexport type { QueryParams, BuildQueryURLArgs } from \"./buildQueryURL\";\nexport type {\n\tAbortSignalLike,\n\tFetchLike,\n\tHttpRequestLike,\n\tOrdering,\n\tRequestInitLike,\n\tResponseLike,\n\tRoute,\n} from \"./types\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOO,MAAM,cAAc;AAepB,MAAM,aAAa;AAKnB,MAAM,aAAa;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Use for deprecations.\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\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 {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\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// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\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\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\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} 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 { 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\nexport type { IntegrationFields } from \"./types/value/integrationFields\";\n\nexport type { GroupField } 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 { FieldState, AnyRegularField } 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 { CustomTypeModelContentRelationshipField } 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\";\n\nexport type { CustomTypeModelIntegrationFieldsField } from \"./types/model/integrationFields\";\nexport type { CustomTypeModelGroupField } 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} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 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// 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"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,YAAY;"}
@@ -1,10 +1,10 @@
1
- /**
2
- * Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid
3
- * URL is a valid endpoint to support network proxies.
4
- *
5
- * @param input - Input to test.
6
- *
7
- * @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`
8
- * otherwise.
9
- */
10
- export declare const isRepositoryEndpoint: (input: string) => boolean;
1
+ /**
2
+ * Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid
3
+ * URL is a valid endpoint to support network proxies.
4
+ *
5
+ * @param input - Input to test.
6
+ *
7
+ * @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`
8
+ * otherwise.
9
+ */
10
+ export declare const isRepositoryEndpoint: (input: string) => boolean;
@@ -1,9 +1,9 @@
1
- /**
2
- * Determines if an input is a valid Prismic repository name.
3
- *
4
- * @param input - Input to test.
5
- *
6
- * @returns `true` if `input` is a valid Prismic repository name, `false`
7
- * otherwise.
8
- */
9
- export declare const isRepositoryName: (input: string) => boolean;
1
+ /**
2
+ * Determines if an input is a valid Prismic repository name.
3
+ *
4
+ * @param input - Input to test.
5
+ *
6
+ * @returns `true` if `input` is a valid Prismic repository name, `false`
7
+ * otherwise.
8
+ */
9
+ export declare const isRepositoryName: (input: string) => boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const castArray = require("./castArray.cjs");
4
+ const appendFilters = (objWithFilters = {}, filters) => {
5
+ return {
6
+ ...objWithFilters,
7
+ filters: [...objWithFilters.filters || [], ...castArray.castArray(filters)]
8
+ };
9
+ };
10
+ exports.appendFilters = appendFilters;
11
+ //# sourceMappingURL=appendFilters.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAGA,UAAAA,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;;"}
@@ -0,0 +1,18 @@
1
+ interface WithFilters {
2
+ filters?: string | string[];
3
+ }
4
+ /**
5
+ * Adds one or more filters to an object with a `filters` property.
6
+ * Appended filters are added to the end of the existing list.
7
+ *
8
+ * @typeParam T - Object to which filters will be append.
9
+ * @param objWithFilters - Object to append filters on the `filters`
10
+ * property.
11
+ * @param filters - One or more filters to append.
12
+ *
13
+ * @returns The object with the appended filters.
14
+ */
15
+ export declare const appendFilters: <T extends WithFilters>(objWithFilters: T | undefined, filters: string | string[]) => T & {
16
+ filters: string[];
17
+ };
18
+ export {};
@@ -0,0 +1,11 @@
1
+ import { castArray } from "./castArray.js";
2
+ const appendFilters = (objWithFilters = {}, filters) => {
3
+ return {
4
+ ...objWithFilters,
5
+ filters: [...objWithFilters.filters || [], ...castArray(filters)]
6
+ };
7
+ };
8
+ export {
9
+ appendFilters
10
+ };
11
+ //# sourceMappingURL=appendFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAG,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const castArray = (a) => Array.isArray(a) ? a : [a];
3
+ const castArray = (a) => {
4
+ return Array.isArray(a) ? a : [a];
5
+ };
4
6
  exports.castArray = castArray;
5
7
  //# sourceMappingURL=castArray.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => (Array.isArray(a) ? a : [a]);\n"],"names":[],"mappings":";;AAUa,MAAA,YAAY,CAAI,MAAqB,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;;"}
1
+ {"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":";;AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;;"}
@@ -1,11 +1,11 @@
1
- /**
2
- * Ensures that a value is an array. If it is already an array, it is returned
3
- * as is. If it is not an array, it is converted to an array with itself as its
4
- * only element.
5
- *
6
- * @typeParam A - Element of the array.
7
- * @param a - Value to ensure is an array.
8
- *
9
- * @returns `a` as an array.
10
- */
11
- export declare const castArray: <A>(a: A | A[]) => A[];
1
+ /**
2
+ * Ensures that a value is an array. If it is already an array, it is returned
3
+ * as is. If it is not an array, it is converted to an array with itself as its
4
+ * only element.
5
+ *
6
+ * @typeParam A - Element of the array.
7
+ * @param a - Value to ensure is an array.
8
+ *
9
+ * @returns `a` as an array.
10
+ */
11
+ export declare const castArray: <A>(a: A | A[]) => A[];
@@ -1,4 +1,6 @@
1
- const castArray = (a) => Array.isArray(a) ? a : [a];
1
+ const castArray = (a) => {
2
+ return Array.isArray(a) ? a : [a];
3
+ };
2
4
  export {
3
5
  castArray
4
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => (Array.isArray(a) ? a : [a]);\n"],"names":[],"mappings":"AAUa,MAAA,YAAY,CAAI,MAAqB,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;"}
1
+ {"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":"AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const castThunk = (a) => typeof a === "function" ? a : () => a;
3
+ const castThunk = (a) => {
4
+ return typeof a === "function" ? a : () => a;
5
+ };
4
6
  exports.castThunk = castThunk;
5
7
  //# sourceMappingURL=castThunk.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) =>\n\ttypeof a === \"function\" ? (a as () => A) : () => a;\n"],"names":[],"mappings":";;AASO,MAAM,YAAY,CAAI,MAC5B,OAAO,MAAM,aAAc,IAAgB,MAAM;;"}
1
+ {"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":";;AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;;"}
@@ -1,10 +1,10 @@
1
- /**
2
- * Ensures that a value is a thunk. If it is already a thunk, it is returned as
3
- * is. If it is not a thunk, it is converted to a thunk.
4
- *
5
- * @typeParam A - Value returned by the thunk.
6
- * @param a - Value to ensure is a thunk.
7
- *
8
- * @returns `a` as a a thunk.
9
- */
10
- export declare const castThunk: <A>(a: A | (() => A)) => () => A;
1
+ /**
2
+ * Ensures that a value is a thunk. If it is already a thunk, it is returned as
3
+ * is. If it is not a thunk, it is converted to a thunk.
4
+ *
5
+ * @typeParam A - Value returned by the thunk.
6
+ * @param a - Value to ensure is a thunk.
7
+ *
8
+ * @returns `a` as a a thunk.
9
+ */
10
+ export declare const castThunk: <A>(a: A | (() => A)) => () => A;
@@ -1,4 +1,6 @@
1
- const castThunk = (a) => typeof a === "function" ? a : () => a;
1
+ const castThunk = (a) => {
2
+ return typeof a === "function" ? a : () => a;
3
+ };
2
4
  export {
3
5
  castThunk
4
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) =>\n\ttypeof a === \"function\" ? (a as () => A) : () => a;\n"],"names":[],"mappings":"AASO,MAAM,YAAY,CAAI,MAC5B,OAAO,MAAM,aAAc,IAAgB,MAAM;"}
1
+ {"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":"AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _package = require("../package.json.cjs");
4
+ const devMsg = (slug) => {
5
+ return `https://prismic.dev/msg/client/v${_package.version}/${slug}`;
6
+ };
7
+ exports.devMsg = devMsg;
8
+ //# sourceMappingURL=devMsg.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devMsg.cjs","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"],"names":["version"],"mappings":";;;AAiBa,MAAA,SAAS,CAAC,SAAwB;AAC9C,SAAO,mCAAmCA,SAAAA,WAAW;AACtD;;"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns a `prismic.dev/msg` URL for a given message slug.
3
+ *
4
+ * @example
5
+ *
6
+ * ```ts
7
+ * devMsg("missing-param");
8
+ * // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
9
+ * ```
10
+ *
11
+ * @param slug - Slug for the message. This corresponds to a Markdown file in
12
+ * the Git repository's `/messages` directory.
13
+ *
14
+ * @returns The `prismic.dev/msg` URL for the given slug.
15
+ */
16
+ export declare const devMsg: (slug: string) => string;
@@ -0,0 +1,8 @@
1
+ import { version } from "../package.json.js";
2
+ const devMsg = (slug) => {
3
+ return `https://prismic.dev/msg/client/v${version}/${slug}`;
4
+ };
5
+ export {
6
+ devMsg
7
+ };
8
+ //# sourceMappingURL=devMsg.js.map