@layer_ai/sdk 1.0.62 → 1.0.70

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;
@@ -357,6 +433,23 @@ export interface DailyUsage {
357
433
  /** Creative Units consumed on this day across all models. */
358
434
  creative_units: number;
359
435
  }
436
+ export interface DeleteStoredFilesOutput {
437
+ /** Files deleted. They stay in the trash for 29 days. */
438
+ deleted_files: number;
439
+ /** Bytes those files held. */
440
+ deleted_bytes: number;
441
+ /** Files left because something depends on them. Ids that are not a stored file are left silently. */
442
+ skipped: Array<SkippedFileOutput>;
443
+ }
444
+ export interface EffectiveAutoDeletePolicyOutput {
445
+ policy: AutoDeletePolicyIO;
446
+ /** The workspace that set the policy: this one or an ancestor. */
447
+ source_workspace_id: string;
448
+ /** That workspace's name. */
449
+ source_workspace_name: string | null;
450
+ /** Whether an ancestor locked it, so this workspace cannot set its own. */
451
+ is_locked_by_ancestor: boolean;
452
+ }
360
453
  export interface EstimateForgePriceOutput {
361
454
  /** Total estimated Creative Units price for this run. */
362
455
  estimated_price_creative_units: number;
@@ -441,6 +534,14 @@ export interface EstimateInferencePriceRequest {
441
534
  segment_by?: SegmentBy | null;
442
535
  /** Parts to split along when segment_by is PARTS, at most 10. */
443
536
  segment_part_names?: Array<string> | null;
537
+ /** What a mesh split treats the mesh as: CHARACTER, split by a body-part template, or GENERAL, split by segment_level. Support varies by model. */
538
+ segment_target?: SegmentTarget | null;
539
+ /** How many parts a CHARACTER split makes. Support varies by model. */
540
+ segment_parts?: number | null;
541
+ /** How finely a GENERAL split cuts the mesh: LOW, MEDIUM or HIGH. Support varies by model. */
542
+ segment_level?: SegmentLevel | null;
543
+ /** How aggressively a mesh split cuts: higher makes more parts. Support varies by model. */
544
+ segment_strength?: number | null;
444
545
  /** Generate quad mesh. */
445
546
  quad_mesh?: boolean | null;
446
547
  /** Generate PBR materials. */
@@ -586,6 +687,14 @@ export interface EstimateInferencePriceV2Request {
586
687
  segment_by?: SegmentBy | null;
587
688
  /** Parts to split along when segment_by is PARTS, at most 10. */
588
689
  segment_part_names?: Array<string> | null;
690
+ /** What a mesh split treats the mesh as: CHARACTER, split by a body-part template, or GENERAL, split by segment_level. Support varies by model. */
691
+ segment_target?: SegmentTarget | null;
692
+ /** How many parts a CHARACTER split makes. Support varies by model. */
693
+ segment_parts?: number | null;
694
+ /** How finely a GENERAL split cuts the mesh: LOW, MEDIUM or HIGH. Support varies by model. */
695
+ segment_level?: SegmentLevel | null;
696
+ /** How aggressively a mesh split cuts: higher makes more parts. Support varies by model. */
697
+ segment_strength?: number | null;
589
698
  /** Generate quad mesh. */
590
699
  quad_mesh?: boolean | null;
591
700
  /** Generate PBR materials. */
@@ -610,6 +719,8 @@ export interface EstimateInferencePriceV2Request {
610
719
  style_exaggeration?: number | null;
611
720
  /** Speech speed multiplier. */
612
721
  speed?: number | null;
722
+ /** 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. */
723
+ speech_language?: string | null;
613
724
  /** Upscale factor (e.g. 2.0, 4.0). */
614
725
  upscale_ratio?: number | null;
615
726
  /** Creative variation strength for upscaling. */
@@ -686,7 +797,7 @@ export interface EstimateInferencePriceV2Request {
686
797
  scene_lighting?: SceneLightingConfig | null;
687
798
  /** 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`. */
688
799
  tile_grid?: TileGrid | null;
689
- /** 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. */
800
+ /** 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. */
690
801
  output_fit?: OutputFit | null;
691
802
  /** 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. */
692
803
  nine_slice?: boolean | null;
@@ -841,6 +952,14 @@ export interface ExecuteInferenceRequest {
841
952
  segment_by?: SegmentBy | null;
842
953
  /** Parts to split along when segment_by is PARTS, at most 10. */
843
954
  segment_part_names?: Array<string> | null;
955
+ /** What a mesh split treats the mesh as: CHARACTER, split by a body-part template, or GENERAL, split by segment_level. Support varies by model. */
956
+ segment_target?: SegmentTarget | null;
957
+ /** How many parts a CHARACTER split makes. Support varies by model. */
958
+ segment_parts?: number | null;
959
+ /** How finely a GENERAL split cuts the mesh: LOW, MEDIUM or HIGH. Support varies by model. */
960
+ segment_level?: SegmentLevel | null;
961
+ /** How aggressively a mesh split cuts: higher makes more parts. Support varies by model. */
962
+ segment_strength?: number | null;
844
963
  /** Generate quad mesh. */
845
964
  quad_mesh?: boolean | null;
846
965
  /** Generate PBR materials. */
@@ -996,6 +1115,14 @@ export interface ExecuteInferenceV2Request {
996
1115
  segment_by?: SegmentBy | null;
997
1116
  /** Parts to split along when segment_by is PARTS, at most 10. */
998
1117
  segment_part_names?: Array<string> | null;
1118
+ /** What a mesh split treats the mesh as: CHARACTER, split by a body-part template, or GENERAL, split by segment_level. Support varies by model. */
1119
+ segment_target?: SegmentTarget | null;
1120
+ /** How many parts a CHARACTER split makes. Support varies by model. */
1121
+ segment_parts?: number | null;
1122
+ /** How finely a GENERAL split cuts the mesh: LOW, MEDIUM or HIGH. Support varies by model. */
1123
+ segment_level?: SegmentLevel | null;
1124
+ /** How aggressively a mesh split cuts: higher makes more parts. Support varies by model. */
1125
+ segment_strength?: number | null;
999
1126
  /** Generate quad mesh. */
1000
1127
  quad_mesh?: boolean | null;
1001
1128
  /** Generate PBR materials. */
@@ -1020,6 +1147,8 @@ export interface ExecuteInferenceV2Request {
1020
1147
  style_exaggeration?: number | null;
1021
1148
  /** Speech speed multiplier. */
1022
1149
  speed?: number | null;
1150
+ /** 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. */
1151
+ speech_language?: string | null;
1023
1152
  /** Upscale factor (e.g. 2.0, 4.0). */
1024
1153
  upscale_ratio?: number | null;
1025
1154
  /** Creative variation strength for upscaling. */
@@ -1096,7 +1225,7 @@ export interface ExecuteInferenceV2Request {
1096
1225
  scene_lighting?: SceneLightingConfig | null;
1097
1226
  /** 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`. */
1098
1227
  tile_grid?: TileGrid | null;
1099
- /** 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. */
1228
+ /** 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. */
1100
1229
  output_fit?: OutputFit | null;
1101
1230
  /** 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. */
1102
1231
  nine_slice?: boolean | null;
@@ -1126,6 +1255,8 @@ export interface ExecuteInferenceV2Request {
1126
1255
  session_id?: string | null;
1127
1256
  /** 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. */
1128
1257
  webhook?: WebhookInput | null;
1258
+ /** 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`). */
1259
+ inference_tool_key?: string | null;
1129
1260
  }
1130
1261
  export interface ExecuteWorkflowOutput {
1131
1262
  /** Unique identifier for this workflow run. */
@@ -1153,6 +1284,19 @@ export interface ExecuteWorkflowRequest {
1153
1284
  /** 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. */
1154
1285
  webhook?: WebhookInput | null;
1155
1286
  }
1287
+ export type FileContentCategory = "image" | "video" | "mesh" | "audio" | "pose" | "safetensors" | "playable" | "spine" | "font" | "world" | "pbr_materials" | "other";
1288
+ export interface FileDependencyOutput {
1289
+ /** 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`. */
1290
+ kind: string;
1291
+ /** Id of the thing that depends on the file. */
1292
+ owner_id: string;
1293
+ /** Its name, when it has one. */
1294
+ owner_name: string | null;
1295
+ }
1296
+ export interface FileIdsInput {
1297
+ /** At most 500 file ids. */
1298
+ file_ids: Array<string>;
1299
+ }
1156
1300
  /** What an engine needs beyond the image to build a resource from a file. Each kind is null when absent. */
1157
1301
  export interface FileMetadataView {
1158
1302
  /** Grid placement, for a game tile sprite. */
@@ -1188,7 +1332,7 @@ export interface FileScoresOutput {
1188
1332
  /** When the stamp was written. */
1189
1333
  headline_scored_at?: string | null;
1190
1334
  }
1191
- export type FileSourceType = "pose" | "reference" | "mask" | "composite" | "google_drive" | "miro" | "transformed_reference" | "skill_resource" | "skill_bundle";
1335
+ export type FileSourceType = "pose" | "reference" | "mask" | "composite" | "google_drive" | "miro" | "linear" | "jira" | "transformed_reference" | "skill_resource" | "skill_bundle";
1192
1336
  export interface ForgeGuidanceFileInput {
1193
1337
  /** File ID of an uploaded file. */
1194
1338
  file_id: string;
@@ -1497,7 +1641,7 @@ export interface InferenceReferenceSetInput {
1497
1641
  weight?: number;
1498
1642
  }
1499
1643
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1500
- 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" | "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";
1644
+ 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";
1501
1645
  /** Delivered when an inference run reaches a terminal state. */
1502
1646
  export interface InferenceWebhookEvent {
1503
1647
  /** Unique event id, repeated in the webhook-id header. */
@@ -1779,6 +1923,7 @@ export interface OutputFit {
1779
1923
  scale?: OutputFitScale;
1780
1924
  anchor?: OutputFitAnchor;
1781
1925
  padding?: number;
1926
+ corner_radius?: number;
1782
1927
  }
1783
1928
  /**
1784
1929
  * The point of the drawing that lands on the same point of the canvas.
@@ -1926,6 +2071,12 @@ export interface RequestUploadUrlResponse {
1926
2071
  /** Source type the file was created with, echoed from the request. */
1927
2072
  source_type?: FileSourceType | null;
1928
2073
  }
2074
+ export interface RestoreDeletedFilesOutput {
2075
+ /** Files restored. Ids not in the trash are left silently. */
2076
+ restored_files: number;
2077
+ /** Bytes those files hold. */
2078
+ restored_bytes: number;
2079
+ }
1929
2080
  export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "creator" | "member" | "installation" | "provisioning";
1930
2081
  export interface RotateWebhookSecretResponse {
1931
2082
  /** The new signing secret. Start verifying with it. */
@@ -2027,6 +2178,17 @@ export interface ScoringRunWebhookEvent {
2027
2178
  * Offered where the model's ``segment_by`` capability lists it.
2028
2179
  */
2029
2180
  export type SegmentBy = "AUTO" | "PARTS";
2181
+ /**
2182
+ * Split granularity for a general-target segmentation (more parts as it
2183
+ * rises). Only meaningful when the target is ``GENERAL``.
2184
+ */
2185
+ export type SegmentLevel = "LOW" | "MEDIUM" | "HIGH";
2186
+ /**
2187
+ * What a mesh-segmentation model treats the input as, selecting its split
2188
+ * strategy. ``CHARACTER`` splits a humanoid mesh with a body-part template;
2189
+ * ``GENERAL`` splits any mesh by granularity level (e.g. Hi3D Parts).
2190
+ */
2191
+ export type SegmentTarget = "CHARACTER" | "GENERAL";
2030
2192
  /** One `object` event on a session's stream. */
2031
2193
  export interface SessionEvent {
2032
2194
  /** What happened to the object: created, updated, or deleted. */
@@ -2107,6 +2269,14 @@ export interface SkippedFile {
2107
2269
  /** 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). */
2108
2270
  reason: "not_found" | "foreign_workspace" | "already_member" | "duplicate_in_request";
2109
2271
  }
2272
+ export interface SkippedFileOutput {
2273
+ /** Id of the file left. */
2274
+ file_id: string;
2275
+ /** What holds the file, and what to do about it. */
2276
+ message: string;
2277
+ /** Everything that holds the file. */
2278
+ dependencies: Array<FileDependencyOutput>;
2279
+ }
2110
2280
  export interface SpriteSheetAnimationView {
2111
2281
  /** The animation's name. */
2112
2282
  name: string;
@@ -2181,6 +2351,63 @@ export interface StartTrainingResponse {
2181
2351
  /** Deliveries this run will produce. Empty when no webhook was supplied. */
2182
2352
  expected_events?: Array<WebhookEventType>;
2183
2353
  }
2354
+ export interface StorageBreakdownOutput {
2355
+ /** Stored files when the breakdown was computed. */
2356
+ total_files: number;
2357
+ /** Bytes those files hold. */
2358
+ total_bytes: number;
2359
+ /** Generated and uploaded files. */
2360
+ by_origin: Array<StorageSliceOutput>;
2361
+ /** Files by content category, most bytes first. */
2362
+ by_category: Array<StorageSliceOutput>;
2363
+ /** Files by age, youngest first. */
2364
+ by_age: Array<StorageSliceOutput>;
2365
+ /** The projects holding the most, then the rest together, then files in no project. A file in several projects counts in each. */
2366
+ by_project: Array<StorageSliceOutput>;
2367
+ /** The members who created the most, then everyone else together. */
2368
+ by_member: Array<StorageSliceOutput>;
2369
+ /** The largest stored files, largest first. */
2370
+ largest_files: Array<StoredFileOutput>;
2371
+ }
2372
+ export interface StorageSliceOutput {
2373
+ /** 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. */
2374
+ key: string | null;
2375
+ /** What to call the slice. */
2376
+ label: string;
2377
+ /** Files in the slice. */
2378
+ files: number;
2379
+ /** Bytes those files hold. */
2380
+ bytes: number;
2381
+ }
2382
+ /** Whether a file is the output of a generation, or something a person put in the workspace. */
2383
+ export type StoredFileOrigin = "generated" | "uploaded";
2384
+ export interface StoredFileOutput {
2385
+ /** Id of the file. */
2386
+ file_id: string;
2387
+ /** The file's name. */
2388
+ name: string;
2389
+ /** The file's MIME type. */
2390
+ content_type: string;
2391
+ /** What kind of asset the file is. */
2392
+ content_category: FileContentCategory;
2393
+ /** Whether a generation produced the file or a person uploaded it. */
2394
+ origin: StoredFileOrigin;
2395
+ /** Bytes the file holds. */
2396
+ size_bytes: number;
2397
+ /** When the file was created. */
2398
+ created_at: string;
2399
+ /** Who created the file, when known. */
2400
+ created_by_name: string | null;
2401
+ /** When the file was deleted; set in the trash only. */
2402
+ deleted_at: string | null;
2403
+ /** Who deleted the file; null for an automatic delete. */
2404
+ deleted_by_name: string | null;
2405
+ }
2406
+ export interface StoredFilePageOutput {
2407
+ files: Array<StoredFileOutput>;
2408
+ /** Pass as `cursor` for the next page; null on the last page. */
2409
+ next_cursor: string | null;
2410
+ }
2184
2411
  /**
2185
2412
  * What a reference set *is*.
2186
2413
  *
@@ -2355,6 +2582,7 @@ export interface UpdateSessionBody {
2355
2582
  }
2356
2583
  /** What a cap does once its member has used all of it. */
2357
2584
  export type UsageLimitMode = "warn" | "block";
2585
+ /** How often a usage cap resets: at midnight UTC, on Monday, or on the 1st of the month. */
2358
2586
  export type UsageLimitPeriod = "daily" | "weekly" | "monthly";
2359
2587
  export interface ValidationError {
2360
2588
  loc: Array<string | number>;
@@ -2533,6 +2761,20 @@ export interface WorkspaceInfo {
2533
2761
  last_active_at: string | null;
2534
2762
  }
2535
2763
  export type WorkspaceMembershipStatus = "active" | "suspended";
2764
+ export interface WorkspaceStorageOutput {
2765
+ /** Bytes the workspace stores now: a live count. */
2766
+ used_bytes: number;
2767
+ /** The most the workspace may store; null when it has no limit. */
2768
+ quota_bytes: number | null;
2769
+ /** What the stored files are, as of `breakdown_computed_at`; null until first computed. */
2770
+ breakdown: StorageBreakdownOutput | null;
2771
+ /** When the breakdown was computed. It trails `used_bytes`, which is live. */
2772
+ breakdown_computed_at: string | null;
2773
+ /** Whether a fresh breakdown is being computed. */
2774
+ is_breakdown_computing: boolean;
2775
+ /** When a fresh breakdown can next be asked for: 15 minutes after the last was computed. Null when it can be now. */
2776
+ breakdown_recompute_available_at: string | null;
2777
+ }
2536
2778
  export interface WorkspaceUsageOutput {
2537
2779
  /** Current Creative Units balance. */
2538
2780
  balance_creative_units: number;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.62";
1
+ export const VERSION = "1.0.70";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.62",
3
+ "version": "1.0.70",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",