@datocms/rest-client-utils
Version:
Utilities for DatoCMS REST API clients
27 lines (26 loc) • 616 B
TypeScript
type Options = {
id?: string;
type: string;
attributes: '*';
relationships: string[];
} | {
id?: string;
type: string;
attributes: string[];
relationships: '*';
} | {
id?: string;
type: string;
attributes: string[];
relationships: string[];
};
export type Rel = {
id: string;
type: string;
};
export declare function serializeRequestBody<T extends {
data: unknown;
} | null>(body: unknown, options: Options): T;
export declare function serializeRawItem<S>(item: any): S;
export declare function serializeRawRequestBodyWithItems(body: any): any;
export {};