(fields: Record<string, string | undefined>)
| 121 | }; |
| 122 | |
| 123 | const definedFields = (fields: Record<string, string | undefined>): Record<string, string> => |
| 124 | Object.fromEntries(Object.entries(fields).filter(([, v]) => v !== undefined)) as Record< |
| 125 | string, |
| 126 | string |
| 127 | >; |
| 128 | |
| 129 | const post = async ( |
| 130 | url: string, |