import { CreateAssetData, ListAssetsData, ListAssetsResponses, UpdateAssetData } from "../generated/mapi/types.gen.cjs"; import { Asset } from "../generated/mapi/types-aliased.gen.cjs"; //#region src/resources/assets.d.ts type AssetListQuery = NonNullable; /** * Return shape of `list()`. * * The list endpoint serializes rows with MAPI's `IndexAsset` serializer, which * is NOT identical to the `ShowAsset` (= `Asset`) shape returned by `get()`: * `IndexAsset` omits `file` and `permanently_deleted`. We deliberately surface * list rows as `Asset` so consumers work against a single asset type. The lie: * `file`/`permanently_deleted` are absent on list rows at runtime — consumers * needing those must re-fetch via `get()`. */ type ListAssetsResult = Omit & { assets: Array; }; /** * Fields for initiating an asset upload. Pass this to `upload()` or `create()` * alongside a file buffer. */ type AssetUploadRequest = { /** The desired filename for the asset (e.g. `"hero.png"`). */short_filename: string; } & Partial, 'filename'>>; /** * Input for `create()`. Combines upload fields with writable metadata. */ type AssetCreate = AssetUploadRequest & NonNullable; //#endregion export { AssetCreate, AssetListQuery, AssetUploadRequest, ListAssetsResult }; //# sourceMappingURL=assets.d.cts.map