import { CreateSpaceSharedAssetData, ListSpaceSharedAssetsData, ListSpaceSharedAssetsResponses } from "../generated/mapi/types.gen.mjs"; import { Asset, AssetUpdate } from "../generated/mapi/types-aliased.gen.mjs"; //#region src/resources/shared-assets.d.ts /** * Query params accepted by `POST /v1/spaces/{space_id}/shared_assets` (the * sign call that starts an upload). * * Two behaviors of this endpoint are absent from the OpenAPI spec, so they are * modelled here: passing `id` re-signs an upload for an *existing* shared * asset (how `update()` replaces a file in place), and `asset_folder_id` may * then be omitted because the folder is taken from that asset. Every other * field stays as the spec defines it. */ type SignSharedAssetQuery = Omit & { asset_folder_id?: number; id?: number; }; /** * Fields for initiating a shared (org-level) asset upload. Mirrors the local * asset upload request; `short_filename` maps to the server's `filename`. */ type SharedAssetUploadRequest = { /** The desired filename for the asset (e.g. `"hero.png"`). */short_filename: string; } & Partial>; /** Input for `create()`. Combines upload fields with writable metadata. */ type SharedAssetCreate = AssetUpdate & SharedAssetUploadRequest; type SharedAssetListQuery = 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()`. * As in `ListAssetsResult` (see `./assets`), list rows are deliberately * surfaced as `Asset` so consumers work against a single asset type. */ type SharedAssetListResponse = Omit & { assets: Array; }; //#endregion export { SharedAssetCreate, SharedAssetListQuery, SharedAssetListResponse, SharedAssetUploadRequest }; //# sourceMappingURL=shared-assets.d.mts.map