API class
Core3D API client
Signature:
declare class API
Remarks
Wraps a typed API client available for arbitrary API and provides a few convenience operations for common operations.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
API constructor. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Readonly<{ check: { create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<any>>; }; me: { read: (options?: FetchInit<{}, "json">) => Promise<FetchResult>; }; }> |
Auth API operations. | |
|
| |||
|
|
Readonly<{ create: (data: any | Design, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; }> |
Design API operations. | |
|
|
Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; }> |
Generation API operations. | |
|
|
Readonly<{ list: (options?: FetchInit<{}, "json">) => Promise<FetchResult<any[]>>; }> |
GenerationStyle API operations. | |
|
|
Readonly<{ read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MaterialResource>>; }> |
Material API operations. | |
|
|
Readonly<{ links: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource[]>>; read: (source: string, target: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource>>; }; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelResource>>; }> |
Model API operations. | |
|
|
Readonly<{ materials: { textures: { read: <TParseAs extends "arrayBuffer" | "blob" = "arrayBuffer" | "blob">(identity: string, filename: `${string}.${("jpg" | "png")}`, options: (Omit<FetchInit<{ force?: boolean; quality?: "0.25k" | "0.5k" | "1k" | "2k" | "4k"; [key: string]: any; }, TParseAs>, "parseAs"> & { parseAs: TParseAs; })) => Promise<FetchResult<{}, TParseAs>>; }; }; }> |
Static API operations. | |
|
|
Readonly<{ designs: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource[]>>; }; exports: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ExportResource[]>>; }; generations: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource[]>>; }; materials: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MaterialResource[]>>; }; members: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.TeamMemberResource[]>>; }; metafieldDefinitions: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MetafieldDefinitionResource[]>>; }; models: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelResource[]>>; }; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UserResource>>; uploads: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource[]>>; }; webhooks: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.WebhookResource[]>>; }; }> |
Team API operations. | |
|
|
Readonly<{ create: (data: { file: string | Blob | File; metafields?: APIv1.MetafieldData[]; team?: string; }, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; }> |
Upload API operations. | |
|
|
Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadVariantResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadVariantResource>>; }> |
UploadVariant API operations. | |
|
|
Readonly<{ designs: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource[]>>; }; exports: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ExportResource[]>>; }; generations: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource[]>>; }; materials: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MaterialResource[]>>; }; metafieldDefinitions: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MetafieldDefinitionResource[]>>; }; models: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelResource[]>>; }; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UserResource>>; teams: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.TeamResource[]>>; }; tokens: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.TokenResource[]>>; }; uploads: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource[]>>; }; webhooks: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.WebhookResource[]>>; }; }> |
User API operations. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
A typed fetch handler for API requests. | ||
|
Resolve a URI to a resource. | ||
|
Wait for a resource status to resolve. |