API class

Core3D API client

Signature:

declare class API 

Remarks

Wraps a typed API client available for arbitrary API and provides a few convenience methods for common operations.

Constructors

Constructor

Modifiers

Description

(constructor)(ctx, data)

API constructor.

Properties

Property

Modifiers

Type

Description

auth

readonly

{ me: { read: ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/auth/me', 'GET'>>; }; }

Auth API operations.

client

readonly

Core3DClient

ctx

readonly

Context

designs

readonly

{ create: (data: Parameters<Core3DClient['/designs']['POST']>['0']['body']) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/designs', 'POST'>>>; read: (identity: string) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/designs/{identity}', 'GET'>>>; }

Design API operations.

generations

readonly

{ create: (data: Parameters<Core3DClient['/generations']['POST']>['0']['body']) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/generations', 'POST'>>>; read: (identity: string) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/generations/{identity}', 'GET'>>>; }

Generation API operations.

materials

readonly

{ read: (identity: string) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/materials/{identity}', 'GET'>>>; }

Material API operations.

models

readonly

{ links: { read: (source: string, target: string) => void; }; read: (identity: string) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/models/{identity}', 'GET'>>>; }

Model API operations.

resolve

readonly

APIResolverFn

Convenience method to resolve resources by URI.

static

readonly

{ materials: { textures: { read: (identity: string, filename: string, options?: { query?: Parameters<Core3DClient['/static/materials/{identity}/textures/{filename}']['GET']>['0']['params']['query']; responseType?: 'arrayBuffer' | 'blob'; }) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/static/materials/{identity}/textures/{filename}', 'GET'>>>; }; }; }

Static API operations.

uploads

readonly

{ create: (data: Parameters<Core3DClient['/uploads']['POST']>['0']['body']) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/uploads', 'POST'>>>; read: (identity: string) => ReturnType<ReturnType<typeof wrapOpenApiMethod<Core3DClient, '/uploads/{identity}', 'GET'>>>; }

Upload API operations.

wait

readonly

(uri: string, options?: { attempts?: number; }) => Promise<any>

Convenience method to wait for an async API resource.

Get in touch

We'd love to learn more about your vision and how we can help.

PressPrivacyTermsSupportCopyright © 2024 Core3D, Inc. All Rights Reserved.