diff --git a/README.md b/README.md index 4849879..a670373 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,10 @@ You can generate schema types for your own workspace with [@ftrack/ts-schema-gen Once generated, you can integrate them with @ftrack/api by passing them as a type variable: ```ts -import SchemaTypes from "./__generated__/schema.ts"; +import { EntityTypeMap } from "./__generated__/schema.ts"; import { Session } from "@ftrack/api"; -const session = new Session(...); +const session = new Session(...); // user will now be of type User // and provide all available properties for its entity type. diff --git a/source/session.ts b/source/session.ts index 405d316..72302de 100644 --- a/source/session.ts +++ b/source/session.ts @@ -594,7 +594,7 @@ export class Session< * This is cached after the first call, and assumes that the schemas will not change during the session. * @returns Promise with the API schemas for the session. */ - async getSchemas(): Promise[]> { + async getSchemas(): Promise[]> { if (!this.schemasPromise) { this.schemasPromise = this.call>([ { action: "query_schemas" },