@timbenniks/contentstack-platform-sdk 0.1.0

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 (244) hide show
  1. package/dist/auth/index.cjs +607 -0
  2. package/dist/auth/index.cjs.map +1 -0
  3. package/dist/auth/index.d.cts +108 -0
  4. package/dist/auth/index.d.ts +108 -0
  5. package/dist/auth/index.mjs +25 -0
  6. package/dist/auth/index.mjs.map +1 -0
  7. package/dist/brandkit/index.cjs +525 -0
  8. package/dist/brandkit/index.cjs.map +1 -0
  9. package/dist/brandkit/index.d.cts +95 -0
  10. package/dist/brandkit/index.d.ts +95 -0
  11. package/dist/brandkit/index.mjs +11 -0
  12. package/dist/brandkit/index.mjs.map +1 -0
  13. package/dist/chunk-3C6J2BDB.mjs +84 -0
  14. package/dist/chunk-3C6J2BDB.mjs.map +1 -0
  15. package/dist/chunk-3KE63N3I.mjs +64 -0
  16. package/dist/chunk-3KE63N3I.mjs.map +1 -0
  17. package/dist/chunk-4CJ4IVPJ.mjs +212 -0
  18. package/dist/chunk-4CJ4IVPJ.mjs.map +1 -0
  19. package/dist/chunk-4JFUI7MJ.mjs +368 -0
  20. package/dist/chunk-4JFUI7MJ.mjs.map +1 -0
  21. package/dist/chunk-7VFGD32I.mjs +26 -0
  22. package/dist/chunk-7VFGD32I.mjs.map +1 -0
  23. package/dist/chunk-ARPJDW3A.mjs +44 -0
  24. package/dist/chunk-ARPJDW3A.mjs.map +1 -0
  25. package/dist/chunk-AVJHCFRK.mjs +52 -0
  26. package/dist/chunk-AVJHCFRK.mjs.map +1 -0
  27. package/dist/chunk-BK2IBTQS.mjs +131 -0
  28. package/dist/chunk-BK2IBTQS.mjs.map +1 -0
  29. package/dist/chunk-BUZ6CQHE.mjs +75 -0
  30. package/dist/chunk-BUZ6CQHE.mjs.map +1 -0
  31. package/dist/chunk-CKMAOWBQ.mjs +379 -0
  32. package/dist/chunk-CKMAOWBQ.mjs.map +1 -0
  33. package/dist/chunk-DJQLN4TR.mjs +1 -0
  34. package/dist/chunk-DJQLN4TR.mjs.map +1 -0
  35. package/dist/chunk-DMERADWM.mjs +67 -0
  36. package/dist/chunk-DMERADWM.mjs.map +1 -0
  37. package/dist/chunk-EREPKWTW.mjs +926 -0
  38. package/dist/chunk-EREPKWTW.mjs.map +1 -0
  39. package/dist/chunk-FQP4PB5X.mjs +88 -0
  40. package/dist/chunk-FQP4PB5X.mjs.map +1 -0
  41. package/dist/chunk-GNPQJBFX.mjs +144 -0
  42. package/dist/chunk-GNPQJBFX.mjs.map +1 -0
  43. package/dist/chunk-GOSB24M6.mjs +87 -0
  44. package/dist/chunk-GOSB24M6.mjs.map +1 -0
  45. package/dist/chunk-JL2E3EOT.mjs +255 -0
  46. package/dist/chunk-JL2E3EOT.mjs.map +1 -0
  47. package/dist/chunk-JYGZBKTH.mjs +222 -0
  48. package/dist/chunk-JYGZBKTH.mjs.map +1 -0
  49. package/dist/chunk-JZE2W7VW.mjs +52 -0
  50. package/dist/chunk-JZE2W7VW.mjs.map +1 -0
  51. package/dist/chunk-K76DKSHJ.mjs +18 -0
  52. package/dist/chunk-K76DKSHJ.mjs.map +1 -0
  53. package/dist/chunk-KLVIROVU.mjs +232 -0
  54. package/dist/chunk-KLVIROVU.mjs.map +1 -0
  55. package/dist/chunk-LPVVA5J3.mjs +18 -0
  56. package/dist/chunk-LPVVA5J3.mjs.map +1 -0
  57. package/dist/chunk-NKLOZ5VI.mjs +112 -0
  58. package/dist/chunk-NKLOZ5VI.mjs.map +1 -0
  59. package/dist/chunk-QGA4WBDC.mjs +7 -0
  60. package/dist/chunk-QGA4WBDC.mjs.map +1 -0
  61. package/dist/chunk-QW7TVYOA.mjs +56 -0
  62. package/dist/chunk-QW7TVYOA.mjs.map +1 -0
  63. package/dist/chunk-SU5QEKYW.mjs +83 -0
  64. package/dist/chunk-SU5QEKYW.mjs.map +1 -0
  65. package/dist/chunk-T5A2E2RI.mjs +654 -0
  66. package/dist/chunk-T5A2E2RI.mjs.map +1 -0
  67. package/dist/chunk-T5OIJQK7.mjs +116 -0
  68. package/dist/chunk-T5OIJQK7.mjs.map +1 -0
  69. package/dist/chunk-VW7DD6HV.mjs +253 -0
  70. package/dist/chunk-VW7DD6HV.mjs.map +1 -0
  71. package/dist/chunk-XH7NLHGW.mjs +133 -0
  72. package/dist/chunk-XH7NLHGW.mjs.map +1 -0
  73. package/dist/client-DJ5haQGd.d.cts +22 -0
  74. package/dist/client-DwVGVSQz.d.ts +22 -0
  75. package/dist/cma/index.cjs +1349 -0
  76. package/dist/cma/index.cjs.map +1 -0
  77. package/dist/cma/index.d.cts +22 -0
  78. package/dist/cma/index.d.ts +22 -0
  79. package/dist/cma/index.mjs +70 -0
  80. package/dist/cma/index.mjs.map +1 -0
  81. package/dist/errors-CAw-IRCP.d.cts +65 -0
  82. package/dist/errors-CAw-IRCP.d.ts +65 -0
  83. package/dist/generative-ai/index.cjs +401 -0
  84. package/dist/generative-ai/index.cjs.map +1 -0
  85. package/dist/generative-ai/index.d.cts +31 -0
  86. package/dist/generative-ai/index.d.ts +31 -0
  87. package/dist/generative-ai/index.mjs +10 -0
  88. package/dist/generative-ai/index.mjs.map +1 -0
  89. package/dist/images/index.cjs +185 -0
  90. package/dist/images/index.cjs.map +1 -0
  91. package/dist/images/index.d.cts +27 -0
  92. package/dist/images/index.d.ts +27 -0
  93. package/dist/images/index.mjs +8 -0
  94. package/dist/images/index.mjs.map +1 -0
  95. package/dist/index.cjs +2909 -0
  96. package/dist/index.cjs.map +1 -0
  97. package/dist/index.d.cts +30 -0
  98. package/dist/index.d.ts +30 -0
  99. package/dist/index.mjs +153 -0
  100. package/dist/index.mjs.map +1 -0
  101. package/dist/knowledge-vault/index.cjs +413 -0
  102. package/dist/knowledge-vault/index.cjs.map +1 -0
  103. package/dist/knowledge-vault/index.d.cts +49 -0
  104. package/dist/knowledge-vault/index.d.ts +49 -0
  105. package/dist/knowledge-vault/index.mjs +10 -0
  106. package/dist/knowledge-vault/index.mjs.map +1 -0
  107. package/dist/launch/index.cjs +624 -0
  108. package/dist/launch/index.cjs.map +1 -0
  109. package/dist/launch/index.d.cts +169 -0
  110. package/dist/launch/index.d.ts +169 -0
  111. package/dist/launch/index.mjs +11 -0
  112. package/dist/launch/index.mjs.map +1 -0
  113. package/dist/react/auth/index.cjs +113 -0
  114. package/dist/react/auth/index.cjs.map +1 -0
  115. package/dist/react/auth/index.d.cts +33 -0
  116. package/dist/react/auth/index.d.ts +33 -0
  117. package/dist/react/auth/index.mjs +13 -0
  118. package/dist/react/auth/index.mjs.map +1 -0
  119. package/dist/react/content/index.cjs +113 -0
  120. package/dist/react/content/index.cjs.map +1 -0
  121. package/dist/react/content/index.d.cts +25 -0
  122. package/dist/react/content/index.d.ts +25 -0
  123. package/dist/react/content/index.mjs +7 -0
  124. package/dist/react/content/index.mjs.map +1 -0
  125. package/dist/react/hooks/index.cjs +2097 -0
  126. package/dist/react/hooks/index.cjs.map +1 -0
  127. package/dist/react/hooks/index.d.cts +77 -0
  128. package/dist/react/hooks/index.d.ts +77 -0
  129. package/dist/react/hooks/index.mjs +46 -0
  130. package/dist/react/hooks/index.mjs.map +1 -0
  131. package/dist/react/index.cjs +2307 -0
  132. package/dist/react/index.cjs.map +1 -0
  133. package/dist/react/index.d.cts +16 -0
  134. package/dist/react/index.d.ts +16 -0
  135. package/dist/react/index.mjs +67 -0
  136. package/dist/react/index.mjs.map +1 -0
  137. package/dist/react/provider/index.cjs +83 -0
  138. package/dist/react/provider/index.cjs.map +1 -0
  139. package/dist/react/provider/index.d.cts +30 -0
  140. package/dist/react/provider/index.d.ts +30 -0
  141. package/dist/react/provider/index.mjs +11 -0
  142. package/dist/react/provider/index.mjs.map +1 -0
  143. package/dist/regions/index.cjs +171 -0
  144. package/dist/regions/index.cjs.map +1 -0
  145. package/dist/regions/index.d.cts +55 -0
  146. package/dist/regions/index.d.ts +55 -0
  147. package/dist/regions/index.mjs +13 -0
  148. package/dist/regions/index.mjs.map +1 -0
  149. package/dist/request-builders-BxeolQIw.d.ts +735 -0
  150. package/dist/request-builders-C2IG1LUo.d.cts +735 -0
  151. package/dist/rte/index.cjs +683 -0
  152. package/dist/rte/index.cjs.map +1 -0
  153. package/dist/rte/index.d.cts +33 -0
  154. package/dist/rte/index.d.ts +33 -0
  155. package/dist/rte/index.mjs +17 -0
  156. package/dist/rte/index.mjs.map +1 -0
  157. package/dist/server/index.cjs +917 -0
  158. package/dist/server/index.cjs.map +1 -0
  159. package/dist/server/index.d.cts +6 -0
  160. package/dist/server/index.d.ts +6 -0
  161. package/dist/server/index.mjs +45 -0
  162. package/dist/server/index.mjs.map +1 -0
  163. package/dist/server/middleware/index.cjs +614 -0
  164. package/dist/server/middleware/index.cjs.map +1 -0
  165. package/dist/server/middleware/index.d.cts +77 -0
  166. package/dist/server/middleware/index.d.ts +77 -0
  167. package/dist/server/middleware/index.mjs +27 -0
  168. package/dist/server/middleware/index.mjs.map +1 -0
  169. package/dist/server/proxy/index.cjs +329 -0
  170. package/dist/server/proxy/index.cjs.map +1 -0
  171. package/dist/server/proxy/index.d.cts +143 -0
  172. package/dist/server/proxy/index.d.ts +143 -0
  173. package/dist/server/proxy/index.mjs +29 -0
  174. package/dist/server/proxy/index.mjs.map +1 -0
  175. package/dist/server/webhooks/index.cjs +131 -0
  176. package/dist/server/webhooks/index.cjs.map +1 -0
  177. package/dist/server/webhooks/index.d.cts +230 -0
  178. package/dist/server/webhooks/index.d.ts +230 -0
  179. package/dist/server/webhooks/index.mjs +23 -0
  180. package/dist/server/webhooks/index.mjs.map +1 -0
  181. package/dist/types-6D9VR7pT.d.cts +26 -0
  182. package/dist/types-AelT0rFJ.d.cts +21 -0
  183. package/dist/types-AelT0rFJ.d.ts +21 -0
  184. package/dist/types-Bu5yCgmw.d.ts +26 -0
  185. package/dist/types-DgixK-ll.d.cts +23 -0
  186. package/dist/types-DgixK-ll.d.ts +23 -0
  187. package/dist/types-DrMwdlH9.d.cts +245 -0
  188. package/dist/types-DrMwdlH9.d.ts +245 -0
  189. package/dist/ui/css/index.cjs +31 -0
  190. package/dist/ui/css/index.cjs.map +1 -0
  191. package/dist/ui/css/index.d.cts +15 -0
  192. package/dist/ui/css/index.d.ts +15 -0
  193. package/dist/ui/css/index.mjs +7 -0
  194. package/dist/ui/css/index.mjs.map +1 -0
  195. package/dist/ui/index.cjs +368 -0
  196. package/dist/ui/index.cjs.map +1 -0
  197. package/dist/ui/index.d.cts +4 -0
  198. package/dist/ui/index.d.ts +4 -0
  199. package/dist/ui/index.mjs +33 -0
  200. package/dist/ui/index.mjs.map +1 -0
  201. package/dist/ui/theme/index.cjs +105 -0
  202. package/dist/ui/theme/index.cjs.map +1 -0
  203. package/dist/ui/theme/index.d.cts +33 -0
  204. package/dist/ui/theme/index.d.ts +33 -0
  205. package/dist/ui/theme/index.mjs +15 -0
  206. package/dist/ui/theme/index.mjs.map +1 -0
  207. package/dist/ui/tokens/index.cjs +286 -0
  208. package/dist/ui/tokens/index.cjs.map +1 -0
  209. package/dist/ui/tokens/index.d.cts +54 -0
  210. package/dist/ui/tokens/index.d.ts +54 -0
  211. package/dist/ui/tokens/index.mjs +17 -0
  212. package/dist/ui/tokens/index.mjs.map +1 -0
  213. package/dist/ui/tokens.css +408 -0
  214. package/dist/vue/auth/index.cjs +141 -0
  215. package/dist/vue/auth/index.cjs.map +1 -0
  216. package/dist/vue/auth/index.d.cts +78 -0
  217. package/dist/vue/auth/index.d.ts +78 -0
  218. package/dist/vue/auth/index.mjs +13 -0
  219. package/dist/vue/auth/index.mjs.map +1 -0
  220. package/dist/vue/composables/index.cjs +2108 -0
  221. package/dist/vue/composables/index.cjs.map +1 -0
  222. package/dist/vue/composables/index.d.cts +78 -0
  223. package/dist/vue/composables/index.d.ts +78 -0
  224. package/dist/vue/composables/index.mjs +46 -0
  225. package/dist/vue/composables/index.mjs.map +1 -0
  226. package/dist/vue/content/index.cjs +142 -0
  227. package/dist/vue/content/index.cjs.map +1 -0
  228. package/dist/vue/content/index.d.cts +47 -0
  229. package/dist/vue/content/index.d.ts +47 -0
  230. package/dist/vue/content/index.mjs +7 -0
  231. package/dist/vue/content/index.mjs.map +1 -0
  232. package/dist/vue/index.cjs +2389 -0
  233. package/dist/vue/index.cjs.map +1 -0
  234. package/dist/vue/index.d.cts +16 -0
  235. package/dist/vue/index.d.ts +16 -0
  236. package/dist/vue/index.mjs +69 -0
  237. package/dist/vue/index.mjs.map +1 -0
  238. package/dist/vue/provider/index.cjs +97 -0
  239. package/dist/vue/provider/index.cjs.map +1 -0
  240. package/dist/vue/provider/index.d.cts +90 -0
  241. package/dist/vue/provider/index.d.ts +90 -0
  242. package/dist/vue/provider/index.mjs +13 -0
  243. package/dist/vue/provider/index.mjs.map +1 -0
  244. package/package.json +195 -0
@@ -0,0 +1,735 @@
1
+ import { H as HttpClientConfig } from './types-DgixK-ll.cjs';
2
+ import { ContentstackRegion } from './regions/index.cjs';
3
+ import { C as ContentstackHttpClient } from './client-DJ5haQGd.cjs';
4
+
5
+ interface PublishDetails {
6
+ environment: string;
7
+ locale: string;
8
+ time: string;
9
+ user: string;
10
+ }
11
+ interface WorkflowStage {
12
+ uid: string;
13
+ name: string;
14
+ color: string;
15
+ order: number;
16
+ next_available_stages?: string[];
17
+ }
18
+ interface FieldSchema {
19
+ uid: string;
20
+ data_type: string;
21
+ display_name: string;
22
+ mandatory?: boolean;
23
+ unique?: boolean;
24
+ multiple?: boolean;
25
+ field_metadata?: Record<string, unknown>;
26
+ schema?: FieldSchema[];
27
+ [key: string]: unknown;
28
+ }
29
+ interface Entry {
30
+ uid: string;
31
+ title: string;
32
+ url?: string;
33
+ locale: string;
34
+ created_at: string;
35
+ updated_at: string;
36
+ created_by: string;
37
+ updated_by: string;
38
+ _version: number;
39
+ tags?: string[];
40
+ publish_details?: PublishDetails[];
41
+ _workflow?: WorkflowStage;
42
+ [field: string]: unknown;
43
+ }
44
+ interface ContentType {
45
+ uid: string;
46
+ title: string;
47
+ description?: string;
48
+ schema: FieldSchema[];
49
+ options: Record<string, unknown>;
50
+ created_at: string;
51
+ updated_at: string;
52
+ }
53
+ interface Asset {
54
+ uid: string;
55
+ title: string;
56
+ filename: string;
57
+ url: string;
58
+ content_type: string;
59
+ file_size: string;
60
+ dimension?: {
61
+ width: number;
62
+ height: number;
63
+ };
64
+ created_at: string;
65
+ updated_at: string;
66
+ }
67
+ interface AssetFolder {
68
+ uid: string;
69
+ name: string;
70
+ parent_uid?: string;
71
+ is_dir: boolean;
72
+ created_at: string;
73
+ updated_at: string;
74
+ }
75
+ interface Environment {
76
+ uid: string;
77
+ name: string;
78
+ urls: Array<{
79
+ url: string;
80
+ locale: string;
81
+ }>;
82
+ created_at: string;
83
+ updated_at: string;
84
+ }
85
+ interface Locale {
86
+ uid: string;
87
+ code: string;
88
+ name: string;
89
+ fallback_locale?: string;
90
+ created_at: string;
91
+ updated_at: string;
92
+ }
93
+ interface Branch {
94
+ uid: string;
95
+ source: string;
96
+ alias?: Array<{
97
+ uid: string;
98
+ }>;
99
+ created_at: string;
100
+ updated_at: string;
101
+ }
102
+ interface Release {
103
+ uid: string;
104
+ name: string;
105
+ description?: string;
106
+ locked: boolean;
107
+ archived: boolean;
108
+ created_at: string;
109
+ updated_at: string;
110
+ }
111
+ interface ReleaseItem {
112
+ uid: string;
113
+ version: number;
114
+ content_type_uid: string;
115
+ action: "publish" | "unpublish";
116
+ locale: string;
117
+ }
118
+ interface Taxonomy {
119
+ uid: string;
120
+ name: string;
121
+ description?: string;
122
+ created_at: string;
123
+ updated_at: string;
124
+ }
125
+ interface TaxonomyTerm {
126
+ uid: string;
127
+ name: string;
128
+ parent_uid?: string;
129
+ depth: number;
130
+ created_at: string;
131
+ updated_at: string;
132
+ }
133
+ interface Webhook {
134
+ uid: string;
135
+ name: string;
136
+ destinations: Array<{
137
+ target_url: string;
138
+ http_basic_auth?: string;
139
+ http_basic_password?: string;
140
+ custom_header?: Array<{
141
+ header_name: string;
142
+ value: string;
143
+ }>;
144
+ }>;
145
+ channels: string[];
146
+ retry_policy: string;
147
+ disabled: boolean;
148
+ created_at: string;
149
+ updated_at: string;
150
+ }
151
+ interface Workflow {
152
+ uid: string;
153
+ name: string;
154
+ description?: string;
155
+ content_types: string[];
156
+ workflow_stages: WorkflowStage[];
157
+ enabled: boolean;
158
+ created_at: string;
159
+ updated_at: string;
160
+ }
161
+ interface BasePublishAction {
162
+ environments: string[];
163
+ locales: string[];
164
+ scheduled_at?: string;
165
+ }
166
+ interface BaseToken {
167
+ uid: string;
168
+ name: string;
169
+ description?: string;
170
+ token: string;
171
+ created_at: string;
172
+ updated_at: string;
173
+ }
174
+ interface ManagementToken extends BaseToken {
175
+ scope: Array<{
176
+ module: string;
177
+ acl: Record<string, unknown>;
178
+ }>;
179
+ expires_on?: string;
180
+ }
181
+ interface DeliveryToken extends BaseToken {
182
+ scope: Array<{
183
+ environments: Array<{
184
+ uid: string;
185
+ name: string;
186
+ }>;
187
+ module: string;
188
+ }>;
189
+ }
190
+ interface GlobalField {
191
+ uid: string;
192
+ title: string;
193
+ description?: string;
194
+ schema: FieldSchema[];
195
+ created_at: string;
196
+ updated_at: string;
197
+ }
198
+ interface Label {
199
+ uid: string;
200
+ name: string;
201
+ content_types: string[];
202
+ parent?: string[];
203
+ created_at: string;
204
+ updated_at: string;
205
+ }
206
+ interface Role {
207
+ uid: string;
208
+ name: string;
209
+ description?: string;
210
+ rules: Array<{
211
+ module: string;
212
+ users: string[];
213
+ acl: Record<string, unknown>;
214
+ }>;
215
+ stack: {
216
+ api_key: string;
217
+ };
218
+ created_at: string;
219
+ updated_at: string;
220
+ }
221
+ interface AuditLogEntry {
222
+ uid: string;
223
+ module: string;
224
+ event_type: string;
225
+ request_id: string;
226
+ metadata: Record<string, unknown>;
227
+ remote_addr: string;
228
+ created_at: string;
229
+ created_by: string;
230
+ }
231
+ interface Extension {
232
+ uid: string;
233
+ title: string;
234
+ type: string;
235
+ tag?: string;
236
+ scope?: {
237
+ content_types: string[];
238
+ };
239
+ src?: string;
240
+ config?: Record<string, unknown>;
241
+ created_at: string;
242
+ updated_at: string;
243
+ }
244
+ interface BranchAlias {
245
+ uid: string;
246
+ source: string;
247
+ created_at: string;
248
+ updated_at: string;
249
+ }
250
+ interface PublishRule {
251
+ uid: string;
252
+ workflow: string;
253
+ actions: string[];
254
+ branches: string[];
255
+ content_types: string[];
256
+ locales: string[];
257
+ environment: string;
258
+ approvers: Array<{
259
+ uid: string;
260
+ name?: string;
261
+ email?: string;
262
+ }>;
263
+ created_at: string;
264
+ updated_at: string;
265
+ }
266
+ interface PreviewToken extends BaseToken {
267
+ scope: Array<{
268
+ environments: Array<{
269
+ uid: string;
270
+ name: string;
271
+ }>;
272
+ module: string;
273
+ }>;
274
+ }
275
+ interface MergeJob {
276
+ uid: string;
277
+ base_branch: string;
278
+ compare_branch: string;
279
+ status: string;
280
+ merge_comment?: string;
281
+ errors?: unknown[];
282
+ created_at: string;
283
+ updated_at: string;
284
+ }
285
+
286
+ type AssetPublishAction = BasePublishAction;
287
+ declare class AssetsClient {
288
+ private readonly http;
289
+ constructor(http: ContentstackHttpClient);
290
+ list(opts?: {
291
+ limit?: number;
292
+ folder?: string;
293
+ }): AsyncIterable<Asset>;
294
+ listAll(opts?: {
295
+ limit?: number;
296
+ folder?: string;
297
+ }): Promise<Asset[]>;
298
+ get(uid: string): Promise<Asset>;
299
+ upload(form: FormData): Promise<Asset>;
300
+ update(uid: string, data: Partial<Asset>): Promise<Asset>;
301
+ delete(uid: string): Promise<void>;
302
+ publish(uid: string, data: AssetPublishAction): Promise<void>;
303
+ unpublish(uid: string, data: AssetPublishAction): Promise<void>;
304
+ listFolders(opts?: {
305
+ limit?: number;
306
+ }): Promise<AssetFolder[]>;
307
+ getFolder(uid: string): Promise<AssetFolder>;
308
+ createFolder(data: {
309
+ name: string;
310
+ parent_uid?: string;
311
+ }): Promise<AssetFolder>;
312
+ updateFolder(uid: string, data: {
313
+ name: string;
314
+ }): Promise<AssetFolder>;
315
+ deleteFolder(uid: string): Promise<void>;
316
+ replace(uid: string, form: FormData): Promise<Asset>;
317
+ getReferences(uid: string): Promise<unknown[]>;
318
+ }
319
+
320
+ interface CrudConfig {
321
+ basePath: string;
322
+ singularKey: string;
323
+ pluralKey: string;
324
+ }
325
+ declare class CrudClient<T> {
326
+ protected readonly http: ContentstackHttpClient;
327
+ protected readonly config: CrudConfig;
328
+ constructor(http: ContentstackHttpClient, config: CrudConfig);
329
+ list(opts?: {
330
+ limit?: number;
331
+ }): AsyncIterable<T>;
332
+ listAll(opts?: {
333
+ limit?: number;
334
+ }): Promise<T[]>;
335
+ get(uid: string): Promise<T>;
336
+ create(data: Partial<T>): Promise<T>;
337
+ update(uid: string, data: Partial<T>): Promise<T>;
338
+ delete(uid: string): Promise<void>;
339
+ }
340
+
341
+ declare class AuditLogClient extends CrudClient<AuditLogEntry> {
342
+ constructor(http: ContentstackHttpClient);
343
+ }
344
+
345
+ declare class BranchAliasesClient {
346
+ private readonly http;
347
+ constructor(http: ContentstackHttpClient);
348
+ list(): Promise<BranchAlias[]>;
349
+ get(uid: string): Promise<BranchAlias>;
350
+ createOrUpdate(uid: string, targetBranch: string): Promise<BranchAlias>;
351
+ delete(uid: string): Promise<void>;
352
+ }
353
+
354
+ interface MergeRequest {
355
+ base_branch: string;
356
+ compare_branch: string;
357
+ default_merge_strategy: "merge_prefer_base" | "merge_prefer_compare" | "overwrite_with_compare" | "merge_new_only" | "ignore";
358
+ merge_comment?: string;
359
+ item_merge_strategies?: Record<string, string>;
360
+ }
361
+ declare class BranchesClient {
362
+ private readonly http;
363
+ constructor(http: ContentstackHttpClient);
364
+ list(opts?: {
365
+ limit?: number;
366
+ }): AsyncIterable<Branch>;
367
+ listAll(opts?: {
368
+ limit?: number;
369
+ }): Promise<Branch[]>;
370
+ get(uid: string): Promise<Branch>;
371
+ create(data: {
372
+ uid: string;
373
+ source: string;
374
+ }): Promise<Branch>;
375
+ delete(uid: string): Promise<void>;
376
+ compare(baseBranch: string, compareBranch: string): Promise<unknown>;
377
+ merge(data: MergeRequest): Promise<MergeJob>;
378
+ listMergeJobs(): Promise<MergeJob[]>;
379
+ getMergeJob(uid: string): Promise<MergeJob>;
380
+ }
381
+
382
+ interface BulkEntry {
383
+ uid: string;
384
+ content_type: string;
385
+ locale: string;
386
+ version?: number;
387
+ }
388
+ interface BulkPublishAction extends BasePublishAction {
389
+ entries?: BulkEntry[];
390
+ assets?: Array<{
391
+ uid: string;
392
+ }>;
393
+ }
394
+ interface BulkWorkflowAction {
395
+ entries: Array<{
396
+ uid: string;
397
+ content_type: string;
398
+ locale: string;
399
+ }>;
400
+ workflow_stage: {
401
+ uid: string;
402
+ comment?: string;
403
+ };
404
+ }
405
+ declare class BulkOperationsClient {
406
+ private readonly http;
407
+ constructor(http: ContentstackHttpClient);
408
+ publish(data: BulkPublishAction): Promise<void>;
409
+ unpublish(data: BulkPublishAction): Promise<void>;
410
+ delete(data: {
411
+ entries?: Array<{
412
+ uid: string;
413
+ content_type: string;
414
+ locale: string;
415
+ }>;
416
+ assets?: Array<{
417
+ uid: string;
418
+ }>;
419
+ }): Promise<void>;
420
+ updateWorkflow(data: BulkWorkflowAction): Promise<void>;
421
+ addItems(data: Record<string, unknown>): Promise<void>;
422
+ updateItems(data: Record<string, unknown>): Promise<void>;
423
+ jobStatus(jobId: string): Promise<unknown>;
424
+ getJobItems(jobId: string, opts?: {
425
+ limit?: number;
426
+ skip?: number;
427
+ }): Promise<unknown[]>;
428
+ }
429
+
430
+ declare class ContentTypesClient extends CrudClient<ContentType> {
431
+ constructor(http: ContentstackHttpClient);
432
+ list(opts?: {
433
+ limit?: number;
434
+ include_count?: boolean;
435
+ }): AsyncIterable<ContentType>;
436
+ listAll(opts?: {
437
+ limit?: number;
438
+ include_count?: boolean;
439
+ }): Promise<ContentType[]>;
440
+ export(uid: string): Promise<ContentType>;
441
+ import(data: Record<string, unknown>): Promise<ContentType>;
442
+ }
443
+
444
+ interface EntryListOptions {
445
+ locale?: string;
446
+ include_publish_details?: boolean;
447
+ include_workflow?: boolean;
448
+ include_count?: boolean;
449
+ query?: Record<string, unknown>;
450
+ asc?: string;
451
+ desc?: string;
452
+ limit?: number;
453
+ }
454
+ interface EntryGetOptions {
455
+ locale?: string;
456
+ include_publish_details?: boolean;
457
+ include_workflow?: boolean;
458
+ version?: number;
459
+ }
460
+ type PublishAction = BasePublishAction;
461
+ interface WorkflowStageAction {
462
+ workflow_stage: {
463
+ uid: string;
464
+ comment?: string;
465
+ due_date?: string;
466
+ assigned_to?: Array<{
467
+ uid: string;
468
+ name: string;
469
+ email: string;
470
+ }>;
471
+ notify?: boolean;
472
+ };
473
+ }
474
+ declare class EntriesClient {
475
+ private readonly http;
476
+ constructor(http: ContentstackHttpClient);
477
+ private basePath;
478
+ list(ctUid: string, opts?: EntryListOptions): AsyncIterable<Entry>;
479
+ listAll(ctUid: string, opts?: EntryListOptions): Promise<Entry[]>;
480
+ get(ctUid: string, entryUid: string, opts?: EntryGetOptions): Promise<Entry>;
481
+ create(ctUid: string, data: Partial<Entry>): Promise<Entry>;
482
+ update(ctUid: string, entryUid: string, data: Partial<Entry>): Promise<Entry>;
483
+ delete(ctUid: string, entryUid: string, opts?: {
484
+ locale?: string;
485
+ }): Promise<void>;
486
+ publish(ctUid: string, entryUid: string, data: PublishAction): Promise<void>;
487
+ unpublish(ctUid: string, entryUid: string, data: PublishAction): Promise<void>;
488
+ localize(ctUid: string, entryUid: string, data: Record<string, unknown>): Promise<Entry>;
489
+ setWorkflowStage(ctUid: string, entryUid: string, data: WorkflowStageAction): Promise<void>;
490
+ references(ctUid: string, entryUid: string): Promise<unknown[]>;
491
+ languages(ctUid: string, entryUid: string): Promise<unknown[]>;
492
+ versions(ctUid: string, entryUid: string): Promise<unknown[]>;
493
+ import(ctUid: string, data: Record<string, unknown>, opts?: {
494
+ locale?: string;
495
+ overwrite?: boolean;
496
+ }): Promise<Entry>;
497
+ }
498
+
499
+ declare class EnvironmentsClient extends CrudClient<Environment> {
500
+ constructor(http: ContentstackHttpClient);
501
+ }
502
+
503
+ declare class ExtensionsClient extends CrudClient<Extension> {
504
+ constructor(http: ContentstackHttpClient);
505
+ upload(form: FormData): Promise<Extension>;
506
+ }
507
+
508
+ declare class GlobalFieldsClient extends CrudClient<GlobalField> {
509
+ constructor(http: ContentstackHttpClient);
510
+ export(uid: string): Promise<GlobalField>;
511
+ import(data: Record<string, unknown>): Promise<GlobalField>;
512
+ }
513
+
514
+ declare class LabelsClient extends CrudClient<Label> {
515
+ constructor(http: ContentstackHttpClient);
516
+ }
517
+
518
+ declare class LocalesClient extends CrudClient<Locale> {
519
+ constructor(http: ContentstackHttpClient);
520
+ }
521
+
522
+ declare class PublishRulesClient extends CrudClient<PublishRule> {
523
+ constructor(http: ContentstackHttpClient);
524
+ }
525
+
526
+ interface DeployAction extends BasePublishAction {
527
+ action?: "publish" | "unpublish";
528
+ }
529
+ declare class ReleasesClient {
530
+ private readonly http;
531
+ constructor(http: ContentstackHttpClient);
532
+ list(opts?: {
533
+ limit?: number;
534
+ include_count?: boolean;
535
+ }): AsyncIterable<Release>;
536
+ listAll(opts?: {
537
+ limit?: number;
538
+ }): Promise<Release[]>;
539
+ get(uid: string): Promise<Release>;
540
+ create(data: Partial<Release>): Promise<Release>;
541
+ update(uid: string, data: Partial<Release>): Promise<Release>;
542
+ delete(uid: string): Promise<void>;
543
+ deploy(uid: string, data: DeployAction): Promise<void>;
544
+ listItems(uid: string): Promise<ReleaseItem[]>;
545
+ addItem(uid: string, item: Partial<ReleaseItem>): Promise<void>;
546
+ removeItem(uid: string, item: {
547
+ uid: string;
548
+ content_type_uid: string;
549
+ locale: string;
550
+ version: number;
551
+ action: string;
552
+ }): Promise<void>;
553
+ clone(uid: string, data: {
554
+ name: string;
555
+ description?: string;
556
+ }): Promise<Release>;
557
+ }
558
+
559
+ declare class RolesClient extends CrudClient<Role> {
560
+ constructor(http: ContentstackHttpClient);
561
+ }
562
+
563
+ declare class TaxonomiesClient {
564
+ private readonly http;
565
+ constructor(http: ContentstackHttpClient);
566
+ list(opts?: {
567
+ limit?: number;
568
+ }): AsyncIterable<Taxonomy>;
569
+ listAll(opts?: {
570
+ limit?: number;
571
+ }): Promise<Taxonomy[]>;
572
+ get(uid: string): Promise<Taxonomy>;
573
+ create(data: Partial<Taxonomy>): Promise<Taxonomy>;
574
+ update(uid: string, data: Partial<Taxonomy>): Promise<Taxonomy>;
575
+ delete(uid: string): Promise<void>;
576
+ listTerms(taxonomyUid: string, opts?: {
577
+ limit?: number;
578
+ }): AsyncIterable<TaxonomyTerm>;
579
+ listAllTerms(taxonomyUid: string, opts?: {
580
+ limit?: number;
581
+ }): Promise<TaxonomyTerm[]>;
582
+ getTerm(taxonomyUid: string, termUid: string): Promise<TaxonomyTerm>;
583
+ createTerm(taxonomyUid: string, data: Partial<TaxonomyTerm>): Promise<TaxonomyTerm>;
584
+ updateTerm(taxonomyUid: string, termUid: string, data: Partial<TaxonomyTerm>): Promise<TaxonomyTerm>;
585
+ deleteTerm(taxonomyUid: string, termUid: string): Promise<void>;
586
+ ancestors(taxonomyUid: string, termUid: string): Promise<TaxonomyTerm[]>;
587
+ descendants(taxonomyUid: string, termUid: string): Promise<TaxonomyTerm[]>;
588
+ moveTerm(taxonomyUid: string, termUid: string, data: {
589
+ parent_uid?: string;
590
+ order: number;
591
+ }): Promise<TaxonomyTerm>;
592
+ export(uid: string): Promise<Taxonomy>;
593
+ import(data: Record<string, unknown>): Promise<Taxonomy>;
594
+ }
595
+
596
+ declare class TokensClient {
597
+ private management;
598
+ private delivery;
599
+ private preview;
600
+ constructor(http: ContentstackHttpClient);
601
+ listManagementTokens(): Promise<ManagementToken[]>;
602
+ getManagementToken(uid: string): Promise<ManagementToken>;
603
+ createManagementToken(data: Partial<ManagementToken>): Promise<ManagementToken>;
604
+ updateManagementToken(uid: string, data: Partial<ManagementToken>): Promise<ManagementToken>;
605
+ deleteManagementToken(uid: string): Promise<void>;
606
+ listDeliveryTokens(): Promise<DeliveryToken[]>;
607
+ getDeliveryToken(uid: string): Promise<DeliveryToken>;
608
+ createDeliveryToken(data: Partial<DeliveryToken>): Promise<DeliveryToken>;
609
+ updateDeliveryToken(uid: string, data: Partial<DeliveryToken>): Promise<DeliveryToken>;
610
+ deleteDeliveryToken(uid: string): Promise<void>;
611
+ listPreviewTokens(): Promise<PreviewToken[]>;
612
+ getPreviewToken(uid: string): Promise<PreviewToken>;
613
+ createPreviewToken(data: Partial<PreviewToken>): Promise<PreviewToken>;
614
+ updatePreviewToken(uid: string, data: Partial<PreviewToken>): Promise<PreviewToken>;
615
+ deletePreviewToken(uid: string): Promise<void>;
616
+ }
617
+
618
+ declare class WebhooksClient extends CrudClient<Webhook> {
619
+ constructor(http: ContentstackHttpClient);
620
+ logs(uid: string): Promise<unknown[]>;
621
+ retry(uid: string, executionUid: string): Promise<void>;
622
+ }
623
+
624
+ declare class WorkflowsClient extends CrudClient<Workflow> {
625
+ constructor(http: ContentstackHttpClient);
626
+ }
627
+
628
+ interface CMAClientConfig {
629
+ region: ContentstackRegion;
630
+ apiKey: string;
631
+ auth: {
632
+ type: "management-token";
633
+ token: string;
634
+ } | {
635
+ type: "oauth";
636
+ accessToken: string;
637
+ } | {
638
+ type: "authtoken";
639
+ token: string;
640
+ };
641
+ branch?: string;
642
+ httpOptions?: Partial<HttpClientConfig>;
643
+ }
644
+ interface CMAClient {
645
+ entries: EntriesClient;
646
+ contentTypes: ContentTypesClient;
647
+ assets: AssetsClient;
648
+ environments: EnvironmentsClient;
649
+ locales: LocalesClient;
650
+ globalFields: GlobalFieldsClient;
651
+ webhooks: WebhooksClient;
652
+ workflows: WorkflowsClient;
653
+ releases: ReleasesClient;
654
+ branches: BranchesClient;
655
+ branchAliases: BranchAliasesClient;
656
+ taxonomies: TaxonomiesClient;
657
+ bulk: BulkOperationsClient;
658
+ tokens: TokensClient;
659
+ labels: LabelsClient;
660
+ roles: RolesClient;
661
+ auditLog: AuditLogClient;
662
+ extensions: ExtensionsClient;
663
+ publishRules: PublishRulesClient;
664
+ onBranch(branchUid: string): CMAClient;
665
+ }
666
+ declare function createCMAClient(config: CMAClientConfig): CMAClient;
667
+
668
+ /**
669
+ * Framework-agnostic request builders for CMA operations.
670
+ *
671
+ * These pure functions build paths, query parameters, and request bodies
672
+ * for Contentstack CMA endpoints. Both React hooks and Vue composables
673
+ * use them to avoid duplicating request construction logic.
674
+ */
675
+ interface EntryQueryParams {
676
+ locale?: string;
677
+ version?: number;
678
+ includePublishDetails?: boolean;
679
+ }
680
+ interface EntriesQueryParams {
681
+ locale?: string;
682
+ limit?: number;
683
+ skip?: number;
684
+ includePublishDetails?: boolean;
685
+ query?: Record<string, unknown>;
686
+ }
687
+ interface AssetsQueryParams {
688
+ folder?: string;
689
+ limit?: number;
690
+ skip?: number;
691
+ }
692
+ interface CreateEntryVariables {
693
+ contentTypeUid: string;
694
+ entry: Record<string, unknown>;
695
+ locale?: string;
696
+ }
697
+ interface UpdateEntryVariables {
698
+ contentTypeUid: string;
699
+ entryUid: string;
700
+ entry: Record<string, unknown>;
701
+ locale?: string;
702
+ }
703
+ interface DeleteEntryVariables {
704
+ contentTypeUid: string;
705
+ entryUid: string;
706
+ locale?: string;
707
+ deleteAllLocalized?: boolean;
708
+ }
709
+ interface PublishEntryVariables {
710
+ contentTypeUid: string;
711
+ entryUid: string;
712
+ environments: string[];
713
+ locales: string[];
714
+ scheduledAt?: string;
715
+ }
716
+ declare function buildEntryParams(options?: EntryQueryParams): Record<string, string> | undefined;
717
+ declare function buildEntriesParams(options?: EntriesQueryParams): Record<string, string> | undefined;
718
+ declare function buildAssetsParams(options?: AssetsQueryParams): Record<string, string> | undefined;
719
+ declare function buildCreateEntryRequest(vars: CreateEntryVariables): {
720
+ path: string;
721
+ body: unknown;
722
+ };
723
+ declare function buildUpdateEntryRequest(vars: UpdateEntryVariables): {
724
+ path: string;
725
+ body: unknown;
726
+ };
727
+ declare function buildDeleteEntryRequest(vars: DeleteEntryVariables): {
728
+ path: string;
729
+ };
730
+ declare function buildPublishEntryRequest(vars: PublishEntryVariables): {
731
+ path: string;
732
+ body: unknown;
733
+ };
734
+
735
+ export { type Release as $, type Asset as A, type BasePublishAction as B, type CreateEntryVariables as C, type DeleteEntryVariables as D, EntriesClient as E, type EntryQueryParams as F, type Environment as G, EnvironmentsClient as H, type Extension as I, ExtensionsClient as J, type FieldSchema as K, type GlobalField as L, GlobalFieldsClient as M, type Label as N, LabelsClient as O, type PublishEntryVariables as P, type Locale as Q, LocalesClient as R, type ManagementToken as S, type MergeJob as T, type UpdateEntryVariables as U, type MergeRequest as V, type PreviewToken as W, type PublishAction as X, type PublishDetails as Y, type PublishRule as Z, PublishRulesClient as _, type AssetFolder as a, type ReleaseItem as a0, ReleasesClient as a1, type Role as a2, RolesClient as a3, TaxonomiesClient as a4, type Taxonomy as a5, type TaxonomyTerm as a6, TokensClient as a7, type Webhook as a8, WebhooksClient as a9, type Workflow as aa, type WorkflowStage as ab, type WorkflowStageAction as ac, WorkflowsClient as ad, buildAssetsParams as ae, buildCreateEntryRequest as af, buildDeleteEntryRequest as ag, buildEntriesParams as ah, buildEntryParams as ai, buildPublishEntryRequest as aj, buildUpdateEntryRequest as ak, createCMAClient as al, type AssetPublishAction as b, AssetsClient as c, type AssetsQueryParams as d, AuditLogClient as e, type AuditLogEntry as f, type Branch as g, type BranchAlias as h, BranchAliasesClient as i, BranchesClient as j, type BulkEntry as k, BulkOperationsClient as l, type BulkPublishAction as m, type BulkWorkflowAction as n, type CMAClient as o, type CMAClientConfig as p, type ContentType as q, ContentTypesClient as r, CrudClient as s, type CrudConfig as t, type DeliveryToken as u, type DeployAction as v, type EntriesQueryParams as w, type Entry as x, type EntryGetOptions as y, type EntryListOptions as z };