@sitecore-content-sdk/content 1.5.0-canary.5

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 (258) hide show
  1. package/LICENSE.txt +202 -0
  2. package/README.md +7 -0
  3. package/client.d.ts +1 -0
  4. package/codegen.d.ts +1 -0
  5. package/config-cli.d.ts +1 -0
  6. package/config.d.ts +1 -0
  7. package/dist/cjs/client/edge-proxy.js +24 -0
  8. package/dist/cjs/client/index.js +14 -0
  9. package/dist/cjs/client/models.js +2 -0
  10. package/dist/cjs/client/sitecore-client.js +420 -0
  11. package/dist/cjs/client/utils.js +53 -0
  12. package/dist/cjs/config/define-config.js +195 -0
  13. package/dist/cjs/config/index.js +7 -0
  14. package/dist/cjs/config/models.js +12 -0
  15. package/dist/cjs/config-cli/define-cli-config.js +23 -0
  16. package/dist/cjs/config-cli/index.js +7 -0
  17. package/dist/cjs/config-cli/models.js +8 -0
  18. package/dist/cjs/constants.js +12 -0
  19. package/dist/cjs/debug.js +21 -0
  20. package/dist/cjs/editing/codegen/index.js +14 -0
  21. package/dist/cjs/editing/codegen/preview.js +277 -0
  22. package/dist/cjs/editing/component-layout-service.js +62 -0
  23. package/dist/cjs/editing/design-library.js +184 -0
  24. package/dist/cjs/editing/editing-service.js +81 -0
  25. package/dist/cjs/editing/index.js +33 -0
  26. package/dist/cjs/editing/models.js +44 -0
  27. package/dist/cjs/editing/utils.js +105 -0
  28. package/dist/cjs/form/form.js +81 -0
  29. package/dist/cjs/form/index.js +7 -0
  30. package/dist/cjs/i18n/dictionary-service.js +144 -0
  31. package/dist/cjs/i18n/index.js +7 -0
  32. package/dist/cjs/i18n/utils.js +16 -0
  33. package/dist/cjs/index.js +47 -0
  34. package/dist/cjs/layout/content-styles.js +73 -0
  35. package/dist/cjs/layout/index.js +24 -0
  36. package/dist/cjs/layout/layout-service.js +68 -0
  37. package/dist/cjs/layout/models.js +39 -0
  38. package/dist/cjs/layout/themes.js +77 -0
  39. package/dist/cjs/layout/utils.js +117 -0
  40. package/dist/cjs/media/index.js +38 -0
  41. package/dist/cjs/media/media-api.js +100 -0
  42. package/dist/cjs/models.js +2 -0
  43. package/dist/cjs/personalize/index.js +15 -0
  44. package/dist/cjs/personalize/layout-personalizer.js +98 -0
  45. package/dist/cjs/personalize/personalize-service.js +109 -0
  46. package/dist/cjs/personalize/utils.js +143 -0
  47. package/dist/cjs/site/error-pages-service.js +82 -0
  48. package/dist/cjs/site/index.js +26 -0
  49. package/dist/cjs/site/models.js +2 -0
  50. package/dist/cjs/site/redirects-service.js +109 -0
  51. package/dist/cjs/site/robots-service.js +74 -0
  52. package/dist/cjs/site/site-resolver.js +73 -0
  53. package/dist/cjs/site/siteinfo-service.js +94 -0
  54. package/dist/cjs/site/sitemap-xml-service.js +92 -0
  55. package/dist/cjs/site/sitepath-service.js +201 -0
  56. package/dist/cjs/site/utils.js +55 -0
  57. package/dist/cjs/sitecore-service-base.js +33 -0
  58. package/dist/cjs/tools/codegen/component-generation.js +49 -0
  59. package/dist/cjs/tools/codegen/extract-files.js +105 -0
  60. package/dist/cjs/tools/codegen/import-map.js +411 -0
  61. package/dist/cjs/tools/codegen/utils.js +418 -0
  62. package/dist/cjs/tools/generate-map.js +2 -0
  63. package/dist/cjs/tools/generateSites.js +59 -0
  64. package/dist/cjs/tools/index.js +30 -0
  65. package/dist/cjs/tools/scaffold.js +62 -0
  66. package/dist/cjs/tools/templating/components.js +96 -0
  67. package/dist/cjs/tools/templating/index.js +6 -0
  68. package/dist/esm/client/edge-proxy.js +19 -0
  69. package/dist/esm/client/index.js +4 -0
  70. package/dist/esm/client/models.js +1 -0
  71. package/dist/esm/client/sitecore-client.js +416 -0
  72. package/dist/esm/client/utils.js +49 -0
  73. package/dist/esm/config/define-config.js +189 -0
  74. package/dist/esm/config/index.js +2 -0
  75. package/dist/esm/config/models.js +9 -0
  76. package/dist/esm/config-cli/define-cli-config.js +19 -0
  77. package/dist/esm/config-cli/index.js +2 -0
  78. package/dist/esm/config-cli/models.js +5 -0
  79. package/dist/esm/constants.js +9 -0
  80. package/dist/esm/debug.js +19 -0
  81. package/dist/esm/editing/codegen/index.js +1 -0
  82. package/dist/esm/editing/codegen/preview.js +263 -0
  83. package/dist/esm/editing/component-layout-service.js +55 -0
  84. package/dist/esm/editing/design-library.js +172 -0
  85. package/dist/esm/editing/editing-service.js +74 -0
  86. package/dist/esm/editing/index.js +6 -0
  87. package/dist/esm/editing/models.js +41 -0
  88. package/dist/esm/editing/utils.js +98 -0
  89. package/dist/esm/form/form.js +72 -0
  90. package/dist/esm/form/index.js +1 -0
  91. package/dist/esm/i18n/dictionary-service.js +137 -0
  92. package/dist/esm/i18n/index.js +2 -0
  93. package/dist/esm/i18n/utils.js +13 -0
  94. package/dist/esm/index.js +5 -0
  95. package/dist/esm/layout/content-styles.js +65 -0
  96. package/dist/esm/layout/index.js +6 -0
  97. package/dist/esm/layout/layout-service.js +61 -0
  98. package/dist/esm/layout/models.js +36 -0
  99. package/dist/esm/layout/themes.js +72 -0
  100. package/dist/esm/layout/utils.js +109 -0
  101. package/dist/esm/media/index.js +2 -0
  102. package/dist/esm/media/media-api.js +90 -0
  103. package/dist/esm/models.js +1 -0
  104. package/dist/esm/personalize/index.js +3 -0
  105. package/dist/esm/personalize/layout-personalizer.js +93 -0
  106. package/dist/esm/personalize/personalize-service.js +102 -0
  107. package/dist/esm/personalize/utils.js +135 -0
  108. package/dist/esm/site/error-pages-service.js +75 -0
  109. package/dist/esm/site/index.js +8 -0
  110. package/dist/esm/site/models.js +1 -0
  111. package/dist/esm/site/redirects-service.js +102 -0
  112. package/dist/esm/site/robots-service.js +67 -0
  113. package/dist/esm/site/site-resolver.js +69 -0
  114. package/dist/esm/site/siteinfo-service.js +87 -0
  115. package/dist/esm/site/sitemap-xml-service.js +85 -0
  116. package/dist/esm/site/sitepath-service.js +193 -0
  117. package/dist/esm/site/utils.js +49 -0
  118. package/dist/esm/sitecore-service-base.js +29 -0
  119. package/dist/esm/tools/codegen/component-generation.js +44 -0
  120. package/dist/esm/tools/codegen/extract-files.js +99 -0
  121. package/dist/esm/tools/codegen/import-map.js +368 -0
  122. package/dist/esm/tools/codegen/utils.js +373 -0
  123. package/dist/esm/tools/generate-map.js +1 -0
  124. package/dist/esm/tools/generateSites.js +52 -0
  125. package/dist/esm/tools/index.js +6 -0
  126. package/dist/esm/tools/scaffold.js +54 -0
  127. package/dist/esm/tools/templating/components.js +59 -0
  128. package/dist/esm/tools/templating/index.js +1 -0
  129. package/editing.d.ts +1 -0
  130. package/i18n.d.ts +1 -0
  131. package/layout.d.ts +1 -0
  132. package/media.d.ts +1 -0
  133. package/package.json +157 -0
  134. package/personalize.d.ts +1 -0
  135. package/site.d.ts +1 -0
  136. package/tools.d.ts +1 -0
  137. package/types/client/edge-proxy.d.ts +17 -0
  138. package/types/client/edge-proxy.d.ts.map +1 -0
  139. package/types/client/index.d.ts +7 -0
  140. package/types/client/index.d.ts.map +1 -0
  141. package/types/client/models.d.ts +21 -0
  142. package/types/client/models.d.ts.map +1 -0
  143. package/types/client/sitecore-client.d.ts +338 -0
  144. package/types/client/sitecore-client.d.ts.map +1 -0
  145. package/types/client/utils.d.ts +15 -0
  146. package/types/client/utils.d.ts.map +1 -0
  147. package/types/config/define-config.d.ts +20 -0
  148. package/types/config/define-config.d.ts.map +1 -0
  149. package/types/config/index.d.ts +3 -0
  150. package/types/config/index.d.ts.map +1 -0
  151. package/types/config/models.d.ts +287 -0
  152. package/types/config/models.d.ts.map +1 -0
  153. package/types/config-cli/define-cli-config.d.ts +9 -0
  154. package/types/config-cli/define-cli-config.d.ts.map +1 -0
  155. package/types/config-cli/index.d.ts +3 -0
  156. package/types/config-cli/index.d.ts.map +1 -0
  157. package/types/config-cli/models.d.ts +6 -0
  158. package/types/config-cli/models.d.ts.map +1 -0
  159. package/types/constants.d.ts +10 -0
  160. package/types/constants.d.ts.map +1 -0
  161. package/types/debug.d.ts +19 -0
  162. package/types/debug.d.ts.map +1 -0
  163. package/types/editing/codegen/index.d.ts +2 -0
  164. package/types/editing/codegen/index.d.ts.map +1 -0
  165. package/types/editing/codegen/preview.d.ts +256 -0
  166. package/types/editing/codegen/preview.d.ts.map +1 -0
  167. package/types/editing/component-layout-service.d.ts +84 -0
  168. package/types/editing/component-layout-service.d.ts.map +1 -0
  169. package/types/editing/design-library.d.ts +111 -0
  170. package/types/editing/design-library.d.ts.map +1 -0
  171. package/types/editing/editing-service.d.ts +71 -0
  172. package/types/editing/editing-service.d.ts.map +1 -0
  173. package/types/editing/index.d.ts +7 -0
  174. package/types/editing/index.d.ts.map +1 -0
  175. package/types/editing/models.d.ts +103 -0
  176. package/types/editing/models.d.ts.map +1 -0
  177. package/types/editing/utils.d.ts +82 -0
  178. package/types/editing/utils.d.ts.map +1 -0
  179. package/types/form/form.d.ts +25 -0
  180. package/types/form/form.d.ts.map +1 -0
  181. package/types/form/index.d.ts +2 -0
  182. package/types/form/index.d.ts.map +1 -0
  183. package/types/i18n/dictionary-service.d.ts +133 -0
  184. package/types/i18n/dictionary-service.d.ts.map +1 -0
  185. package/types/i18n/index.d.ts +3 -0
  186. package/types/i18n/index.d.ts.map +1 -0
  187. package/types/i18n/utils.d.ts +9 -0
  188. package/types/i18n/utils.d.ts.map +1 -0
  189. package/types/index.d.ts +7 -0
  190. package/types/index.d.ts.map +1 -0
  191. package/types/layout/content-styles.d.ts +20 -0
  192. package/types/layout/content-styles.d.ts.map +1 -0
  193. package/types/layout/index.d.ts +6 -0
  194. package/types/layout/index.d.ts.map +1 -0
  195. package/types/layout/layout-service.d.ts +45 -0
  196. package/types/layout/layout-service.d.ts.map +1 -0
  197. package/types/layout/models.d.ts +174 -0
  198. package/types/layout/models.d.ts.map +1 -0
  199. package/types/layout/themes.d.ts +13 -0
  200. package/types/layout/themes.d.ts.map +1 -0
  201. package/types/layout/utils.d.ts +56 -0
  202. package/types/layout/utils.d.ts.map +1 -0
  203. package/types/media/index.d.ts +3 -0
  204. package/types/media/index.d.ts.map +1 -0
  205. package/types/media/media-api.d.ts +60 -0
  206. package/types/media/media-api.d.ts.map +1 -0
  207. package/types/models.d.ts +32 -0
  208. package/types/models.d.ts.map +1 -0
  209. package/types/personalize/index.d.ts +4 -0
  210. package/types/personalize/index.d.ts.map +1 -0
  211. package/types/personalize/layout-personalizer.d.ts +29 -0
  212. package/types/personalize/layout-personalizer.d.ts.map +1 -0
  213. package/types/personalize/personalize-service.d.ts +89 -0
  214. package/types/personalize/personalize-service.d.ts.map +1 -0
  215. package/types/personalize/utils.d.ts +78 -0
  216. package/types/personalize/utils.d.ts.map +1 -0
  217. package/types/site/error-pages-service.d.ts +64 -0
  218. package/types/site/error-pages-service.d.ts.map +1 -0
  219. package/types/site/index.d.ts +10 -0
  220. package/types/site/index.d.ts.map +1 -0
  221. package/types/site/models.d.ts +23 -0
  222. package/types/site/models.d.ts.map +1 -0
  223. package/types/site/redirects-service.d.ts +91 -0
  224. package/types/site/redirects-service.d.ts.map +1 -0
  225. package/types/site/robots-service.d.ts +57 -0
  226. package/types/site/robots-service.d.ts.map +1 -0
  227. package/types/site/site-resolver.d.ts +28 -0
  228. package/types/site/site-resolver.d.ts.map +1 -0
  229. package/types/site/siteinfo-service.d.ts +64 -0
  230. package/types/site/siteinfo-service.d.ts.map +1 -0
  231. package/types/site/sitemap-xml-service.d.ts +63 -0
  232. package/types/site/sitemap-xml-service.d.ts.map +1 -0
  233. package/types/site/sitepath-service.d.ts +137 -0
  234. package/types/site/sitepath-service.d.ts.map +1 -0
  235. package/types/site/utils.d.ts +41 -0
  236. package/types/site/utils.d.ts.map +1 -0
  237. package/types/sitecore-service-base.d.ts +31 -0
  238. package/types/sitecore-service-base.d.ts.map +1 -0
  239. package/types/tools/codegen/component-generation.d.ts +50 -0
  240. package/types/tools/codegen/component-generation.d.ts.map +1 -0
  241. package/types/tools/codegen/extract-files.d.ts +24 -0
  242. package/types/tools/codegen/extract-files.d.ts.map +1 -0
  243. package/types/tools/codegen/import-map.d.ts +103 -0
  244. package/types/tools/codegen/import-map.d.ts.map +1 -0
  245. package/types/tools/codegen/utils.d.ts +76 -0
  246. package/types/tools/codegen/utils.d.ts.map +1 -0
  247. package/types/tools/generate-map.d.ts +36 -0
  248. package/types/tools/generate-map.d.ts.map +1 -0
  249. package/types/tools/generateSites.d.ts +25 -0
  250. package/types/tools/generateSites.d.ts.map +1 -0
  251. package/types/tools/index.d.ts +8 -0
  252. package/types/tools/index.d.ts.map +1 -0
  253. package/types/tools/scaffold.d.ts +27 -0
  254. package/types/tools/scaffold.d.ts.map +1 -0
  255. package/types/tools/templating/components.d.ts +104 -0
  256. package/types/tools/templating/components.d.ts.map +1 -0
  257. package/types/tools/templating/index.d.ts +2 -0
  258. package/types/tools/templating/index.d.ts.map +1 -0
package/package.json ADDED
@@ -0,0 +1,157 @@
1
+ {
2
+ "name": "@sitecore-content-sdk/content",
3
+ "version": "1.5.0-canary.5",
4
+ "main": "dist/cjs/index.js",
5
+ "module": "dist/esm/index.js",
6
+ "sideEffects": false,
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
11
+ "scripts": {
12
+ "build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
13
+ "clean": "del-cli dist types",
14
+ "lint": "eslint \"./src/**/*.ts\"",
15
+ "test": "mocha \"./src/**/*.test.ts\"",
16
+ "prepublishOnly": "npm run build",
17
+ "coverage": "nyc npm test",
18
+ "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/content --entryPoints src/index.ts --entryPoints src/config/index.ts --entryPoints src/config-cli/index.ts --entryPoints src/client/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/editing/index.ts --entryPoints src/tools/index.ts --entryPoints src/codegen/index.ts --githubPages false",
19
+ "api-extractor": "npm run build && api-extractor run --local --verbose",
20
+ "api-extractor:verify": "api-extractor run"
21
+ },
22
+ "engines": {
23
+ "node": ">=24"
24
+ },
25
+ "author": {
26
+ "name": "Sitecore Corporation",
27
+ "url": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/Sitecore/content-sdk"
32
+ },
33
+ "license": "Apache-2.0",
34
+ "homepage": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html",
35
+ "bugs": {
36
+ "url": "https://github.com/sitecore/content-sdk/issues"
37
+ },
38
+ "devDependencies": {
39
+ "@sitecore-cloudsdk/events": "^0.5.1",
40
+ "@stylistic/eslint-plugin": "^5.2.2",
41
+ "@types/chai": "^5.2.2",
42
+ "@types/chai-spies": "^1.0.6",
43
+ "@types/chai-string": "^1.4.5",
44
+ "@types/debug": "^4.1.12",
45
+ "@types/jsdom": "^21.1.7",
46
+ "@types/memory-cache": "^0.2.6",
47
+ "@types/mocha": "^10.0.10",
48
+ "@types/node": "^24.10.4",
49
+ "@types/proxyquire": "^1.3.31",
50
+ "@types/sinon": "^17.0.4",
51
+ "@types/sinon-chai": "^4.0.0",
52
+ "@types/url-parse": "1.4.11",
53
+ "@typescript-eslint/eslint-plugin": "8.39.0",
54
+ "@typescript-eslint/parser": "8.39.0",
55
+ "chai": "^4.4.1",
56
+ "chai-spies": "^1.1.0",
57
+ "chai-string": "^1.6.0",
58
+ "del-cli": "^6.0.0",
59
+ "eslint": "^9.32.0",
60
+ "eslint-config-prettier": "^10.1.8",
61
+ "eslint-plugin-import": "2.32.0",
62
+ "eslint-plugin-jsdoc": "52.0.3",
63
+ "eslint-plugin-prettier": "^4.0.0",
64
+ "jsdom": "^26.1.0",
65
+ "mocha": "^11.2.2",
66
+ "nock": "14.0.0-beta.7",
67
+ "nyc": "^17.1.0",
68
+ "prettier": "^2.8.0",
69
+ "proxyquire": "^2.1.3",
70
+ "sinon": "^20.0.0",
71
+ "sinon-chai": "^4.0.0",
72
+ "tslib": "^2.8.1",
73
+ "tsx": "^4.19.4",
74
+ "typescript": "~5.8.3"
75
+ },
76
+ "peerDependencies": {
77
+ "@sitecore-cloudsdk/events": "^0.5.1"
78
+ },
79
+ "dependencies": {
80
+ "@sitecore-content-sdk/core": "1.5.0-canary.5",
81
+ "chalk": "^4.1.2",
82
+ "debug": "^4.4.0",
83
+ "glob": "^11.0.2",
84
+ "graphql": "^16.11.0",
85
+ "url-parse": "^1.5.10"
86
+ },
87
+ "description": "",
88
+ "types": "types/index.d.ts",
89
+ "gitHead": "e8fa7da15d05d45f474b4f000c1f361b488466b0",
90
+ "files": [
91
+ "dist",
92
+ "types",
93
+ "/*.d.ts"
94
+ ],
95
+ "exports": {
96
+ ".": {
97
+ "import": "./dist/esm/index.js",
98
+ "require": "./dist/cjs/index.js",
99
+ "types": "./types/index.d.ts"
100
+ },
101
+ "./client": {
102
+ "import": "./dist/esm/client/index.js",
103
+ "require": "./dist/cjs/client/index.js",
104
+ "types": "./types/client/index.d.ts"
105
+ },
106
+ "./config": {
107
+ "import": "./dist/esm/config/index.js",
108
+ "require": "./dist/cjs/config/index.js",
109
+ "types": "./types/config/index.d.ts"
110
+ },
111
+ "./config-cli": {
112
+ "import": "./dist/esm/config-cli/index.js",
113
+ "require": "./dist/cjs/config-cli/index.js",
114
+ "types": "./types/config-cli/index.d.ts"
115
+ },
116
+ "./codegen": {
117
+ "import": "./dist/esm/editing/codegen/index.js",
118
+ "require": "./dist/cjs/editing/codegen/index.js",
119
+ "types": "./types/editing/codegen/index.d.ts"
120
+ },
121
+ "./editing": {
122
+ "import": "./dist/esm/editing/index.js",
123
+ "require": "./dist/cjs/editing/index.js",
124
+ "types": "./types/editing/index.d.ts"
125
+ },
126
+ "./i18n": {
127
+ "import": "./dist/esm/i18n/index.js",
128
+ "require": "./dist/cjs/i18n/index.js",
129
+ "types": "./types/i18n/index.d.ts"
130
+ },
131
+ "./layout": {
132
+ "import": "./dist/esm/layout/index.js",
133
+ "require": "./dist/cjs/layout/index.js",
134
+ "types": "./types/layout/index.d.ts"
135
+ },
136
+ "./media": {
137
+ "import": "./dist/esm/media/index.js",
138
+ "require": "./dist/cjs/media/index.js",
139
+ "types": "./types/media/index.d.ts"
140
+ },
141
+ "./personalize": {
142
+ "import": "./dist/esm/personalize/index.js",
143
+ "require": "./dist/cjs/personalize/index.js",
144
+ "types": "./types/personalize/index.d.ts"
145
+ },
146
+ "./site": {
147
+ "import": "./dist/esm/site/index.js",
148
+ "require": "./dist/cjs/site/index.js",
149
+ "types": "./types/site/index.d.ts"
150
+ },
151
+ "./tools": {
152
+ "import": "./dist/esm/tools/index.js",
153
+ "require": "./dist/cjs/tools/index.js",
154
+ "types": "./types/tools/index.d.ts"
155
+ }
156
+ }
157
+ }
@@ -0,0 +1 @@
1
+ export * from './types/personalize/index';
package/site.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './types/site/index';
package/tools.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './types/tools/index';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generates a URL for accessing Sitecore Edge Platform Content using the provided endpoint and context ID.
3
+ * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform. Default is https://edge-platform.sitecorecloud.io
4
+ * @returns {string} The complete URL for accessing content through the Edge Platform.
5
+ * @public
6
+ */
7
+ export declare const getEdgeProxyContentUrl: (sitecoreEdgeUrl?: string) => string;
8
+ /**
9
+ * Generates a URL for accessing Sitecore Edge Platform Forms using the provided form ID and context ID.
10
+ * @param {string} sitecoreEdgeContextId - The unique context id.
11
+ * @param {string} formId - The unique form id.
12
+ * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform. Default is https://edge-platform.sitecorecloud.io
13
+ * @returns {string} The complete URL for accessing forms through the Edge Platform.
14
+ * @internal
15
+ */
16
+ export declare const getEdgeProxyFormsUrl: (sitecoreEdgeContextId: string, formId: string, sitecoreEdgeUrl?: string) => string;
17
+ //# sourceMappingURL=edge-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-proxy.d.ts","sourceRoot":"","sources":["../../src/client/edge-proxy.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,wBAA2C,WACpB,CAAC;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,uBAAuB,MAAM,EAC7B,QAAQ,MAAM,EACd,wBAA2C,WAIgC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { GraphQLClientError, GraphQLClient, GraphQLRequestClient, GraphQLRequestClientConfig, GraphQLRequestClientFactory, GraphQLRequestClientFactoryConfig, DefaultRetryStrategy, RetryStrategy, FetchOptions } from '@sitecore-content-sdk/core';
2
+ export { PageInfo } from '../models';
3
+ export { getEdgeProxyContentUrl, getEdgeProxyFormsUrl } from './edge-proxy';
4
+ export { SitecoreClient, Page, PageOptions, SitemapXmlOptions, PageMode, ErrorPage, } from './sitecore-client';
5
+ export { SitecoreClientInit } from './models';
6
+ export { createGraphQLClientFactory, GraphQLClientOptions } from './utils';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,oBAAoB,EACpB,aAAa,EACb,YAAY,EACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,IAAI,EACJ,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { SitecoreConfig } from '../config';
2
+ import { EditingService } from '../editing/editing-service';
3
+ import { ComponentLayoutService } from '../editing/component-layout-service';
4
+ import { DictionaryService } from '../i18n/dictionary-service';
5
+ import { LayoutService } from '../layout/layout-service';
6
+ import { ErrorPagesService, SitePathService } from '../site';
7
+ /**
8
+ * Init options for Sitecore Client that allows you to override services too
9
+ * @public
10
+ */
11
+ export type SitecoreClientInit = Omit<SitecoreConfig, 'multisite' | 'redirects' | 'personalize'> & {
12
+ custom?: {
13
+ layoutService?: LayoutService;
14
+ dictionaryService?: DictionaryService;
15
+ editingService?: EditingService;
16
+ errorPagesService?: ErrorPagesService;
17
+ componentService?: ComponentLayoutService;
18
+ sitePathService?: SitePathService;
19
+ };
20
+ };
21
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/client/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG;IACjG,MAAM,CAAC,EAAE;QACP,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;QACtC,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;QACtC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;QAC1C,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACH,CAAC"}
@@ -0,0 +1,338 @@
1
+ import { DocumentNode } from 'graphql';
2
+ import { GraphQLClient, GraphQLRequestClientFactory, FetchOptions, RetryStrategy } from '@sitecore-content-sdk/core';
3
+ import { DictionaryPhrases, DictionaryService } from '../i18n';
4
+ import { LayoutService, LayoutServiceData, RouteOptions, LayoutServicePageState } from '../layout';
5
+ import { HTMLLink, StaticPath } from '../models';
6
+ import { PersonalizedRewriteData } from '../personalize/utils';
7
+ import { ErrorPages, ErrorPagesService, SitePathService, SitemapXmlService } from '../site';
8
+ import { SitecoreClientInit } from './models';
9
+ import { RobotsService } from '../site/robots-service';
10
+ import { DesignLibraryRenderPreviewData, EditingPreviewData, EditingService, ComponentLayoutService, DesignLibraryMode } from '../editing';
11
+ /**
12
+ * Error page codes
13
+ * @public
14
+ */
15
+ export declare enum ErrorPage {
16
+ NotFound = "404",
17
+ InternalServerError = "500"
18
+ }
19
+ /**
20
+ * Page mode name
21
+ * @public
22
+ */
23
+ type PageModeName = LayoutServicePageState | DesignLibraryMode;
24
+ /**
25
+ * Represents the mode of the page
26
+ * @public
27
+ */
28
+ export type PageMode = {
29
+ /**
30
+ * Page mode name.
31
+ */
32
+ name: PageModeName;
33
+ /**
34
+ * Design Library related properties. Only available in Design Library mode.
35
+ */
36
+ designLibrary: {
37
+ /**
38
+ * Whether the page is in variant generation mode
39
+ */
40
+ isVariantGeneration: boolean;
41
+ };
42
+ /**
43
+ * Whether the page is in normal mode
44
+ */
45
+ isNormal: boolean;
46
+ /**
47
+ * Whether the page is in preview mode
48
+ */
49
+ isPreview: boolean;
50
+ /**
51
+ * Whether the page is in editing mode
52
+ */
53
+ isEditing: boolean;
54
+ /**
55
+ * Whether the page is in Design Library mode
56
+ */
57
+ isDesignLibrary: boolean;
58
+ };
59
+ /**
60
+ * Represent a Page model returned from Edge endpoint
61
+ * @public
62
+ */
63
+ export type Page = {
64
+ /**
65
+ * Layout details and props for the page
66
+ */
67
+ layout: LayoutServiceData;
68
+ /**
69
+ * Site name for current page / route
70
+ */
71
+ siteName?: string;
72
+ /**
73
+ * Route locale
74
+ */
75
+ locale: string;
76
+ /**
77
+ * Page mode
78
+ */
79
+ mode: PageMode;
80
+ };
81
+ /**
82
+ * Page options
83
+ * @public
84
+ */
85
+ export type PageOptions = Partial<RouteOptions> & {
86
+ personalize?: PersonalizedRewriteData;
87
+ };
88
+ /**
89
+ * Request options for the getSiteMap method
90
+ * @public
91
+ */
92
+ export type SitemapXmlOptions = {
93
+ /** The hostname from the request (e.g., 'example.com') */
94
+ reqHost: string;
95
+ /** The protocol from request headers (e.g., 'https' or 'http') */
96
+ reqProtocol: string | string[];
97
+ /** Optional sitemap identifier when requesting a specific sitemap */
98
+ id?: string;
99
+ /** The site name to resolve the sitemap for */
100
+ siteName?: string;
101
+ };
102
+ /**
103
+ * Options for fetching robots.txt content.
104
+ */
105
+ export type RobotsOptions = {
106
+ /**
107
+ * The name of the site for which to fetch robots.txt content.
108
+ */
109
+ siteName: string;
110
+ };
111
+ /**
112
+ * Contract for the Sitecore Client implementations
113
+ */
114
+ export interface BaseSitecoreClient {
115
+ /**
116
+ * Execute a raw GraphQL request using the client's configured GraphQL endpoint(s).
117
+ * This is a thin pass-through to the underlying {@link GraphQLClient.request},
118
+ * @param query GraphQL string or DocumentNode
119
+ * @param variables Optional variables bag
120
+ * @param fetchOptions Optional fetch/retry overrides (headers, retries, fetch impl, debugger)
121
+ */
122
+ getData<T = unknown>(query: string | DocumentNode, variables?: Record<string, unknown>, fetchOptions?: FetchOptions): Promise<T>;
123
+ /**
124
+ * Retrieves page layoutData and returns page details like language, layoutData and site info for current request
125
+ * @param {string} path current request path
126
+ * @param {PageOptions} pageOptions additional overrides like language, site name and personalization variants
127
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
128
+ * @returns {Page | null} page details when page layout is found and null when not
129
+ */
130
+ getPage(path: string | string[], pageOptions?: PageOptions, fetchOptions?: FetchOptions): Promise<Page | null>;
131
+ /**
132
+ * Retrieves the robots.txt content for a given site name.
133
+ * @param {string} siteName - The name of the site for which to fetch robots.txt content.
134
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
135
+ * @returns {Promise<string>} A promise that resolves to the robots.txt content.
136
+ */
137
+ getRobots(siteName: string, fetchOptions?: FetchOptions): Promise<string | null>;
138
+ getDictionary(routeOptions?: Partial<RouteOptions>, fetchOptions?: FetchOptions): Promise<DictionaryPhrases>;
139
+ /**
140
+ * Get error pages configured by SXA for a given site and locale
141
+ * @param {RouteOptions} [routeOptions] language and site to load error pages for
142
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
143
+ */
144
+ getErrorPages(routeOptions?: RouteOptions, fetchOptions?: FetchOptions): Promise<ErrorPages | null>;
145
+ /**
146
+ * Get preview layout details based on details from EditingPreviewData input
147
+ * @param {EditingPreviewData | undefined} previewData preview details like route, site, language etc used to retrieve preview page and layout
148
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
149
+ */
150
+ getPreview(previewData: EditingPreviewData | undefined, fetchOptions?: FetchOptions): Promise<Page | null>;
151
+ /**
152
+ * Get error page details for a given error code
153
+ * @param {ErrorPage} code - The error code to get the error page for
154
+ * @param {Partial<RouteOptions>} [pageOptions] - The page options to get the error page for
155
+ * @param {FetchOptions} [fetchOptions] - Additional fetch fetch options to override GraphQL requests
156
+ * @returns {Promise<Page | null>} A promise that resolves to the error page details or null if not found
157
+ */
158
+ getErrorPage(code: ErrorPage, pageOptions?: Partial<RouteOptions>, fetchOptions?: FetchOptions): Promise<Page | null>;
159
+ /**
160
+ * Get route paths for all pages in the site. Can be used for static site generation.
161
+ * @param {string[]} sites - sites to fetch routes for
162
+ * @param {string[]} [languages] languages to fetch routes in
163
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
164
+ */
165
+ getPagePaths(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticPath[]>;
166
+ /**
167
+ * Retrieves the links to be loaded in app's <head> element for each page.
168
+ * @param {LayoutServiceData} layoutData - The layout data containing styles and themes.
169
+ * @param {object} [options] - Optional configuration for enabling styles and themes.
170
+ * @param {boolean} [options.enableStyles] - Whether to include content styles.
171
+ * @param {boolean} [options.enableThemes] - Whether to include theme styles.
172
+ * @returns {HTMLLink[]} An array of `<link>` elements.
173
+ */
174
+ getHeadLinks(layoutData: LayoutServiceData, options: {
175
+ enableStyles?: boolean;
176
+ enableThemes?: boolean;
177
+ }): HTMLLink[];
178
+ /**
179
+ * Retrieves sitemap XML content - either a specific sitemap or the index of all sitemaps.
180
+ * @param { SitemapRequestConfig} reqOptions - Configuration for sitemap retrieval
181
+ * @param {FetchOptions} [fetchOptions] - Additional fetchOptions Additional fetch options to override GraphQL requests
182
+ * @returns {Promise<string>} Promise resolving to the sitemap XML content as string
183
+ */
184
+ getSiteMap(reqOptions: SitemapXmlOptions, fetchOptions?: FetchOptions): Promise<string>;
185
+ /**
186
+ * Retrieves the robots.txt content for a given site name.
187
+ * @param {string} siteName - The name of the site for which to fetch robots.txt content.
188
+ * @param {FetchOptions} fetchOptions Additional fetch options to override GraphQL requests
189
+ * @returns {Promise<string>} A promise that resolves to the robots.txt content.
190
+ */
191
+ getRobots(siteName: string, fetchOptions?: FetchOptions): Promise<string | null>;
192
+ }
193
+ export interface BaseServiceOptions {
194
+ defaultSite: string;
195
+ clientFactory: GraphQLRequestClientFactory;
196
+ retries: {
197
+ count: number;
198
+ retryStrategy: RetryStrategy;
199
+ };
200
+ }
201
+ /**
202
+ * This is a generic content client that can be used by any framework.
203
+ * Use it to retrieve pages, preview data, dictionary and other data
204
+ * @public
205
+ */
206
+ export declare class SitecoreClient implements BaseSitecoreClient {
207
+ protected initOptions: SitecoreClientInit;
208
+ protected layoutService: LayoutService;
209
+ protected dictionaryService: DictionaryService;
210
+ protected editingService: EditingService;
211
+ protected clientFactory: GraphQLRequestClientFactory;
212
+ protected errorPagesService: ErrorPagesService;
213
+ protected componentService: ComponentLayoutService;
214
+ protected sitePathService: SitePathService;
215
+ protected graphQLClient: GraphQLClient;
216
+ /**
217
+ * Init SitecoreClient
218
+ * @param {SitecoreClientInit} initOptions initOptions for the client, containing site and Sitecore connection details
219
+ */
220
+ constructor(initOptions: SitecoreClientInit);
221
+ /**
222
+ * Normalize path regardless of type
223
+ * @param {string | string[]} path string or string array path
224
+ * @returns {string} string path
225
+ */
226
+ parsePath(path: string | string[]): string;
227
+ /**
228
+ * Execute a raw GraphQL request using the client's configured GraphQL Edge endpoint.
229
+ * This is a thin pass-through to the underlying `GraphQLClient.request` method,
230
+ * @param {string | DocumentNode} query GraphQL query
231
+ * @param {Record<string, unknown>} [variables] Optional variables bag
232
+ * @param {FetchOptions} [fetchOptions] Optional fetch overrides (e.g. fetch, headers)
233
+ */
234
+ getData<T = unknown>(query: string | DocumentNode, variables?: Record<string, unknown>, fetchOptions?: FetchOptions): Promise<T>;
235
+ /**
236
+ * Get page details for a route, with layout and other details
237
+ * @param {string} path route path
238
+ * @param {PageOptions} [pageOptions] site, language and personalization variant details for route
239
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
240
+ * @returns {Page | null} page details
241
+ */
242
+ getPage(path: string | string[], pageOptions?: PageOptions, fetchOptions?: FetchOptions): Promise<Page | null>;
243
+ /**
244
+ * Retrieves the head `<link>` elements for Sitecore styles and themes.
245
+ * @param {LayoutServiceData} layoutData - The layout data containing styles and themes.
246
+ * @param {object} [options] - Optional configuration for enabling styles and themes.
247
+ * @param {boolean} [options.enableStyles] - Whether to include content styles.
248
+ * @param {boolean} [options.enableThemes] - Whether to include theme styles.
249
+ * @returns {HTMLLink[]} An array of `<link>` elements for stylesheets.
250
+ */
251
+ getHeadLinks(layoutData: LayoutServiceData, options?: {
252
+ enableStyles?: boolean;
253
+ enableThemes?: boolean;
254
+ }): HTMLLink[];
255
+ /**
256
+ * Retrieves dictionary phrases for a given site and locale.
257
+ * @param {RouteOptions} routeOptions - Route options containing language and site name to load dictionary for
258
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
259
+ * @returns {DictionaryPhrases} A promise that resolves to the dictionary phrases.
260
+ */
261
+ getDictionary(routeOptions?: Partial<RouteOptions>, fetchOptions?: FetchOptions): Promise<DictionaryPhrases>;
262
+ /**
263
+ * Retrieves error pages for a given site and locale.
264
+ * @param {RouteOptions} routeOptions - Route options containing language and site name to load error pages
265
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
266
+ * @returns {ErrorPages | null} A promise that resolves to the error pages or null if not found.
267
+ */
268
+ getErrorPages(routeOptions?: RouteOptions, fetchOptions?: FetchOptions): Promise<ErrorPages | null>;
269
+ /**
270
+ * Retrieves preview page and layout details
271
+ * @param {EditingPreviewData | undefined} previewData - The editing preview data for metadata mode.
272
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
273
+ * @returns {Page} preview page details
274
+ */
275
+ getPreview(previewData: EditingPreviewData | undefined, fetchOptions?: FetchOptions): Promise<Page | null>;
276
+ /**
277
+ * Get design library page details for Design Library mode of your app
278
+ * @param {DesignLibraryRenderPreviewData} designLibData preview data set in 'library' mode of the app
279
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
280
+ * @returns {Page} preview page for Design Library
281
+ */
282
+ getDesignLibraryData(designLibData: DesignLibraryRenderPreviewData, fetchOptions?: FetchOptions): Promise<Page>;
283
+ /**
284
+ * Get error page details for a given error code
285
+ * @param {ErrorPage} code - The error code to get the error page for
286
+ * @param {Partial<RouteOptions>} pageOptions - The page options to get the error page for
287
+ * @param {FetchOptions} [fetchOptions] - Additional fetch fetch options to override GraphQL requests
288
+ * @returns {Promise<Page | null>} A promise that resolves to the error page details or null if not found
289
+ */
290
+ getErrorPage(code: ErrorPage, pageOptions?: Partial<RouteOptions>, fetchOptions?: FetchOptions): Promise<Page | null>;
291
+ /**
292
+ * Retrieves the static paths for pages based on the given languages.
293
+ * @param {string[]} sites - An array of site names to fetch routes for.
294
+ * @param {string[]} [languages] - An optional array of language codes to generate paths for.
295
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
296
+ * @returns {Promise<StaticPath[]>} A promise that resolves to an array of static paths.
297
+ */
298
+ getPagePaths(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticPath[]>;
299
+ /**
300
+ * Retrieves sitemap XML content - either a specific sitemap or the index of all sitemaps.
301
+ * @param {SitemapXmlOptions} reqOptions - Options for sitemap retrieval
302
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
303
+ * @returns {Promise<string>} Promise resolving to the sitemap XML content as string
304
+ * @throws {Error} Throws 'REDIRECT_404' if requested sitemap is not found
305
+ */
306
+ getSiteMap(reqOptions: SitemapXmlOptions, fetchOptions?: FetchOptions): Promise<string>;
307
+ /**
308
+ * Retrieves the robots.txt content for a given site name.
309
+ * @param {string} siteName - The name of the site to retrieve the robots.txt for.
310
+ * @param {FetchOptions} [fetchOptions] - Optional fetch options.
311
+ * @returns {Promise<string | null>} A promise that resolves to the robots.txt content,
312
+ * or null if no content is found.
313
+ */
314
+ getRobots(siteName: string, fetchOptions?: FetchOptions): Promise<string | null>;
315
+ /**
316
+ * Factory methods for creating dependencies
317
+ * Subclasses can override these to provide custom implementations.
318
+ */
319
+ protected getGraphqlSitemapXMLService(siteName: string): SitemapXmlService;
320
+ protected getRobotsService(siteName: string): RobotsService;
321
+ protected getBaseServiceOptions(): BaseServiceOptions;
322
+ /**
323
+ * Get page mode based on mode name
324
+ * @param {PageModeName} mode - The mode name to get the page mode for
325
+ * @param { DesignLibraryVariantGeneration} generation - The variant generation mode, if applicable
326
+ * @returns {PageMode} The page mode
327
+ */
328
+ private getPageMode;
329
+ private getClientFactory;
330
+ private getLayoutService;
331
+ private getDictionaryService;
332
+ private getEditingService;
333
+ private getErrorPagesService;
334
+ private getComponentService;
335
+ private getSitePathService;
336
+ }
337
+ export {};
338
+ //# sourceMappingURL=sitecore-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitecore-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EAGd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAGL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAwB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,oBAAY,SAAS;IACnB,QAAQ,QAAQ;IAChB,mBAAmB,QAAQ;CAC5B;AAED;;;GAGG;AACH,KAAK,YAAY,GAAG,sBAAsB,GAAG,iBAAiB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE;QACb;;WAEG;QACH,mBAAmB,EAAE,OAAO,CAAC;KAC9B,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YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IA+C7F;;;;;;OAMG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAMtF;;;OAGG;IAEH,SAAS,CAAC,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB;IAO1E,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa;IAO3D,SAAS,CAAC,qBAAqB,IAAI,kBAAkB;IAQrD;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IA4CnB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,kBAAkB;CAK3B"}
@@ -0,0 +1,15 @@
1
+ import { FetchOptions } from '@sitecore-content-sdk/core';
2
+ import { SitecoreConfigInput } from '../config';
3
+ /**
4
+ * GraphQL client options
5
+ * @public
6
+ */
7
+ export type GraphQLClientOptions = Pick<SitecoreConfigInput, 'api'> & FetchOptions;
8
+ /**
9
+ * Creates a new GraphQLRequestClientFactory instance
10
+ * @param {GraphQLClientOptions} options content sdk config
11
+ * @returns GraphQLRequestClientFactory instance
12
+ * @public
13
+ */
14
+ export declare const createGraphQLClientFactory: (options: GraphQLClientOptions) => import("@sitecore-content-sdk/core").GraphQLRequestClientFactory;
15
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/client/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,GAAG,YAAY,CAAC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,oBAAoB,qEA2CvE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { DeepPartial, SitecoreConfig, SitecoreConfigInput } from './models';
2
+ /**
3
+ * Provides default initial values for SitecoreConfig
4
+ * @returns default config
5
+ */
6
+ export declare const getFallbackConfig: () => SitecoreConfig;
7
+ /**
8
+ * Deep merge utility that skips undefined or empty string values in the override.
9
+ * @param {T} base base value
10
+ * @param {DeepPartial<T>} [override] override value
11
+ */
12
+ export declare function deepMerge<T>(base: T, override?: DeepPartial<T>): T;
13
+ /**
14
+ * Accepts a SitecoreConfigInput object and returns full sitecore configuration
15
+ * @param {SitecoreConfigInput} config override values to be written over default config settings
16
+ * @returns {SitecoreConfig} full sitecore configuration to use in application
17
+ * @public
18
+ */
19
+ export declare const defineConfig: (config: SitecoreConfigInput) => SitecoreConfig;
20
+ //# sourceMappingURL=define-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/config/define-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAK5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,cAgDnC,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CA8BlE;AAyHD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,mBAAmB,KAAG,cAe1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SitecoreConfig, SitecoreConfigInput, SitecoreCliConfig, SitecoreCliConfigInput, ScaffoldTemplate, ComponentTemplateType, DeepRequired, } from './models';
2
+ export { defineConfig } from './define-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}