From 952878448604395483b7301080a0d2e9c0a15b4f Mon Sep 17 00:00:00 2001 From: Joseph Chrzan Date: Wed, 16 Oct 2024 17:37:33 -0400 Subject: [PATCH] version up (#106) --- components/package.json | 2 +- components/src/api/.openapi-generator/FILES | 1 + .../api/models/CompanyDetailResponseData.ts | 20 ++--- .../src/api/models/GenericPreviewObject.ts | 90 +++++++++++++++++++ components/src/api/models/index.ts | 1 + 5 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 components/src/api/models/GenericPreviewObject.ts diff --git a/components/package.json b/components/package.json index a96f25ed..29dd847a 100644 --- a/components/package.json +++ b/components/package.json @@ -1,6 +1,6 @@ { "name": "@schematichq/schematic-components", - "version": "0.3.7", + "version": "0.3.8", "main": "dist/schematic-components.cjs.js", "module": "dist/schematic-components.esm.js", "types": "dist/schematic-components.d.ts", diff --git a/components/src/api/.openapi-generator/FILES b/components/src/api/.openapi-generator/FILES index 9ef0425e..6d78224d 100644 --- a/components/src/api/.openapi-generator/FILES +++ b/components/src/api/.openapi-generator/FILES @@ -32,6 +32,7 @@ models/FeatureUsageDetailResponseData.ts models/FeatureUsageResponseData.ts models/FlagDetailResponseData.ts models/FlagResponseData.ts +models/GenericPreviewObject.ts models/GetSetupIntentResponse.ts models/HydrateComponentResponse.ts models/InvoiceResponseData.ts diff --git a/components/src/api/models/CompanyDetailResponseData.ts b/components/src/api/models/CompanyDetailResponseData.ts index 9e2c3c22..3d5c7a1d 100644 --- a/components/src/api/models/CompanyDetailResponseData.ts +++ b/components/src/api/models/CompanyDetailResponseData.ts @@ -19,12 +19,6 @@ import { CompanyPlanWithBillingSubViewFromJSONTyped, CompanyPlanWithBillingSubViewToJSON, } from "./CompanyPlanWithBillingSubView"; -import type { PreviewObject } from "./PreviewObject"; -import { - PreviewObjectFromJSON, - PreviewObjectFromJSONTyped, - PreviewObjectToJSON, -} from "./PreviewObject"; import type { EntityKeyDetailResponseData } from "./EntityKeyDetailResponseData"; import { EntityKeyDetailResponseDataFromJSON, @@ -43,6 +37,12 @@ import { EntityTraitDetailResponseDataFromJSONTyped, EntityTraitDetailResponseDataToJSON, } from "./EntityTraitDetailResponseData"; +import type { GenericPreviewObject } from "./GenericPreviewObject"; +import { + GenericPreviewObjectFromJSON, + GenericPreviewObjectFromJSONTyped, + GenericPreviewObjectToJSON, +} from "./GenericPreviewObject"; /** * @@ -118,10 +118,10 @@ export interface CompanyDetailResponseData { plan?: CompanyPlanWithBillingSubView; /** * - * @type {Array} + * @type {Array} * @memberof CompanyDetailResponseData */ - plans: Array; + plans: Array; /** * A map of trait names to trait values * @type {object} @@ -203,7 +203,7 @@ export function CompanyDetailResponseDataFromJSONTyped( json["plan"] == null ? undefined : CompanyPlanWithBillingSubViewFromJSON(json["plan"]), - plans: (json["plans"] as Array).map(PreviewObjectFromJSON), + plans: (json["plans"] as Array).map(GenericPreviewObjectFromJSON), traits: json["traits"] == null ? undefined : json["traits"], updatedAt: new Date(json["updated_at"]), userCount: json["user_count"], @@ -237,7 +237,7 @@ export function CompanyDetailResponseDataToJSON( logo_url: value["logoUrl"], name: value["name"], plan: CompanyPlanWithBillingSubViewToJSON(value["plan"]), - plans: (value["plans"] as Array).map(PreviewObjectToJSON), + plans: (value["plans"] as Array).map(GenericPreviewObjectToJSON), traits: value["traits"], updated_at: value["updatedAt"].toISOString(), user_count: value["userCount"], diff --git a/components/src/api/models/GenericPreviewObject.ts b/components/src/api/models/GenericPreviewObject.ts new file mode 100644 index 00000000..c8d6cc33 --- /dev/null +++ b/components/src/api/models/GenericPreviewObject.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Schematic API + * Schematic API + * + * The version of the OpenAPI document: 0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface GenericPreviewObject + */ +export interface GenericPreviewObject { + /** + * + * @type {string} + * @memberof GenericPreviewObject + */ + description?: string | null; + /** + * + * @type {string} + * @memberof GenericPreviewObject + */ + id: string; + /** + * + * @type {string} + * @memberof GenericPreviewObject + */ + imageUrl?: string | null; + /** + * + * @type {string} + * @memberof GenericPreviewObject + */ + name: string; +} + +/** + * Check if a given object implements the GenericPreviewObject interface. + */ +export function instanceOfGenericPreviewObject( + value: object, +): value is GenericPreviewObject { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + return true; +} + +export function GenericPreviewObjectFromJSON(json: any): GenericPreviewObject { + return GenericPreviewObjectFromJSONTyped(json, false); +} + +export function GenericPreviewObjectFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GenericPreviewObject { + if (json == null) { + return json; + } + return { + description: json["description"] == null ? undefined : json["description"], + id: json["id"], + imageUrl: json["image_url"] == null ? undefined : json["image_url"], + name: json["name"], + }; +} + +export function GenericPreviewObjectToJSON( + value?: GenericPreviewObject | null, +): any { + if (value == null) { + return value; + } + return { + description: value["description"], + id: value["id"], + image_url: value["imageUrl"], + name: value["name"], + }; +} diff --git a/components/src/api/models/index.ts b/components/src/api/models/index.ts index 7981bafe..b1cac668 100644 --- a/components/src/api/models/index.ts +++ b/components/src/api/models/index.ts @@ -30,6 +30,7 @@ export * from "./FeatureUsageDetailResponseData"; export * from "./FeatureUsageResponseData"; export * from "./FlagDetailResponseData"; export * from "./FlagResponseData"; +export * from "./GenericPreviewObject"; export * from "./GetSetupIntentResponse"; export * from "./HydrateComponentResponse"; export * from "./InvoiceResponseData";