@stackbit/cms-core 0.8.17-develop.1 → 0.8.18-develop.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.
@@ -1,89 +1,406 @@
1
- import { DocumentBooleanFieldLocalized, DocumentBooleanFieldNonLocalized, DocumentCrossReferenceFieldLocalized, DocumentCrossReferenceFieldNonLocalized, DocumentField, DocumentFieldLocalized, DocumentFileFieldLocalized, DocumentFileFieldNonLocalized, DocumentImageFieldLocalized, DocumentImageFieldNonLocalized, DocumentJsonFieldLocalized, DocumentJsonFieldNonLocalized, DocumentListFieldLocalized, DocumentListFieldNonLocalized, DocumentMarkdownFieldLocalized, DocumentMarkdownFieldNonLocalized, DocumentModelFieldLocalized, DocumentModelFieldNonLocalized, DocumentNumberFieldLocalized, DocumentNumberFieldNonLocalized, DocumentObjectFieldLocalized, DocumentObjectFieldNonLocalized, DocumentReferenceFieldLocalized, DocumentReferenceFieldNonLocalized, DocumentRichTextFieldLocalized, DocumentRichTextFieldNonLocalized, DocumentStringLikeFieldLocalized, DocumentStringLikeFieldNonLocalized, DocumentStyleFieldLocalized, DocumentStyleFieldNonLocalized, ExtractByType } from './content-store-document-fields';
1
+ import { DocumentRichTextFieldValue, DocumentStringLikeFieldTypes, DocumentStyleFieldValue, ExtractByType } from './content-store-document-fields';
2
2
  import { APICustomActionDocument, APICustomActionField, APICustomActionObject } from './custom-actions';
3
3
  import { Document } from './content-store-documents';
4
4
  import { FieldType } from '@stackbit/types';
5
- export interface APIV2DocumentObject extends Omit<Document, 'getPreview' | 'getDocumentActions' | 'fields'> {
5
+ export interface APIDocument extends Omit<Document, 'getPreview' | 'getDocumentActions' | 'fields'> {
6
6
  srcObjectLabel: string;
7
7
  actions?: APICustomActionDocument[];
8
- fields: Record<string, APIV2DocumentField>;
8
+ fields: Record<string, DocumentFieldAPIV2>;
9
9
  }
10
- declare type Overwrite<T, U, O> = Pick<T, Exclude<keyof T, keyof U | O>> & U;
11
- declare type ValueOf<T> = T[keyof T];
12
- export declare type APIV2DocumentFieldTransformerNonLocalized<Type extends DocumentField> = Overwrite<Type, {
10
+ /**
11
+ * string-like fields (e.g., string, url, slug, text, html, enum, date, datetime, color)
12
+ * The 'markdown' is not included, although it is a string field, because it has
13
+ * the `multiElement` and `isUnset` fields.
14
+ * The 'file' also has `isUnset` field and should have its own type anyway.
15
+ */
16
+ export declare type DocumentStringLikeFieldAPIV2 = DocumentStringLikeFieldForTypeAPIV2<DocumentStringLikeFieldTypes>;
17
+ export declare type DocumentStringLikeFieldNonLocalizedAPIV2 = APIV2DistributeDocumentStringLikeFieldNonLocalized<DocumentStringLikeFieldTypes>;
18
+ export declare type DocumentStringLikeFieldLocalizedAPIV2 = APIV2DistributeDocumentStringFieldLocalized<DocumentStringLikeFieldTypes>;
19
+ export declare type DocumentStringLikeFieldForTypeAPIV2<Type> = Type extends DocumentStringLikeFieldTypes ? DocumentStringLikeFieldNonLocalizedForTypeAPIV2<Type> | DocumentStringLikeFieldLocalizedForTypeAPIV2<Type> : never;
20
+ export declare type APIV2DistributeDocumentStringLikeFieldNonLocalized<Type> = Type extends DocumentStringLikeFieldTypes ? DocumentStringLikeFieldNonLocalizedForTypeAPIV2<Type> : never;
21
+ export declare type APIV2DistributeDocumentStringFieldLocalized<Type> = Type extends DocumentStringLikeFieldTypes ? DocumentStringLikeFieldLocalizedForTypeAPIV2<Type> : never;
22
+ export interface DocumentStringLikeFieldNonLocalizedForTypeAPIV2<Type extends DocumentStringLikeFieldTypes> {
23
+ type: Type;
24
+ label?: string;
25
+ localized?: false;
13
26
  actions?: APICustomActionField[];
14
- }, 'getFieldActions' | 'getPreview'>;
15
- export declare type APIV2DocumentFieldTransformerLocalized<Type extends DocumentFieldLocalized> = Overwrite<Type, {
16
- locales: Record<string, Overwrite<ValueOf<Type['locales']>, {
27
+ value?: string;
28
+ }
29
+ export interface DocumentStringLikeFieldLocalizedForTypeAPIV2<Type extends DocumentStringLikeFieldTypes> {
30
+ type: Type;
31
+ label?: string;
32
+ localized: true;
33
+ locales: Record<string, {
17
34
  actions?: APICustomActionField[];
18
- }, ''>>;
19
- }, 'getFieldActions' | 'getPreview'>;
20
- export declare type APIV2DocumentFieldTransformerReferenceNonLocalized<Type extends DocumentReferenceFieldNonLocalized | DocumentCrossReferenceFieldNonLocalized> = Overwrite<Type, {
35
+ locale: string;
36
+ value: string;
37
+ }>;
38
+ }
39
+ /**
40
+ * markdown
41
+ */
42
+ export declare type DocumentMarkdownFieldAPIV2 = DocumentMarkdownFieldNonLocalizedAPIV2 | DocumentMarkdownFieldLocalizedAPIV2;
43
+ export declare type DocumentMarkdownFieldNonLocalizedAPIV2 = {
44
+ type: 'markdown';
45
+ label?: string;
46
+ localized?: false;
21
47
  actions?: APICustomActionField[];
22
- srcModelLabel?: string;
23
- srcObjectLabel?: string;
24
- isMissing?: boolean;
25
- }, 'getFieldActions' | 'getPreview'>;
26
- export declare type APIV2DocumentFieldTransformerReferenceLocalized<Type extends DocumentReferenceFieldLocalized | DocumentCrossReferenceFieldLocalized> = Overwrite<Type, {
27
- locales: Record<string, Overwrite<ValueOf<Type['locales']>, {
48
+ multiElement?: boolean;
49
+ value?: string;
50
+ } & ({
51
+ isUnset: true;
52
+ value?: never;
53
+ } | {
54
+ isUnset?: false;
55
+ value: string;
56
+ });
57
+ export interface DocumentMarkdownFieldLocalizedAPIV2 {
58
+ type: 'markdown';
59
+ label?: string;
60
+ localized: true;
61
+ locales: Record<string, {
62
+ locale: string;
63
+ multiElement?: boolean;
64
+ value: string;
28
65
  actions?: APICustomActionField[];
29
- isMissing?: boolean;
30
- srcModelLabel?: string;
31
- srcObjectLabel?: string;
32
- }, ''>>;
33
- }, 'getFieldActions' | 'getPreview'>;
34
- export declare type APIV2DocumentObjectFieldNonLocalized = Overwrite<DocumentObjectFieldNonLocalized, {
66
+ }>;
67
+ }
68
+ /**
69
+ * number
70
+ */
71
+ export declare type DocumentNumberFieldAPIV2 = DocumentNumberFieldNonLocalizedAPIV2 | DocumentNumberFieldLocalizedAPIV2;
72
+ export interface DocumentNumberFieldNonLocalizedAPIV2 {
73
+ type: 'number';
74
+ label?: string;
75
+ localized?: false;
76
+ actions?: APICustomActionField[];
77
+ value?: number;
78
+ }
79
+ export interface DocumentNumberFieldLocalizedAPIV2 {
80
+ type: 'number';
81
+ label?: string;
82
+ localized: true;
83
+ locales: Record<string, {
84
+ locale: string;
85
+ value: number;
86
+ actions?: APICustomActionField[];
87
+ }>;
88
+ }
89
+ /**
90
+ * boolean
91
+ */
92
+ export declare type DocumentBooleanFieldAPIV2 = DocumentBooleanFieldNonLocalizedAPIV2 | DocumentBooleanFieldLocalizedAPIV2;
93
+ export interface DocumentBooleanFieldNonLocalizedAPIV2 {
94
+ type: 'boolean';
95
+ label?: string;
96
+ localized?: false;
97
+ actions?: APICustomActionField[];
98
+ value?: boolean;
99
+ }
100
+ export interface DocumentBooleanFieldLocalizedAPIV2 {
101
+ type: 'boolean';
102
+ label?: string;
103
+ localized: true;
104
+ locales: Record<string, {
105
+ actions?: APICustomActionField[];
106
+ locale: string;
107
+ value: boolean;
108
+ }>;
109
+ }
110
+ /**
111
+ * json
112
+ */
113
+ export declare type DocumentJsonFieldAPIV2 = DocumentJsonFieldNonLocalizedAPIV2 | DocumentJsonFieldLocalizedAPIV2;
114
+ export declare type DocumentJsonFieldNonLocalizedAPIV2 = {
115
+ type: 'json';
116
+ label?: string;
117
+ localized?: false;
118
+ actions?: APICustomActionField[];
119
+ value?: any;
120
+ } & ({
121
+ isUnset: true;
122
+ value?: never;
123
+ } | {
124
+ isUnset?: false;
125
+ value: any;
126
+ });
127
+ export interface DocumentJsonFieldLocalizedAPIV2 {
128
+ type: 'json';
129
+ label?: string;
130
+ localized: true;
131
+ locales: Record<string, {
132
+ actions?: APICustomActionField[];
133
+ locale: string;
134
+ value: any;
135
+ }>;
136
+ }
137
+ /**
138
+ * style
139
+ */
140
+ export declare type DocumentStyleFieldAPIV2 = DocumentStyleFieldNonLocalizedAPIV2 | DocumentStyleFieldLocalizedAPIV2;
141
+ export interface DocumentStyleFieldNonLocalizedAPIV2 {
142
+ type: 'style';
143
+ label?: string;
144
+ localized?: false;
145
+ actions?: APICustomActionField[];
146
+ value?: DocumentStyleFieldValue;
147
+ }
148
+ export interface DocumentStyleFieldLocalizedAPIV2 {
149
+ type: 'style';
150
+ label?: string;
151
+ localized: true;
152
+ locales: Record<string, {
153
+ actions?: APICustomActionField[];
154
+ locale: string;
155
+ value: DocumentStyleFieldValue;
156
+ }>;
157
+ }
158
+ /**
159
+ * richText
160
+ */
161
+ export declare type DocumentRichTextFieldAPIV2 = DocumentRichTextFieldNonLocalizedAPIV2 | DocumentRichTextFieldLocalizedAPIV2;
162
+ export declare type DocumentRichTextFieldNonLocalizedAPIV2 = {
163
+ type: 'richText';
164
+ label?: string;
165
+ localized?: false;
166
+ actions?: APICustomActionField[];
167
+ hint?: string;
168
+ multiElement?: boolean;
169
+ value?: DocumentRichTextFieldValue;
170
+ } & ({
171
+ isUnset: true;
172
+ value?: never;
173
+ } | {
174
+ isUnset?: false;
175
+ value: DocumentRichTextFieldValue;
176
+ });
177
+ export interface DocumentRichTextFieldLocalizedAPIV2 {
178
+ type: 'richText';
179
+ label?: string;
180
+ localized: true;
181
+ locales: Record<string, {
182
+ actions?: APICustomActionField[];
183
+ locale: string;
184
+ hint?: string;
185
+ multiElement?: boolean;
186
+ value: DocumentRichTextFieldValue;
187
+ }>;
188
+ }
189
+ /**
190
+ * file
191
+ */
192
+ export declare type DocumentFileFieldAPIV2 = DocumentFileFieldNonLocalizedAPIV2 | DocumentFileFieldLocalizedAPIV2;
193
+ export declare type DocumentFileFieldNonLocalizedAPIV2 = {
194
+ type: 'file';
195
+ label?: string;
196
+ localized?: false;
197
+ actions?: APICustomActionField[];
198
+ value?: any;
199
+ } & ({
200
+ isUnset: true;
201
+ value?: never;
202
+ } | {
203
+ isUnset?: false;
204
+ value: any;
205
+ });
206
+ export interface DocumentFileFieldLocalizedAPIV2 {
207
+ type: 'file';
208
+ label?: string;
209
+ localized: true;
210
+ locales: Record<string, {
211
+ actions?: APICustomActionField[];
212
+ locale: string;
213
+ value: any;
214
+ }>;
215
+ }
216
+ /**
217
+ * object
218
+ */
219
+ export declare type DocumentObjectFieldAPIV2 = DocumentObjectFieldNonLocalizedAPIV2 | DocumentObjectFieldLocalizedAPIV2;
220
+ export declare type DocumentObjectFieldNonLocalizedAPIV2 = {
221
+ type: 'object';
222
+ label?: string;
223
+ localized?: false;
35
224
  actions?: (APICustomActionField | APICustomActionObject)[];
36
225
  } & ({
37
226
  isUnset: true;
38
227
  } | {
39
228
  isUnset?: false;
40
229
  srcObjectLabel: string;
41
- fields: Record<string, APIV2DocumentField>;
42
- }), 'getFieldActions' | 'getPreview'>;
43
- export declare type APIV2DocumentModelFieldNonLocalized = Overwrite<DocumentModelFieldNonLocalized, {
230
+ fields: Record<string, DocumentFieldAPIV2>;
231
+ });
232
+ export interface DocumentObjectFieldLocalizedAPIV2 {
233
+ type: 'object';
234
+ label?: string;
235
+ localized: true;
236
+ locales: Record<string, {
237
+ locale: string;
238
+ actions?: (APICustomActionField | APICustomActionObject)[];
239
+ srcObjectLabel: string;
240
+ fields: Record<string, DocumentFieldAPIV2>;
241
+ }>;
242
+ }
243
+ /**
244
+ * model
245
+ */
246
+ export declare type DocumentModelFieldAPIV2 = DocumentModelFieldNonLocalizedAPIV2 | DocumentModelFieldLocalizedAPIV2;
247
+ export declare type DocumentModelFieldNonLocalizedAPIV2 = {
248
+ type: 'model';
249
+ label?: string;
250
+ localized?: false;
44
251
  actions?: (APICustomActionField | APICustomActionObject)[];
45
252
  } & ({
46
253
  isUnset: true;
47
254
  } | {
48
255
  isUnset?: false;
49
- srcObjectLabel: string;
50
- srcModelLabel: string;
51
256
  srcModelName: string;
52
- fields: Record<string, APIV2DocumentField>;
53
- }), 'getFieldActions' | 'getPreview'>;
54
- export declare type APIV2DocumentFieldTransformerObjectLocalized<Type extends DocumentObjectFieldLocalized> = Overwrite<Type, {
55
- locales: Record<string, Overwrite<ValueOf<Type['locales']>, {
56
- actions?: (APICustomActionField | APICustomActionObject)[];
57
- fields: Record<string, APIV2DocumentField>;
257
+ srcModelLabel: string;
258
+ srcObjectLabel: string;
259
+ fields: Record<string, DocumentFieldAPIV2>;
260
+ });
261
+ export interface DocumentModelFieldLocalizedAPIV2 {
262
+ type: 'model';
263
+ label?: string;
264
+ localized: true;
265
+ locales: Record<string, {
266
+ locale: string;
267
+ srcModelName: string;
268
+ srcModelLabel: string;
58
269
  srcObjectLabel: string;
59
- }, 'getObjectActions' | 'getPreview'>>;
60
- }, 'getFieldActions' | 'getPreview' | 'locales'>;
61
- export declare type APIV2DocumentFieldTransformerModelLocalized<Type extends DocumentModelFieldLocalized> = Overwrite<Type, {
62
- locales: Record<string, Overwrite<ValueOf<Type['locales']>, {
63
270
  actions?: (APICustomActionField | APICustomActionObject)[];
64
- fields: Record<string, APIV2DocumentField>;
65
- srcObjectLabel: string;
66
- srcModelLabel: string;
67
- srcModelName: string;
68
- }, 'getObjectActions' | 'getPreview'>>;
69
- }, 'getFieldActions' | 'getPreview' | 'locales'>;
70
- export declare type APIV2DocumentListFieldItems = Exclude<APIV2DocumentFieldNonLocalized, APIV2DocumentFieldListNonLocalized>;
71
- export declare type APIV2DocumentFieldListNonLocalized = Overwrite<DocumentListFieldNonLocalized, {
271
+ fields: Record<string, DocumentFieldAPIV2>;
272
+ }>;
273
+ }
274
+ /**
275
+ * list
276
+ */
277
+ export declare type DocumentListFieldAPIV2 = DocumentListFieldNonLocalizedAPIV2 | DocumentListFieldLocalizedAPIV2;
278
+ export declare type DocumentListFieldItemsAPIV2 = Exclude<DocumentFieldNonLocalizedAPIV2, DocumentListFieldNonLocalizedAPIV2>;
279
+ export interface DocumentListFieldNonLocalizedAPIV2 {
280
+ type: 'list';
281
+ label?: string;
282
+ localized?: false;
72
283
  actions?: APICustomActionField[];
73
- items: APIV2DocumentListFieldItems[];
74
- }, 'getFieldActions' | 'getPreview' | 'items'>;
75
- export declare type APIV2DocumentFieldTransformerListLocalized<Type extends DocumentListFieldLocalized> = Overwrite<Type, {
76
- locales: Record<string, Overwrite<ValueOf<Type['locales']>, {
284
+ items: DocumentListFieldItemsAPIV2[];
285
+ }
286
+ export interface DocumentListFieldLocalizedAPIV2 {
287
+ type: 'list';
288
+ label?: string;
289
+ localized: true;
290
+ locales: Record<string, {
77
291
  actions?: APICustomActionField[];
78
- items: APIV2DocumentListFieldItems[];
79
- }, ''>>;
80
- }, 'getFieldActions' | 'getPreview'>;
81
- export declare type APIV2DocumentReferenceField = APIV2DocumentFieldTransformerReferenceNonLocalized<DocumentReferenceFieldNonLocalized> | APIV2DocumentFieldTransformerReferenceLocalized<DocumentReferenceFieldLocalized>;
82
- export declare type APIV2DocumentObjectLikeField = APIV2DocumentObjectFieldNonLocalized | APIV2DocumentFieldTransformerObjectLocalized<DocumentObjectFieldLocalized> | APIV2DocumentModelFieldNonLocalized | APIV2DocumentFieldTransformerModelLocalized<DocumentModelFieldLocalized>;
83
- export declare type APIV2DocumentField = APIV2DocumentFieldLocalized | APIV2DocumentFieldNonLocalized;
84
- export declare type APIV2DocumentFieldNonLocalized = APIV2DocumentFieldTransformerNonLocalized<DocumentStringLikeFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentMarkdownFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentNumberFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentBooleanFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentJsonFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentStyleFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentRichTextFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentImageFieldNonLocalized> | APIV2DocumentFieldTransformerNonLocalized<DocumentFileFieldNonLocalized> | APIV2DocumentObjectFieldNonLocalized | APIV2DocumentModelFieldNonLocalized | APIV2DocumentFieldTransformerReferenceNonLocalized<DocumentReferenceFieldNonLocalized> | APIV2DocumentFieldTransformerReferenceNonLocalized<DocumentCrossReferenceFieldNonLocalized> | APIV2DocumentFieldListNonLocalized;
85
- export declare type APIV2DocumentFieldLocalized = APIV2DocumentFieldTransformerLocalized<DocumentStringLikeFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentMarkdownFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentNumberFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentBooleanFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentJsonFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentStyleFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentRichTextFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentFileFieldLocalized> | APIV2DocumentFieldTransformerLocalized<DocumentImageFieldLocalized> | APIV2DocumentFieldTransformerObjectLocalized<DocumentObjectFieldLocalized> | APIV2DocumentFieldTransformerModelLocalized<DocumentModelFieldLocalized> | APIV2DocumentFieldTransformerReferenceLocalized<DocumentReferenceFieldLocalized> | APIV2DocumentFieldTransformerReferenceLocalized<DocumentCrossReferenceFieldLocalized> | APIV2DocumentFieldTransformerListLocalized<DocumentListFieldLocalized>;
86
- export declare type APIV2DocumentFieldNonLocalizedForType<Type extends FieldType> = ExtractByType<APIV2DocumentFieldNonLocalized, Type>;
87
- export declare type APIV2DocumentFieldForType<Type extends FieldType> = ExtractByType<APIV2DocumentField, Type>;
88
- export {};
292
+ locale: string;
293
+ items: DocumentListFieldItemsAPIV2[];
294
+ }>;
295
+ }
296
+ /**
297
+ * reference
298
+ */
299
+ export declare type DocumentReferenceFieldAPIV2 = DocumentReferenceFieldNonLocalizedAPIV2 | DocumentReferenceFieldLocalizedAPIV2;
300
+ export declare type DocumentReferenceFieldNonLocalizedAPIV2 = {
301
+ type: 'reference';
302
+ refType: 'document' | 'asset';
303
+ label?: string;
304
+ localized?: false;
305
+ actions?: APICustomActionField[];
306
+ } & ({
307
+ isUnset: true;
308
+ } | {
309
+ isUnset?: false;
310
+ refId: string;
311
+ srcModelLabel?: string;
312
+ srcObjectLabel?: string;
313
+ isMissing?: boolean;
314
+ });
315
+ export interface DocumentReferenceFieldLocalizedAPIV2 {
316
+ type: 'reference';
317
+ refType: 'document' | 'asset';
318
+ label?: string;
319
+ localized: true;
320
+ locales: Record<string, {
321
+ locale: string;
322
+ refId: string;
323
+ actions?: APICustomActionField[];
324
+ srcModelLabel?: string;
325
+ srcObjectLabel?: string;
326
+ isMissing?: boolean;
327
+ }>;
328
+ }
329
+ /**
330
+ * cross-reference
331
+ */
332
+ export declare type DocumentCrossReferenceFieldAPIV2 = DocumentCrossReferenceFieldLocalizedAPIV2 | DocumentCrossReferenceFieldNonLocalizedAPIV2;
333
+ export declare type DocumentCrossReferenceFieldNonLocalizedAPIV2 = {
334
+ type: 'cross-reference';
335
+ refType: 'document' | 'asset';
336
+ label?: string;
337
+ localized?: false;
338
+ actions?: APICustomActionField[];
339
+ } & ({
340
+ isUnset: true;
341
+ } | {
342
+ isUnset?: false;
343
+ refId: string;
344
+ refSrcType: string;
345
+ refProjectId: string;
346
+ refModelLabel?: string;
347
+ refModelName?: string;
348
+ refObjectLabel?: string;
349
+ isMissing?: boolean;
350
+ });
351
+ export interface DocumentCrossReferenceFieldLocalizedAPIV2 {
352
+ type: 'cross-reference';
353
+ refType: 'document' | 'asset';
354
+ label?: string;
355
+ localized: true;
356
+ locales: Record<string, {
357
+ locale: string;
358
+ refId: string;
359
+ actions?: APICustomActionField[];
360
+ refSrcType: string;
361
+ refProjectId: string;
362
+ refModelLabel?: string;
363
+ refModelName?: string;
364
+ refObjectLabel?: string;
365
+ isMissing?: boolean;
366
+ }>;
367
+ }
368
+ /**
369
+ * image
370
+ */
371
+ export declare type DocumentImageFieldAPIV2 = DocumentImageFieldNonLocalizedAPIV2 | DocumentImageFieldLocalizedAPIV2;
372
+ export declare type DocumentImageFieldNonLocalizedAPIV2 = {
373
+ type: 'image';
374
+ label?: string;
375
+ localized?: false;
376
+ source?: string;
377
+ actions?: APICustomActionField[];
378
+ } & ({
379
+ isUnset: true;
380
+ } | {
381
+ isUnset?: false;
382
+ sourceData?: any;
383
+ fields: ImageFieldsAPIV2;
384
+ });
385
+ export interface DocumentImageFieldLocalizedAPIV2 {
386
+ type: 'image';
387
+ label?: string;
388
+ source?: string;
389
+ localized: true;
390
+ locales: Record<string, {
391
+ locale: string;
392
+ sourceData?: any;
393
+ fields: ImageFieldsAPIV2;
394
+ actions?: APICustomActionField[];
395
+ }>;
396
+ }
397
+ export declare type ImageFieldsAPIV2 = {
398
+ title: DocumentStringLikeFieldForTypeAPIV2<'string'>;
399
+ url: DocumentStringLikeFieldForTypeAPIV2<'string'>;
400
+ };
401
+ export declare type DocumentFieldAPIV2 = DocumentStringLikeFieldAPIV2 | DocumentMarkdownFieldAPIV2 | DocumentNumberFieldAPIV2 | DocumentBooleanFieldAPIV2 | DocumentJsonFieldAPIV2 | DocumentStyleFieldAPIV2 | DocumentRichTextFieldAPIV2 | DocumentFileFieldAPIV2 | DocumentImageFieldAPIV2 | DocumentObjectFieldAPIV2 | DocumentModelFieldAPIV2 | DocumentReferenceFieldAPIV2 | DocumentCrossReferenceFieldAPIV2 | DocumentListFieldAPIV2;
402
+ export declare type DocumentFieldNonLocalizedAPIV2 = DocumentStringLikeFieldNonLocalizedAPIV2 | DocumentMarkdownFieldNonLocalizedAPIV2 | DocumentNumberFieldNonLocalizedAPIV2 | DocumentBooleanFieldNonLocalizedAPIV2 | DocumentJsonFieldNonLocalizedAPIV2 | DocumentStyleFieldNonLocalizedAPIV2 | DocumentRichTextFieldNonLocalizedAPIV2 | DocumentFileFieldNonLocalizedAPIV2 | DocumentImageFieldNonLocalizedAPIV2 | DocumentObjectFieldNonLocalizedAPIV2 | DocumentModelFieldNonLocalizedAPIV2 | DocumentReferenceFieldNonLocalizedAPIV2 | DocumentCrossReferenceFieldNonLocalizedAPIV2 | DocumentListFieldNonLocalizedAPIV2;
403
+ export declare type DocumentFieldLocalizedAPIV2 = DocumentStringLikeFieldLocalizedAPIV2 | DocumentMarkdownFieldLocalizedAPIV2 | DocumentNumberFieldLocalizedAPIV2 | DocumentBooleanFieldLocalizedAPIV2 | DocumentJsonFieldLocalizedAPIV2 | DocumentStyleFieldLocalizedAPIV2 | DocumentRichTextFieldLocalizedAPIV2 | DocumentFileFieldLocalizedAPIV2 | DocumentImageFieldLocalizedAPIV2 | DocumentObjectFieldLocalizedAPIV2 | DocumentModelFieldLocalizedAPIV2 | DocumentReferenceFieldLocalizedAPIV2 | DocumentCrossReferenceFieldLocalizedAPIV2 | DocumentListFieldLocalizedAPIV2;
404
+ export declare type DocumentFieldNonLocalizedForTypeAPIV2<Type extends FieldType> = ExtractByType<DocumentFieldNonLocalizedAPIV2, Type>;
405
+ export declare type DocumentFieldForTypeAPIV2<Type extends FieldType> = ExtractByType<DocumentFieldAPIV2, Type>;
89
406
  //# sourceMappingURL=content-store-api-document-fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-store-api-document-fields.d.ts","sourceRoot":"","sources":["../../src/types/content-store-api-document-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,6BAA6B,EAC7B,gCAAgC,EAChC,oCAAoC,EACpC,uCAAuC,EACvC,aAAa,EACb,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,iCAAiC,EACjC,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,kCAAkC,EAClC,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,mCAAmC,EACnC,2BAA2B,EAC3B,8BAA8B,EAC9B,aAAa,EAChB,MAAM,iCAAiC,CAAC;AACzC,OA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AA2B,GACjC,sCAAsC,CAAC,gCAAgC,CAAC,GACxE,sCAAsC,CAAC,8BAA8B,CAAC,GACtE,sCAAsC,CAAC,4BAA4B,CAAC,GACpE,sCAAsC,CAAC,6BAA6B,CAAC,GACrE,sCAAsC,CAAC,0BAA0B,CAAC,GAClE,sCAAsC,CAAC,2BAA2B,CAAC,GACnE,sCAAsC,CAAC,8BAA8B,CAAC,GACtE,sCAAsC,CAAC,0BAA0B,CAAC,GAClE,sCAAsC,CAAC,2BAA2B,CAAC,GACnE,4CAA4C,CAAC,4BAA4B,CAAC,GAC1E,2CAA2C,CAAC,2BAA2B,CAAC,GACxE,+CAA+C,CAAC,+BAA+B,CAAC,GAChF,+CAA+C,CAAC,oCAAoC,CAAC,GACrF,0CAA0C,CAAC,0BAA0B,CAAC,CAAC;AAE7E,oBAAY,qCAAqC,CAAC,IAAI,SAAS,SAAS,IAAI,aAAa,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;AAChI,oBAAY,yBAAyB,CAAC,IAAI,SAAS,SAAS,IAAI,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"content-store-api-document-fields.d.ts","sourceRoot":"","sources":["../../src/types/content-store-api-document-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACnJ,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,oBAAoB,GAAG,QAAQ,CAAC;IAC/F,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,uBAAuB,EAA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C,GAChC,oCAAoC,GACpC,yCAAyC,GACzC,+BAA+B,CAAC;AAEtC,oBAAY,qCAAqC,CAAC,IAAI,SAAS,SAAS,IAAI,aAAa,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;AAChI,oBAAY,yBAAyB,CAAC,IAAI,SAAS,SAAS,IAAI,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import * as CSITypes from '@stackbit/types';
2
2
  import * as ContentStoreTypes from '../types';
3
- export declare function mapDocumentsToApiV2Objects({ documents, locale, documentMap, assetMap, delegate }: {
3
+ export declare function mapDocumentsToApiV2Objects({ documents, allowedLocales, documentMap, assetMap, delegate }: {
4
4
  documents: ContentStoreTypes.Document[];
5
- locale?: string;
5
+ allowedLocales?: string[];
6
6
  documentMap: Record<string, ContentStoreTypes.Document>;
7
7
  assetMap: Record<string, ContentStoreTypes.Asset>;
8
8
  delegate: CSITypes.ConfigDelegate;
9
- }): ContentStoreTypes.APIV2DocumentObject[];
9
+ }): ContentStoreTypes.APIDocument[];
10
10
  //# sourceMappingURL=store-to-api-v2-docs-converter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-to-api-v2-docs-converter.d.ts","sourceRoot":"","sources":["../../src/utils/store-to-api-v2-docs-converter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAc9C,wBAAgB,0BAA0B,CAAC,EACvC,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACX,EAAE;IACC,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAClD,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC;CACrC,GAAG,iBAAiB,CAAC,mBAAmB,EAAE,CAU1C"}
1
+ {"version":3,"file":"store-to-api-v2-docs-converter.d.ts","sourceRoot":"","sources":["../../src/utils/store-to-api-v2-docs-converter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAE9C,wBAAgB,0BAA0B,CAAC,EACvC,SAAS,EACT,cAAc,EACd,WAAW,EACX,QAAQ,EACR,QAAQ,EACX,EAAE;IACC,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAClD,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC;CACrC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAUlC"}