diff --git a/.github/workflows/common_integration_modules_check.yml b/.github/workflows/common_integration_modules_check.yml index 61484fb..77b4758 100644 --- a/.github/workflows/common_integration_modules_check.yml +++ b/.github/workflows/common_integration_modules_check.yml @@ -12,9 +12,9 @@ jobs: working-directory: ./demos/common steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" - name: NPM ci repository root diff --git a/.github/workflows/demo_integrations_ci.yml b/.github/workflows/demo_integrations_ci.yml index c09219c..15e123b 100644 --- a/.github/workflows/demo_integrations_ci.yml +++ b/.github/workflows/demo_integrations_ci.yml @@ -12,9 +12,9 @@ jobs: working-directory: ./demos/ecommerce_shop steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" - name: NPM ci repository root @@ -35,9 +35,9 @@ jobs: working-directory: ./demos/realty steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" - name: NPM ci repository root diff --git a/.github/workflows/package-lock-check.yml b/.github/workflows/package-lock-check.yml index 96e3e9a..f8712f4 100644 --- a/.github/workflows/package-lock-check.yml +++ b/.github/workflows/package-lock-check.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Node.js and NPM - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" diff --git a/.github/workflows/playground_integration_ci.yml b/.github/workflows/playground_integration_ci.yml index 9ec4d36..6767e7e 100644 --- a/.github/workflows/playground_integration_ci.yml +++ b/.github/workflows/playground_integration_ci.yml @@ -12,9 +12,9 @@ jobs: working-directory: ./demos/playground steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" - name: NPM ci repository root diff --git a/.github/workflows/ts-client-check.yml b/.github/workflows/ts-client-check.yml index 2823087..d0f526d 100644 --- a/.github/workflows/ts-client-check.yml +++ b/.github/workflows/ts-client-check.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Node.js and NPM - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" diff --git a/CHANGELOG.md b/CHANGELOG.md index 17753f3..aaf6ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2026-05-07 + +### 🔧 Changed + +- Upgraded GitHub Actions workflows to use `actions/checkout` and `actions/setup-node` v6. +- Upgraded `axios` to `1.15.2` and `@hey-api/openapi-ts` to `0.97.0`. +- Refreshed `openapi/spec.yml` to be based on the latest Connect API and regenerated the TypeScript client. + ## 2026-04-23 ### 🗑️ Removed diff --git a/client/openapi-ts.config.ts b/client/openapi-ts.config.ts index 6067f03..be4a113 100644 --- a/client/openapi-ts.config.ts +++ b/client/openapi-ts.config.ts @@ -2,11 +2,9 @@ import { defineConfig } from "@hey-api/openapi-ts"; export default defineConfig({ input: "../openapi/spec.yml", - experimentalParser: true, output: { path: "./ts", - format: "prettier", - lint: "eslint", + postProcess: ["prettier"], }, plugins: [ { diff --git a/client/package.json b/client/package.json index c46eed4..1b0cea5 100644 --- a/client/package.json +++ b/client/package.json @@ -14,7 +14,7 @@ }, "engineStrict": true, "devDependencies": { - "@hey-api/openapi-ts": "0.85.2", + "@hey-api/openapi-ts": "0.97.0", "typescript": "5.9.2" } } diff --git a/client/ts/client.gen.ts b/client/ts/client.gen.ts index 8bdca47..6922bb3 100644 --- a/client/ts/client.gen.ts +++ b/client/ts/client.gen.ts @@ -21,7 +21,5 @@ export type CreateClientConfig = ( ) => Config & T>; export const client = createClient( - createConfig({ - baseUrl: "https://api.canva.com/rest", - }), + createConfig({ baseUrl: "https://api.canva.com/rest" }), ); diff --git a/client/ts/client/client.gen.ts b/client/ts/client/client.gen.ts index 36b6ca3..3202520 100644 --- a/client/ts/client/client.gen.ts +++ b/client/ts/client/client.gen.ts @@ -41,13 +41,20 @@ export const createClient = (config: Config = {}): Client => { ResolvedRequestOptions >(); - const beforeRequest = async (options: RequestOptions) => { + const beforeRequest = async < + TData = unknown, + TResponseStyle extends "data" | "fields" = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, + >( + options: RequestOptions, + ) => { const opts = { ..._config, ...options, fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, headers: mergeHeaders(_config.headers, options.headers), - serializedBody: undefined, + serializedBody: undefined as string | undefined, }; if (opts.security) { @@ -62,7 +69,9 @@ export const createClient = (config: Config = {}): Client => { } if (opts.body !== undefined && opts.bodySerializer) { - opts.serializedBody = opts.bodySerializer(opts.body); + opts.serializedBody = opts.bodySerializer(opts.body) as + | string + | undefined; } // remove Content-Type header if body is empty to avoid sending invalid requests @@ -70,147 +79,170 @@ export const createClient = (config: Config = {}): Client => { opts.headers.delete("Content-Type"); } - const url = buildUrl(opts); + const resolvedOpts = opts as typeof opts & + ResolvedRequestOptions; + const url = buildUrl(resolvedOpts); - return { opts, url }; + return { opts: resolvedOpts, url }; }; const request: Client["request"] = async (options) => { - // @ts-expect-error - const { opts, url } = await beforeRequest(options); - const requestInit: ReqInit = { - redirect: "follow", - ...opts, - body: getValidRequestBody(opts), - }; + const throwOnError = options.throwOnError ?? _config.throwOnError; + const responseStyle = options.responseStyle ?? _config.responseStyle; - let request = new Request(url, requestInit); + let request: Request | undefined; + let response: Response | undefined; - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); + try { + const { opts, url } = await beforeRequest(options); + const requestInit: ReqInit = { + redirect: "follow", + ...opts, + body: getValidRequestBody(opts), + }; + + request = new Request(url, requestInit); + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } } - } - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = opts.fetch!; - let response = await _fetch(request); + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch!; + + response = await _fetch(request); - for (const fn of interceptors.response.fns) { - if (fn) { - response = await fn(response, request, opts); + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts); + } } - } - const result = { - request, - response, - }; + const result = { + request, + response, + }; + + if (response.ok) { + const parseAs = + (opts.parseAs === "auto" + ? getParseAs(response.headers.get("Content-Type")) + : opts.parseAs) ?? "json"; + + if ( + response.status === 204 || + response.headers.get("Content-Length") === "0" + ) { + let emptyData: any; + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "text": + emptyData = await response[parseAs](); + break; + case "formData": + emptyData = new FormData(); + break; + case "stream": + emptyData = response.body; + break; + case "json": + default: + emptyData = {}; + break; + } + return opts.responseStyle === "data" + ? emptyData + : { + data: emptyData, + ...result, + }; + } - if (response.ok) { - const parseAs = - (opts.parseAs === "auto" - ? getParseAs(response.headers.get("Content-Type")) - : opts.parseAs) ?? "json"; - - if ( - response.status === 204 || - response.headers.get("Content-Length") === "0" - ) { - let emptyData: any; + let data: any; switch (parseAs) { case "arrayBuffer": case "blob": + case "formData": case "text": - emptyData = await response[parseAs](); + data = await response[parseAs](); break; - case "formData": - emptyData = new FormData(); + case "json": { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text(); + data = text ? JSON.parse(text) : {}; break; + } case "stream": - emptyData = response.body; - break; - case "json": - default: - emptyData = {}; - break; + return opts.responseStyle === "data" + ? response.body + : { + data: response.body, + ...result, + }; + } + + if (parseAs === "json") { + if (opts.responseValidator) { + await opts.responseValidator(data); + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data); + } } + return opts.responseStyle === "data" - ? emptyData + ? data : { - data: emptyData, + data, ...result, }; } - let data: any; - switch (parseAs) { - case "arrayBuffer": - case "blob": - case "formData": - case "json": - case "text": - data = await response[parseAs](); - break; - case "stream": - return opts.responseStyle === "data" - ? response.body - : { - data: response.body, - ...result, - }; - } + const textError = await response.text(); + let jsonError: unknown; - if (parseAs === "json") { - if (opts.responseValidator) { - await opts.responseValidator(data); - } + try { + jsonError = JSON.parse(textError); + } catch { + // noop + } - if (opts.responseTransformer) { - data = await opts.responseTransformer(data); + throw jsonError ?? textError; + } catch (error) { + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = await fn( + finalError, + response, + request, + options as ResolvedRequestOptions, + ); } } - return opts.responseStyle === "data" - ? data - : { - data, - ...result, - }; - } - - const textError = await response.text(); - let jsonError: unknown; - - try { - jsonError = JSON.parse(textError); - } catch { - // noop - } - - const error = jsonError ?? textError; - let finalError = error; + finalError = finalError || {}; - for (const fn of interceptors.error.fns) { - if (fn) { - finalError = (await fn(error, response, request, opts)) as string; + if (throwOnError) { + throw finalError; } - } - - finalError = finalError || ({} as string); - if (opts.throwOnError) { - throw finalError; + // TODO: we probably want to return error and improve types + return responseStyle === "data" + ? undefined + : { + error: finalError, + request, + response, + }; } - - // TODO: we probably want to return error and improve types - return opts.responseStyle === "data" - ? undefined - : { - error: finalError, - ...result, - }; }; const makeMethodFn = @@ -223,7 +255,6 @@ export const createClient = (config: Config = {}): Client => { return createSseClient({ ...opts, body: opts.body as BodyInit | null | undefined, - headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { let request = new Request(url, init); @@ -234,12 +265,19 @@ export const createClient = (config: Config = {}): Client => { } return request; }, + serializedBody: getValidRequestBody(opts) as + | BodyInit + | null + | undefined, url, }); }; + const _buildUrl: Client["buildUrl"] = (options) => + buildUrl({ ..._config, ...options }); + return { - buildUrl, + buildUrl: _buildUrl, connect: makeMethodFn("CONNECT"), delete: makeMethodFn("DELETE"), get: makeMethodFn("GET"), diff --git a/client/ts/client/index.ts b/client/ts/client/index.ts index 6dd96c7..4602312 100644 --- a/client/ts/client/index.ts +++ b/client/ts/client/index.ts @@ -16,7 +16,6 @@ export type { Config, CreateClientConfig, Options, - OptionsLegacyParser, RequestOptions, RequestResult, ResolvedRequestOptions, diff --git a/client/ts/client/types.gen.ts b/client/ts/client/types.gen.ts index f640bbd..6c1e9f1 100644 --- a/client/ts/client/types.gen.ts +++ b/client/ts/client/types.gen.ts @@ -75,6 +75,7 @@ export interface RequestOptions< }>, Pick< ServerSentEventsOptions, + | "onRequest" | "onSseError" | "onSseEvent" | "sseDefaultRetryDelay" @@ -101,6 +102,7 @@ export interface ResolvedRequestOptions< ThrowOnError extends boolean = boolean, Url extends string = string, > extends RequestOptions { + headers: Headers; serializedBody?: string; } @@ -144,8 +146,10 @@ export type RequestResult< : TError; } ) & { - request: Request; - response: Response; + /** request may be undefined, because error may be from building the request object itself */ + request?: Request; + /** response may be undefined, because error may be from building the request object itself or from a network error */ + response?: Response; } >; @@ -170,7 +174,7 @@ type SseFn = < ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields", >( - options: Omit, "method">, + options: Omit, "method">, ) => Promise>; type RequestFn = < @@ -194,7 +198,7 @@ type BuildUrlFn = < url: string; }, >( - options: Pick & Options, + options: TData & Options, ) => string; export type Client = CoreClient< @@ -238,31 +242,4 @@ export type Options< RequestOptions, "body" | "path" | "query" | "url" > & - Omit; - -export type OptionsLegacyParser< - TData = unknown, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = "fields", -> = TData extends { body?: any } - ? TData extends { headers?: any } - ? OmitKeys< - RequestOptions, - "body" | "headers" | "url" - > & - TData - : OmitKeys< - RequestOptions, - "body" | "url" - > & - TData & - Pick, "headers"> - : TData extends { headers?: any } - ? OmitKeys< - RequestOptions, - "headers" | "url" - > & - TData & - Pick, "body"> - : OmitKeys, "url"> & - TData; + ([TData] extends [never] ? unknown : Omit); diff --git a/client/ts/client/utils.gen.ts b/client/ts/client/utils.gen.ts index 50d45d3..a563acf 100644 --- a/client/ts/client/utils.gen.ts +++ b/client/ts/client/utils.gen.ts @@ -17,9 +17,8 @@ import type { } from "./types.gen"; export const createQuerySerializer = ({ - allowReserved, - array, - object, + parameters = {}, + ...args }: QuerySerializerOptions = {}) => { const querySerializer = (queryParams: T) => { const search: string[] = []; @@ -31,29 +30,31 @@ export const createQuerySerializer = ({ continue; } + const options = parameters[name] || args; + if (Array.isArray(value)) { const serializedArray = serializeArrayParam({ - allowReserved, + allowReserved: options.allowReserved, explode: true, name, style: "form", value, - ...array, + ...options.array, }); if (serializedArray) search.push(serializedArray); } else if (typeof value === "object") { const serializedObject = serializeObjectParam({ - allowReserved, + allowReserved: options.allowReserved, explode: true, name, style: "deepObject", value: value as Record, - ...object, + ...options.object, }); if (serializedObject) search.push(serializedObject); } else { const serializedPrimitive = serializePrimitiveParam({ - allowReserved, + allowReserved: options.allowReserved, name, value: value as string, }); @@ -218,7 +219,7 @@ export const mergeHeaders = ( mergedHeaders.append(key, v as string); } } else if (value !== undefined) { - // assume object headers are meant to be JSON stringified, i.e. their + // assume object headers are meant to be JSON stringified, i.e., their // content value in OpenAPI specification is 'application/json' mergedHeaders.set( key, @@ -232,8 +233,10 @@ export const mergeHeaders = ( type ErrInterceptor = ( error: Err, - response: Res, - request: Req, + /** response may be undefined due to a network error where no response object is produced */ + response: Res | undefined, + /** request may be undefined, because error may be from building the request object itself */ + request: Req | undefined, options: Options, ) => Err | Promise; diff --git a/client/ts/core/bodySerializer.gen.ts b/client/ts/core/bodySerializer.gen.ts index 8f4ffc5..6aadfde 100644 --- a/client/ts/core/bodySerializer.gen.ts +++ b/client/ts/core/bodySerializer.gen.ts @@ -8,13 +8,21 @@ import type { export type QuerySerializer = (query: Record) => string; -export type BodySerializer = (body: any) => any; +export type BodySerializer = (body: unknown) => unknown; -export interface QuerySerializerOptions { +type QuerySerializerOptionsObject = { allowReserved?: boolean; - array?: SerializerOptions; - object?: SerializerOptions; -} + array?: Partial>; + object?: Partial>; +}; + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record; +}; const serializeFormDataPair = ( data: FormData, @@ -43,12 +51,10 @@ const serializeUrlSearchParamsPair = ( }; export const formDataBodySerializer = { - bodySerializer: | Array>>( - body: T, - ): FormData => { + bodySerializer: (body: unknown): FormData => { const data = new FormData(); - Object.entries(body).forEach(([key, value]) => { + Object.entries(body as Record).forEach(([key, value]) => { if (value === undefined || value === null) { return; } @@ -64,19 +70,17 @@ export const formDataBodySerializer = { }; export const jsonBodySerializer = { - bodySerializer: (body: T): string => + bodySerializer: (body: unknown): string => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value, ), }; export const urlSearchParamsBodySerializer = { - bodySerializer: | Array>>( - body: T, - ): string => { + bodySerializer: (body: unknown): string => { const data = new URLSearchParams(); - Object.entries(body).forEach(([key, value]) => { + Object.entries(body as Record).forEach(([key, value]) => { if (value === undefined || value === null) { return; } diff --git a/client/ts/core/params.gen.ts b/client/ts/core/params.gen.ts index 6527557..28764e7 100644 --- a/client/ts/core/params.gen.ts +++ b/client/ts/core/params.gen.ts @@ -22,6 +22,17 @@ export type Field = */ key?: string; map?: string; + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot; }; export interface Fields { @@ -41,10 +52,14 @@ const extraPrefixes = Object.entries(extraPrefixesMap); type KeyMap = Map< string, - { - in: Slot; - map?: string; - } + | { + in: Slot; + map?: string; + } + | { + in?: never; + map: Slot; + } >; const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { @@ -60,6 +75,10 @@ const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { map: config.map, }); } + } else if ("key" in config) { + map.set(config.key, { + map: config.map, + }); } else if (config.args) { buildKeyMap(config.args, map); } @@ -77,7 +96,12 @@ interface Params { const stripEmptySlots = (params: Params) => { for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === "object" && !Object.keys(value).length) { + if ( + value && + typeof value === "object" && + !Array.isArray(value) && + !Object.keys(value).length + ) { delete params[slot as Slot]; } } @@ -111,7 +135,9 @@ export const buildClientParams = ( if (config.key) { const field = map.get(config.key)!; const name = field.map || config.key; - (params[field.in] as Record)[name] = arg; + if (field.in) { + (params[field.in] as Record)[name] = arg; + } } else { params.body = arg; } @@ -120,8 +146,12 @@ export const buildClientParams = ( const field = map.get(key); if (field) { - const name = field.map || key; - (params[field.in] as Record)[name] = value; + if (field.in) { + const name = field.map || key; + (params[field.in] as Record)[name] = value; + } else { + params[field.map] = value; + } } else { const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix), @@ -132,10 +162,8 @@ export const buildClientParams = ( (params[slot] as Record)[ key.slice(prefix.length) ] = value; - } else { - for (const [slot, allowed] of Object.entries( - config.allowExtra ?? {}, - )) { + } else if ("allowExtra" in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { if (allowed) { (params[slot as Slot] as Record)[key] = value; break; diff --git a/client/ts/core/serverSentEvents.gen.ts b/client/ts/core/serverSentEvents.gen.ts index 06ae880..acbc7cf 100644 --- a/client/ts/core/serverSentEvents.gen.ts +++ b/client/ts/core/serverSentEvents.gen.ts @@ -86,7 +86,7 @@ export type ServerSentEventsResult< >; }; -export const createSseClient = ({ +export function createSseClient({ onRequest, onSseError, onSseEvent, @@ -98,7 +98,7 @@ export const createSseClient = ({ sseSleepFn, url, ...options -}: ServerSentEventsOptions): ServerSentEventsResult => { +}: ServerSentEventsOptions): ServerSentEventsResult { let lastEventId: string | undefined; const sleep = @@ -169,6 +169,7 @@ export const createSseClient = ({ const { done, value } = await reader.read(); if (done) break; buffer += value; + buffer = buffer.replace(/\r\n?/g, "\n"); // normalize line endings const chunks = buffer.split("\n\n"); buffer = chunks.pop() ?? ""; @@ -261,4 +262,4 @@ export const createSseClient = ({ const stream = createStream(); return { stream }; -}; +} diff --git a/client/ts/core/types.gen.ts b/client/ts/core/types.gen.ts index 6b23d10..2b11454 100644 --- a/client/ts/core/types.gen.ts +++ b/client/ts/core/types.gen.ts @@ -92,7 +92,7 @@ export interface Config { requestValidator?: (data: unknown) => Promise; /** * A function transforming response data before it's returned. This is useful - * for post-processing data, e.g. converting ISO strings into Date objects. + * for post-processing data, e.g., converting ISO strings into Date objects. */ responseTransformer?: (data: unknown) => Promise; /** diff --git a/client/ts/core/utils.gen.ts b/client/ts/core/utils.gen.ts index 80fbfff..fcabdf7 100644 --- a/client/ts/core/utils.gen.ts +++ b/client/ts/core/utils.gen.ts @@ -129,7 +129,7 @@ export function getValidRequestBody(options: { return hasSerializedBody ? options.serializedBody : null; } - // not all clients implement a serializedBody property (i.e. client-axios) + // not all clients implement a serializedBody property (i.e., client-axios) return options.body !== "" ? options.body : null; } diff --git a/client/ts/index.ts b/client/ts/index.ts index a6d2363..a0e777d 100644 --- a/client/ts/index.ts +++ b/client/ts/index.ts @@ -1,4 +1,527 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from "./types.gen"; -export * from "./sdk.gen"; +export { + AppService, + AssetService, + AutofillService, + BrandTemplateService, + CommentService, + ConnectService, + DesignImportService, + DesignService, + ExportService, + FolderService, + OauthService, + OidcService, + type Options, + ResizeService, + UserService, +} from "./sdk.gen"; +export { + type AcceptedSuggestionEventType, + type AddSuggestedEdit, + type AppId, + type ApprovalRequestAction, + type ApprovalResponseAction, + type Asset, + type AssetMetadata, + type AssetSummary, + AssetType, + type AssetUploadError, + AssetUploadErrorCode, + type AssetUploadJob, + type AssetUploadMetadata, + AssetUploadStatus, + type AssignedCommentEvent, + type AutofillError, + AutofillErrorCode, + type BooleanDataTableCell, + type BrandTemplate, + type BrandTemplateId, + Capability, + type ChartDataField, + type ClientId, + type ClientOptions, + type ClientSecret, + type ColumnConfig, + ColumnDataType, + type Comment, + type CommentContent, + type CommentEvent, + type CommentEventDeprecated, + CommentEventTypeEnum, + type CommentId, + type CommentNotificationContent, + type CommentObject, + type CommentObjectInput, + type CommentThreadType, + type CreateAssetUploadJobData, + type CreateAssetUploadJobError, + type CreateAssetUploadJobErrors, + type CreateAssetUploadJobResponse, + type CreateAssetUploadJobResponse2, + type CreateAssetUploadJobResponses, + type CreateCommentData, + type CreateCommentError, + type CreateCommentErrors, + type CreateCommentRequest, + type CreateCommentResponse, + type CreateCommentResponse2, + type CreateCommentResponses, + type CreateDesignAutofillJobData, + type CreateDesignAutofillJobError, + type CreateDesignAutofillJobErrors, + type CreateDesignAutofillJobRequest, + type CreateDesignAutofillJobResponse, + type CreateDesignAutofillJobResponse2, + type CreateDesignAutofillJobResponses, + type CreateDesignAutofillJobResult, + type CreateDesignData, + type CreateDesignError, + type CreateDesignErrors, + type CreateDesignExportJobData, + type CreateDesignExportJobError, + type CreateDesignExportJobErrors, + type CreateDesignExportJobRequest, + type CreateDesignExportJobResponse, + type CreateDesignExportJobResponse2, + type CreateDesignExportJobResponses, + type CreateDesignImportJobData, + type CreateDesignImportJobError, + type CreateDesignImportJobErrors, + type CreateDesignImportJobResponse, + type CreateDesignImportJobResponse2, + type CreateDesignImportJobResponses, + type CreateDesignRequest, + type CreateDesignResizeJobData, + type CreateDesignResizeJobError, + type CreateDesignResizeJobErrors, + type CreateDesignResizeJobRequest, + type CreateDesignResizeJobResponse, + type CreateDesignResizeJobResponse2, + type CreateDesignResizeJobResponses, + type CreateDesignResponse, + type CreateDesignResponse2, + type CreateDesignResponses, + type CreateFolderData, + type CreateFolderError, + type CreateFolderErrors, + type CreateFolderRequest, + type CreateFolderResponse, + type CreateFolderResponse2, + type CreateFolderResponses, + type CreateReplyData, + type CreateReplyDeprecatedData, + type CreateReplyDeprecatedError, + type CreateReplyDeprecatedErrors, + type CreateReplyDeprecatedResponse, + type CreateReplyDeprecatedResponses, + type CreateReplyError, + type CreateReplyErrors, + type CreateReplyRequest, + type CreateReplyResponse, + type CreateReplyResponse2, + type CreateReplyResponses, + type CreateReplyV2Request, + type CreateReplyV2Response, + type CreateThreadData, + type CreateThreadError, + type CreateThreadErrors, + type CreateThreadRequest, + type CreateThreadResponse, + type CreateThreadResponse2, + type CreateThreadResponses, + type CreateUrlAssetUploadJobData, + type CreateUrlAssetUploadJobError, + type CreateUrlAssetUploadJobErrors, + type CreateUrlAssetUploadJobRequest, + type CreateUrlAssetUploadJobResponse, + type CreateUrlAssetUploadJobResponse2, + type CreateUrlAssetUploadJobResponses, + type CreateUrlImportJobData, + type CreateUrlImportJobError, + type CreateUrlImportJobErrors, + type CreateUrlImportJobRequest, + type CreateUrlImportJobResponse, + type CreateUrlImportJobResponse2, + type CreateUrlImportJobResponses, + type CustomDesignTypeInput, + type DataField, + type Dataset, + type DatasetChartValue, + type DatasetDefinition, + DatasetFilter, + type DatasetImageValue, + type DatasetTextValue, + type DatasetValue, + type DataTable, + DataTableAiDisclosure, + type DataTableCell, + DataTableImageMimeType, + type DataTableImageUpload, + type DataTableMedia, + type DataTableRow, + DataTableVideoMimeType, + type DataTableVideoUpload, + type DateDataTableCell, + type DeleteAssetData, + type DeleteAssetError, + type DeleteAssetErrors, + type DeleteAssetResponse, + type DeleteAssetResponses, + type DeleteFolderData, + type DeleteFolderError, + type DeleteFolderErrors, + type DeleteFolderResponse, + type DeleteFolderResponses, + type DeleteSuggestedEdit, + type Design, + type DesignAccessRequestedNotificationContent, + type DesignApprovalRequestedNotificationContent, + type DesignApprovalResponseNotificationContent, + type DesignApprovalReviewerInvalidatedNotificationContent, + type DesignAutofillJob, + type DesignAutofillJobNotificationContent, + type DesignAutofillJobResult, + DesignAutofillStatus, + type DesignCommentObject, + type DesignCommentObjectInput, + DesignExportStatus, + type DesignId, + type DesignImportError, + DesignImportErrorCode, + type DesignImportJob, + type DesignImportJobResult, + type DesignImportMetadata, + DesignImportStatus, + type DesignItem, + type DesignLinks, + type DesignMentionNotificationContent, + type DesignPage, + type DesignResizeError, + DesignResizeErrorCode, + type DesignResizeJob, + type DesignResizeJobResult, + DesignResizeStatus, + type DesignSummary, + type DesignTypeCreateDesignRequest, + type DesignTypeInput, + type EdDsaJwk, + type Error, + ErrorCode, + type ExchangeAccessTokenData, + type ExchangeAccessTokenError, + type ExchangeAccessTokenErrors, + type ExchangeAccessTokenRequest, + type ExchangeAccessTokenResponse, + type ExchangeAccessTokenResponse2, + type ExchangeAccessTokenResponses, + type ExchangeAuthCodeRequest, + type ExchangeRefreshTokenRequest, + type ExportError, + ExportErrorCode, + type ExportFormat, + type ExportFormatOptions, + type ExportHeight, + type ExportId, + type ExportJob, + ExportPageSize, + ExportQuality, + type ExportWidth, + type FeatureId, + type FeatureId2, + type FeatureQuotaLimit, + type FeatureQuotaLimit2, + type FileIdParameter, + type Folder, + type FolderAccessRequestedNotificationContent, + type FolderIdParameter, + type FolderItem, + FolderItemPinStatus, + FolderItemSortBy, + type FolderItemSummary, + FolderItemType, + type FolderSummary, + type FormatSuggestedEdit, + type GetAppJwksData, + type GetAppJwksError, + type GetAppJwksErrors, + type GetAppJwksResponse, + type GetAppJwksResponse2, + type GetAppJwksResponses, + type GetAssetData, + type GetAssetError, + type GetAssetErrors, + type GetAssetResponse, + type GetAssetResponse2, + type GetAssetResponses, + type GetAssetUploadJobData, + type GetAssetUploadJobError, + type GetAssetUploadJobErrors, + type GetAssetUploadJobResponse, + type GetAssetUploadJobResponse2, + type GetAssetUploadJobResponses, + type GetBrandTemplateData, + type GetBrandTemplateDatasetData, + type GetBrandTemplateDatasetError, + type GetBrandTemplateDatasetErrors, + type GetBrandTemplateDatasetResponse, + type GetBrandTemplateDatasetResponse2, + type GetBrandTemplateDatasetResponses, + type GetBrandTemplateError, + type GetBrandTemplateErrors, + type GetBrandTemplateResponse, + type GetBrandTemplateResponse2, + type GetBrandTemplateResponses, + type GetDesignAutofillJobData, + type GetDesignAutofillJobError, + type GetDesignAutofillJobErrors, + type GetDesignAutofillJobResponse, + type GetDesignAutofillJobResponse2, + type GetDesignAutofillJobResponses, + type GetDesignData, + type GetDesignError, + type GetDesignErrors, + type GetDesignExportFormatsData, + type GetDesignExportFormatsError, + type GetDesignExportFormatsErrors, + type GetDesignExportFormatsResponse, + type GetDesignExportFormatsResponse2, + type GetDesignExportFormatsResponses, + type GetDesignExportJobData, + type GetDesignExportJobError, + type GetDesignExportJobErrors, + type GetDesignExportJobResponse, + type GetDesignExportJobResponse2, + type GetDesignExportJobResponses, + type GetDesignImportJobData, + type GetDesignImportJobError, + type GetDesignImportJobErrors, + type GetDesignImportJobResponse, + type GetDesignImportJobResponse2, + type GetDesignImportJobResponses, + type GetDesignPagesData, + type GetDesignPagesError, + type GetDesignPagesErrors, + type GetDesignPagesResponse, + type GetDesignPagesResponse2, + type GetDesignPagesResponses, + type GetDesignResizeJobData, + type GetDesignResizeJobError, + type GetDesignResizeJobErrors, + type GetDesignResizeJobResponse, + type GetDesignResizeJobResponse2, + type GetDesignResizeJobResponses, + type GetDesignResponse, + type GetDesignResponse2, + type GetDesignResponses, + type GetFolderData, + type GetFolderError, + type GetFolderErrors, + type GetFolderResponse, + type GetFolderResponse2, + type GetFolderResponses, + type GetListDesignResponse, + type GetOidcJwksData, + type GetOidcJwksError, + type GetOidcJwksErrors, + type GetOidcJwksResponse, + type GetOidcJwksResponses, + type GetReplyData, + type GetReplyError, + type GetReplyErrors, + type GetReplyResponse, + type GetReplyResponse2, + type GetReplyResponses, + type GetSigningPublicKeysData, + type GetSigningPublicKeysError, + type GetSigningPublicKeysErrors, + type GetSigningPublicKeysResponse, + type GetSigningPublicKeysResponse2, + type GetSigningPublicKeysResponses, + type GetThreadData, + type GetThreadError, + type GetThreadErrors, + type GetThreadResponse, + type GetThreadResponse2, + type GetThreadResponses, + type GetUrlAssetUploadJobData, + type GetUrlAssetUploadJobError, + type GetUrlAssetUploadJobErrors, + type GetUrlAssetUploadJobResponse, + type GetUrlAssetUploadJobResponse2, + type GetUrlAssetUploadJobResponses, + type GetUrlImportJobData, + type GetUrlImportJobError, + type GetUrlImportJobErrors, + type GetUrlImportJobResponse, + type GetUrlImportJobResponse2, + type GetUrlImportJobResponses, + type GetUserCapabilitiesData, + type GetUserCapabilitiesError, + type GetUserCapabilitiesErrors, + type GetUserCapabilitiesResponse, + type GetUserCapabilitiesResponse2, + type GetUserCapabilitiesResponses, + type GetUserProfileData, + type GetUserProfileError, + type GetUserProfileErrors, + type GetUserProfileResponse, + type GetUserProfileResponses, + type GifExportFormat, + type GifExportFormatOption, + type Group, + type HtmlBundleExportFormat, + type HtmlBundleExportFormatOption, + type HtmlStandaloneExportFormat, + type HtmlStandaloneExportFormatOption, + type ImageDataField, + type ImageItem, + type ImageMetadata, + type ImportError, + ImportErrorCode, + type ImportStatus, + ImportStatusState, + Interval, + type Interval2, + type IntrospectTokenData, + type IntrospectTokenError, + type IntrospectTokenErrors, + type IntrospectTokenRequest, + type IntrospectTokenResponse, + type IntrospectTokenResponse2, + type IntrospectTokenResponses, + type JpgExportFormat, + type JpgExportFormatOption, + type JsonWebKey, + type JsonWebKeySet, + type ListBrandTemplatesData, + type ListBrandTemplatesError, + type ListBrandTemplatesErrors, + type ListBrandTemplatesResponse, + type ListBrandTemplatesResponse2, + type ListBrandTemplatesResponses, + type ListDesignsData, + type ListDesignsError, + type ListDesignsErrors, + type ListDesignsResponse, + type ListDesignsResponses, + type ListFolderItemsData, + type ListFolderItemsError, + type ListFolderItemsErrors, + type ListFolderItemsResponse, + type ListFolderItemsResponse2, + type ListFolderItemsResponses, + type ListRepliesData, + type ListRepliesError, + type ListRepliesErrors, + type ListRepliesResponse, + type ListRepliesResponse2, + type ListRepliesResponses, + type MediaCollectionDataTableCell, + type MentionCommentEvent, + type MentionEventContent, + type Mentions, + type MentionSuggestionEventType, + type MoveFolderItemData, + type MoveFolderItemError, + type MoveFolderItemErrors, + type MoveFolderItemRequest, + type MoveFolderItemResponse, + type MoveFolderItemResponses, + type Mp4ExportFormat, + type Mp4ExportFormatOption, + Mp4ExportQuality, + type NewCommentEvent, + type NewSuggestionEventType, + type Notification, + type NotificationContent, + type NumberCellMetadata, + type NumberDataTableCell, + type OauthError, + OwnershipType, + type PageDimensions, + type PageIndex, + type PageIndicesParameter, + type ParentComment, + type PdfExportFormat, + type PdfExportFormatOption, + type PngExportFormat, + type PngExportFormatOption, + type PptxExportFormat, + type PptxExportFormatOption, + type PresetDesignTypeInput, + PresetDesignTypeName, + type RejectedSuggestionEventType, + type Reply, + type ReplyComment, + type ReplyCommentEvent, + type ReplyId, + type ReplyMentionEventContent, + type ReplySuggestionEventType, + type ResolvedCommentEvent, + type RevokeTokensData, + type RevokeTokensError, + type RevokeTokensErrors, + type RevokeTokensRequest, + type RevokeTokensResponse, + type RevokeTokensResponse2, + type RevokeTokensResponses, + type ScopeResponse, + type ShareAction, + type ShareDesignNotificationContent, + type ShareFolderNotificationContent, + SortByType, + type StringDataTableCell, + type SuggestedEdit, + type SuggestionEventType, + SuggestionFormat, + type SuggestionNotificationContent, + SuggestionStatus, + type SuggestionThreadType, + type SvgExportFormatOption, + type Team, + type TeamInviteNotificationContent, + type TeamUser, + type TeamUserSummary, + type TextDataField, + type Thread, + type ThreadId, + type ThreadMentionEventContent, + type ThreadType, + type Thumbnail, + type TransactionIdParameter, + type TrialInformation, + type UpdateAssetData, + type UpdateAssetError, + type UpdateAssetErrors, + type UpdateAssetRequest, + type UpdateAssetResponse, + type UpdateAssetResponse2, + type UpdateAssetResponses, + type UpdateFolderData, + type UpdateFolderError, + type UpdateFolderErrors, + type UpdateFolderRequest, + type UpdateFolderResponse, + type UpdateFolderResponse2, + type UpdateFolderResponses, + type User, + type UserInfoData, + type UserInfoError, + type UserInfoErrors, + type UserInfoResponse, + type UserInfoResponse2, + type UserInfoResponses, + type UserMention, + type UserMentions, + type UserProfile, + type UserProfileResponse, + type UsersMeData, + type UsersMeError, + type UsersMeErrors, + type UsersMeResponse, + type UsersMeResponse2, + type UsersMeResponses, + type VideoMetadata, +} from "./types.gen"; diff --git a/client/ts/sdk.gen.ts b/client/ts/sdk.gen.ts index 58c99c7..5bf247b 100644 --- a/client/ts/sdk.gen.ts +++ b/client/ts/sdk.gen.ts @@ -157,7 +157,8 @@ import type { export type Options< TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, -> = Options2 & { + TResponse = unknown, +> = Options2 & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a @@ -183,10 +184,7 @@ export class AppService { GetAppJwksResponses, GetAppJwksErrors, ThrowOnError - >({ - url: "/v1/apps/{appId}/jwks", - ...options, - }); + >({ url: "/v1/apps/{appId}/jwks", ...options }); } } @@ -204,12 +202,7 @@ export class AssetService { DeleteAssetErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/assets/{assetId}", ...options, }); @@ -226,12 +219,7 @@ export class AssetService { GetAssetErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/assets/{assetId}", ...options, }); @@ -249,12 +237,7 @@ export class AssetService { UpdateAssetErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/assets/{assetId}", ...options, headers: { @@ -286,12 +269,7 @@ export class AssetService { ThrowOnError >({ bodySerializer: null, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/asset-uploads", ...options, headers: { @@ -314,12 +292,7 @@ export class AssetService { GetAssetUploadJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/asset-uploads/{jobId}", ...options, }); @@ -354,12 +327,7 @@ export class AssetService { CreateUrlAssetUploadJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/url-asset-uploads", ...options, headers: { @@ -392,12 +360,7 @@ export class AssetService { GetUrlAssetUploadJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/url-asset-uploads/{jobId}", ...options, }); @@ -433,12 +396,7 @@ export class AutofillService { CreateDesignAutofillJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/autofills", ...options, headers: { @@ -464,12 +422,7 @@ export class AutofillService { GetDesignAutofillJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/autofills/{jobId}", ...options, }); @@ -492,12 +445,7 @@ export class BrandTemplateService { ListBrandTemplatesErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/brand-templates", ...options, }); @@ -518,12 +466,7 @@ export class BrandTemplateService { GetBrandTemplateErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/brand-templates/{brandTemplateId}", ...options, }); @@ -557,12 +500,7 @@ export class BrandTemplateService { GetBrandTemplateDatasetErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/brand-templates/{brandTemplateId}/dataset", ...options, }); @@ -602,12 +540,7 @@ export class CommentService { CreateCommentErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/comments", ...options, headers: { @@ -651,12 +584,7 @@ export class CommentService { CreateReplyDeprecatedErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/comments/{commentId}/replies", ...options, headers: { @@ -687,12 +615,7 @@ export class CommentService { ListRepliesErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/comments/{threadId}/replies", ...options, }); @@ -726,12 +649,7 @@ export class CommentService { CreateReplyErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/comments/{threadId}/replies", ...options, headers: { @@ -765,12 +683,7 @@ export class CommentService { GetThreadErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/comments/{threadId}", ...options, }); @@ -799,12 +712,7 @@ export class CommentService { GetReplyErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/comments/{threadId}/replies/{replyId}", ...options, }); @@ -830,12 +738,7 @@ export class CommentService { CreateThreadErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/comments", ...options, headers: { @@ -877,10 +780,7 @@ export class ConnectService { GetSigningPublicKeysResponses, GetSigningPublicKeysErrors, ThrowOnError - >({ - url: "/v1/connect/keys", - ...options, - }); + >({ url: "/v1/connect/keys", ...options }); } } @@ -901,22 +801,19 @@ export class DesignService { ListDesignsErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs", ...options, }); } /** - * Creates a new Canva design. To create a new design, you can either: + * Creates a new Canva design. To create a new design, you can: * * - Use a preset design type. * - Set height and width dimensions for a custom design. + * - Create a copy of an existing design. + * - Create a new design from a brand template. * * Additionally, you can also provide the `asset_id` of an asset in the user's [projects](https://www.canva.com/help/find-designs-and-folders/) to add to the new design. Currently, this only supports image assets. To list the assets in a folder in the user's projects, use the [List folder items API](https://www.canva.dev/docs/connect/api-reference/folders/list-folder-items/). * @@ -930,12 +827,7 @@ export class DesignService { CreateDesignErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs", ...options, headers: { @@ -956,12 +848,7 @@ export class DesignService { GetDesignErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}", ...options, }); @@ -992,12 +879,7 @@ export class DesignService { GetDesignPagesErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/pages", ...options, }); @@ -1019,12 +901,7 @@ export class DesignService { GetDesignExportFormatsErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/designs/{designId}/export-formats", ...options, }); @@ -1055,12 +932,7 @@ export class DesignImportService { ThrowOnError >({ bodySerializer: null, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/imports", ...options, headers: { @@ -1083,12 +955,7 @@ export class DesignImportService { GetDesignImportJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/imports/{jobId}", ...options, }); @@ -1113,12 +980,7 @@ export class DesignImportService { CreateUrlImportJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/url-imports", ...options, headers: { @@ -1141,12 +1003,7 @@ export class DesignImportService { GetUrlImportJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/url-imports/{jobId}", ...options, }); @@ -1160,8 +1017,17 @@ export class ExportService { * * The request requires the design ID and the exported file format type. * - * Supported file formats (and export file type values): PDF (`pdf`), JPG (`jpg`), PNG (`png`), GIF (`gif`), Microsoft PowerPoint (`pptx`), and MP4 (`mp4`). + * Supported file formats (and export file type values): JPG (`jpg`), PNG (`png`), GIF (`gif`), Microsoft PowerPoint (`pptx`), MP4 (`mp4`), PDF (`pdf`), HTML bundle (`html_bundle`), and standalone HTML (`html_standalone`). + * + * + * + * This endpoint has the following additional rate limits: * + * - **Integration throttle:** Each integration can export a maximum of 750 times per 5-minute window, and 5,000 times per 24-hour window. + * - **Document throttle:** Each document can be exported a maximum of 75 times per 5-minute window. + * - **User throttle:** Each user can export a maximum of 75 times per 5-minute window, and 500 times per 24-hour window. + * + * * * * For more information on the workflow for using asynchronous jobs, see [API requests and responses](https://www.canva.dev/docs/connect/api-requests-responses/#asynchronous-job-endpoints). You can check the status and get the results of export jobs created with this API using the [Get design export job API](https://www.canva.dev/docs/connect/api-reference/exports/get-design-export-job/). @@ -1176,12 +1042,7 @@ export class ExportService { CreateDesignExportJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/exports", ...options, headers: { @@ -1207,12 +1068,7 @@ export class ExportService { GetDesignExportJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/exports/{exportId}", ...options, }); @@ -1235,12 +1091,7 @@ export class FolderService { DeleteFolderErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders/{folderId}", ...options, }); @@ -1257,12 +1108,7 @@ export class FolderService { GetFolderErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders/{folderId}", ...options, }); @@ -1280,12 +1126,7 @@ export class FolderService { UpdateFolderErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders/{folderId}", ...options, headers: { @@ -1315,17 +1156,9 @@ export class FolderService { ThrowOnError >({ querySerializer: { - array: { - explode: false, - style: "form", - }, + parameters: { item_types: { array: { explode: false } } }, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders/{folderId}/items", ...options, }); @@ -1344,12 +1177,7 @@ export class FolderService { MoveFolderItemErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders/move", ...options, headers: { @@ -1377,12 +1205,7 @@ export class FolderService { CreateFolderErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/folders", ...options, headers: { @@ -1441,12 +1264,7 @@ export class OauthService { ThrowOnError >({ ...urlSearchParamsBodySerializer, - security: [ - { - scheme: "basic", - type: "http", - }, - ], + security: [{ scheme: "basic", type: "http" }], url: "/v1/oauth/token", ...options, headers: { @@ -1475,12 +1293,7 @@ export class OauthService { ThrowOnError >({ ...urlSearchParamsBodySerializer, - security: [ - { - scheme: "basic", - type: "http", - }, - ], + security: [{ scheme: "basic", type: "http" }], url: "/v1/oauth/introspect", ...options, headers: { @@ -1514,12 +1327,7 @@ export class OauthService { ThrowOnError >({ ...urlSearchParamsBodySerializer, - security: [ - { - scheme: "basic", - type: "http", - }, - ], + security: [{ scheme: "basic", type: "http" }], url: "/v1/oauth/revoke", ...options, headers: { @@ -1541,10 +1349,7 @@ export class OidcService { GetOidcJwksResponses, GetOidcJwksErrors, ThrowOnError - >({ - url: "/v1/oidc/jwks", - ...options, - }); + >({ url: "/v1/oidc/jwks", ...options }); } /** @@ -1559,12 +1364,7 @@ export class OidcService { UserInfoErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/oidc/userinfo", ...options, }); @@ -1589,7 +1389,7 @@ export class ResizeService { * - Designs can be resized to a maximum area of 25,000,000 pixels squared. * - Resizing designs using the Connect API always creates a new design. In-place resizing is currently not available in the Connect API, but can be done in the Canva UI. * - Resizing a multi-page design results in all pages of the design being resized. Resizing a section of a design is only available in the Canva UI. - * - [Canva docs](https://www.canva.com/create/documents/) can't be resized, and other design types can't be resized to a Canva doc. + * - [Canva docs](https://www.canva.com/create/documents/) and [emails](https://www.canva.com/emails/) can't be resized, and other design types can't be resized to a Canva doc or email. * - Canva Code designs can't be resized, and other design types can't be resized to a Canva Code design. * * @@ -1607,12 +1407,7 @@ export class ResizeService { CreateDesignResizeJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/resizes", ...options, headers: { @@ -1642,12 +1437,7 @@ export class ResizeService { GetDesignResizeJobErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/resizes/{jobId}", ...options, }); @@ -1667,12 +1457,7 @@ export class UserService { UsersMeErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/users/me", ...options, }); @@ -1689,12 +1474,7 @@ export class UserService { GetUserCapabilitiesErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/users/me/capabilities", ...options, }); @@ -1711,12 +1491,7 @@ export class UserService { GetUserProfileErrors, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v1/users/me/profile", ...options, }); diff --git a/client/ts/types.gen.ts b/client/ts/types.gen.ts index f7ea11f..3c0c945 100644 --- a/client/ts/types.gen.ts +++ b/client/ts/types.gen.ts @@ -86,6 +86,50 @@ export type Asset = { updated_at: number; owner: TeamUserSummary; thumbnail?: Thumbnail; + metadata?: AssetMetadata; +}; + +/** + * Type-specific metadata for the asset. + */ +export type AssetMetadata = + | ({ + type: "image"; + } & ImageMetadata) + | ({ + type: "video"; + } & VideoMetadata); + +export type ImageMetadata = { + type: "image"; + /** + * The width of the image in pixels. + */ + width?: number; + /** + * The height of the image in pixels. + */ + height?: number; + /** + * AI-generated tags for the image. + */ + smart_tags?: Array; +}; + +export type VideoMetadata = { + type: "video"; + /** + * The width of the video in pixels. + */ + width: number; + /** + * The height of the video in pixels. + */ + height: number; + /** + * The duration of the video in seconds. + */ + duration?: number; }; /** @@ -125,10 +169,7 @@ export type AssetSummary = { /** * Type of an asset. */ -export const AssetType = { - IMAGE: "image", - VIDEO: "video", -} as const; +export const AssetType = { IMAGE: "image", VIDEO: "video" } as const; /** * Type of an asset. @@ -347,6 +388,12 @@ export type DatasetTextValue = { /** * If the data field is a chart. * + * Note the following behavior: + * - If `column_configs` is not provided, the first row is assumed to contain column headers where applicable. + * - Chart autofill supports a maximum of 100 rows and 20 columns. + * - `number` cells with formatting metadata are not currently supported for autofill and will result in an error response. + * - `media` cells are not supported for chart autofill and will result in an error response. + * * WARNING: Chart data fields are a [preview feature](https://www.canva.dev/docs/connect/#preview-apis). There might be unannounced breaking changes to this feature which won't produce a new API version. */ export type DatasetChartValue = { @@ -405,6 +452,8 @@ export const AutofillErrorCode = { AUTOFILL_ERROR: "autofill_error", THUMBNAIL_GENERATION_ERROR: "thumbnail_generation_error", CREATE_DESIGN_ERROR: "create_design_error", + DESIGN_APPROVAL_ERROR: "design_approval_error", + TRIAL_QUOTA_EXCEEDED: "trial_quota_exceeded", } as const; export type AutofillErrorCode = @@ -425,10 +474,9 @@ export const DatasetFilter = { /** * Brand templates with and without dataset definitions. */ - ANY: "any", - /** + ANY: "any" /** * Brand templates with one or more data fields defined. - */ + */, NON_EMPTY: "non_empty", } as const; @@ -1335,22 +1383,70 @@ export type EdDsaJwk = { /** * Tabular data, structured in rows of cells. * - * - The first row usually contains column headers. * - Each cell must have a data type configured. * - All rows must have the same number of cells. - * - Maximum of 100 rows and 20 columns. + * - The number of entries in `column_configs` must match the number of columns in the data. * * WARNING: Chart data fields are a [preview feature](https://www.canva.dev/docs/connect/#preview-apis). There might be unannounced breaking changes to this feature which won't produce a new API version. */ export type DataTable = { + /** + * Column definitions with names and data types. + */ + column_configs?: Array; /** * Rows of data. - * - * The first row usually contains column headers. */ rows: Array; }; +/** + * Configuration for a data table column. + */ +export type ColumnConfig = { + /** + * Name for the column, displayed as header text. + */ + name?: string; + type: ColumnDataType; +}; + +/** + * Expected data type for cells in this column. + */ +export const ColumnDataType = { + /** + * String data + */ + STRING: "string", + /** + * Numeric data + */ + NUMBER: "number", + /** + * Date data + */ + DATE: "date", + /** + * Boolean data + */ + BOOLEAN: "boolean", + /** + * Media data (such as images, videos, or combinations of both) + */ + MEDIA: "media", + /** + * Mixed data types (use where the column contains cells of a combination of data types) + */ + VARIANT: "variant", +} as const; + +/** + * Expected data type for cells in this column. + */ +export type ColumnDataType = + (typeof ColumnDataType)[keyof typeof ColumnDataType]; + /** * A single row of tabular data. */ @@ -1378,7 +1474,10 @@ export type DataTableCell = } & BooleanDataTableCell) | ({ type: "date"; - } & DateDataTableCell); + } & DateDataTableCell) + | ({ + type: "media"; + } & MediaCollectionDataTableCell); /** * A string tabular data cell. @@ -1394,6 +1493,20 @@ export type StringDataTableCell = { export type NumberDataTableCell = { type: "number"; value?: number; + metadata?: NumberCellMetadata; +}; + +/** + * Formatting metadata for number cells. + */ +export type NumberCellMetadata = { + /** + * Formatting pattern using Office Open XML Format. + * + * These patterns control how numbers are displayed to users, including currency symbols, + * decimal places, and separators. + */ + formatting?: string; }; /** @@ -1414,6 +1527,149 @@ export type DateDataTableCell = { value?: number; }; +/** + * Cell containing a media collection. + */ +export type MediaCollectionDataTableCell = { + type: "media"; + /** + * Media collection values. + * + * Provide an empty array for an empty cell. + */ + value: Array; +}; + +export type DataTableMedia = + | ({ + type: "image_upload"; + } & DataTableImageUpload) + | ({ + type: "video_upload"; + } & DataTableVideoUpload); + +/** + * Options for uploading an image asset. + */ +export type DataTableImageUpload = { + type: "image_upload"; + /** + * The URL of the image file to upload. + * This can be an external URL or a data URL. + */ + url: string; + /** + * The URL of a thumbnail image to display while the image is queued for upload. + * This can be an external URL or a data URL. + */ + thumbnail_url: string; + mime_type: DataTableImageMimeType; + /** + * The width of the image in pixels. + */ + width?: number; + /** + * The height of the image in pixels. + */ + height?: number; + ai_disclosure: DataTableAiDisclosure; +}; + +/** + * Options for uploading a video asset. + */ +export type DataTableVideoUpload = { + type: "video_upload"; + /** + * The URL of the video file to upload. + */ + url: string; + /** + * The URL of a thumbnail image to use as a fallback if thumbnailVideoUrl isn't provided. + * This can be an external URL or a data URL. + */ + thumbnail_image_url: string; + /** + * The URL of a thumbnail video to display while the video is queued for upload. + */ + thumbnail_video_url?: string; + mime_type: DataTableVideoMimeType; + /** + * The width of the video in pixels. + */ + width?: number; + /** + * The height of the video in pixels. + */ + height?: number; + ai_disclosure: DataTableAiDisclosure; +}; + +/** + * The MIME type of an image file that's supported by Canva's backend. + */ +export const DataTableImageMimeType = { + IMAGE_JPEG: "image/jpeg", + IMAGE_HEIC: "image/heic", + IMAGE_PNG: "image/png", + IMAGE_SVG_XML: "image/svg+xml", + IMAGE_WEBP: "image/webp", + IMAGE_TIFF: "image/tiff", +} as const; + +/** + * The MIME type of an image file that's supported by Canva's backend. + */ +export type DataTableImageMimeType = + (typeof DataTableImageMimeType)[keyof typeof DataTableImageMimeType]; + +/** + * The MIME type of a video file that's supported by Canva's backend. + */ +export const DataTableVideoMimeType = { + VIDEO_AVI: "video/avi", + VIDEO_X_MSVIDEO: "video/x-msvideo", + /** + * GIFs are treated as videos, not images. + */ + IMAGE_GIF: "image/gif", + VIDEO_X_M4V: "video/x-m4v", + VIDEO_X_MATROSKA: "video/x-matroska", + VIDEO_QUICKTIME: "video/quicktime", + VIDEO_MP4: "video/mp4", + VIDEO_MPEG: "video/mpeg", + VIDEO_WEBM: "video/webm", + /** + * Used for Lottie files. + */ + APPLICATION_JSON: "application/json", +} as const; + +/** + * The MIME type of a video file that's supported by Canva's backend. + */ +export type DataTableVideoMimeType = + (typeof DataTableVideoMimeType)[keyof typeof DataTableVideoMimeType]; + +/** + * A disclosure identifying if the app generated this media asset using AI. + */ +export const DataTableAiDisclosure = { + /** + * App creates or significantly alters content using AI + */ + APP_GENERATED: "app_generated" /** + * No AI involvement in creation or alteration + */, + NONE: "none", +} as const; + +/** + * A disclosure identifying if the app generated this media asset using AI. + */ +export type DataTableAiDisclosure = + (typeof DataTableAiDisclosure)[keyof typeof DataTableAiDisclosure]; + export const SortByType = { /** * Sort results using a relevance algorithm. @@ -1474,11 +1730,26 @@ export type GetListDesignResponse = { }; /** - * Body parameters for creating a new design. - * At least one of `design_type` or `asset_id` must be defined - * to create a new design. + * Body parameters for creating a new design. Use the `type` discriminator to choose the creation mode: + * + * - Use `type_and_asset` to create a design by specifying the design type and/or an asset. + * + * NOTE: For backward compatibility, if `type` isn't specified in the request, + * the request type will be assumed to be `type_and_asset`. */ export type CreateDesignRequest = { + type: "type_and_asset"; +} & DesignTypeCreateDesignRequest; + +/** + * Create a design by specifying the design type and/or an asset. + * At least one of `design_type` or `asset_id` must be defined. + */ +export type DesignTypeCreateDesignRequest = { + /** + * For backward compatibility, if `type` isn't specified in the request, the request type will be assumed to be `type_and_asset`. + */ + type: "type_and_asset"; design_type?: DesignTypeInput; /** * The ID of an asset to insert into the created design. Currently, this only supports image assets. @@ -1783,13 +2054,17 @@ export const PresetDesignTypeName = { */ DOC: "doc", /** - * A [whiteboard](https://www.canva.com/online-whiteboard/); a design which gives you infinite space to collaborate. + * An [email](https://www.canva.com/emails/); for creating email campaign designs. */ - WHITEBOARD: "whiteboard", + EMAIL: "email", /** * A [presentation](https://www.canva.com/presentations/); lets you create and collaborate for presenting to an audience. */ PRESENTATION: "presentation", + /** + * A [whiteboard](https://www.canva.com/online-whiteboard/); a design which gives you infinite space to collaborate. + */ + WHITEBOARD: "whiteboard", } as const; /** @@ -1813,7 +2088,7 @@ export type CustomDesignTypeInput = { height: number; }; -export type _Error = { +export type Error = { code: ErrorCode; /** * A human-readable description of what went wrong. @@ -1896,6 +2171,7 @@ export const ErrorCode = { LICENSE_REQUIRED: "license_required", INPUT_UNSAFE: "input_unsafe", DISPLAY_NAME_UNAVAILABLE: "display_name_unavailable", + USER_NOT_MANAGED: "user_not_managed", } as const; /** @@ -1937,7 +2213,13 @@ export type ExportFormat = } & GifExportFormat) | ({ type: "mp4"; - } & Mp4ExportFormat); + } & Mp4ExportFormat) + | ({ + type: "html_bundle"; + } & HtmlBundleExportFormat) + | ({ + type: "html_standalone"; + } & HtmlStandaloneExportFormat); /** * Export the design as a PDF. Providing a paper size is optional. @@ -2104,6 +2386,30 @@ export type Mp4ExportFormat = { pages?: Array; }; +/** + * Export the email design as an HTML bundle. An HTML bundle is a zip file that contains an HTML file and the associated assets. + */ +export type HtmlBundleExportFormat = { + type: "html_bundle"; + /** + * The pages of the design to export. Currently only a single page can be exported. If not provided, + * the first page of the design is used. + */ + pages?: [number]; +}; + +/** + * Export the email design as a standalone HTML file with hosted assets. + */ +export type HtmlStandaloneExportFormat = { + type: "html_standalone"; + /** + * The pages of the design to export. Currently only a single page can be exported. If not provided, + * the first page of the design is used. + */ + pages?: [number]; +}; + export type CreateDesignExportJobResponse = { job: ExportJob; }; @@ -2214,6 +2520,8 @@ export type ExportFormatOptions = { pptx?: PptxExportFormatOption; gif?: GifExportFormatOption; mp4?: Mp4ExportFormatOption; + html_bundle?: HtmlBundleExportFormatOption; + html_standalone?: HtmlStandaloneExportFormatOption; }; /** @@ -2265,6 +2573,20 @@ export type Mp4ExportFormatOption = { [key: string]: unknown; }; +/** + * Whether the design can be exported as an HTML bundle. + */ +export type HtmlBundleExportFormatOption = { + [key: string]: unknown; +}; + +/** + * Whether the design can be exported as an standalone HTML file. + */ +export type HtmlStandaloneExportFormatOption = { + [key: string]: unknown; +}; + /** * If the export fails, this object provides details about the error. */ @@ -2278,10 +2600,6 @@ export type ExportError = { /** * If the export failed, this specifies the reason why it failed. - * - * - `license_required`: The design contains [premium elements](https://www.canva.com/help/premium-elements/) that haven't been purchased. You can either buy the elements or upgrade to a Canva plan (such as Canva Pro) that has premium features, then try again. Alternatively, you can set `export_quality` to `regular` to export your document in regular quality. - * - `approval_required`: The design requires [reviewer approval](https://www.canva.com/en_au/help/design-approval/) before it can be exported. - * - `internal_failure`: The service encountered an error when exporting your design. */ export const ExportErrorCode = { /** @@ -2300,10 +2618,6 @@ export const ExportErrorCode = { /** * If the export failed, this specifies the reason why it failed. - * - * - `license_required`: The design contains [premium elements](https://www.canva.com/help/premium-elements/) that haven't been purchased. You can either buy the elements or upgrade to a Canva plan (such as Canva Pro) that has premium features, then try again. Alternatively, you can set `export_quality` to `regular` to export your document in regular quality. - * - `approval_required`: The design requires [reviewer approval](https://www.canva.com/en_au/help/design-approval/) before it can be exported. - * - `internal_failure`: The service encountered an error when exporting your design. */ export type ExportErrorCode = (typeof ExportErrorCode)[keyof typeof ExportErrorCode]; @@ -2315,12 +2629,11 @@ export const ExportQuality = { /** * Regular quality export. */ - REGULAR: "regular", - /** + REGULAR: "regular" /** * Premium quality export. * * NOTE: A `pro` export might fail if the design contains [premium elements](https://www.canva.com/help/premium-elements/) and the calling user either hasn't purchased the elements or isn't on a Canva plan (such as Canva Pro) that has premium features. - */ + */, PRO: "pro", } as const; @@ -2368,6 +2681,25 @@ export const FolderItemType = { export type FolderItemType = (typeof FolderItemType)[keyof typeof FolderItemType]; +/** + * Filter folder items by their pinned status. + */ +export const FolderItemPinStatus = { + /** + * Return all items regardless of pinned status (default). + */ + ANY: "any" /** + * Return only pinned items. + */, + PINNED: "pinned", +} as const; + +/** + * Filter folder items by their pinned status. + */ +export type FolderItemPinStatus = + (typeof FolderItemPinStatus)[keyof typeof FolderItemPinStatus]; + /** * The folder ID. */ @@ -3172,7 +3504,10 @@ export type NotificationContent = } & FolderAccessRequestedNotificationContent) | ({ type: "suggestion"; - } & SuggestionNotificationContent); + } & SuggestionNotificationContent) + | ({ + type: "autofill_job"; + } & DesignAutofillJobNotificationContent); /** * The notification content for when someone shares a design. @@ -3327,6 +3662,15 @@ export type SuggestionNotificationContent = { suggestion_event_type: SuggestionEventType; }; +/** + * The notification content for when a design autofill job reaches a terminal state. + */ +export type DesignAutofillJobNotificationContent = { + type: "autofill_job"; + receiving_team_user: TeamUser; + job: DesignAutofillJob; +}; + /** * Metadata about the share event. */ @@ -3449,7 +3793,7 @@ export type GetAppJwksErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetAppJwksError = GetAppJwksErrors[keyof GetAppJwksErrors]; @@ -3480,7 +3824,7 @@ export type DeleteAssetErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors]; @@ -3511,7 +3855,7 @@ export type GetAssetErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetAssetError = GetAssetErrors[keyof GetAssetErrors]; @@ -3541,7 +3885,7 @@ export type UpdateAssetErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type UpdateAssetError = UpdateAssetErrors[keyof UpdateAssetErrors]; @@ -3573,7 +3917,7 @@ export type CreateAssetUploadJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type CreateAssetUploadJobError = @@ -3605,7 +3949,7 @@ export type GetAssetUploadJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetAssetUploadJobError = @@ -3632,7 +3976,7 @@ export type CreateUrlAssetUploadJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type CreateUrlAssetUploadJobError = @@ -3664,7 +4008,7 @@ export type GetUrlAssetUploadJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetUrlAssetUploadJobError = @@ -3691,19 +4035,19 @@ export type CreateDesignAutofillJobErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateDesignAutofillJobError = @@ -3735,15 +4079,15 @@ export type GetDesignAutofillJobErrors = { /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignAutofillJobError = @@ -3801,7 +4145,7 @@ export type ListBrandTemplatesErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type ListBrandTemplatesError = @@ -3833,7 +4177,7 @@ export type GetBrandTemplateErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetBrandTemplateError = @@ -3865,7 +4209,7 @@ export type GetBrandTemplateDatasetErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetBrandTemplateDatasetError = @@ -3892,19 +4236,19 @@ export type CreateCommentErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateCommentError = CreateCommentErrors[keyof CreateCommentErrors]; @@ -3935,19 +4279,19 @@ export type CreateReplyDeprecatedErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateReplyDeprecatedError = @@ -3994,15 +4338,15 @@ export type ListRepliesErrors = { /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type ListRepliesError = ListRepliesErrors[keyof ListRepliesErrors]; @@ -4037,19 +4381,19 @@ export type CreateReplyErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateReplyError = CreateReplyErrors[keyof CreateReplyErrors]; @@ -4084,15 +4428,15 @@ export type GetThreadErrors = { /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type GetThreadError = GetThreadErrors[keyof GetThreadErrors]; @@ -4130,15 +4474,15 @@ export type GetReplyErrors = { /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type GetReplyError = GetReplyErrors[keyof GetReplyErrors]; @@ -4168,19 +4512,19 @@ export type CreateThreadErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Forbidden */ - 403: _Error; + 403: Error; /** * Not Found */ - 404: _Error; + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateThreadError = CreateThreadErrors[keyof CreateThreadErrors]; @@ -4206,7 +4550,7 @@ export type GetSigningPublicKeysErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetSigningPublicKeysError = @@ -4259,7 +4603,7 @@ export type ListDesignsErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type ListDesignsError = ListDesignsErrors[keyof ListDesignsErrors]; @@ -4282,10 +4626,14 @@ export type CreateDesignData = { }; export type CreateDesignErrors = { + /** + * Not Found + */ + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateDesignError = CreateDesignErrors[keyof CreateDesignErrors]; @@ -4316,7 +4664,7 @@ export type GetDesignErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignError = GetDesignErrors[keyof GetDesignErrors]; @@ -4358,7 +4706,7 @@ export type GetDesignPagesErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignPagesError = @@ -4390,7 +4738,7 @@ export type GetDesignExportFormatsErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignExportFormatsError = @@ -4423,7 +4771,7 @@ export type CreateDesignImportJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type CreateDesignImportJobError = @@ -4455,7 +4803,7 @@ export type GetDesignImportJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignImportJobError = @@ -4482,7 +4830,7 @@ export type CreateUrlImportJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type CreateUrlImportJobError = @@ -4514,7 +4862,7 @@ export type GetUrlImportJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetUrlImportJobError = @@ -4538,10 +4886,26 @@ export type CreateDesignExportJobData = { }; export type CreateDesignExportJobErrors = { + /** + * Bad Request + */ + 400: Error; + /** + * Forbidden + */ + 403: Error; + /** + * Not Found + */ + 404: Error; + /** + * Too Many Requests + */ + 429: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateDesignExportJobError = @@ -4570,10 +4934,18 @@ export type GetDesignExportJobData = { }; export type GetDesignExportJobErrors = { + /** + * Forbidden + */ + 403: Error; + /** + * Not Found + */ + 404: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignExportJobError = @@ -4605,7 +4977,7 @@ export type DeleteFolderErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type DeleteFolderError = DeleteFolderErrors[keyof DeleteFolderErrors]; @@ -4636,7 +5008,7 @@ export type GetFolderErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetFolderError = GetFolderErrors[keyof GetFolderErrors]; @@ -4666,7 +5038,7 @@ export type UpdateFolderErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type UpdateFolderError = UpdateFolderErrors[keyof UpdateFolderErrors]; @@ -4713,6 +5085,10 @@ export type ListFolderItemsData = { * Sort the list of folder items. */ sort_by?: FolderItemSortBy; + /** + * Filter the folder items by their pinned status. + */ + pin_status?: FolderItemPinStatus; }; url: "/v1/folders/{folderId}/items"; }; @@ -4721,7 +5097,7 @@ export type ListFolderItemsErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type ListFolderItemsError = @@ -4748,7 +5124,7 @@ export type MoveFolderItemErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type MoveFolderItemError = @@ -4775,7 +5151,7 @@ export type CreateFolderErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type CreateFolderError = CreateFolderErrors[keyof CreateFolderErrors]; @@ -4801,11 +5177,15 @@ export type ExchangeAccessTokenErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Unauthorized */ - 401: _Error; + 401: Error; + /** + * Too Many Requests + */ + 429: Error; /** * Error Response */ @@ -4836,11 +5216,11 @@ export type IntrospectTokenErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Unauthorized */ - 401: _Error; + 401: Error; /** * Error Response */ @@ -4871,11 +5251,11 @@ export type RevokeTokensErrors = { /** * Bad Request */ - 400: _Error; + 400: Error; /** * Unauthorized */ - 401: _Error; + 401: Error; /** * Error Response */ @@ -4905,7 +5285,7 @@ export type GetOidcJwksErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetOidcJwksError = GetOidcJwksErrors[keyof GetOidcJwksErrors]; @@ -4931,11 +5311,11 @@ export type UserInfoErrors = { /** * Unauthorized */ - 401: _Error; + 401: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type UserInfoError = UserInfoErrors[keyof UserInfoErrors]; @@ -4957,10 +5337,14 @@ export type CreateDesignResizeJobData = { }; export type CreateDesignResizeJobErrors = { + /** + * Bad Request + */ + 400: Error; /** * Error Response */ - default: _Error; + default: Error; }; export type CreateDesignResizeJobError = @@ -4992,7 +5376,7 @@ export type GetDesignResizeJobErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetDesignResizeJobError = @@ -5019,7 +5403,7 @@ export type UsersMeErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type UsersMeError = UsersMeErrors[keyof UsersMeErrors]; @@ -5044,7 +5428,7 @@ export type GetUserCapabilitiesErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetUserCapabilitiesError = @@ -5071,7 +5455,7 @@ export type GetUserProfileErrors = { /** * Error Response */ - default: _Error; + default: Error; }; export type GetUserProfileError = diff --git a/demos/ecommerce_shop/backend/routes/auth.ts b/demos/ecommerce_shop/backend/routes/auth.ts index 6cc2892..b00e805 100644 --- a/demos/ecommerce_shop/backend/routes/auth.ts +++ b/demos/ecommerce_shop/backend/routes/auth.ts @@ -80,7 +80,7 @@ router.get(endpoints.REDIRECT, async (req, res) => { if (result.error) { console.error(result.error); - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } const token = result.data; diff --git a/demos/ecommerce_shop/frontend/src/services/asset.ts b/demos/ecommerce_shop/frontend/src/services/asset.ts index 9f8ff49..7623c4d 100644 --- a/demos/ecommerce_shop/frontend/src/services/asset.ts +++ b/demos/ecommerce_shop/frontend/src/services/asset.ts @@ -129,7 +129,7 @@ export class Assets { }, }, body: image, - bodySerializer: (body: Blob) => body, + bodySerializer: (body: unknown) => body, }); if (result.error) { diff --git a/demos/ecommerce_shop/frontend/src/services/design.ts b/demos/ecommerce_shop/frontend/src/services/design.ts index 6725ab0..e74ee75 100644 --- a/demos/ecommerce_shop/frontend/src/services/design.ts +++ b/demos/ecommerce_shop/frontend/src/services/design.ts @@ -34,6 +34,7 @@ export class Designs { const result = await DesignService.createDesign({ client: this.client, body: { + type: "type_and_asset", asset_id: asset.id, title: name, }, diff --git a/demos/playground/backend/routes/auth.ts b/demos/playground/backend/routes/auth.ts index 83f506d..c317a7a 100644 --- a/demos/playground/backend/routes/auth.ts +++ b/demos/playground/backend/routes/auth.ts @@ -82,7 +82,7 @@ router.get(endpoints.REDIRECT, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } const token = result.data; diff --git a/demos/realty/backend/routes/asset.ts b/demos/realty/backend/routes/asset.ts index e147f78..6dfaab1 100644 --- a/demos/realty/backend/routes/asset.ts +++ b/demos/realty/backend/routes/asset.ts @@ -56,12 +56,12 @@ router.post( }, }, body: blob, - bodySerializer: (body: Blob) => body, + bodySerializer: (body: unknown) => body, }); if (result.error) { console.error("Asset upload error:", result.error); - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); @@ -85,7 +85,7 @@ router.get(endpoints.GET_ASSET_UPLOAD_JOB, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); diff --git a/demos/realty/backend/routes/auth.ts b/demos/realty/backend/routes/auth.ts index 44625fc..9c58fbd 100644 --- a/demos/realty/backend/routes/auth.ts +++ b/demos/realty/backend/routes/auth.ts @@ -78,7 +78,7 @@ router.get(endpoints.REDIRECT, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } const token = result.data; diff --git a/demos/realty/backend/routes/autofill.ts b/demos/realty/backend/routes/autofill.ts index 5c7da38..079e0c5 100644 --- a/demos/realty/backend/routes/autofill.ts +++ b/demos/realty/backend/routes/autofill.ts @@ -15,7 +15,7 @@ router.post(endpoints.CREATE_AUTOFILL_JOB, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); @@ -30,7 +30,7 @@ router.get(endpoints.GET_AUTOFILL_JOB_BY_ID, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } if (!result.data) { diff --git a/demos/realty/backend/routes/brand-template.ts b/demos/realty/backend/routes/brand-template.ts index cc4cc8d..5dc8034 100644 --- a/demos/realty/backend/routes/brand-template.ts +++ b/demos/realty/backend/routes/brand-template.ts @@ -28,7 +28,7 @@ router.get(endpoints.BRAND_TEMPLATES, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } if (!result.data) { @@ -55,7 +55,7 @@ router.get(endpoints.BRAND_TEMPLATE_DATASET, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } if (!result.data) { diff --git a/demos/realty/backend/routes/design.ts b/demos/realty/backend/routes/design.ts index 2703b4b..b6f8c55 100644 --- a/demos/realty/backend/routes/design.ts +++ b/demos/realty/backend/routes/design.ts @@ -16,7 +16,7 @@ router.post(endpoints.DESIGNS, async (req, res) => { body: requestBody, }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); @@ -29,7 +29,7 @@ router.get(endpoints.GET_DESIGN, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } if (!result.data) { diff --git a/demos/realty/backend/routes/export.ts b/demos/realty/backend/routes/export.ts index c7f2a7a..083f093 100644 --- a/demos/realty/backend/routes/export.ts +++ b/demos/realty/backend/routes/export.ts @@ -23,7 +23,7 @@ router.post(endpoints.CREATE_DESIGN_EXPORT_JOB, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); @@ -36,7 +36,7 @@ router.get(endpoints.GET_DESIGN_EXPORT_JOB, async (req, res) => { }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } if (!result.data) { diff --git a/demos/realty/backend/routes/user.ts b/demos/realty/backend/routes/user.ts index d5c5d6a..e2c79c7 100644 --- a/demos/realty/backend/routes/user.ts +++ b/demos/realty/backend/routes/user.ts @@ -8,7 +8,7 @@ router.get("/user", async (req, res) => { client: req.client, }); if (result.error) { - return res.status(result.response.status).json(result.error); + return res.status(result.response?.status ?? 500).json(result.error); } return res.json(result.data); }); diff --git a/demos/realty/frontend/package.json b/demos/realty/frontend/package.json index b853276..71db588 100644 --- a/demos/realty/frontend/package.json +++ b/demos/realty/frontend/package.json @@ -22,7 +22,7 @@ "@mui/icons-material": "5.18.0", "@mui/material": "5.18.0", "@realty-demo/shared-models": "file:../shared-models/src", - "axios": "1.13.6", + "axios": "1.15.2", "react": "^19.2.3", "react-dom": "^19.2.3", "react-router-dom": "7.12.0" diff --git a/demos/realty/frontend/src/services/api.ts b/demos/realty/frontend/src/services/api.ts index 7b6dd5b..585bcc9 100644 --- a/demos/realty/frontend/src/services/api.ts +++ b/demos/realty/frontend/src/services/api.ts @@ -113,7 +113,7 @@ export const createDesign = async ({ title: string; }): Promise => { const body: CreateDesignRequest = { - design_type: undefined, + type: "type_and_asset", asset_id: assetId, title, }; diff --git a/openapi/spec.yml b/openapi/spec.yml index c81bcea..061691e 100644 --- a/openapi/spec.yml +++ b/openapi/spec.yml @@ -451,7 +451,7 @@ paths: - design:content:write tags: - autofill - x-rate-limit-per-client-user: 10 + x-rate-limit-per-client-user: 60 /v1/autofills/{jobId}: get: description: |- @@ -1438,10 +1438,12 @@ paths: x-rate-limit-per-client-user: 100 post: description: |- - Creates a new Canva design. To create a new design, you can either: + Creates a new Canva design. To create a new design, you can: - Use a preset design type. - Set height and width dimensions for a custom design. + - Create a copy of an existing design. + - Create a new design from a brand template. Additionally, you can also provide the `asset_id` of an asset in the user's [projects](https://www.canva.com/help/find-designs-and-folders/) to add to the new design. Currently, this only supports image assets. To list the assets in a folder in the user's projects, use the [List folder items API](https://www.canva.dev/docs/connect/api-reference/folders/list-folder-items/). @@ -1459,6 +1461,17 @@ paths: schema: $ref: "#/components/schemas/CreateDesignResponse" description: OK + "404": + content: + application/json: + examples: + create_design_not_found: + $ref: "#/components/examples/CreateDesignNotFoundError" + create_brand_template_not_found: + $ref: "#/components/examples/CreateBrandTemplateNotFoundError" + schema: + $ref: "#/components/schemas/Error" + description: Not Found default: content: application/json: @@ -1821,10 +1834,19 @@ paths: The request requires the design ID and the exported file format type. - Supported file formats (and export file type values): PDF (`pdf`), JPG (`jpg`), PNG (`png`), GIF (`gif`), Microsoft PowerPoint (`pptx`), and MP4 (`mp4`). + Supported file formats (and export file type values): JPG (`jpg`), PNG (`png`), GIF (`gif`), Microsoft PowerPoint (`pptx`), MP4 (`mp4`), PDF (`pdf`), HTML bundle (`html_bundle`), and standalone HTML (`html_standalone`). + This endpoint has the following additional rate limits: + + - **Integration throttle:** Each integration can export a maximum of 750 times per 5-minute window, and 5,000 times per 24-hour window. + - **Document throttle:** Each document can be exported a maximum of 75 times per 5-minute window. + - **User throttle:** Each user can export a maximum of 75 times per 5-minute window, and 500 times per 24-hour window. + + + + For more information on the workflow for using asynchronous jobs, see [API requests and responses](https://www.canva.dev/docs/connect/api-requests-responses/#asynchronous-job-endpoints). You can check the status and get the results of export jobs created with this API using the [Get design export job API](https://www.canva.dev/docs/connect/api-reference/exports/get-design-export-job/). @@ -1848,6 +1870,64 @@ paths: schema: $ref: "#/components/schemas/CreateDesignExportJobResponse" description: OK + "400": + content: + application/json: + examples: + export_invalid_design_id: + $ref: "#/components/examples/ExportInvalidDesignIdError" + export_design_type_not_supported: + $ref: "#/components/examples/UnsupportedDesignType" + export_format_not_supported: + $ref: "#/components/examples/UnsupportedFormatError" + invalid_page_range: + $ref: "#/components/examples/InvalidPageRangeError" + schema: + $ref: "#/components/schemas/Error" + description: Bad Request + x-http-status-code: 400 + "403": + content: + application/json: + examples: + design_permission_denied: + $ref: "#/components/examples/DesignPermissionDeniedError" + license_required: + $ref: "#/components/examples/LicenseRequiredError" + svg_export_unavailable: + $ref: "#/components/examples/SvgExportUnavailableError" + schema: + $ref: "#/components/schemas/Error" + description: Forbidden + x-http-status-code: 403 + "404": + content: + application/json: + examples: + export_design_not_found: + $ref: "#/components/examples/ExportDesignNotFoundError" + schema: + $ref: "#/components/schemas/Error" + description: Not Found + x-http-status-code: 404 + "429": + content: + application/json: + examples: + client_throttle: + $ref: "#/components/examples/ClientThrottleError" + client_daily_throttle: + $ref: "#/components/examples/ClientDailyThrottleError" + user_throttle: + $ref: "#/components/examples/UserThrottleError" + user_daily_throttle: + $ref: "#/components/examples/UserDailyThrottleError" + design_throttle: + $ref: "#/components/examples/DesignThrottleError" + schema: + $ref: "#/components/schemas/Error" + description: Too Many Requests + x-http-status-code: 429 default: content: application/json: @@ -1894,6 +1974,26 @@ paths: schema: $ref: "#/components/schemas/GetDesignExportJobResponse" description: OK + "403": + content: + application/json: + examples: + export_job_permission_denied: + $ref: "#/components/examples/ExportJobPermissionDeniedError" + export_job_result_permission_denied: + $ref: "#/components/examples/ExportJobResultPermissionDeniedError" + schema: + $ref: "#/components/schemas/Error" + description: Forbidden + "404": + content: + application/json: + examples: + export_job_expired: + $ref: "#/components/examples/ExportJobExpiredError" + schema: + $ref: "#/components/schemas/Error" + description: Not Found default: content: application/json: @@ -2088,6 +2188,14 @@ paths: schema: $ref: "#/components/schemas/FolderItemSortBy" style: form + - description: Filter the folder items by their pinned status. + explode: true + in: query + name: pin_status + required: false + schema: + $ref: "#/components/schemas/FolderItemPinStatus" + style: form responses: "200": content: @@ -2244,6 +2352,16 @@ paths: $ref: "#/components/examples/InvalidRefreshToken" unauthorized_client: $ref: "#/components/examples/UnauthorizedClientError" + token_exchange_invalid_request: + $ref: "#/components/examples/TokenExchangeInvalidRequest" + token_exchange_invalid_grant: + $ref: "#/components/examples/TokenExchangeInvalidGrant" + token_exchange_unauthorized_client: + $ref: "#/components/examples/TokenExchangeUnauthorizedClient" + token_exchange_unsupported_grant_type: + $ref: "#/components/examples/TokenExchangeUnsupportedGrantType" + token_exchange_invalid_scope: + $ref: "#/components/examples/TokenExchangeInvalidScope" schema: $ref: "#/components/schemas/Error" description: Bad Request @@ -2255,9 +2373,22 @@ paths: $ref: "#/components/examples/ClientSecretInvalid" access_token_missing: $ref: "#/components/examples/AccessTokenMissing" + token_exchange_invalid_client: + $ref: "#/components/examples/TokenExchangeInvalidClient" + token_exchange_unauthorized_user: + $ref: "#/components/examples/TokenExchangeUnauthorizedUser" schema: $ref: "#/components/schemas/Error" description: Unauthorized + "429": + content: + application/json: + examples: + too_many_token_exchange_requests: + $ref: "#/components/examples/TooManyTokenExchangeRequests" + schema: + $ref: "#/components/schemas/Error" + description: Too Many Requests default: content: application/json: @@ -2484,7 +2615,7 @@ paths: - Designs can be resized to a maximum area of 25,000,000 pixels squared. - Resizing designs using the Connect API always creates a new design. In-place resizing is currently not available in the Connect API, but can be done in the Canva UI. - Resizing a multi-page design results in all pages of the design being resized. Resizing a section of a design is only available in the Canva UI. - - [Canva docs](https://www.canva.com/create/documents/) can't be resized, and other design types can't be resized to a Canva doc. + - [Canva docs](https://www.canva.com/create/documents/) and [emails](https://www.canva.com/emails/) can't be resized, and other design types can't be resized to a Canva doc or email. - Canva Code designs can't be resized, and other design types can't be resized to a Canva Code design. @@ -2519,6 +2650,15 @@ paths: schema: $ref: "#/components/schemas/CreateDesignResizeJobResponse" description: OK + "400": + content: + application/json: + examples: + unsupported_design_type: + $ref: "#/components/examples/UnsupportedDesignTypeError" + schema: + $ref: "#/components/schemas/Error" + description: Bad Request default: content: application/json: @@ -2863,6 +3003,18 @@ components: value: code: reply_not_found message: "Suggestion reply with ID {replyId} not found" + CreateDesignNotFoundError: + summary: A design with the ID specified in the request could not be found. + value: + code: not_found + message: "Design with id '{designId}' not found" + CreateBrandTemplateNotFoundError: + summary: + A brand template with the ID specified in the request could not be + found. + value: + code: not_found + message: "Brand template with id '{brandTemplateId}' not found" InProgressDesignImportJobExample: summary: In progress job value: @@ -3080,6 +3232,88 @@ components: error: code: license_required message: User doesn't have the required license to export in PRO quality. + ExportInvalidDesignIdError: + summary: Request design ID does not match expected format. + value: + code: invalid_request + message: "{designId} does not match expected format for designId" + UnsupportedDesignType: + summary: Export not supported for this design type. + value: + code: bad_request_body + message: "{formatType} export not supported for this design type" + SvgExportUnavailableError: + summary: SVG export is currently unavailable. + value: + code: feature_not_available + message: SVG Export is currently unavailable + ClientThrottleError: + summary: Too many requests for client. + value: + code: too_many_requests + message: Too many export requests for client + ClientDailyThrottleError: + summary: Too many daily requests for client. + value: + code: too_many_requests + message: Too many daily export requests for client + UserThrottleError: + summary: Too many requests for user. + value: + code: too_many_requests + message: Too many export requests for user + UserDailyThrottleError: + summary: Too many daily requests for user. + value: + code: too_many_requests + message: Too many daily export requests for user + DesignThrottleError: + summary: Too many requests for design. + value: + code: too_many_requests + message: Too many export requests for design + ExportJobPermissionDeniedError: + summary: Not allowed to access export job. + value: + code: permission_denied + message: Not allowed to access export job + ExportJobExpiredError: + summary: Export job result has expired. + value: + code: not_found + message: export job result has expired + ExportJobResultPermissionDeniedError: + summary: Not allowed to access export job result. + value: + code: permission_denied + message: Not allowed to access export job result + UnsupportedFormatError: + summary: Export format not supported for requested page(s). + value: + code: bad_request_body + message: "{formatType} export not supported for requested page(s) [{pageNumbers}]" + InvalidPageRangeError: + summary: Requested invalid page range for design. + value: + code: bad_request_body + message: + "Requested page(s) [{badPageNumbers}] of a design with {maxPageNumber}\ + \ page(s)" + LicenseRequiredError: + summary: User doesn't have the required license to export in PRO quality. + value: + code: license_required + message: User doesn't have the required license to export in PRO quality + ExportDesignNotFoundError: + summary: Design not found. + value: + code: design_not_found + message: "Design with id '{designId}' not found" + DesignPermissionDeniedError: + summary: Not allowed to access design. + value: + code: permission_denied + message: "Not allowed to access design with id {designId}" InvalidTokenError: summary: The token supplied is neither an access token nor a refresh token. value: @@ -3142,6 +3376,46 @@ components: value: code: invalid_access_token message: Access token is missing + TokenExchangeInvalidRequest: + summary: The token exchange request is invalid. + value: + code: invalid_request + message: "{description}" + TokenExchangeInvalidClient: + summary: The client credentials are invalid. + value: + code: invalid_client + message: "{description}" + TokenExchangeInvalidGrant: + summary: "The provided authorization grant is invalid, expired, or revoked." + value: + code: invalid_grant + message: "{description}" + TokenExchangeUnauthorizedClient: + summary: The client is not authorized to use this grant type. + value: + code: unauthorized_client + message: "{description}" + TokenExchangeUnauthorizedUser: + summary: The user is not authorized. + value: + code: unauthorized_user + message: "{description}" + TokenExchangeUnsupportedGrantType: + summary: The grant type is not supported. + value: + code: unsupported_grant_type + message: "{description}" + TokenExchangeInvalidScope: + summary: "The requested scope is invalid, unknown, or malformed." + value: + code: invalid_scope + message: "{description}" + TooManyTokenExchangeRequests: + summary: Too many token exchange requests. + value: + code: too_many_requests + message: "Too many {grantType} requests" InProgressResizeJobExample: summary: In progress job value: @@ -3180,6 +3454,11 @@ components: error: code: design_resize_error message: Failed to resize the design + UnsupportedDesignTypeError: + summary: Unsupported design type + value: + code: bad_request_params + message: "Canva designs can't be resized to the selected design type: `{designTypeName}`" parameters: appId: description: The app ID. @@ -3578,6 +3857,8 @@ components: $ref: "#/components/schemas/TeamUserSummary" thumbnail: $ref: "#/components/schemas/Thumbnail" + metadata: + $ref: "#/components/schemas/AssetMetadata" required: - created_at - id @@ -3587,6 +3868,73 @@ components: - type - updated_at type: object + AssetMetadata: + description: Type-specific metadata for the asset. + discriminator: + mapping: + image: "#/components/schemas/ImageMetadata" + video: "#/components/schemas/VideoMetadata" + propertyName: type + oneOf: + - $ref: "#/components/schemas/ImageMetadata" + - $ref: "#/components/schemas/VideoMetadata" + type: object + ImageMetadata: + properties: + type: + enum: + - image + type: string + width: + description: The width of the image in pixels. + example: 1920 + format: int32 + type: integer + height: + description: The height of the image in pixels. + example: 1080 + format: int32 + type: integer + smart_tags: + description: AI-generated tags for the image. + example: + - landscape + - sunset + - mountains + - nature + items: + maxLength: 50 + type: string + type: array + required: + - type + type: object + VideoMetadata: + properties: + type: + enum: + - video + type: string + width: + description: The width of the video in pixels. + example: 1920 + format: int32 + type: integer + height: + description: The height of the video in pixels. + example: 1080 + format: int32 + type: integer + duration: + description: The duration of the video in seconds. + example: 60 + format: int32 + type: integer + required: + - height + - type + - width + type: object AssetSummary: description: An object representing an asset with associated metadata. properties: @@ -3815,21 +4163,25 @@ components: cute_pet_sales_chart: type: chart chart_data: + column_configs: + - name: Geographic Region + type: string + - name: Sales (millions AUD) + type: number + - name: Target (millions AUD) + type: number + - name: Target met? + type: boolean + - name: Date met + type: date rows: - - cells: - - type: string - value: Geographic Region - - type: string - value: Sales (millions AUD) - - type: string - value: Target met? - - type: string - value: Date met - cells: - type: string value: Asia Pacific - type: number value: 10.2 + - type: number + value: 10 - type: boolean value: true - type: date @@ -3839,6 +4191,8 @@ components: value: EMEA - type: number value: 13.8 + - type: number + value: 14 - type: boolean value: false - type: date @@ -3881,21 +4235,25 @@ components: cute_pet_sales_chart: type: chart chart_data: + column_configs: + - name: Geographic Region + type: string + - name: Sales (millions AUD) + type: number + - name: Target (millions AUD) + type: number + - name: Target met? + type: boolean + - name: Date met + type: date rows: - - cells: - - type: string - value: Geographic Region - - type: string - value: Sales (millions AUD) - - type: string - value: Target met? - - type: string - value: Date met - cells: - type: string value: Asia Pacific - type: number value: 10.2 + - type: number + value: 10 - type: boolean value: true - type: date @@ -3905,6 +4263,8 @@ components: value: EMEA - type: number value: 13.8 + - type: number + value: 14 - type: boolean value: false - type: date @@ -3943,6 +4303,12 @@ components: description: |- If the data field is a chart. + Note the following behavior: + - If `column_configs` is not provided, the first row is assumed to contain column headers where applicable. + - Chart autofill supports a maximum of 100 rows and 20 columns. + - `number` cells with formatting metadata are not currently supported for autofill and will result in an error response. + - `media` cells are not supported for chart autofill and will result in an error response. + WARNING: Chart data fields are a [preview feature](https://www.canva.dev/docs/connect/#preview-apis). There might be unannounced breaking changes to this feature which won't produce a new API version. properties: type: @@ -4018,6 +4384,8 @@ components: - autofill_error - thumbnail_generation_error - create_design_error + - design_approval_error + - trial_quota_exceeded type: string AutofillError: description: @@ -5234,59 +5602,113 @@ components: description: |- Tabular data, structured in rows of cells. - - The first row usually contains column headers. - Each cell must have a data type configured. - All rows must have the same number of cells. - - Maximum of 100 rows and 20 columns. + - The number of entries in `column_configs` must match the number of columns in the data. WARNING: Chart data fields are a [preview feature](https://www.canva.dev/docs/connect/#preview-apis). There might be unannounced breaking changes to this feature which won't produce a new API version. example: + column_configs: + - name: Geographic Region + type: string + - name: Sales (millions AUD) + type: number + - name: Target (millions AUD) + type: number + - name: Target met? + type: boolean + - name: Date met + type: date + - name: Logo + type: media rows: - - cells: - - type: string - value: Geographic Region - - type: string - value: Sales (millions AUD) - - type: string - value: Target (millions AUD) - - type: string - value: Target met? - - type: string - value: Date met - cells: - type: string value: Asia Pacific - type: number value: 10.2 + metadata: + formatting: "#,##0.0" - type: number value: 10 + metadata: + formatting: "#,##0.0" - type: boolean value: true - type: date value: 1721944387 + - type: media + value: + - type: image_upload + url: https://example.com/apac-logo.png + thumbnail_url: https://example.com/apac-logo-thumb.png + mime_type: image/png + ai_disclosure: none + - type: video_upload + url: https://example.com/apac-logo.mp4 + thumbnail_image_url: https://example.com/apac-logo-thumb.png + thumbnail_video_url: https://example.com/apac-logo-thumb.mp4 + mime_type: video/mp4 + ai_disclosure: none - cells: - type: string value: EMEA - type: number value: 13.8 + metadata: + formatting: "#,##0.0" - type: number value: 14 + metadata: + formatting: "#,##0.0" - type: boolean value: false - type: date + - type: media + value: [] properties: + column_configs: + description: Column definitions with names and data types. + items: + $ref: "#/components/schemas/ColumnConfig" + type: array rows: - description: |- - Rows of data. - - The first row usually contains column headers. + description: Rows of data. items: $ref: "#/components/schemas/DataTableRow" - maxItems: 100 type: array required: - rows type: object + ColumnConfig: + description: Configuration for a data table column. + properties: + name: + description: "Name for the column, displayed as header text." + type: string + type: + $ref: "#/components/schemas/ColumnDataType" + required: + - type + type: object + ColumnDataType: + description: Expected data type for cells in this column. + enum: + - string + - number + - date + - boolean + - media + - variant + type: string + x-enum-descriptions: + - String data + - Numeric data + - Date data + - Boolean data + - "Media data (such as images, videos, or combinations of both)" + - Mixed data types (use where the column contains cells of a combination of + data types) DataTableRow: description: A single row of tabular data. properties: @@ -5297,7 +5719,6 @@ components: All rows must have the same number of cells. items: $ref: "#/components/schemas/DataTableCell" - maxItems: 20 type: array required: - cells @@ -5310,12 +5731,14 @@ components: number: "#/components/schemas/NumberDataTableCell" boolean: "#/components/schemas/BooleanDataTableCell" date: "#/components/schemas/DateDataTableCell" + media: "#/components/schemas/MediaCollectionDataTableCell" propertyName: type oneOf: - $ref: "#/components/schemas/StringDataTableCell" - $ref: "#/components/schemas/NumberDataTableCell" - $ref: "#/components/schemas/BooleanDataTableCell" - $ref: "#/components/schemas/DateDataTableCell" + - $ref: "#/components/schemas/MediaCollectionDataTableCell" type: object StringDataTableCell: description: A string tabular data cell. @@ -5325,6 +5748,7 @@ components: - string type: string value: + maxLength: 10000 type: string required: - type @@ -5339,9 +5763,22 @@ components: value: format: double type: number + metadata: + $ref: "#/components/schemas/NumberCellMetadata" required: - type type: object + NumberCellMetadata: + description: Formatting metadata for number cells. + properties: + formatting: + description: |- + Formatting pattern using Office Open XML Format. + + These patterns control how numbers are displayed to users, including currency symbols, + decimal places, and separators. + type: string + type: object BooleanDataTableCell: description: A boolean tabular data cell. properties: @@ -5370,6 +5807,156 @@ components: required: - type type: object + MediaCollectionDataTableCell: + description: Cell containing a media collection. + properties: + type: + enum: + - media + type: string + value: + description: |- + Media collection values. + + Provide an empty array for an empty cell. + items: + $ref: "#/components/schemas/DataTableMedia" + maxItems: 20 + type: array + required: + - type + - value + type: object + DataTableMedia: + discriminator: + mapping: + image_upload: "#/components/schemas/DataTableImageUpload" + video_upload: "#/components/schemas/DataTableVideoUpload" + propertyName: type + oneOf: + - $ref: "#/components/schemas/DataTableImageUpload" + - $ref: "#/components/schemas/DataTableVideoUpload" + DataTableImageUpload: + description: Options for uploading an image asset. + properties: + type: + enum: + - image_upload + type: string + url: + description: |- + The URL of the image file to upload. + This can be an external URL or a data URL. + type: string + thumbnail_url: + description: |- + The URL of a thumbnail image to display while the image is queued for upload. + This can be an external URL or a data URL. + type: string + mime_type: + $ref: "#/components/schemas/DataTableImageMimeType" + width: + description: The width of the image in pixels. + format: int32 + type: integer + height: + description: The height of the image in pixels. + format: int32 + type: integer + ai_disclosure: + $ref: "#/components/schemas/DataTableAiDisclosure" + required: + - ai_disclosure + - mime_type + - thumbnail_url + - type + - url + type: object + DataTableVideoUpload: + description: Options for uploading a video asset. + properties: + type: + enum: + - video_upload + type: string + url: + description: The URL of the video file to upload. + type: string + thumbnail_image_url: + description: |- + The URL of a thumbnail image to use as a fallback if thumbnailVideoUrl isn't provided. + This can be an external URL or a data URL. + type: string + thumbnail_video_url: + description: + The URL of a thumbnail video to display while the video is + queued for upload. + type: string + mime_type: + $ref: "#/components/schemas/DataTableVideoMimeType" + width: + description: The width of the video in pixels. + format: int32 + type: integer + height: + description: The height of the video in pixels. + format: int32 + type: integer + ai_disclosure: + $ref: "#/components/schemas/DataTableAiDisclosure" + required: + - ai_disclosure + - mime_type + - thumbnail_image_url + - type + - url + type: object + DataTableImageMimeType: + description: The MIME type of an image file that's supported by Canva's backend. + enum: + - image/jpeg + - image/heic + - image/png + - image/svg+xml + - image/webp + - image/tiff + type: string + DataTableVideoMimeType: + description: The MIME type of a video file that's supported by Canva's backend. + enum: + - video/avi + - video/x-msvideo + - image/gif + - video/x-m4v + - video/x-matroska + - video/quicktime + - video/mp4 + - video/mpeg + - video/webm + - application/json + type: string + x-enum-descriptions: + - "" + - "" + - "GIFs are treated as videos, not images." + - "" + - "" + - "" + - "" + - "" + - "" + - Used for Lottie files. + DataTableAiDisclosure: + description: + A disclosure identifying if the app generated this media asset + using AI. + enum: + - app_generated + - none + type: string + x-enum-descriptions: + - App creates or significantly alters content using AI + - No AI involvement in creation or alteration SortByType: default: relevance enum: @@ -5419,10 +6006,31 @@ components: type: object CreateDesignRequest: description: |- - Body parameters for creating a new design. - At least one of `design_type` or `asset_id` must be defined - to create a new design. + Body parameters for creating a new design. Use the `type` discriminator to choose the creation mode: + + - Use `type_and_asset` to create a design by specifying the design type and/or an asset. + + NOTE: For backward compatibility, if `type` isn't specified in the request, + the request type will be assumed to be `type_and_asset`. + discriminator: + mapping: + type_and_asset: "#/components/schemas/DesignTypeCreateDesignRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/DesignTypeCreateDesignRequest" + type: object + DesignTypeCreateDesignRequest: + description: |- + Create a design by specifying the design type and/or an asset. + At least one of `design_type` or `asset_id` must be defined. properties: + type: + description: + "For backward compatibility, if `type` isn't specified in the\ + \ request, the request type will be assumed to be `type_and_asset`." + enum: + - type_and_asset + type: string design_type: $ref: "#/components/schemas/DesignTypeInput" asset_id: @@ -5437,6 +6045,8 @@ components: maxLength: 255 minLength: 1 type: string + required: + - type type: object CreateDesignResponse: description: Details about the new design. @@ -5675,6 +6285,7 @@ components: id: description: The ID of the design import job. example: e08861ae-3b29-45db-8dc1-1fe0bf7f1cc8 + pattern: "^[a-zA-Z0-9_-]{1,50}$" type: string status: $ref: "#/components/schemas/DesignImportStatus" @@ -5812,16 +6423,18 @@ components: description: The name of the design type. enum: - doc - - whiteboard + - email - presentation + - whiteboard type: string x-enum-descriptions: - "A [Canva doc](https://www.canva.com/docs/); a document for Canva's online\ \ text editor." - - "A [whiteboard](https://www.canva.com/online-whiteboard/); a design which\ - \ gives you infinite space to collaborate." + - "An [email](https://www.canva.com/emails/); for creating email campaign designs." - "A [presentation](https://www.canva.com/presentations/); lets you create and\ \ collaborate for presenting to an audience." + - "A [whiteboard](https://www.canva.com/online-whiteboard/); a design which\ + \ gives you infinite space to collaborate." CustomDesignTypeInput: description: Provide the width and height to define a custom design type. properties: @@ -5934,6 +6547,7 @@ components: - license_required - input_unsafe - display_name_unavailable + - user_not_managed type: string CreateDesignExportJobRequest: description: |- @@ -5968,6 +6582,8 @@ components: pptx: "#/components/schemas/PptxExportFormat" gif: "#/components/schemas/GifExportFormat" mp4: "#/components/schemas/Mp4ExportFormat" + html_bundle: "#/components/schemas/HtmlBundleExportFormat" + html_standalone: "#/components/schemas/HtmlStandaloneExportFormat" propertyName: type oneOf: - $ref: "#/components/schemas/PdfExportFormat" @@ -5976,6 +6592,8 @@ components: - $ref: "#/components/schemas/PptxExportFormat" - $ref: "#/components/schemas/GifExportFormat" - $ref: "#/components/schemas/Mp4ExportFormat" + - $ref: "#/components/schemas/HtmlBundleExportFormat" + - $ref: "#/components/schemas/HtmlStandaloneExportFormat" type: object PdfExportFormat: description: Export the design as a PDF. Providing a paper size is optional. @@ -6250,6 +6868,54 @@ components: - quality - type type: object + HtmlBundleExportFormat: + description: + Export the email design as an HTML bundle. An HTML bundle is a + zip file that contains an HTML file and the associated assets. + properties: + type: + enum: + - html_bundle + type: string + pages: + description: |- + The pages of the design to export. Currently only a single page can be exported. If not provided, + the first page of the design is used. + example: + - 1 + items: + format: int32 + minimum: 1 + type: integer + maxItems: 1 + minItems: 1 + type: array + required: + - type + type: object + HtmlStandaloneExportFormat: + description: Export the email design as a standalone HTML file with hosted assets. + properties: + type: + enum: + - html_standalone + type: string + pages: + description: |- + The pages of the design to export. Currently only a single page can be exported. If not provided, + the first page of the design is used. + example: + - 1 + items: + format: int32 + minimum: 1 + type: integer + maxItems: 1 + minItems: 1 + type: array + required: + - type + type: object CreateDesignExportJobResponse: properties: job: @@ -6365,6 +7031,10 @@ components: $ref: "#/components/schemas/GifExportFormatOption" mp4: $ref: "#/components/schemas/Mp4ExportFormatOption" + html_bundle: + $ref: "#/components/schemas/HtmlBundleExportFormatOption" + html_standalone: + $ref: "#/components/schemas/HtmlStandaloneExportFormatOption" type: object PdfExportFormatOption: description: Whether the design can be exported as a PDF. @@ -6387,6 +7057,12 @@ components: Mp4ExportFormatOption: description: Whether the design can be exported as an MP4. type: object + HtmlBundleExportFormatOption: + description: Whether the design can be exported as an HTML bundle. + type: object + HtmlStandaloneExportFormatOption: + description: Whether the design can be exported as an standalone HTML file. + type: object ExportError: description: "If the export fails, this object provides details about the error." properties: @@ -6400,12 +7076,7 @@ components: - message type: object ExportErrorCode: - description: |- - If the export failed, this specifies the reason why it failed. - - - `license_required`: The design contains [premium elements](https://www.canva.com/help/premium-elements/) that haven't been purchased. You can either buy the elements or upgrade to a Canva plan (such as Canva Pro) that has premium features, then try again. Alternatively, you can set `export_quality` to `regular` to export your document in regular quality. - - `approval_required`: The design requires [reviewer approval](https://www.canva.com/en_au/help/design-approval/) before it can be exported. - - `internal_failure`: The service encountered an error when exporting your design. + description: "If the export failed, this specifies the reason why it failed." enum: - license_required - approval_required @@ -6458,6 +7129,16 @@ components: - folder - image type: string + FolderItemPinStatus: + default: any + description: Filter folder items by their pinned status. + enum: + - any + - pinned + type: string + x-enum-descriptions: + - Return all items regardless of pinned status (default). + - Return only pinned items. GetFolderResponse: description: The folder ID. properties: @@ -7116,7 +7797,6 @@ components: properties: design_id: description: The design ID. - pattern: "^[a-zA-Z0-9_-]{1,50}$" type: string design_type: $ref: "#/components/schemas/DesignTypeInput" @@ -7378,6 +8058,7 @@ components: team_invite: "#/components/schemas/TeamInviteNotificationContent" folder_access_requested: "#/components/schemas/FolderAccessRequestedNotificationContent" suggestion: "#/components/schemas/SuggestionNotificationContent" + autofill_job: "#/components/schemas/DesignAutofillJobNotificationContent" propertyName: type oneOf: - $ref: "#/components/schemas/ShareDesignNotificationContent" @@ -7391,6 +8072,7 @@ components: - $ref: "#/components/schemas/TeamInviteNotificationContent" - $ref: "#/components/schemas/FolderAccessRequestedNotificationContent" - $ref: "#/components/schemas/SuggestionNotificationContent" + - $ref: "#/components/schemas/DesignAutofillJobNotificationContent" type: object ShareDesignNotificationContent: description: The notification content for when someone shares a design. @@ -7691,6 +8373,25 @@ components: - triggering_user - type type: object + DesignAutofillJobNotificationContent: + description: + The notification content for when a design autofill job reaches + a terminal state. + properties: + type: + enum: + - autofill_job + example: autofill_job + type: string + receiving_team_user: + $ref: "#/components/schemas/TeamUser" + job: + $ref: "#/components/schemas/DesignAutofillJob" + required: + - job + - receiving_team_user + - type + type: object ShareAction: description: Metadata about the share event. properties: diff --git a/package-lock.json b/package-lock.json index 8f528f9..16db2b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "version": "0.0.0", "license": "SEE LICENSE IN LICENSE.md in root directory", "devDependencies": { - "@hey-api/openapi-ts": "0.85.2", + "@hey-api/openapi-ts": "0.97.0", "typescript": "5.9.2" }, "engines": { @@ -383,7 +383,7 @@ "@mui/icons-material": "5.18.0", "@mui/material": "5.18.0", "@realty-demo/shared-models": "file:../shared-models/src", - "axios": "1.13.6", + "axios": "1.15.2", "react": "^19.2.3", "react-dom": "^19.2.3", "react-router-dom": "7.12.0" @@ -2577,9 +2577,9 @@ } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -2648,9 +2648,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -2665,9 +2665,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -2752,103 +2752,147 @@ } }, "node_modules/@hey-api/codegen-core": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.2.0.tgz", - "integrity": "sha512-c7VjBy/8ed0EVLNgaeS9Xxams1Tuv/WK/b4xXH3Qr4wjzYeJUtxOcoP8YdwNLavqKP8pGiuctjX2Z1Pwc4jMgQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.8.1.tgz", + "integrity": "sha512-Iciv2vUCJTW9lWM/ROvyZLblmcbYJHPuXfzb1SzeDVVn4xEXu2ilLU1pq3fn+09FZ/Y0P7VyvRE47UDU6om8xA==", "dev": true, "license": "MIT", + "dependencies": { + "@hey-api/types": "0.1.4", + "ansi-colors": "4.1.3", + "c12": "3.3.4", + "color-support": "1.1.3" + }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=22.10.0" + "node": ">=22.13.0" }, "funding": { "url": "https://github.com/sponsors/hey-api" - }, - "peerDependencies": { - "typescript": ">=5.5.3" } }, "node_modules/@hey-api/json-schema-ref-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.2.0.tgz", - "integrity": "sha512-BMnIuhVgNmSudadw1GcTsP18Yk5l8FrYrg/OSYNxz0D2E0vf4D5e4j5nUbuY8MU6p1vp7ev0xrfP6A/NWazkzQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.4.1.tgz", + "integrity": "sha512-DoPJGxVApDlktP1yYLjmOrF0YBEqb32ieCbx1S1i09n8TyCgdoh4yQaQ3kp0sMTauH+bwNKPsFh7S8qiWCoKZA==", "dev": true, "license": "MIT", "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21" + "@jsdevtools/ono": "7.1.3", + "@types/json-schema": "7.0.15", + "yaml": "2.8.3" }, "engines": { - "node": ">= 16" + "node": ">=22.13.0" }, "funding": { "url": "https://github.com/sponsors/hey-api" } }, + "node_modules/@hey-api/json-schema-ref-parser/node_modules/yaml": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", + "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, "node_modules/@hey-api/openapi-ts": { - "version": "0.85.2", - "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.85.2.tgz", - "integrity": "sha512-pNu+DOtjeXiGhMqSQ/mYadh6BuKR/QiucVunyA2P7w2uyxkfCJ9sHS20Y72KHXzB3nshKJ9r7JMirysoa50SJg==", + "version": "0.97.0", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.97.0.tgz", + "integrity": "sha512-WZkKgrDlZpxKlDv2HkBCzaAYeuM+EtZKFmKGBv9/JblAKpX3JQTROi7PzlCZE3eisetRPSakbcRgn+LGyB7EiQ==", "dev": true, "license": "MIT", "dependencies": { - "@hey-api/codegen-core": "^0.2.0", - "@hey-api/json-schema-ref-parser": "1.2.0", + "@hey-api/codegen-core": "0.8.1", + "@hey-api/json-schema-ref-parser": "1.4.1", + "@hey-api/shared": "0.4.2", + "@hey-api/spec-types": "0.2.0", + "@hey-api/types": "0.1.4", + "@lukeed/ms": "2.0.2", "ansi-colors": "4.1.3", - "c12": "3.3.0", "color-support": "1.1.3", - "commander": "13.0.0", - "handlebars": "4.7.8", - "open": "10.1.2", - "semver": "7.7.2" + "commander": "14.0.3", + "get-tsconfig": "4.14.0" }, "bin": { - "openapi-ts": "bin/index.cjs" + "openapi-ts": "bin/run.js" }, "engines": { - "node": ">=18.0.0" + "node": ">=22.13.0" }, "funding": { "url": "https://github.com/sponsors/hey-api" }, "peerDependencies": { - "typescript": ">=5.5.3" + "typescript": ">=5.5.3 || >=6.0.0 || 6.0.1-rc" } }, "node_modules/@hey-api/openapi-ts/node_modules/commander": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", - "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, - "node_modules/@hey-api/openapi-ts/node_modules/open": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", - "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", + "node_modules/@hey-api/shared": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@hey-api/shared/-/shared-0.4.2.tgz", + "integrity": "sha512-4fconS10E0Xr4/acV8G+BkApxaIStxrT0GhB9BDTQWvrFTy5/nV933SyFk8qImcbpKvgv9hpn3N+7bV8oFrbjA==", "dev": true, "license": "MIT", "dependencies": { - "default-browser": "^5.2.1", + "@hey-api/codegen-core": "0.8.1", + "@hey-api/json-schema-ref-parser": "1.4.1", + "@hey-api/spec-types": "0.2.0", + "@hey-api/types": "0.1.4", + "ansi-colors": "4.1.3", + "cross-spawn": "7.0.6", + "open": "11.0.0", + "semver": "7.7.4" + }, + "engines": { + "node": ">=22.13.0" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + } + }, + "node_modules/@hey-api/shared/node_modules/open": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz", + "integrity": "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.4.0", "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" + "powershell-utils": "^0.1.0", + "wsl-utils": "^0.3.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@hey-api/openapi-ts/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "node_modules/@hey-api/shared/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -2858,6 +2902,43 @@ "node": ">=10" } }, + "node_modules/@hey-api/shared/node_modules/wsl-utils": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz", + "integrity": "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0", + "powershell-utils": "^0.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@hey-api/spec-types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hey-api/spec-types/-/spec-types-0.2.0.tgz", + "integrity": "sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hey-api/types": "0.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + } + }, + "node_modules/@hey-api/types": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@hey-api/types/-/types-0.1.4.tgz", + "integrity": "sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==", + "dev": true, + "license": "MIT" + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -4438,6 +4519,16 @@ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", "license": "MIT" }, + "node_modules/@lukeed/ms": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.2.tgz", + "integrity": "sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/@mui/core-downloads-tracker": { "version": "5.18.0", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.18.0.tgz", @@ -6721,9 +6812,9 @@ } }, "node_modules/ajv": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", - "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -7051,14 +7142,14 @@ } }, "node_modules/axios": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", - "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.2.tgz", + "integrity": "sha512-wLrXxPtcrPTsNlJmKjkPnNPK2Ihe0hn0wGSaTEiHRPxwjvJwT3hKmXF4dpqxmPO9SoNb2FsYXj/xEo0gHN+D5A==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" + "proxy-from-env": "^2.1.0" } }, "node_modules/babel-jest": { @@ -7349,9 +7440,9 @@ "license": "ISC" }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -7465,27 +7556,27 @@ } }, "node_modules/c12": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.0.tgz", - "integrity": "sha512-K9ZkuyeJQeqLEyqldbYLG3wjqwpw4BVaAqvmxq3GYKK0b1A/yYQdIcJxkzAOWcNVWhJpRXAPfZFueekiY/L8Dw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.4.tgz", + "integrity": "sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==", "dev": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.3", - "confbox": "^0.2.2", - "defu": "^6.1.4", - "dotenv": "^17.2.2", - "exsolve": "^1.0.7", - "giget": "^2.0.0", - "jiti": "^2.5.1", + "chokidar": "^5.0.0", + "confbox": "^0.2.4", + "defu": "^6.1.6", + "dotenv": "^17.3.1", + "exsolve": "^1.0.8", + "giget": "^3.2.0", + "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", - "perfect-debounce": "^2.0.0", + "perfect-debounce": "^2.1.0", "pkg-types": "^2.3.0", - "rc9": "^2.1.2" + "rc9": "^3.0.1" }, "peerDependencies": { - "magicast": "^0.3.5" + "magicast": "*" }, "peerDependenciesMeta": { "magicast": { @@ -7494,25 +7585,25 @@ } }, "node_modules/c12/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/c12/node_modules/dotenv": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz", - "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==", + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -7533,13 +7624,13 @@ } }, "node_modules/c12/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -7740,16 +7831,6 @@ "node": ">=8" } }, - "node_modules/citty": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", - "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "consola": "^3.2.3" - } - }, "node_modules/cjs-module-lexer": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", @@ -8028,16 +8109,6 @@ "node": ">=0.8" } }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.10.0" - } - }, "node_modules/constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", @@ -8748,9 +8819,9 @@ } }, "node_modules/defu": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", "dev": true, "license": "MIT" }, @@ -9444,9 +9515,9 @@ } }, "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -9528,9 +9599,9 @@ } }, "node_modules/eslint/node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -9545,9 +9616,9 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -10154,9 +10225,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "funding": [ { "type": "individual", @@ -10403,20 +10474,25 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/giget": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", - "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "node_modules/get-tsconfig": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", + "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", "dev": true, "license": "MIT", "dependencies": { - "citty": "^0.1.6", - "consola": "^3.4.0", - "defu": "^6.1.4", - "node-fetch-native": "^1.6.6", - "nypm": "^0.6.0", - "pathe": "^2.0.3" + "resolve-pkg-maps": "^1.0.0" }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/giget": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-3.2.0.tgz", + "integrity": "sha512-GvHTWcykIR/fP8cj8dMpuMMkvaeJfPvYnhq0oW+chSeIr+ldX21ifU2Ms6KBoyKZQZmVaUAAhQ2EZ68KJF8a7A==", + "dev": true, + "license": "MIT", "bin": { "giget": "dist/cli.mjs" } @@ -10538,9 +10614,9 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "license": "MIT", "dependencies": { "minimist": "^1.2.5", @@ -11201,6 +11277,19 @@ "node": ">=0.10.0" } }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-inside-container": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", @@ -13340,13 +13429,6 @@ "node": ">=8" } }, - "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -13752,13 +13834,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/node-fetch-native": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", - "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", - "dev": true, - "license": "MIT" - }, "node_modules/node-forge": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz", @@ -13809,9 +13884,9 @@ } }, "node_modules/nodemon/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -13906,31 +13981,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/nypm": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.5.tgz", - "integrity": "sha512-K6AJy1GMVyfyMXRVB88700BJqNUkByijGJM8kEHpLdcAt+vSQAVfkWWHYzuRXHSY6xA2sNc5RjTj0p9rE2izVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "citty": "^0.2.0", - "pathe": "^2.0.3", - "tinyexec": "^1.0.2" - }, - "bin": { - "nypm": "dist/cli.mjs" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/nypm/node_modules/citty": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.1.tgz", - "integrity": "sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==", - "dev": true, - "license": "MIT" - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -14318,9 +14368,9 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", "license": "MIT" }, "node_modules/path-type": { @@ -14386,14 +14436,14 @@ } }, "node_modules/pkg-types": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", - "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.1.tgz", + "integrity": "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==", "dev": true, "license": "MIT", "dependencies": { - "confbox": "^0.2.2", - "exsolve": "^1.0.7", + "confbox": "^0.2.4", + "exsolve": "^1.0.8", "pathe": "^2.0.3" } }, @@ -14408,9 +14458,9 @@ } }, "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz", + "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==", "dev": true, "funding": [ { @@ -15087,6 +15137,19 @@ "dev": true, "license": "MIT" }, + "node_modules/powershell-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz", + "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -15191,10 +15254,13 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/pstree.remy": { "version": "1.1.8", @@ -15413,14 +15479,14 @@ } }, "node_modules/rc9": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", - "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-3.0.1.tgz", + "integrity": "sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==", "dev": true, "license": "MIT", "dependencies": { - "defu": "^6.1.4", - "destr": "^2.0.3" + "defu": "^6.1.6", + "destr": "^2.0.5" } }, "node_modules/react": { @@ -15749,6 +15815,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -17010,9 +17086,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -17074,16 +17150,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "license": "MIT" }, - "node_modules/tinyexec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", - "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -17706,9 +17772,9 @@ } }, "node_modules/url-loader/node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": {