You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cma-client-analysis/__tests__/__snapshots__/code-analysis.test.ts.snap
+54-56Lines changed: 54 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -1098,42 +1098,25 @@ exports[`TypeScript Compiler API - Unit Tests extractTypeDependencies uploads.cr
1098
1098
*/
1099
1099
notes?:string|null;
1100
1100
/**
1101
-
* For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
1101
+
* Patch the asset's default metadata. Send any subset of \`alt\`/\`title\`/\`custom_data\`/\`focal_point\` — missing keys preserve their stored values. See the response shape for the full structure and per-key semantics.
1102
1102
*/
1103
1103
default_field_metadata?: {
1104
+
alt?: LocalizedAlt;
1105
+
title?: LocalizedTitle;
1106
+
custom_data?: LocalizedCustomData;
1104
1107
/**
1105
-
* This interface was referenced by \`undefined\`'s JSON-Schema definition
1106
-
* via the \`patternProperty\` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
1108
+
* Focal point (only for image assets)
1107
1109
*/
1108
-
[k: string]: {
1110
+
focal_point?: {
1109
1111
/**
1110
-
* Alternate text for the asset
1112
+
* Horizontal position expressed as float between 0 and 1
1111
1113
*/
1112
-
alt?: string | null;
1114
+
x: number;
1113
1115
/**
1114
-
* Title for the asset
1116
+
* Vertical position expressed as float between 0 and 1
1115
1117
*/
1116
-
title?: string | null;
1117
-
/**
1118
-
* Object with arbitrary metadata
1119
-
*/
1120
-
custom_data?: {
1121
-
[k: string]: unknown;
1122
-
};
1123
-
/**
1124
-
* Focal point (only for image assets)
1125
-
*/
1126
-
focal_point?: {
1127
-
/**
1128
-
* Horizontal position expressed as float between 0 and 1
1129
-
*/
1130
-
x: number;
1131
-
/**
1132
-
* Vertical position expressed as float between 0 and 1
1133
-
*/
1134
-
y: number;
1135
-
} |null;
1136
-
};
1118
+
y: number;
1119
+
} |null;
1137
1120
};
1138
1121
/**
1139
1122
* Tags
@@ -1146,6 +1129,38 @@ export type UploadIdentity = string;
1146
1129
1147
1130
export type UploadType = 'upload';
1148
1131
1132
+
export type LocalizedAlt = {
1133
+
/**
1134
+
* Alternate text for the asset in this locale
1135
+
*
1136
+
* This interface was referenced by \`LocalizedAlt\`'s JSON-Schema definition
1137
+
* via the \`patternProperty\` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
1138
+
*/
1139
+
[k: string]: string|null;
1140
+
};
1141
+
1142
+
export type LocalizedTitle = {
1143
+
/**
1144
+
* Title for the asset in this locale
1145
+
*
1146
+
* This interface was referenced by \`LocalizedTitle\`'s JSON-Schema definition
1147
+
* via the \`patternProperty\` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
1148
+
*/
1149
+
[k: string]: string|null;
1150
+
};
1151
+
1152
+
export type LocalizedCustomData = {
1153
+
/**
1154
+
* Arbitrary metadata for the asset in this locale
1155
+
*
1156
+
* This interface was referenced by \`LocalizedCustomData\`'s JSON-Schema definition
1157
+
* via the \`patternProperty\` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
1158
+
*/
1159
+
[k: string]: {
1160
+
[k: string]: unknown;
1161
+
};
1162
+
};
1163
+
1149
1164
export type UploadCollectionData = {
1150
1165
type: UploadCollectionType;
1151
1166
id: UploadCollectionIdentity;
@@ -1227,42 +1242,25 @@ export type Upload = {
1227
1242
*/
1228
1243
mux_mp4_highest_res: null|'high'|'medium'|'low';
1229
1244
/**
1230
-
* For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
1245
+
* Per-asset default metadata applied when no record-level overrides are present. \`alt\`, \`title\`, and \`custom_data\` are objects keyed by locale; \`focal_point\` is a single value per asset (only meaningful for image assets). See [non-localized focal points](https://www.datocms.com/product-updates/non-localized-focal-points) for more info.
1231
1246
*/
1232
1247
default_field_metadata: {
1248
+
alt: LocalizedAlt;
1249
+
title: LocalizedTitle;
1250
+
custom_data: LocalizedCustomData;
1233
1251
/**
1234
-
* This interface was referenced by \`undefined\`'s JSON-Schema definition
1235
-
* via the \`patternProperty\` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
1252
+
* Focal point (only for image assets)
1236
1253
*/
1237
-
[k: string]: {
1238
-
/**
1239
-
* Alternate text for the asset
1240
-
*/
1241
-
alt: string|null;
1242
-
/**
1243
-
* Title for the asset
1244
-
*/
1245
-
title: string|null;
1254
+
focal_point: {
1246
1255
/**
1247
-
* Object with arbitrary metadata
1256
+
* Horizontal position expressed as float between 0 and 1
1248
1257
*/
1249
-
custom_data: {
1250
-
[k: string]: unknown;
1251
-
};
1258
+
x: number;
1252
1259
/**
1253
-
* Focal point (only for image assets)
1260
+
* Vertical position expressed as float between 0 and 1
1254
1261
*/
1255
-
focal_point: {
1256
-
/**
1257
-
* Horizontal position expressed as float between 0 and 1
1258
-
*/
1259
-
x: number;
1260
-
/**
1261
-
* Vertical position expressed as float between 0 and 1
0 commit comments