@kittycad/lib
Version:
Javascript library for KittyCAD API
1,510 lines (1,499 loc) • 359 kB
TypeScript
export type AccountProvider = 'apple' | 'discord' | 'google' | 'zoo_corp' | 'github' | 'microsoft' | 'saml' | 'test_provider';
export interface AddHoleFromOffset {
/**
* {
* "format": "uuid"
* }
*/
entity_ids: string[];
}
export interface AddOrgMember {
/** format:email, description:The email address of the user to add to the org. */
email: string;
/** The organization role to give the user. */
role: UserOrgRole;
}
export interface Address {
/** The city component. */
city?: string;
/** The country component. This is a two-letter ISO country code. */
country: CountryCode;
/** title:DateTime, format:date-time, description:The time and date the address was created. */
created_at: string;
/** The unique identifier of the address. */
id: Uuid;
/** The state component. */
state?: string;
/** The first street component. */
street1?: string;
/** The second street component. */
street2?: string;
/** title:DateTime, format:date-time, description:The time and date the address was last updated. */
updated_at: string;
/** The user ID that this address belongs to. */
user_id: Uuid;
/** The zip component. */
zip?: string;
}
export interface AddressDetails {
/** The city component. */
city?: string;
/** The country component. This is a two-letter ISO country code. */
country: CountryCode;
/** The state component. */
state?: string;
/** The first street component. */
street1?: string;
/** The second street component. */
street2?: string;
/** The zip component. */
zip?: string;
}
export interface AdjacencyInfo {
/** nullable:true, description:Adjacent edge and face info. */
adjacent_info?: EdgeInfo;
/** nullable:true, description:Opposite edge and face info. */
opposite_info?: EdgeInfo;
/** nullable:true, description:Original edge id and face info. */
original_info?: EdgeInfo;
}
export interface Angle {
/** What unit is the measurement? */
unit: UnitAngle;
/**
* {
* "format": "double",
* "description": "The size of the angle, measured in the chosen unit."
* }
*/
value: number;
}
export interface AnnotationBasicDimension {
/** default:1, format:float, description:The scale of the dimension arrows. Defaults to 1. */
arrow_scale?: number;
/** Basic dimension parameters (symbol and tolerance) */
dimension: AnnotationMbdBasicDimension;
/**
* {
* "format": "uint32",
* "minimum": 0,
* "description": "The point size of the fonts used to generate the annotation label. Very large values can negatively affect performance."
* }
*/
font_point_size: number;
/** format:float, description:The scale of the font label in 3D space */
font_scale: number;
/** format:uuid, description:Entity to measure the dimension from */
from_entity_id: string;
/** Normalized position within the entity to position the dimension from */
from_entity_pos: Point2d;
/** 2D Position offset of the annotation within the plane. */
offset: Point2d;
/**
* {
* "format": "uuid",
* "description": "Orientation plane. The annotation will lie in this plane which is positioned about the leader position as its origin."
* }
*/
plane_id: string;
/**
* {
* "format": "uint32",
* "minimum": 0,
* "description": "Number of decimal places to use when displaying tolerance and dimension values"
* }
*/
precision: number;
/** format:uuid, description:Entity to measure the dimension to */
to_entity_id: string;
/** Normalized position within the entity to position the dimension to */
to_entity_pos: Point2d;
}
export interface AnnotationFeatureControl {
/** nullable:true, description:MBD Control frame for geometric control */
control_frame?: AnnotationMbdControlFrame;
/**
* {
* "nullable": true,
* "minLength": 1,
* "maxLength": 1,
* "description": "Set if this annotation is defining a datum"
* }
*/
defined_datum?: string;
/** nullable:true, description:Basic dimensions */
dimension?: AnnotationMbdBasicDimension;
/** format:uuid, description:Entity to place the annotation leader from */
entity_id: string;
/** Normalized position within the entity to position the annotation leader from */
entity_pos: Point2d;
/**
* {
* "format": "uint32",
* "minimum": 0,
* "description": "The point size of the fonts used to generate the annotation label. Very large values can negatively affect performance."
* }
*/
font_point_size: number;
/** format:float, description:The scale of the font label in 3D space */
font_scale: number;
/**
* {
* "default": 1,
* "format": "float",
* "description": "The scale of the leader (dot or arrow). Defaults to 1."
* }
*/
leader_scale?: number;
/** Type of leader to use */
leader_type: AnnotationLineEnd;
/** 2D Position offset of the annotation within the plane. */
offset: Point2d;
/**
* {
* "format": "uuid",
* "description": "Orientation plane. The annotation will lie in this plane which is positioned about the leader position as its origin."
* }
*/
plane_id: string;
/**
* {
* "format": "uint32",
* "minimum": 0,
* "description": "Number of decimal places to use when displaying tolerance and dimension values"
* }
*/
precision: number;
/**
* {
* "nullable": true,
* "description": "Prefix text which will appear before the basic dimension"
* }
*/
prefix?: string;
/**
* {
* "nullable": true,
* "description": "Suffix text which will appear after the basic dimension"
* }
*/
suffix?: string;
}
export interface AnnotationFeatureTag {
/** format:uuid, description:Entity to place the annotation leader from */
entity_id: string;
/** Normalized position within the entity to position the annotation leader from */
entity_pos: Point2d;
/**
* {
* "format": "uint32",
* "minimum": 0,
* "description": "The point size of the fonts used to generate the annotation label. Very large values can negatively affect performance."
* }
*/
font_point_size: number;
/** format:float, description:The scale of the font label in 3D space */
font_scale: number;
/** Tag key */
key: string;
/**
* {
* "default": 1,
* "format": "float",
* "description": "The scale of the leader (dot or arrow). Defaults to 1."
* }
*/
leader_scale?: number;
/** Type of leader to use */
leader_type: AnnotationLineEnd;
/** 2D Position offset of the annotation within the plane. */
offset: Point2d;
/**
* {
* "format": "uuid",
* "description": "Orientation plane. The annotation will lie in this plane which is positioned about the leader position as its origin."
* }
*/
plane_id: string;
/** Whether or not to display the key on the annotation label */
show_key: boolean;
/** Tag value */
value: string;
}
export type AnnotationLineEnd =
/** Annotation line end type */
'none' | 'arrow' | 'dot';
export interface AnnotationLineEndOptions {
/** How to style the end of the annotation line. */
end: AnnotationLineEnd;
/** How to style the start of the annotation line. */
start: AnnotationLineEnd;
}
export interface AnnotationMbdBasicDimension {
/**
* {
* "nullable": true,
* "format": "double",
* "description": "The explicitly defined dimension. Only required if the measurement is not automatically calculated."
* }
*/
dimension?: number;
/**
* {
* "nullable": true,
* "description": "Type of symbol to use for this dimension (if required)"
* }
*/
symbol?: MbdSymbol;
/** format:double, description:The tolerance of the dimension */
tolerance: number;
}
export interface AnnotationMbdControlFrame {
/**
* {
* "nullable": true,
* "description": "Diameter symbol (if required) whether the geometric control requires a cylindrical or diameter tolerance"
* }
*/
diameter_symbol?: MbdSymbol;
/** nullable:true, description:Feature of size or tolerance modifiers */
modifier?: MbdSymbol;
/**
* {
* "nullable": true,
* "minLength": 1,
* "maxLength": 1,
* "description": "Primary datum"
* }
*/
primary_datum?: string;
/**
* {
* "nullable": true,
* "minLength": 1,
* "maxLength": 1,
* "description": "Secondary datum"
* }
*/
secondary_datum?: string;
/** Geometric symbol, the type of geometric control specified */
symbol: MbdSymbol;
/**
* {
* "nullable": true,
* "minLength": 1,
* "maxLength": 1,
* "description": "Tertiary datum"
* }
*/
tertiary_datum?: string;
/**
* {
* "format": "double",
* "description": "Tolerance value - the total tolerance of the geometric control. The unit is based on the drawing standard."
* }
*/
tolerance: number;
}
export interface AnnotationOptions {
/** nullable:true, description:Color to render the annotation */
color?: Color;
/** nullable:true, description:Set as an MBD measured basic dimension annotation */
dimension?: AnnotationBasicDimension;
/** nullable:true, description:Set as an MBD Feature control annotation */
feature_control?: AnnotationFeatureControl;
/** nullable:true, description:Set as a feature tag annotation */
feature_tag?: AnnotationFeatureTag;
/** nullable:true, description:How to style the start and end of the line */
line_ends?: AnnotationLineEndOptions;
/** nullable:true, format:float, description:Width of the annotation's line */
line_width?: number;
/** nullable:true, description:Position to put the annotation */
position?: Point3d;
/** nullable:true, description:Text displayed on the annotation */
text?: AnnotationTextOptions;
}
export type AnnotationTextAlignmentX =
/** Horizontal Text alignment */
'left' | 'center' | 'right';
export type AnnotationTextAlignmentY =
/** Vertical Text alignment */
'bottom' | 'center' | 'top';
export interface AnnotationTextOptions {
/** format:uint32, minimum:0, description:Text font's point size */
point_size: number;
/** Text displayed on the annotation */
text: string;
/** Alignment along the X axis */
x: AnnotationTextAlignmentX;
/** Alignment along the Y axis */
y: AnnotationTextAlignmentY;
}
export type AnnotationType = 't2d' | 't3d';
export type ApiCallStatus = 'queued' | 'uploaded' | 'in_progress' | 'completed' | 'failed';
export interface ApiCallWithPrice {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The date and time the API call completed billing."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The date and time the API call was created. */
created_at: string;
/**
* {
* "nullable": true,
* "title": "int64",
* "format": "duration",
* "description": "The duration of the API call."
* }
*/
duration?: number;
/** format:email, description:The user's email address. */
email?: string;
/** The endpoint requested by the API call. */
endpoint?: string;
/** The unique identifier for the API call. */
id: Uuid;
/** title:String, format:ip, description:The ip address of the origin. */
ip_address?: string;
/** The HTTP method requested by the API call. */
method: Method;
/**
* {
* "nullable": true,
* "format": "int32",
* "description": "The number of minutes the API call was billed for."
* }
*/
minutes?: number;
/**
* {
* "nullable": true,
* "description": "The organization ID of the API call if it is billable through an organization."
* }
*/
org_id?: Uuid;
/** The origin of the API call. */
origin?: string;
/**
* {
* "nullable": true,
* "title": "double",
* "format": "money-usd",
* "description": "The price of the API call."
* }
*/
price?: number;
/** The request query params sent by the API call. */
request_query_params?: string;
/**
* {
* "nullable": true,
* "format": "int32",
* "description": "The number of seconds the API call was billed for."
* }
*/
seconds?: number;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The date and time the API call started billing."
* }
*/
started_at?: string;
/**
* {
* "nullable": true,
* "title": "int32",
* "format": "int32",
* "description": "The status code returned by the API call."
* }
*/
status_code?: number;
/** The Stripe invoice item ID of the API call if it is billable. */
stripe_invoice_item_id?: string;
/** The API token that made the API call. */
token: Uuid;
/** title:DateTime, format:date-time, description:The date and time the API call was last updated. */
updated_at: string;
/** The user agent of the request. */
user_agent: string;
/** The ID of the user that made the API call. */
user_id: Uuid;
}
export interface ApiCallWithPriceResultsPage {
/** list of items on this page of results */
items: ApiCallWithPrice[];
/**
* {
* "nullable": true,
* "description": "token used to fetch the next page of results (if any)"
* }
*/
next_page?: string;
}
export type ApiEndpoint = 'modeling' | 'ml' | 'file';
export interface ApiError {
/** The error code. */
error_code: ErrorCode;
/** The error message. */
message: string;
}
export interface ApiToken {
/** title:DateTime, format:date-time, description:The date and time the API token was created. */
created_at: string;
/** The unique identifier for the API token. */
id: Uuid;
/** If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token. */
is_valid: boolean;
/** nullable:true, description:An optional label for the API token. */
label?: string;
/** The API token itself. */
token: ApiTokenUuid;
/** title:DateTime, format:date-time, description:The date and time the API token was last updated. */
updated_at: string;
/** The ID of the user that owns the API token. */
user_id: Uuid;
}
export interface ApiTokenResultsPage {
/** list of items on this page of results */
items: ApiToken[];
/**
* {
* "nullable": true,
* "description": "token used to fetch the next page of results (if any)"
* }
*/
next_page?: string;
}
export type ApiTokenUuid =
/** An auth token. A uuid with a prefix of api- */
string;
export interface AppClientInfo {
/** The URL for consent. */
url?: string;
}
export type AsyncApiCallOutput = {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** The output format of the file conversion. */
output_format: FileExportFormat;
/** nullable:true, description:The output format options of the file conversion. */
output_format_options?: OutputFormat3d;
outputs?: {
[key: string]: string;
};
/** The source format of the file conversion. */
src_format: FileImportFormat;
/** nullable:true, description:The source format options of the file conversion. */
src_format_options?: InputFormat3d;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'file_conversion';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/** nullable:true, description:The resulting center of mass. */
center_of_mass?: Point3d;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** The output unit for the center of mass. */
output_unit: UnitLength;
/** The source format of the file. */
src_format: FileImportFormat;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'file_center_of_mass';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** nullable:true, format:double, description:The resulting mass. */
mass?: number;
/** default:0, format:double, description:The material density as denoted by the user. */
material_density?: number;
/** The material density unit. */
material_density_unit: UnitDensity;
/** The output unit for the mass. */
output_unit: UnitMass;
/** The source format of the file. */
src_format: FileImportFormat;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'file_mass';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** The output unit for the volume. */
output_unit: UnitVolume;
/** The source format of the file. */
src_format: FileImportFormat;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'file_volume';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
/** nullable:true, format:double, description:The resulting volume. */
volume?: number;
} | {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, format:double, description:The resulting density. */
density?: number;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** default:0, format:double, description:The material mass as denoted by the user. */
material_mass?: number;
/** The material mass unit. */
material_mass_unit: UnitMass;
/** The output unit for the density. */
output_unit: UnitDensity;
/** The source format of the file. */
src_format: FileImportFormat;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'file_density';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** The output unit for the surface area. */
output_unit: UnitArea;
/** The source format of the file. */
src_format: FileImportFormat;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
/** nullable:true, format:double, description:The resulting surface area. */
surface_area?: number;
type: 'file_surface_area';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/**
* {
* "nullable": true,
* "description": "The code for the model. This is optional but will be required in the future once we are at v1."
* }
*/
code?: string;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** The conversation ID Conversations group different prompts together. */
conversation_id: Uuid;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** nullable:true, description:Feedback from the user, if any. */
feedback?: MlFeedback;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** nullable:true, description:The version of kcl requested. */
kcl_version?: string;
/** The model being used. */
model: TextToCadModel;
/** The version of the model. */
model_version: string;
/** The output format of the model. */
output_format: FileExportFormat;
outputs?: {
[key: string]: string;
};
/** The prompt. */
prompt: string;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'text_to_cad';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/** The code for the new model. */
code: string;
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** The conversation ID Conversations group different prompts together. */
conversation_id: Uuid;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** nullable:true, description:Feedback from the user, if any. */
feedback?: MlFeedback;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/** The model being used. */
model: TextToCadModel;
/** The version of the model. */
model_version: string;
/** The original source code for the model, previous to the changes. */
original_source_code: string;
/**
* {
* "nullable": true,
* "description": "The prompt for the overall changes. This is optional if you only want changes on specific source ranges."
* }
*/
prompt?: string;
/** The source ranges the user suggested to change. */
source_ranges: SourceRangePrompt[];
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'text_to_cad_iteration';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
} | {
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was completed."
* }
*/
completed_at?: string;
/** The conversation ID Conversations group different prompts together. */
conversation_id: Uuid;
/** title:DateTime, format:date-time, description:The time and date the API call was created. */
created_at: string;
/** nullable:true, description:The error the function returned, if any. */
error?: string;
/** nullable:true, description:Feedback from the user, if any. */
feedback?: MlFeedback;
/** The unique identifier of the API call.
This is the same as the API call ID. */
id: Uuid;
/**
* {
* "nullable": true,
* "description": "The version of kcl to use. If empty, the latest version will be used."
* }
*/
kcl_version?: string;
/** The model being used. */
model: TextToCadModel;
/** The version of the model. */
model_version: string;
outputs?: {
[key: string]: string;
};
/**
* {
* "nullable": true,
* "description": "The project name. This is used to tie the prompt to a project. Which helps us make our models better over time."
* }
*/
project_name?: string;
/**
* {
* "nullable": true,
* "description": "The prompt for the overall changes. This is optional if you only want changes on specific source ranges. This will apply to all the files."
* }
*/
prompt?: string;
/** The source ranges the user suggested to change. */
source_ranges: SourceRangePrompt[];
/**
* {
* "nullable": true,
* "title": "DateTime",
* "format": "date-time",
* "description": "The time and date the API call was started."
* }
*/
started_at?: string;
/** The status of the API call. */
status: ApiCallStatus;
type: 'text_to_cad_multi_file_iteration';
/** title:DateTime, format:date-time, description:The time and date the API call was last updated. */
updated_at: string;
/** The user ID of the user who created the API call. */
user_id: Uuid;
};
export interface AuthApiKeyResponse {
/** The session token */
session_token: string;
}
export interface AuthCallback {
/** The authorization code. */
code?: string;
/**
* {
* "nullable": true,
* "description": "For Apple only, a JSON web token containing the user’s identity information."
* }
*/
id_token?: string;
/** The state that we had passed in through the user consent URL. */
state?: string;
/**
* {
* "nullable": true,
* "description": "For Apple only, a JSON string containing the data requested in the scope property. The returned data is in the following format: `{ \"name\": { \"firstName\": string, \"lastName\": string }, \"email\": string }`"
* }
*/
user?: string;
}
export type Axis = 'y' | 'z';
export interface AxisDirectionPair {
/** Axis specifier. */
axis: Axis;
/** Specifies which direction the axis is pointing. */
direction: Direction;
}
export type BatchResponse = {
/** Response to the modeling command. */
response: OkModelingCmdResponse;
} | {
/** Errors that occurred during the modeling command. */
errors: ApiError[];
};
export type BillingCadence = 'annual' | 'quarterly' | 'monthly' | 'manual';
export type BillingCommitmentScope = 'pooled' | 'per_item';
export interface BillingContractItemInput {
/**
* {
* "default": true,
* "description": "Whether the item should participate in billing decisions immediately."
* }
*/
active?: boolean;
/**
* {
* "nullable": true,
* "description": "Optional normalization rule used before rating usage."
* }
*/
billing_unit_granularity?: BillingUnitGranularity;
/** Canonical item code so later metering can find the right price row. */
code: BillingItemCode;
/** Human-readable name shown in finance tooling. */
display_name: string;
/**
* {
* "nullable": true,
* "title": "double",
* "format": "money-usd",
* "description": "Fixed fee charged for the item when the kind is `fixed_fee`."
* }
*/
fixed_fee_amount?: number;
/**
* {
* "default": false,
* "description": "Whether usage from this item may burn down contract commitment."
* }
*/
is_commitment_eligible?: boolean;
/** Pricing model for this item. */
kind: BillingItemKind;
/** default:[], description:Pricing tiers for usage-rated items. */
rate_tiers?: BillingRateTierInput[];
/** Base measurement unit for pricing and usage. */
unit: BillingUnit;
}
export interface BillingContractItemView {
/** Whether the item is active. */
active: boolean;
/** nullable:true, description:Optional normalization rule for usage. */
billing_unit_granularity?: BillingUnitGranularity;
/** Canonical item code. */
code: BillingItemCode;
/** Human-readable item name. */
display_name: string;
/**
* {
* "nullable": true,
* "title": "double",
* "format": "money-usd",
* "description": "Fixed fee charged for the item when applicable."
* }
*/
fixed_fee_amount?: number;
/** Database identifier for the contract item row. */
id: Uuid;
/** Whether this item can consume commitment. */
is_commitment_eligible: boolean;
/** Pricing model for the item. */
kind: BillingItemKind;
/** Usage tiers for the item. */
rate_tiers: BillingRateTierView[];
/** Measurement unit for the item. */
unit: BillingUnit;
}
export type BillingContractStatus = 'draft' | 'scheduled' | 'active' | 'closed' | 'canceled';
export interface BillingContractUpsert {
/** Operational cadence used for finance workflows. */
billing_cadence: BillingCadence;
/** Whether commitment is shared or item-scoped. */
commitment_scope: BillingCommitmentScope;
/** Contract currency shared by every money field in this definition. */
currency: Currency;
/**
* {
* "nullable": true,
* "description": "Free-form finance note for discounts or negotiated pricing."
* }
*/
discount_description?: string;
/** title:DateTime, format:date-time, description:Timestamp when the contract starts to apply. */
effective_at: string;
/**
* {
* "nullable": true,
* "description": "Provider-owned customer reference, when one already exists."
* }
*/
external_customer_id?: BillingExternalCustomerId;
/** Billable items attached to the contract. */
items: BillingContractItemInput[];
/** Human-readable contract label. */
name: string;
/** nullable:true, description:Internal notes about the contract. */
notes?: string;
/** Period schedule for the contract term. */
periods: BillingPeriodInput[];
/** Downstream provider responsible for collecting the invoice. */
provider: BillingProvider;
/** What should happen to unused commitment when a period ends. */
rollover_policy: BillingRolloverPolicy;
/** Lifecycle state for the new contract. */
status: BillingContractStatus;
/** title:DateTime, format:date-time, description:Timestamp when the contract term ends. */
term_end_at: string;
}
export interface BillingContractView {
/** Billing account identifier that owns the contract. */
account_id: Uuid;
/** Operational cadence for finance workflows. */
billing_cadence: BillingCadence;
/** Whether commitment is shared or item-scoped. */
commitment_scope: BillingCommitmentScope;
/** Billing contract identifier. */
contract_id: Uuid;
/** Currency shared by every money field in the contract. */
currency: Currency;
/** nullable:true, description:Discount note associated with the contract. */
discount_description?: string;
/** title:DateTime, format:date-time, description:Timestamp when the contract started applying. */
effective_at: string;
/**
* {
* "nullable": true,
* "description": "Provider-owned customer reference, when one exists."
* }
*/
external_customer_id?: BillingExternalCustomerId;
/** Billable items attached to the contract. */
items: BillingContractItemView[];
/** Human-readable contract label. */
name: string;
/** nullable:true, description:Internal notes for the contract. */
notes?: string;
/** Period schedule for the contract. */
periods: BillingPeriodView[];
/** Downstream invoice provider. */
provider: BillingProvider;
/** What happens to unused commitment when a period ends. */
rollover_policy: BillingRolloverPolicy;
/** Lifecycle state for the contract. */
status: BillingContractStatus;
/** title:DateTime, format:date-time, description:Timestamp when the contract term ends. */
term_end_at: string;
}
export type BillingExternalCustomerId =
/** Provider-owned customer reference for downstream invoicing systems. */
string;
export interface BillingInfo {
/** nullable:true, description:The address of the customer. */
address?: AddressDetails;
/** The name of the customer. */
name?: string;
/**
* {
* "title": "String",
* "default": "",
* "format": "phone",
* "description": "The phone for the customer."
* }
*/
phone?: string;
}
export type BillingItemCode = 'enterprise_support' | 'fde' | 'govcloud_management' | 'file_ingestion_conversion' | 'licensed_api_credits';
export type BillingItemKind = 'fixed_fee' | 'usage_tiered' | 'usage_commitment_bucket';
export type BillingPeriodIndex =
/**
* {
* "format": "int32",
* "description": "Non-negative index of a billing period inside a contract."
* }
*/
number;
export interface BillingPeriodInput {
/** title:double, format:money-usd, description:New commitment funded for this period. */
commitment_amount: number;
/** title:DateTime, format:date-time, description:Exclusive period end timestamp. */
period_end_at: string;
/** Sequence index for the period inside the contract. */
period_index: BillingPeriodIndex;
/** title:DateTime, format:date-time, description:Inclusive period start timestamp. */
period_start_at: string;
/**
* {
* "nullable": true,
* "title": "double",
* "format": "money-usd",
* "description": "Commitment carried in from an earlier period."
* }
*/
rollover_in_amount?: number;
/**
* {
* "nullable": true,
* "title": "double",
* "format": "money-usd",
* "description": "Commitment intentionally rolled out to a later period."
* }
*/
rollover_out_amount?: number;
/** nullable:true, description:Operational status for the period. */
status?: BillingPeriodStatus;
}
export type BillingPeriodStatus = 'open' | 'closed';
export interface BillingPeriodView {
/** title:double, format:money-usd, description:New commitment funded for this period. */
commitment_amount: number;
/** Database identifier for the period row. */
id: Uuid;
/** title:DateTime, format:date-time, description:Exclusive period end timestamp. */
period_end_at: string;
/** Sequence index for the period inside the contract. */
period_index: BillingPeriodIndex;
/** title:DateTime, format:date-time, description:Inclusive period start timestamp. */
period_start_at: string;
/** title:double, format:money-usd, description:Commitment carried in from a previous period. */
rollover_in_amount: number;
/**
* {
* "title": "double",
* "format": "money-usd",
* "description": "Commitment intentionally rolled out to a later period."
* }
*/
rollover_out_amount: number;
/** Operational status for the period. */
status: BillingPeriodStatus;
}
export type BillingProvider = 'stripe' | 'manual_invoice';
export type BillingQuantity =
/**
* {
* "format": "int64",
* "description": "Non-negative quantity used for tier boundaries and later usage counts."
* }
*/
number;
export interface BillingRateTierInput {
/**
* {
* "nullable": true,
* "description": "Exclusive upper bound for the tier, or `None` when the tier is open-ended."
* }
*/
tier_end_exclusive?: BillingQuantity;
/** First billable quantity in this tier. */
tier_start_inclusive: BillingQuantity;
/**
* {
* "title": "double",
* "format": "money-usd",
* "description": "Price to charge for each unit that lands in this tier."
* }
*/
unit_price: number;
}
export interface BillingRateTierView {
/** Database identifier for the tier row. */
id: Uuid;
/**
* {
* "nullable": true,
* "description": "Exclusive upper bound for the tier, or `None` when the tier is open-ended."
* }
*/
tier_end_exclusive?: BillingQuantity;
/** First billable quantity in this tier. */
tier_start_inclusive: BillingQuantity;
/** title:double, format:money-usd, description:Price charged for each unit in the tier. */
unit_price: number;
}
export type BillingRolloverPolicy = 'none' | 'year1_to_year2_once';
export type BillingUnit = 'file' | 'minute' | 'second' | 'year' | 'period';
export type BillingUnitGranularity = 'minute' | 'second';
export type BlendType = 'tangent';
export type BlockReason = 'missing_payment_method' | 'payment_method_failed' | 'upgrade_downgrade_abuse';
export interface BodiesCreated {
/** All bodies created by this operation. */
bodies: BodyCreated[];
}
export interface BodiesUpdated {
/** All bodies created by this operation. */
bodies: BodyUpdated[];
}
export interface BodyCreated {
/** format:uuid, description:The body's ID. */
id: string;
/** Surfaces this body contains. */
surfaces: SurfaceCreated[];
}
export type BodyType = 'solid' | 'surface';
export interface BodyUpdated {
/** format:uuid, description:The body's ID. */
id: string;
/** Surfaces added to this body. */
surfaces: SurfaceCreated[];
}
export interface BooleanImprint {
/** If the operation involved any intersecting solids. */
any_intersections?: boolean;
/**
* {
* "format": "uuid"
* }
*/
extra_solid_ids?: string[];
}
export interface BooleanIntersection {
/** If the operation involved any intersecting solids. */
any_intersections?: boolean;
/**
* {
* "format": "uuid"
* }
*/
extra_solid_ids?: string[];
}
export interface BooleanSubtract {
/** If the operation involved any intersecting solids. */
any_intersections?: boolean;
/**
* {
* "format": "uuid"
* }
*/
extra_solid_ids?: string[];
}
export interface BooleanUnion {
/** If the operation involved any intersecting solids. */
any_intersections?: boolean;
/**
* {
* "format": "uuid"
* }
*/
extra_solid_ids?: string[];
}
export interface BoundingBox {
/** Center of the box. */
center: Point3d;
/** Dimensions of the box along each axis. */
dimensions: Point3d;
}
export type CadDesignWorkflow = 'sketching' | 'coding' | 'ai' | 'hybrid_approach';
export type CadDiscoverySource = 'google' | 'x' | 'tiktok' | 'reddit' | 'payload_space' | 'youtube' | 'instagram' | 'facebook' | 'word_of_mouth' | 'other';
export type CadExperienceLevel = 'beginner' | 'intermediate' | 'advanced';
export type CadIndustry = 'mechanical_engineering' | 'manufacturing' | 'automotive' | 'aerospace' | 'civil_engineering' | 'electrical_engineering' | 'construction' | 'product_design' | 'architecture' | 'other';
export type CadUserType = 'student_or_researcher' | 'hobbyist' | 'professional';
export interface CameraDragEnd {
/** Camera settings */
settings: CameraSettings;
}
export type CameraDragInteractionType = 'pan' | 'rotate' | 'rotatetrackball' | 'zoom';
export interface CameraDragMove {
/** Camera settings */
settings: CameraSettings;
}
export interface CameraDragStart {
}
export type CameraMovement = 'vantage' | 'none';
export interface CameraSettings {
/** Camera's look-at center (center-pos gives viewing vector) */
center: Point3d;
/** nullable:true, format:float, description:Camera's field-of-view angle (if ortho is false) */
fov_y?: number;
/** The Camera's orientation (in the form of a quaternion) */
orientation: Point4d;
/** Whether or not the camera is in ortho mode */
ortho: boolean;
/**
* {
* "nullable": true,
* "format": "float",
* "description": "The camera's ortho scale (derived from viewing distance if ortho is true)"
* }
*/
ortho_scale?: number;
/** Camera position (vantage) */
pos: Point3d;
/** Camera's world-space up vector */
up: Point3d;
}
export interface CameraViewState {
/**
* {
* "format": "float"
* }
*/
eye_offset: number;
/**
* {
* "format": "float"
* }
*/
fov_y: number;
is_ortho: boolean;
ortho_scale_enabled: boolean;
/**
* {
* "format": "float"
* }
*/
ortho_scale_factor: number;
/**
* {
* "$ref": "#/components/schemas/Point3d"
* }
*/
pivot_position: Point3d;
/**
* {
* "$ref": "#/components/schemas/Point4d"
* }
*/
pivot_rotation: Point4d;
/**
* {
* "$ref": "#/components/schemas/WorldCoordinateSystem"
* }
*/
world_coord_system: WorldCoordinateSystem;
}
export interface CardDetails {
/** Card brand.
Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */
brand?: string;
/** default:{}, description:Checks on Card address and CVC if provided. */
checks?: PaymentMethodCardChecks;
/** Two-letter ISO code representing the country of the card. */
country?: string;
/**
* {
* "default": 0,
* "format": "int64",
* "description": "Two-digit number representing the card's expiration month."
* }
*/
exp_month?: number;
/**
* {
* "default": 0,
* "format": "int64",
* "description": "Four-digit number representing the card's expiration year."
* }
*/
exp_year?: number;
/** Uniquely identifies this particular card number. */
fingerprint?: string;
/** Card funding type.
Can be `credit`, `debit`, `prepaid`, or `unknown`. */
funding?: string;
/** The last four digits of the card. */
last4?: string;
}
export interface CenterOfMass {
/** The center of mass. */
center_of_mass: Point3d;
/** The output unit for the center of mass. */
output_unit: UnitLength;
}
export interface ClientErrorReport {
/** Stable identifier for the client application reporting the error. */
client: string;
/**
* {
* "nullable": true,
* "description": "Optional application-defined error code or fingerprint."
* }
*/
code?: string;
/** nullable:true, description:Optional JavaScript/runtime error name. */
error_name?: string;
/** Human-readable error message. */
message: string;
/** Client release/version string. */
release: string;
/** nullable:true, description:Optional route/path where the error occurred. */
route?: string;
/** nullable:true, description:Optional stack trace or equivalent debug context. */
stack?: string;
}
export interface ClientErrorReportAccepted {
/** Whether the report was accepted. */
accepted: boolean;
}
export interface ClientMetrics {
/**
* {
* "nullable": true,
* "format": "uint32",
* "minimum": 0,
* "description": "The height of the inbound video stream in pixels.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-frameheight"
* }
*/
rtc_frame_height?: number;
/**
* {
* "nullable": true,
* "format": "uint32",
* "minimum": 0,
* "description": "The width of the inbound video stream in pixels.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framewidth"
* }
*/
rtc_frame_width?: number;
/**
* {
* "nullable": true,
* "format": "uint64",
* "minimum": 0,
* "description": "Counter of the number of WebRTC frames that the client has decoded from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount"
* }
*/
rtc_frames_decoded?: number;
/**
* {
* "nullable": true,
* "format": "uint32",
* "minimum": 0,
* "description": "Counter of the number of WebRTC frames the client has dropped from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framesdropped"
* }
*/
rtc_frames_dropped?: number;
/**
* {
* "nullable": true,
* "format": "uint8",
* "minimum": 0,
* "description": "Current number of frames being rendered in the last second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount"
* }
*/
rtc_frames_per_second?: number;
/**
* {
* "nullable": true,
* "format": "uint64",
* "minimum": 0,
* "description": "Counter of the number of WebRTC frames that the client has received from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount"
* }
*/
rtc_frames_received?: number;
/**
* {
* "nullable": true,
* "format": "uint32",
* "minimum": 0,
* "description": "Number of times the i