@layer_ai/sdk 1.0.63 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,6 +42,80 @@ export interface AudioExtension {
42
42
  * differed from the value would hand clients a format string the request API rejects.
43
43
  */
44
44
  export type AudioOutputFormat = "mp3" | "wav" | "aac" | "flac";
45
+ export interface AutoDeleteOutput {
46
+ /** Whether the workspace can use auto-delete: Enterprise only. */
47
+ is_available: boolean;
48
+ /** The policy this workspace set itself; null when it follows another. */
49
+ policy: AutoDeletePolicyIO | null;
50
+ /** The policy that applies to this workspace; null when none does. */
51
+ effective_policy: EffectiveAutoDeletePolicyOutput | null;
52
+ }
53
+ export interface AutoDeletePolicyIO {
54
+ /** Whether the rules run every night. */
55
+ is_enabled?: boolean;
56
+ /** A file any rule reaches is deleted. A file something depends on, or that is public or featured, never is. */
57
+ rules?: Array<AutoDeleteRuleIO>;
58
+ /** Whether every workspace under this one must follow these rules, whatever they set. */
59
+ is_locked?: boolean;
60
+ /** Whether admins are told what each run deleted. */
61
+ notify_admins?: boolean;
62
+ }
63
+ export interface AutoDeletePreviewInput {
64
+ /** The rules to preview. */
65
+ rules: Array<AutoDeleteRuleIO>;
66
+ }
67
+ export interface AutoDeletePreviewOutput {
68
+ /** Files the rules would delete now. */
69
+ files: number;
70
+ /** Bytes those files hold. */
71
+ bytes: number;
72
+ /** Whether counting stopped at 20,000 files, so the run would delete at least this many. */
73
+ is_at_least: boolean;
74
+ /** The largest of those files. */
75
+ sample: Array<StoredFileOutput>;
76
+ }
77
+ export interface AutoDeleteRuleIO {
78
+ /** Delete files created at least this many days ago (7 or more). */
79
+ older_than_days: number;
80
+ /** Generated or uploaded files only; both when null. */
81
+ origin?: StoredFileOrigin | null;
82
+ /** Only these content categories; every category when empty. */
83
+ content_categories?: Array<FileContentCategory>;
84
+ /** Keep files with a label. */
85
+ keep_labeled?: boolean;
86
+ /** Keep files filed in a folder. */
87
+ keep_in_folder?: boolean;
88
+ /** Keep files someone liked. */
89
+ keep_liked?: boolean;
90
+ /** Keep files someone pinned. */
91
+ keep_pinned?: boolean;
92
+ }
93
+ export interface AutoDeleteRunOutput {
94
+ /** Id of the run. */
95
+ run_id: string;
96
+ /** Whether the nightly schedule or a person started it. */
97
+ trigger: AutoDeleteTrigger;
98
+ /** `running`, `finished` or `failed`. */
99
+ status: AutoDeleteRunStatus;
100
+ /** The workspace whose policy the run applied. */
101
+ policy_workspace_id: string;
102
+ started_at: string;
103
+ finished_at: string | null;
104
+ /** Files deleted. They stay in the trash for 29 days. */
105
+ deleted_files: number;
106
+ /** Bytes those files held. */
107
+ deleted_bytes: number;
108
+ /** Files a rule reached that were kept because something depends on them. */
109
+ kept_in_use: number;
110
+ /** Whether the run stopped at 50,000 files, leaving the rest for the next one. */
111
+ is_capped: boolean;
112
+ }
113
+ export type AutoDeleteRunStatus = "running" | "finished" | "failed";
114
+ export interface AutoDeleteRunsOutput {
115
+ /** Most recent first. */
116
+ runs: Array<AutoDeleteRunOutput>;
117
+ }
118
+ export type AutoDeleteTrigger = "schedule" | "manual";
45
119
  /** ToolModelCapabilities without the MCP token-saving serializer — returns all fields for REST. */
46
120
  export interface BaseModelCapabilitiesREST {
47
121
  /** Supported modes: create, create_video, create_3_d, create_speech, create_sound_effect, prompt_edit_image, etc. */
@@ -103,6 +177,8 @@ export interface BaseModelCapabilitiesREST {
103
177
  output_formats?: Array<string>;
104
178
  /** ISO 639-1 codes a `dub_video` model can speak, passed to forge as `target_language`. */
105
179
  dub_languages?: Array<string>;
180
+ /** Language codes a text-to-speech model can be told to read the script in, passed to forge as `speech_language`. Empty: the model takes no language and detects it from the text. */
181
+ speech_languages?: Array<string>;
106
182
  /** Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice. */
107
183
  voice_reference_set_required?: boolean;
108
184
  rigging?: boolean;
@@ -350,6 +426,8 @@ export interface CreateReferenceSetResponse {
350
426
  export interface CreateSessionBody {
351
427
  /** The session's display name. */
352
428
  name: string;
429
+ /** The project to file the session under. Runs in the session follow the project's AI policy, and their outputs are added to the project. The project must be active and the caller a member of it or a workspace admin. */
430
+ project_id?: string | null;
353
431
  }
354
432
  export interface DailyUsage {
355
433
  /** Calendar day (UTC), ISO format YYYY-MM-DD. */
@@ -357,6 +435,23 @@ export interface DailyUsage {
357
435
  /** Creative Units consumed on this day across all models. */
358
436
  creative_units: number;
359
437
  }
438
+ export interface DeleteStoredFilesOutput {
439
+ /** Files deleted. They stay in the trash for 29 days. */
440
+ deleted_files: number;
441
+ /** Bytes those files held. */
442
+ deleted_bytes: number;
443
+ /** Files left because something depends on them. Ids that are not a stored file are left silently. */
444
+ skipped: Array<SkippedFileOutput>;
445
+ }
446
+ export interface EffectiveAutoDeletePolicyOutput {
447
+ policy: AutoDeletePolicyIO;
448
+ /** The workspace that set the policy: this one or an ancestor. */
449
+ source_workspace_id: string;
450
+ /** That workspace's name. */
451
+ source_workspace_name: string | null;
452
+ /** Whether an ancestor locked it, so this workspace cannot set its own. */
453
+ is_locked_by_ancestor: boolean;
454
+ }
360
455
  export interface EstimateForgePriceOutput {
361
456
  /** Total estimated Creative Units price for this run. */
362
457
  estimated_price_creative_units: number;
@@ -626,6 +721,8 @@ export interface EstimateInferencePriceV2Request {
626
721
  style_exaggeration?: number | null;
627
722
  /** Speech speed multiplier. */
628
723
  speed?: number | null;
724
+ /** The language the speech is in, as one of the codes the model's capabilities list under `speech_languages`. Omit to let the model detect it from the text. */
725
+ speech_language?: string | null;
629
726
  /** Upscale factor (e.g. 2.0, 4.0). */
630
727
  upscale_ratio?: number | null;
631
728
  /** Creative variation strength for upscaling. */
@@ -700,13 +797,13 @@ export interface EstimateInferencePriceV2Request {
700
797
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
701
798
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
702
799
  scene_lighting?: SceneLightingConfig | null;
703
- /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
800
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. The output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
704
801
  tile_grid?: TileGrid | null;
705
- /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin. Image outputs only. */
802
+ /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
706
803
  output_fit?: OutputFit | null;
707
804
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
708
805
  nine_slice?: boolean | null;
709
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
806
+ /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right, each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest; a loop adds one heal per plate. */
710
807
  parallax?: ParallaxSplit | null;
711
808
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
712
809
  color_palette?: InferenceColorPalette | null;
@@ -1052,6 +1149,8 @@ export interface ExecuteInferenceV2Request {
1052
1149
  style_exaggeration?: number | null;
1053
1150
  /** Speech speed multiplier. */
1054
1151
  speed?: number | null;
1152
+ /** The language the speech is in, as one of the codes the model's capabilities list under `speech_languages`. Omit to let the model detect it from the text. */
1153
+ speech_language?: string | null;
1055
1154
  /** Upscale factor (e.g. 2.0, 4.0). */
1056
1155
  upscale_ratio?: number | null;
1057
1156
  /** Creative variation strength for upscaling. */
@@ -1126,13 +1225,13 @@ export interface ExecuteInferenceV2Request {
1126
1225
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
1127
1226
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
1128
1227
  scene_lighting?: SceneLightingConfig | null;
1129
- /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
1228
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. The output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
1130
1229
  tile_grid?: TileGrid | null;
1131
- /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin. Image outputs only. */
1230
+ /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
1132
1231
  output_fit?: OutputFit | null;
1133
1232
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
1134
1233
  nine_slice?: boolean | null;
1135
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
1234
+ /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right, each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest; a loop adds one heal per plate. */
1136
1235
  parallax?: ParallaxSplit | null;
1137
1236
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
1138
1237
  color_palette?: InferenceColorPalette | null;
@@ -1158,6 +1257,8 @@ export interface ExecuteInferenceV2Request {
1158
1257
  session_id?: string | null;
1159
1258
  /** Deliver this run's terminal events to a URL instead of polling for them. See the Webhooks section of this document for the payload, headers and retry behaviour. */
1160
1259
  webhook?: WebhookInput | null;
1260
+ /** The Layer tool this run is, such as `image.upscale`, so the asset it makes reopens in that tool in the Layer app. The run must be one the tool makes: a `base_model_id` from the tool's models, with every value the tool fixes left as the tool sets it. A run that is not is refused with a 422 naming why (`UNKNOWN_INFERENCE_TOOL`, `INFERENCE_TOOL_MODEL_NOT_IN_POOL`, `INFERENCE_TOOL_PIN_MISMATCH`, `INFERENCE_TOOL_NO_REFRAME` or `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`). */
1261
+ inference_tool_key?: string | null;
1161
1262
  }
1162
1263
  export interface ExecuteWorkflowOutput {
1163
1264
  /** Unique identifier for this workflow run. */
@@ -1185,6 +1286,19 @@ export interface ExecuteWorkflowRequest {
1185
1286
  /** Deliver this run's terminal events to a URL instead of polling for them. Only the run's own outcome is delivered — the generations it performs internally are not yours to poll and raise no events of their own. See the Webhooks section of this document for the payload, headers and retry behaviour. */
1186
1287
  webhook?: WebhookInput | null;
1187
1288
  }
1289
+ export type FileContentCategory = "image" | "video" | "mesh" | "audio" | "pose" | "safetensors" | "playable" | "spine" | "font" | "world" | "pbr_materials" | "other";
1290
+ export interface FileDependencyOutput {
1291
+ /** What depends on the file: `style`, `reference_set`, `workflow`, `skill`, `template`, `content_policy_rule`, `base_model`, `workspace_share`, `trend`, `ua_creative`, `export` or `scoring_run`. */
1292
+ kind: string;
1293
+ /** Id of the thing that depends on the file. */
1294
+ owner_id: string;
1295
+ /** Its name, when it has one. */
1296
+ owner_name: string | null;
1297
+ }
1298
+ export interface FileIdsInput {
1299
+ /** At most 500 file ids. */
1300
+ file_ids: Array<string>;
1301
+ }
1188
1302
  /** What an engine needs beyond the image to build a resource from a file. Each kind is null when absent. */
1189
1303
  export interface FileMetadataView {
1190
1304
  /** Grid placement, for a game tile sprite. */
@@ -1220,7 +1334,7 @@ export interface FileScoresOutput {
1220
1334
  /** When the stamp was written. */
1221
1335
  headline_scored_at?: string | null;
1222
1336
  }
1223
- export type FileSourceType = "pose" | "reference" | "mask" | "composite" | "google_drive" | "miro" | "transformed_reference" | "skill_resource" | "skill_bundle";
1337
+ export type FileSourceType = "pose" | "reference" | "mask" | "composite" | "google_drive" | "miro" | "linear" | "jira" | "transformed_reference" | "skill_resource" | "skill_bundle";
1224
1338
  export interface ForgeGuidanceFileInput {
1225
1339
  /** File ID of an uploaded file. */
1226
1340
  file_id: string;
@@ -1529,6 +1643,30 @@ export interface InferenceReferenceSetInput {
1529
1643
  weight?: number;
1530
1644
  }
1531
1645
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1646
+ /** Whether a tool makes something new or changes something the user already has. */
1647
+ export type InferenceToolGroup = "generate" | "edit";
1648
+ export interface InferenceToolSource {
1649
+ /** The type of asset the tool works on. */
1650
+ modality: Modality;
1651
+ }
1652
+ export interface InferenceToolSummary {
1653
+ /** The tool's key, such as `image.upscale`. */
1654
+ key: string;
1655
+ /** The tool's name, as the Layer app shows it. */
1656
+ name: string;
1657
+ /** What the tool does. */
1658
+ description: string;
1659
+ /** `generate` for a tool that makes something new, `edit` for one that changes an asset. */
1660
+ group: InferenceToolGroup;
1661
+ /** The type of asset the tool makes. */
1662
+ modality: Modality;
1663
+ /** What an edit works on; null for a tool that makes something new. */
1664
+ source: InferenceToolSource | null;
1665
+ /** The base models the caller can run the tool on, in catalog order. */
1666
+ base_model_ids: Array<string>;
1667
+ /** The model a run of the tool takes when it names none: the tool's own default, else the caller's first pinned model among `base_model_ids`, else Layer's recommendation for the tool's job. */
1668
+ default_base_model_id: string;
1669
+ }
1532
1670
  export type InferenceUseCase = "text_to_image" | "image_editing" | "multi_angle" | "inpainting" | "reframing" | "split_into_layers" | "text_to_video" | "image_to_video" | "video_editing" | "video_extend" | "insert_video" | "video_subtitle" | "video_lipsync" | "motion_transfer" | "video_object_swap" | "video_character_swap" | "relight_video" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "text_to_world" | "image_to_world" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "image_mask" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "denoise_audio" | "voice_change" | "audio_separation" | "audio_isolation" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on" | "restyle" | "pixelate" | "colorize" | "change_expression" | "erase_object" | "edit_text" | "dub_video" | "extend_audio" | "generate_pbr_materials" | "create_skybox" | "complete_draft";
1533
1671
  /** Delivered when an inference run reaches a terminal state. */
1534
1672
  export interface InferenceWebhookEvent {
@@ -1571,6 +1709,10 @@ export interface ListGroupsOutput {
1571
1709
  groups: Array<GroupOut>;
1572
1710
  pagination: PaginationOutput;
1573
1711
  }
1712
+ export interface ListInferenceToolsOutput {
1713
+ inference_tools: Array<InferenceToolSummary>;
1714
+ pagination: PaginationOutput;
1715
+ }
1574
1716
  export interface ListMembersOutput {
1575
1717
  members: Array<MemberOutput>;
1576
1718
  pagination: PaginationOutput;
@@ -1811,6 +1953,7 @@ export interface OutputFit {
1811
1953
  scale?: OutputFitScale;
1812
1954
  anchor?: OutputFitAnchor;
1813
1955
  padding?: number;
1956
+ corner_radius?: number;
1814
1957
  }
1815
1958
  /**
1816
1959
  * The point of the drawing that lands on the same point of the canvas.
@@ -1958,6 +2101,12 @@ export interface RequestUploadUrlResponse {
1958
2101
  /** Source type the file was created with, echoed from the request. */
1959
2102
  source_type?: FileSourceType | null;
1960
2103
  }
2104
+ export interface RestoreDeletedFilesOutput {
2105
+ /** Files restored. Ids not in the trash are left silently. */
2106
+ restored_files: number;
2107
+ /** Bytes those files hold. */
2108
+ restored_bytes: number;
2109
+ }
1961
2110
  export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "creator" | "member" | "installation" | "provisioning";
1962
2111
  export interface RotateWebhookSecretResponse {
1963
2112
  /** The new signing secret. Start verifying with it. */
@@ -2150,6 +2299,14 @@ export interface SkippedFile {
2150
2299
  /** Why this file_id was not added: not_found (no such file), foreign_workspace (belongs to another workspace), already_member (already in the set), or duplicate_in_request (listed more than once in this call). */
2151
2300
  reason: "not_found" | "foreign_workspace" | "already_member" | "duplicate_in_request";
2152
2301
  }
2302
+ export interface SkippedFileOutput {
2303
+ /** Id of the file left. */
2304
+ file_id: string;
2305
+ /** What holds the file, and what to do about it. */
2306
+ message: string;
2307
+ /** Everything that holds the file. */
2308
+ dependencies: Array<FileDependencyOutput>;
2309
+ }
2153
2310
  export interface SpriteSheetAnimationView {
2154
2311
  /** The animation's name. */
2155
2312
  name: string;
@@ -2224,6 +2381,63 @@ export interface StartTrainingResponse {
2224
2381
  /** Deliveries this run will produce. Empty when no webhook was supplied. */
2225
2382
  expected_events?: Array<WebhookEventType>;
2226
2383
  }
2384
+ export interface StorageBreakdownOutput {
2385
+ /** Stored files when the breakdown was computed. */
2386
+ total_files: number;
2387
+ /** Bytes those files hold. */
2388
+ total_bytes: number;
2389
+ /** Generated and uploaded files. */
2390
+ by_origin: Array<StorageSliceOutput>;
2391
+ /** Files by content category, most bytes first. */
2392
+ by_category: Array<StorageSliceOutput>;
2393
+ /** Files by age, youngest first. */
2394
+ by_age: Array<StorageSliceOutput>;
2395
+ /** The projects holding the most, then the rest together, then files in no project. A file in several projects counts in each. */
2396
+ by_project: Array<StorageSliceOutput>;
2397
+ /** The members who created the most, then everyone else together. */
2398
+ by_member: Array<StorageSliceOutput>;
2399
+ /** The largest stored files, largest first. */
2400
+ largest_files: Array<StoredFileOutput>;
2401
+ }
2402
+ export interface StorageSliceOutput {
2403
+ /** What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, ...), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member's principal id. Null for the slice that totals everything not listed. */
2404
+ key: string | null;
2405
+ /** What to call the slice. */
2406
+ label: string;
2407
+ /** Files in the slice. */
2408
+ files: number;
2409
+ /** Bytes those files hold. */
2410
+ bytes: number;
2411
+ }
2412
+ /** Whether a file is the output of a generation, or something a person put in the workspace. */
2413
+ export type StoredFileOrigin = "generated" | "uploaded";
2414
+ export interface StoredFileOutput {
2415
+ /** Id of the file. */
2416
+ file_id: string;
2417
+ /** The file's name. */
2418
+ name: string;
2419
+ /** The file's MIME type. */
2420
+ content_type: string;
2421
+ /** What kind of asset the file is. */
2422
+ content_category: FileContentCategory;
2423
+ /** Whether a generation produced the file or a person uploaded it. */
2424
+ origin: StoredFileOrigin;
2425
+ /** Bytes the file holds. */
2426
+ size_bytes: number;
2427
+ /** When the file was created. */
2428
+ created_at: string;
2429
+ /** Who created the file, when known. */
2430
+ created_by_name: string | null;
2431
+ /** When the file was deleted; set in the trash only. */
2432
+ deleted_at: string | null;
2433
+ /** Who deleted the file; null for an automatic delete. */
2434
+ deleted_by_name: string | null;
2435
+ }
2436
+ export interface StoredFilePageOutput {
2437
+ files: Array<StoredFileOutput>;
2438
+ /** Pass as `cursor` for the next page; null on the last page. */
2439
+ next_cursor: string | null;
2440
+ }
2227
2441
  /**
2228
2442
  * What a reference set *is*.
2229
2443
  *
@@ -2258,7 +2472,7 @@ export interface TileGrid {
2258
2472
  footprint_width?: number;
2259
2473
  footprint_depth?: number;
2260
2474
  height?: number;
2261
- tile_width?: number;
2475
+ tile_width?: number | null;
2262
2476
  light_from?: TileLightSide;
2263
2477
  }
2264
2478
  /** The side the key light comes from, seen from the camera. */
@@ -2398,6 +2612,7 @@ export interface UpdateSessionBody {
2398
2612
  }
2399
2613
  /** What a cap does once its member has used all of it. */
2400
2614
  export type UsageLimitMode = "warn" | "block";
2615
+ /** How often a usage cap resets: at midnight UTC, on Monday, or on the 1st of the month. */
2401
2616
  export type UsageLimitPeriod = "daily" | "weekly" | "monthly";
2402
2617
  export interface ValidationError {
2403
2618
  loc: Array<string | number>;
@@ -2576,6 +2791,20 @@ export interface WorkspaceInfo {
2576
2791
  last_active_at: string | null;
2577
2792
  }
2578
2793
  export type WorkspaceMembershipStatus = "active" | "suspended";
2794
+ export interface WorkspaceStorageOutput {
2795
+ /** Bytes the workspace stores now: a live count. */
2796
+ used_bytes: number;
2797
+ /** The most the workspace may store; null when it has no limit. */
2798
+ quota_bytes: number | null;
2799
+ /** What the stored files are, as of `breakdown_computed_at`; null until first computed. */
2800
+ breakdown: StorageBreakdownOutput | null;
2801
+ /** When the breakdown was computed. It trails `used_bytes`, which is live. */
2802
+ breakdown_computed_at: string | null;
2803
+ /** Whether a fresh breakdown is being computed. */
2804
+ is_breakdown_computing: boolean;
2805
+ /** When a fresh breakdown can next be asked for: 15 minutes after the last was computed. Null when it can be now. */
2806
+ breakdown_recompute_available_at: string | null;
2807
+ }
2579
2808
  export interface WorkspaceUsageOutput {
2580
2809
  /** Current Creative Units balance. */
2581
2810
  balance_creative_units: number;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.63";
1
+ export const VERSION = "1.0.74";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.63",
3
+ "version": "1.0.74",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",