( field: SchemaOverview['collections'][string]['fields'][string], payload: Partial<Item>, action: PayloadAction, accountability: Accountability | null, )
| 333 | } |
| 334 | |
| 335 | async processField( |
| 336 | field: SchemaOverview['collections'][string]['fields'][string], |
| 337 | payload: Partial<Item>, |
| 338 | action: PayloadAction, |
| 339 | accountability: Accountability | null, |
| 340 | ): Promise<any> { |
| 341 | if (!field.special) return payload[field.field]; |
| 342 | const fieldSpecials = field.special ? toArray(field.special) : []; |
| 343 | |
| 344 | let value = clone(payload[field.field]); |
| 345 | |
| 346 | for (const special of fieldSpecials) { |
| 347 | if (special in this.transformers) { |
| 348 | value = await this.transformers[special]!({ |
| 349 | action, |
| 350 | value, |
| 351 | payload, |
| 352 | accountability, |
| 353 | specials: fieldSpecials, |
| 354 | helpers: this.helpers, |
| 355 | overwriteDefaults: this.overwriteDefaults, |
| 356 | }); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | return value; |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Native geometries are stored in custom binary format. We need to insert them with |
no test coverage detected