@datocms/cma-client 5.1.2 → 5.1.3

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 (156) hide show
  1. package/dist/cjs/fieldTypes/boolean.js +7 -1
  2. package/dist/cjs/fieldTypes/boolean.js.map +1 -1
  3. package/dist/cjs/fieldTypes/color.js +7 -1
  4. package/dist/cjs/fieldTypes/color.js.map +1 -1
  5. package/dist/cjs/fieldTypes/date.js +7 -1
  6. package/dist/cjs/fieldTypes/date.js.map +1 -1
  7. package/dist/cjs/fieldTypes/date_time.js +7 -1
  8. package/dist/cjs/fieldTypes/date_time.js.map +1 -1
  9. package/dist/cjs/fieldTypes/file.js +7 -1
  10. package/dist/cjs/fieldTypes/file.js.map +1 -1
  11. package/dist/cjs/fieldTypes/float.js +7 -1
  12. package/dist/cjs/fieldTypes/float.js.map +1 -1
  13. package/dist/cjs/fieldTypes/gallery.js +7 -1
  14. package/dist/cjs/fieldTypes/gallery.js.map +1 -1
  15. package/dist/cjs/fieldTypes/integer.js +7 -1
  16. package/dist/cjs/fieldTypes/integer.js.map +1 -1
  17. package/dist/cjs/fieldTypes/json.js +7 -1
  18. package/dist/cjs/fieldTypes/json.js.map +1 -1
  19. package/dist/cjs/fieldTypes/lat_lon.js +7 -1
  20. package/dist/cjs/fieldTypes/lat_lon.js.map +1 -1
  21. package/dist/cjs/fieldTypes/link.js +7 -1
  22. package/dist/cjs/fieldTypes/link.js.map +1 -1
  23. package/dist/cjs/fieldTypes/links.js +7 -1
  24. package/dist/cjs/fieldTypes/links.js.map +1 -1
  25. package/dist/cjs/fieldTypes/rich_text.js +19 -1
  26. package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
  27. package/dist/cjs/fieldTypes/seo.js +7 -1
  28. package/dist/cjs/fieldTypes/seo.js.map +1 -1
  29. package/dist/cjs/fieldTypes/single_block.js +19 -1
  30. package/dist/cjs/fieldTypes/single_block.js.map +1 -1
  31. package/dist/cjs/fieldTypes/slug.js +8 -2
  32. package/dist/cjs/fieldTypes/slug.js.map +1 -1
  33. package/dist/cjs/fieldTypes/string.js +7 -1
  34. package/dist/cjs/fieldTypes/string.js.map +1 -1
  35. package/dist/cjs/fieldTypes/structured_text.js +19 -1
  36. package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
  37. package/dist/cjs/fieldTypes/text.js +7 -1
  38. package/dist/cjs/fieldTypes/text.js.map +1 -1
  39. package/dist/cjs/fieldTypes/video.js +7 -1
  40. package/dist/cjs/fieldTypes/video.js.map +1 -1
  41. package/dist/cjs/generated/Client.js +1 -1
  42. package/dist/cjs/index.js +1 -0
  43. package/dist/cjs/index.js.map +1 -1
  44. package/dist/esm/fieldTypes/boolean.d.ts +2 -0
  45. package/dist/esm/fieldTypes/boolean.js +5 -0
  46. package/dist/esm/fieldTypes/boolean.js.map +1 -1
  47. package/dist/esm/fieldTypes/color.d.ts +2 -0
  48. package/dist/esm/fieldTypes/color.js +5 -0
  49. package/dist/esm/fieldTypes/color.js.map +1 -1
  50. package/dist/esm/fieldTypes/date.d.ts +2 -0
  51. package/dist/esm/fieldTypes/date.js +5 -0
  52. package/dist/esm/fieldTypes/date.js.map +1 -1
  53. package/dist/esm/fieldTypes/date_time.d.ts +2 -0
  54. package/dist/esm/fieldTypes/date_time.js +5 -0
  55. package/dist/esm/fieldTypes/date_time.js.map +1 -1
  56. package/dist/esm/fieldTypes/file.d.ts +2 -0
  57. package/dist/esm/fieldTypes/file.js +5 -0
  58. package/dist/esm/fieldTypes/file.js.map +1 -1
  59. package/dist/esm/fieldTypes/float.d.ts +2 -0
  60. package/dist/esm/fieldTypes/float.js +5 -0
  61. package/dist/esm/fieldTypes/float.js.map +1 -1
  62. package/dist/esm/fieldTypes/gallery.d.ts +2 -0
  63. package/dist/esm/fieldTypes/gallery.js +5 -0
  64. package/dist/esm/fieldTypes/gallery.js.map +1 -1
  65. package/dist/esm/fieldTypes/integer.d.ts +2 -0
  66. package/dist/esm/fieldTypes/integer.js +5 -0
  67. package/dist/esm/fieldTypes/integer.js.map +1 -1
  68. package/dist/esm/fieldTypes/json.d.ts +2 -0
  69. package/dist/esm/fieldTypes/json.js +5 -0
  70. package/dist/esm/fieldTypes/json.js.map +1 -1
  71. package/dist/esm/fieldTypes/lat_lon.d.ts +2 -0
  72. package/dist/esm/fieldTypes/lat_lon.js +5 -0
  73. package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
  74. package/dist/esm/fieldTypes/link.d.ts +2 -0
  75. package/dist/esm/fieldTypes/link.js +5 -0
  76. package/dist/esm/fieldTypes/link.js.map +1 -1
  77. package/dist/esm/fieldTypes/links.d.ts +2 -0
  78. package/dist/esm/fieldTypes/links.js +5 -0
  79. package/dist/esm/fieldTypes/links.js.map +1 -1
  80. package/dist/esm/fieldTypes/rich_text.d.ts +7 -3
  81. package/dist/esm/fieldTypes/rich_text.js +15 -0
  82. package/dist/esm/fieldTypes/rich_text.js.map +1 -1
  83. package/dist/esm/fieldTypes/seo.d.ts +2 -0
  84. package/dist/esm/fieldTypes/seo.js +5 -0
  85. package/dist/esm/fieldTypes/seo.js.map +1 -1
  86. package/dist/esm/fieldTypes/single_block.d.ts +4 -0
  87. package/dist/esm/fieldTypes/single_block.js +15 -0
  88. package/dist/esm/fieldTypes/single_block.js.map +1 -1
  89. package/dist/esm/fieldTypes/slug.d.ts +2 -0
  90. package/dist/esm/fieldTypes/slug.js +6 -1
  91. package/dist/esm/fieldTypes/slug.js.map +1 -1
  92. package/dist/esm/fieldTypes/string.d.ts +2 -0
  93. package/dist/esm/fieldTypes/string.js +5 -0
  94. package/dist/esm/fieldTypes/string.js.map +1 -1
  95. package/dist/esm/fieldTypes/structured_text.d.ts +4 -0
  96. package/dist/esm/fieldTypes/structured_text.js +15 -0
  97. package/dist/esm/fieldTypes/structured_text.js.map +1 -1
  98. package/dist/esm/fieldTypes/text.d.ts +2 -0
  99. package/dist/esm/fieldTypes/text.js +5 -0
  100. package/dist/esm/fieldTypes/text.js.map +1 -1
  101. package/dist/esm/fieldTypes/video.d.ts +2 -0
  102. package/dist/esm/fieldTypes/video.js +5 -0
  103. package/dist/esm/fieldTypes/video.js.map +1 -1
  104. package/dist/esm/generated/Client.js +1 -1
  105. package/dist/esm/generated/resources/Field.d.ts +500 -500
  106. package/dist/esm/index.d.ts +1 -0
  107. package/dist/esm/index.js +1 -0
  108. package/dist/esm/index.js.map +1 -1
  109. package/dist/esm/utilities/fieldValue.d.ts +1 -1
  110. package/dist/types/fieldTypes/boolean.d.ts +2 -0
  111. package/dist/types/fieldTypes/color.d.ts +2 -0
  112. package/dist/types/fieldTypes/date.d.ts +2 -0
  113. package/dist/types/fieldTypes/date_time.d.ts +2 -0
  114. package/dist/types/fieldTypes/file.d.ts +2 -0
  115. package/dist/types/fieldTypes/float.d.ts +2 -0
  116. package/dist/types/fieldTypes/gallery.d.ts +2 -0
  117. package/dist/types/fieldTypes/integer.d.ts +2 -0
  118. package/dist/types/fieldTypes/json.d.ts +2 -0
  119. package/dist/types/fieldTypes/lat_lon.d.ts +2 -0
  120. package/dist/types/fieldTypes/link.d.ts +2 -0
  121. package/dist/types/fieldTypes/links.d.ts +2 -0
  122. package/dist/types/fieldTypes/rich_text.d.ts +7 -3
  123. package/dist/types/fieldTypes/seo.d.ts +2 -0
  124. package/dist/types/fieldTypes/single_block.d.ts +4 -0
  125. package/dist/types/fieldTypes/slug.d.ts +2 -0
  126. package/dist/types/fieldTypes/string.d.ts +2 -0
  127. package/dist/types/fieldTypes/structured_text.d.ts +4 -0
  128. package/dist/types/fieldTypes/text.d.ts +2 -0
  129. package/dist/types/fieldTypes/video.d.ts +2 -0
  130. package/dist/types/generated/resources/Field.d.ts +500 -500
  131. package/dist/types/index.d.ts +1 -0
  132. package/dist/types/utilities/fieldValue.d.ts +1 -1
  133. package/package.json +2 -2
  134. package/src/fieldTypes/boolean.ts +11 -0
  135. package/src/fieldTypes/color.ts +11 -0
  136. package/src/fieldTypes/date.ts +11 -0
  137. package/src/fieldTypes/date_time.ts +11 -0
  138. package/src/fieldTypes/file.ts +11 -0
  139. package/src/fieldTypes/float.ts +11 -0
  140. package/src/fieldTypes/gallery.ts +11 -0
  141. package/src/fieldTypes/integer.ts +11 -0
  142. package/src/fieldTypes/json.ts +11 -0
  143. package/src/fieldTypes/lat_lon.ts +11 -0
  144. package/src/fieldTypes/link.ts +11 -0
  145. package/src/fieldTypes/links.ts +11 -0
  146. package/src/fieldTypes/rich_text.ts +33 -3
  147. package/src/fieldTypes/seo.ts +11 -0
  148. package/src/fieldTypes/single_block.ts +31 -0
  149. package/src/fieldTypes/slug.ts +12 -1
  150. package/src/fieldTypes/string.ts +11 -0
  151. package/src/fieldTypes/structured_text.ts +31 -0
  152. package/src/fieldTypes/text.ts +11 -0
  153. package/src/fieldTypes/video.ts +11 -0
  154. package/src/generated/Client.ts +1 -1
  155. package/src/index.ts +1 -0
  156. package/src/utilities/fieldValue.ts +1 -1
@@ -10,6 +10,7 @@ export * from './utilities/fieldValue';
10
10
  export * from './utilities/id';
11
11
  export * from './utilities/recursiveBlocks';
12
12
  export * from './utilities/schemaRepository';
13
+ export * from './fieldTypes';
13
14
  export type { ApiTypes, RawApiTypes };
14
15
  export type { ApiTypes as SchemaTypes, RawApiTypes as SimpleSchemaTypes };
15
16
  import type * as ApiTypes from './generated/ApiTypes';
package/dist/esm/index.js CHANGED
@@ -9,4 +9,5 @@ export * from './utilities/fieldValue';
9
9
  export * from './utilities/id';
10
10
  export * from './utilities/recursiveBlocks';
11
11
  export * from './utilities/schemaRepository';
12
+ export * from './fieldTypes';
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC"}
@@ -7,7 +7,7 @@ import type * as RawApiTypes from '../generated/RawApiTypes';
7
7
  * for various locales structured as an object, such as
8
8
  * `{ "en": "Hello", "it": "Ciao" }`
9
9
  */
10
- export type LocalizedFieldValue = Record<string, unknown>;
10
+ export type LocalizedFieldValue<T = unknown> = Record<string, T>;
11
11
  /**
12
12
  * Determines whether a DatoCMS field is localized or not.
13
13
  *
@@ -1,7 +1,9 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { BooleanEditorConfiguration } from './appearance/boolean';
2
3
  import type { BooleanRadioGroupEditorConfiguration } from './appearance/boolean_radio_group';
3
4
  export type BooleanFieldValue = boolean | null;
4
5
  export declare function isBooleanFieldValue(value: unknown): value is BooleanFieldValue;
6
+ export declare function isLocalizedBooleanFieldValue(value: unknown): value is LocalizedFieldValue<BooleanFieldValue>;
5
7
  export type BooleanFieldValidators = Record<string, never>;
6
8
  export type BooleanFieldAppearance = {
7
9
  editor: 'boolean';
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { ColorPickerEditorConfiguration } from './appearance/color_picker';
2
3
  import type { RequiredValidator } from './validators/required';
3
4
  export type ColorFieldValue = {
@@ -7,6 +8,7 @@ export type ColorFieldValue = {
7
8
  alpha: number;
8
9
  } | null;
9
10
  export declare function isColorFieldValue(value: unknown): value is ColorFieldValue;
11
+ export declare function isLocalizedColorFieldValue(value: unknown): value is LocalizedFieldValue<ColorFieldValue>;
10
12
  export type ColorFieldValidators = {
11
13
  /** Value must be specified or it won't be valid */
12
14
  required?: RequiredValidator;
@@ -1,8 +1,10 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { DatePickerEditorConfiguration } from './appearance/date_picker';
2
3
  import type { DateRangeValidator } from './validators/date_range';
3
4
  import type { RequiredValidator } from './validators/required';
4
5
  export type DateFieldValue = string | null;
5
6
  export declare function isDateFieldValue(value: unknown): value is DateFieldValue;
7
+ export declare function isLocalizedDateFieldValue(value: unknown): value is LocalizedFieldValue<DateFieldValue>;
6
8
  export type DateFieldValidators = {
7
9
  /** Value must be specified or it won't be valid */
8
10
  required?: RequiredValidator;
@@ -1,8 +1,10 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { DateTimePickerEditorConfiguration } from './appearance/date_time_picker';
2
3
  import type { DateTimeRangeValidator } from './validators/date_time_range';
3
4
  import type { RequiredValidator } from './validators/required';
4
5
  export type DateTimeFieldValue = string | null;
5
6
  export declare function isDateTimeFieldValue(value: unknown): value is DateTimeFieldValue;
7
+ export declare function isLocalizedDateTimeFieldValue(value: unknown): value is LocalizedFieldValue<DateTimeFieldValue>;
6
8
  export type DateTimeFieldValidators = {
7
9
  /** Value must be specified or it won't be valid */
8
10
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { FileEditorConfiguration } from './appearance/file';
2
3
  import type { ExtensionValidator } from './validators/extension';
3
4
  import type { FileSizeValidator } from './validators/file_size';
@@ -16,6 +17,7 @@ export type FileFieldValue = {
16
17
  } | null;
17
18
  } | null;
18
19
  export declare function isFileFieldValue(value: unknown): value is FileFieldValue;
20
+ export declare function isLocalizedFileFieldValue(value: unknown): value is LocalizedFieldValue<FileFieldValue>;
19
21
  export type FileFieldValidators = {
20
22
  /** Value must be specified or it won't be valid */
21
23
  required?: RequiredValidator;
@@ -1,8 +1,10 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { FloatEditorConfiguration } from './appearance/float';
2
3
  import type { NumberRangeValidator } from './validators/number_range';
3
4
  import type { RequiredValidator } from './validators/required';
4
5
  export type FloatFieldValue = number | null;
5
6
  export declare function isFloatFieldValue(value: unknown): value is FloatFieldValue;
7
+ export declare function isLocalizedFloatFieldValue(value: unknown): value is LocalizedFieldValue<FloatFieldValue>;
6
8
  export type FloatFieldValidators = {
7
9
  /** Value must be specified or it won't be valid */
8
10
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { GalleryEditorConfiguration } from './appearance/gallery';
2
3
  import type { ExtensionValidator } from './validators/extension';
3
4
  import type { FileSizeValidator } from './validators/file_size';
@@ -16,6 +17,7 @@ export type GalleryFieldValue = Array<{
16
17
  } | null;
17
18
  }> | null;
18
19
  export declare function isGalleryFieldValue(value: unknown): value is GalleryFieldValue;
20
+ export declare function isLocalizedGalleryFieldValue(value: unknown): value is LocalizedFieldValue<GalleryFieldValue>;
19
21
  export type GalleryFieldValidators = {
20
22
  /** Only accept a number of items within the specified range */
21
23
  size?: SizeValidator;
@@ -1,8 +1,10 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { IntegerEditorConfiguration } from './appearance/integer';
2
3
  import type { NumberRangeValidator } from './validators/number_range';
3
4
  import type { RequiredValidator } from './validators/required';
4
5
  export type IntegerFieldValue = number | null;
5
6
  export declare function isIntegerFieldValue(value: unknown): value is IntegerFieldValue;
7
+ export declare function isLocalizedIntegerFieldValue(value: unknown): value is LocalizedFieldValue<IntegerFieldValue>;
6
8
  export type IntegerFieldValidators = {
7
9
  /** Value must be specified or it won't be valid */
8
10
  required?: RequiredValidator;
@@ -1,9 +1,11 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { JsonEditorConfiguration } from './appearance/json';
2
3
  import type { StringCheckboxGroupEditorConfiguration } from './appearance/string_checkbox_group';
3
4
  import type { StringMultiSelectEditorConfiguration } from './appearance/string_multi_select';
4
5
  import type { RequiredValidator } from './validators/required';
5
6
  export type JsonFieldValue = string | null;
6
7
  export declare function isJsonFieldValue(value: unknown): value is JsonFieldValue;
8
+ export declare function isLocalizedJsonFieldValue(value: unknown): value is LocalizedFieldValue<JsonFieldValue>;
7
9
  export type JsonFieldValidators = {
8
10
  /** Value must be specified or it won't be valid */
9
11
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { MapEditorConfiguration } from './appearance/map';
2
3
  import type { RequiredValidator } from './validators/required';
3
4
  export type LocationFieldValue = {
@@ -5,6 +6,7 @@ export type LocationFieldValue = {
5
6
  longitude: number;
6
7
  } | null;
7
8
  export declare function isLocationFieldValue(value: unknown): value is LocationFieldValue;
9
+ export declare function isLocalizedLocationFieldValue(value: unknown): value is LocalizedFieldValue<LocationFieldValue>;
8
10
  export type LocationFieldValidators = {
9
11
  /** Value must be specified or it won't be valid */
10
12
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { LinkEmbedEditorConfiguration } from './appearance/link_embed';
2
3
  import type { LinkSelectEditorConfiguration } from './appearance/link_select';
3
4
  import type { ItemItemTypeValidator } from './validators/item_item_type';
@@ -5,6 +6,7 @@ import type { RequiredValidator } from './validators/required';
5
6
  import type { UniqueValidator } from './validators/unique';
6
7
  export type LinkFieldValue = string | null;
7
8
  export declare function isLinkFieldValue(value: unknown): value is LinkFieldValue;
9
+ export declare function isLocalizedLinkFieldValue(value: unknown): value is LocalizedFieldValue<LinkFieldValue>;
8
10
  export type LinkFieldValidators = {
9
11
  /** Only accept references to records of the specified models */
10
12
  item_item_type: ItemItemTypeValidator;
@@ -1,9 +1,11 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { LinksEmbedEditorConfiguration } from './appearance/links_embed';
2
3
  import type { LinksSelectEditorConfiguration } from './appearance/links_select';
3
4
  import type { ItemsItemTypeValidator } from './validators/items_item_type';
4
5
  import type { SizeValidator } from './validators/size';
5
6
  export type LinksFieldValue = string[] | null;
6
7
  export declare function isLinksFieldValue(value: unknown): value is LinksFieldValue;
8
+ export declare function isLocalizedLinksFieldValue(value: unknown): value is LocalizedFieldValue<LinksFieldValue>;
7
9
  export type LinksFieldValidators = {
8
10
  /** Only accept references to records of the specified models */
9
11
  items_item_type: ItemsItemTypeValidator;
@@ -1,5 +1,9 @@
1
1
  import type * as RawApiTypes from '../generated/RawApiTypes';
2
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
3
+ import type { RichTextEditorConfiguration } from './appearance/rich_text';
2
4
  import { type BlockItemInARequest } from './single_block';
5
+ import type { RichTextBlocksValidator } from './validators/rich_text_blocks';
6
+ import type { SizeValidator } from './validators/size';
3
7
  /**
4
8
  * MODULAR CONTENT FIELD TYPE SYSTEM FOR DATOCMS
5
9
  *
@@ -70,19 +74,19 @@ export type RichTextFieldValueWithNestedBlocks = RawApiTypes.Item[] | null;
70
74
  * Checks for array structure and ensures all blocks are string references.
71
75
  */
72
76
  export declare function isRichTextFieldValue(value: unknown): value is RichTextFieldValue;
77
+ export declare function isLocalizedRichTextFieldValue(value: unknown): value is LocalizedFieldValue<RichTextFieldValue>;
73
78
  /**
74
79
  * Type guard for Modular Content field values in API request format.
75
80
  * Allows blocks as string IDs, full objects with IDs, or objects without IDs.
76
81
  */
77
82
  export declare function isRichTextFieldValueAsRequest(value: unknown): value is RichTextFieldValueAsRequest;
83
+ export declare function isLocalizedRichTextFieldValueAsRequest(value: unknown): value is LocalizedFieldValue<RichTextFieldValueAsRequest>;
78
84
  /**
79
85
  * Type guard for Modular Content field values with nested blocks (?nested=true format).
80
86
  * Ensures all blocks are full RawApiTypes.Item objects with complete data.
81
87
  */
82
88
  export declare function isRichTextFieldValueWithNestedBlocks(value: unknown): value is RichTextFieldValueWithNestedBlocks;
83
- import type { RichTextEditorConfiguration } from './appearance/rich_text';
84
- import type { RichTextBlocksValidator } from './validators/rich_text_blocks';
85
- import type { SizeValidator } from './validators/size';
89
+ export declare function isLocalizedRichTextFieldValueWithNestedBlocks(value: unknown): value is LocalizedFieldValue<RichTextFieldValueWithNestedBlocks>;
86
90
  export type RichTextFieldValidators = {
87
91
  /** Only accept references to block records of the specified block models */
88
92
  rich_text_blocks: RichTextBlocksValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { SeoEditorConfiguration } from './appearance/seo';
2
3
  import type { DescriptionLengthValidator } from './validators/description_length';
3
4
  import type { FileSizeValidator } from './validators/file_size';
@@ -13,6 +14,7 @@ export type SeoFieldValue = {
13
14
  no_index?: boolean;
14
15
  } | null;
15
16
  export declare function isSeoFieldValue(value: unknown): value is SeoFieldValue;
17
+ export declare function isLocalizedSeoFieldValue(value: unknown): value is LocalizedFieldValue<SeoFieldValue>;
16
18
  export type SeoFieldValidators = {
17
19
  /** SEO field has to specify one or more properties, or it won't be valid */
18
20
  required_seo_fields?: RequiredSeoFieldsValidator;
@@ -1,4 +1,5 @@
1
1
  import type * as RawApiTypes from '../generated/RawApiTypes';
2
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
2
3
  import type { FramedSingleBlockEditorConfiguration } from './appearance/framed_single_block';
3
4
  import type { FramelessSingleBlockEditorConfiguration } from './appearance/frameless_single_block';
4
5
  import type { RequiredValidator } from './validators/required';
@@ -108,16 +109,19 @@ export declare function isItemWithOptionalMeta(block: unknown): block is ItemWit
108
109
  * Checks for string structure and ensures block is a string reference.
109
110
  */
110
111
  export declare function isSingleBlockFieldValue(value: unknown): value is SingleBlockFieldValue;
112
+ export declare function isLocalizedSingleBlockFieldValue(value: unknown): value is LocalizedFieldValue<SingleBlockFieldValue>;
111
113
  /**
112
114
  * Type guard for Single Block field values in API request format.
113
115
  * Allows block as string ID, full object with ID, or object without ID.
114
116
  */
115
117
  export declare function isSingleBlockFieldValueAsRequest(value: unknown): value is SingleBlockFieldValueAsRequest;
118
+ export declare function isLocalizedSingleBlockFieldValueAsRequest(value: unknown): value is LocalizedFieldValue<SingleBlockFieldValueAsRequest>;
116
119
  /**
117
120
  * Type guard for Single Block field values with nested blocks (?nested=true format).
118
121
  * Ensures block is a full RawApiTypes.Item object with complete data.
119
122
  */
120
123
  export declare function isSingleBlockFieldValueWithNestedBlocks(value: unknown): value is SingleBlockFieldValueWithNestedBlocks;
124
+ export declare function isLocalizedSingleBlockFieldValueWithNestedBlocks(value: unknown): value is LocalizedFieldValue<SingleBlockFieldValueWithNestedBlocks>;
121
125
  export type SingleBlockFieldValidators = {
122
126
  /** Only accept references to block records of the specified block models */
123
127
  single_block_blocks: SingleBlockBlocksValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { SlugEditorConfiguration } from './appearance/slug';
2
3
  import type { LengthValidator } from './validators/length';
3
4
  import type { RequiredValidator } from './validators/required';
@@ -5,6 +6,7 @@ import type { SlugFormatValidator } from './validators/slug_format';
5
6
  import type { SlugTitleFieldValidator } from './validators/slug_title_field';
6
7
  export type SlugFieldValue = string | null;
7
8
  export declare function isSlugFieldValue(value: unknown): value is SlugFieldValue;
9
+ export declare function isLocalizedSlugFieldValue(value: unknown): value is LocalizedFieldValue<SlugFieldValue>;
8
10
  export type SlugFieldValidators = {
9
11
  /** Value must be specified or it won't be valid */
10
12
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { SingleLineEditorConfiguration } from './appearance/single_line';
2
3
  import type { StringRadioGroupEditorConfiguration } from './appearance/string_radio_group';
3
4
  import type { StringSelectEditorConfiguration } from './appearance/string_select';
@@ -8,6 +9,7 @@ import type { RequiredValidator } from './validators/required';
8
9
  import type { UniqueValidator } from './validators/unique';
9
10
  export type StringFieldValue = string | null;
10
11
  export declare function isStringFieldValue(value: unknown): value is StringFieldValue;
12
+ export declare function isLocalizedStringFieldValue(value: unknown): value is LocalizedFieldValue<StringFieldValue>;
11
13
  export type StringFieldValidators = {
12
14
  /** Value must be specified or it won't be valid */
13
15
  required?: RequiredValidator;
@@ -1,5 +1,6 @@
1
1
  import { type Block, type Document, type InlineBlock } from 'datocms-structured-text-utils';
2
2
  import type * as RawApiTypes from '../generated/RawApiTypes';
3
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
3
4
  import type { StructuredTextEditorConfiguration } from './appearance/structured_text';
4
5
  import { type BlockItemInARequest } from './single_block';
5
6
  import type { LengthValidator } from './validators/length';
@@ -85,16 +86,19 @@ export type StructuredTextFieldValueWithNestedBlocks = DocumentWithNestedBlocks
85
86
  * Checks for the expected structure and ensures all block/inlineBlock nodes have string IDs.
86
87
  */
87
88
  export declare function isStructuredTextFieldValue(value: unknown): value is StructuredTextFieldValue;
89
+ export declare function isLocalizedStructuredTextFieldValue(value: unknown): value is LocalizedFieldValue<StructuredTextFieldValue>;
88
90
  /**
89
91
  * Type guard for structured text field values in API request format.
90
92
  * Allows blocks as string IDs, full objects with IDs, or objects without IDs.
91
93
  */
92
94
  export declare function isStructuredTextFieldValueAsRequest(value: unknown): value is StructuredTextFieldValueAsRequest;
95
+ export declare function isLocalizedStructuredTextFieldValueAsRequest(value: unknown): value is LocalizedFieldValue<StructuredTextFieldValueAsRequest>;
93
96
  /**
94
97
  * Type guard for structured text field values with nested blocks (?nested=true format).
95
98
  * Ensures all block/inlineBlock nodes have full RawApiTypes.Item objects.
96
99
  */
97
100
  export declare function isStructuredTextFieldValueWithNestedBlocks(value: unknown): value is StructuredTextFieldValueWithNestedBlocks;
101
+ export declare function isLocalizedStructuredTextFieldValueWithNestedBlocks(value: unknown): value is LocalizedFieldValue<StructuredTextFieldValueWithNestedBlocks>;
98
102
  export type StructuredTextFieldValidators = {
99
103
  /** Only accept references to block records of the specified block models */
100
104
  structured_text_blocks: StructuredTextBlocksValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { MarkdownEditorConfiguration } from './appearance/markdown';
2
3
  import type { TextareaEditorConfiguration } from './appearance/textarea';
3
4
  import type { WysiwygEditorConfiguration } from './appearance/wysiwyg';
@@ -7,6 +8,7 @@ import type { RequiredValidator } from './validators/required';
7
8
  import type { SanitizationValidator } from './validators/sanitization';
8
9
  export type TextFieldValue = string | null;
9
10
  export declare function isTextFieldValue(value: unknown): value is TextFieldValue;
11
+ export declare function isLocalizedTextFieldValue(value: unknown): value is LocalizedFieldValue<TextFieldValue>;
10
12
  export type TextFieldValidators = {
11
13
  /** Value must be specified or it won't be valid */
12
14
  required?: RequiredValidator;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedFieldValue } from '../utilities/fieldValue';
1
2
  import type { VideoEditorConfiguration } from './appearance/video';
2
3
  import type { RequiredValidator } from './validators/required';
3
4
  export type VideoFieldValue = {
@@ -10,6 +11,7 @@ export type VideoFieldValue = {
10
11
  title: string;
11
12
  } | null;
12
13
  export declare function isVideoFieldValue(value: unknown): value is VideoFieldValue;
14
+ export declare function isLocalizedVideoFieldValue(value: unknown): value is LocalizedFieldValue<VideoFieldValue>;
13
15
  export type VideoFieldValidators = {
14
16
  /** Value must be specified or it won't be valid */
15
17
  required?: RequiredValidator;