diff --git a/src/api/resources/plans/client/Client.ts b/src/api/resources/plans/client/Client.ts index dc9111f..5769fff 100644 --- a/src/api/resources/plans/client/Client.ts +++ b/src/api/resources/plans/client/Client.ts @@ -405,7 +405,7 @@ export class Plans { request: Schematic.ListPlansRequest = {}, requestOptions?: Plans.RequestOptions ): Promise { - const { companyId, ids, q, withoutEntitlementFor, limit, offset } = request; + const { companyId, ids, q, planType, withoutEntitlementFor, limit, offset } = request; const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; @@ -423,6 +423,10 @@ export class Plans { _queryParams["q"] = q; } + if (planType != null) { + _queryParams["plan_type"] = planType; + } + if (withoutEntitlementFor != null) { _queryParams["without_entitlement_for"] = withoutEntitlementFor; } @@ -1137,7 +1141,7 @@ export class Plans { request: Schematic.CountPlansRequest = {}, requestOptions?: Plans.RequestOptions ): Promise { - const { companyId, ids, q, withoutEntitlementFor, limit, offset } = request; + const { companyId, ids, q, planType, withoutEntitlementFor, limit, offset } = request; const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; @@ -1155,6 +1159,10 @@ export class Plans { _queryParams["q"] = q; } + if (planType != null) { + _queryParams["plan_type"] = planType; + } + if (withoutEntitlementFor != null) { _queryParams["without_entitlement_for"] = withoutEntitlementFor; } diff --git a/src/api/resources/plans/client/requests/CountPlansRequest.ts b/src/api/resources/plans/client/requests/CountPlansRequest.ts index 86944ea..2dcb9f1 100644 --- a/src/api/resources/plans/client/requests/CountPlansRequest.ts +++ b/src/api/resources/plans/client/requests/CountPlansRequest.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Schematic from "../../../../index"; + /** * @example * {} @@ -10,6 +12,10 @@ export interface CountPlansRequest { companyId?: string; ids?: string | string[]; q?: string; + /** + * Filter by plan type + */ + planType?: Schematic.CountPlansRequestPlanType; /** * Filter out plans that already have a plan entitlement for the specified feature ID */ diff --git a/src/api/resources/plans/client/requests/ListPlansRequest.ts b/src/api/resources/plans/client/requests/ListPlansRequest.ts index e2133d6..a3c1fe6 100644 --- a/src/api/resources/plans/client/requests/ListPlansRequest.ts +++ b/src/api/resources/plans/client/requests/ListPlansRequest.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Schematic from "../../../../index"; + /** * @example * {} @@ -10,6 +12,10 @@ export interface ListPlansRequest { companyId?: string; ids?: string | string[]; q?: string; + /** + * Filter by plan type + */ + planType?: Schematic.ListPlansRequestPlanType; /** * Filter out plans that already have a plan entitlement for the specified feature ID */ diff --git a/src/api/resources/plans/types/CountPlansParams.ts b/src/api/resources/plans/types/CountPlansParams.ts index f999821..0c68cff 100644 --- a/src/api/resources/plans/types/CountPlansParams.ts +++ b/src/api/resources/plans/types/CountPlansParams.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Schematic from "../../../index"; + /** * Input parameters */ @@ -12,6 +14,8 @@ export interface CountPlansParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan type */ + planType?: Schematic.CountPlansResponseParamsPlanType; q?: string; /** Filter out plans that already have a plan entitlement for the specified feature ID */ withoutEntitlementFor?: string; diff --git a/src/api/resources/plans/types/CountPlansRequestPlanType.ts b/src/api/resources/plans/types/CountPlansRequestPlanType.ts new file mode 100644 index 0000000..7d2b1bc --- /dev/null +++ b/src/api/resources/plans/types/CountPlansRequestPlanType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filter by plan type + */ +export type CountPlansRequestPlanType = "plan" | "add_on"; + +export const CountPlansRequestPlanType = { + Plan: "plan", + AddOn: "add_on", +} as const; diff --git a/src/api/resources/plans/types/CountPlansResponseParamsPlanType.ts b/src/api/resources/plans/types/CountPlansResponseParamsPlanType.ts new file mode 100644 index 0000000..506b874 --- /dev/null +++ b/src/api/resources/plans/types/CountPlansResponseParamsPlanType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filter by plan type + */ +export type CountPlansResponseParamsPlanType = "plan" | "add_on"; + +export const CountPlansResponseParamsPlanType = { + Plan: "plan", + AddOn: "add_on", +} as const; diff --git a/src/api/resources/plans/types/ListPlansParams.ts b/src/api/resources/plans/types/ListPlansParams.ts index 212cbef..b6cb603 100644 --- a/src/api/resources/plans/types/ListPlansParams.ts +++ b/src/api/resources/plans/types/ListPlansParams.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Schematic from "../../../index"; + /** * Input parameters */ @@ -12,6 +14,8 @@ export interface ListPlansParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan type */ + planType?: Schematic.ListPlansResponseParamsPlanType; q?: string; /** Filter out plans that already have a plan entitlement for the specified feature ID */ withoutEntitlementFor?: string; diff --git a/src/api/resources/plans/types/ListPlansRequestPlanType.ts b/src/api/resources/plans/types/ListPlansRequestPlanType.ts new file mode 100644 index 0000000..6fdd2b7 --- /dev/null +++ b/src/api/resources/plans/types/ListPlansRequestPlanType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filter by plan type + */ +export type ListPlansRequestPlanType = "plan" | "add_on"; + +export const ListPlansRequestPlanType = { + Plan: "plan", + AddOn: "add_on", +} as const; diff --git a/src/api/resources/plans/types/ListPlansResponseParamsPlanType.ts b/src/api/resources/plans/types/ListPlansResponseParamsPlanType.ts new file mode 100644 index 0000000..b60aa5d --- /dev/null +++ b/src/api/resources/plans/types/ListPlansResponseParamsPlanType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filter by plan type + */ +export type ListPlansResponseParamsPlanType = "plan" | "add_on"; + +export const ListPlansResponseParamsPlanType = { + Plan: "plan", + AddOn: "add_on", +} as const; diff --git a/src/api/resources/plans/types/index.ts b/src/api/resources/plans/types/index.ts index 3132f74..fa2c234 100644 --- a/src/api/resources/plans/types/index.ts +++ b/src/api/resources/plans/types/index.ts @@ -1,6 +1,8 @@ export * from "./GetAudienceResponse"; export * from "./UpdateAudienceResponse"; export * from "./DeleteAudienceResponse"; +export * from "./ListPlansRequestPlanType"; +export * from "./ListPlansResponseParamsPlanType"; export * from "./ListPlansParams"; export * from "./ListPlansResponse"; export * from "./CreatePlanRequestBodyPlanType"; @@ -9,5 +11,7 @@ export * from "./GetPlanResponse"; export * from "./UpdatePlanResponse"; export * from "./DeletePlanResponse"; export * from "./UpsertBillingProductPlanResponse"; +export * from "./CountPlansRequestPlanType"; +export * from "./CountPlansResponseParamsPlanType"; export * from "./CountPlansParams"; export * from "./CountPlansResponse"; diff --git a/src/api/types/ComponentResponseData.ts b/src/api/types/ComponentResponseData.ts index feca024..ea759c6 100644 --- a/src/api/types/ComponentResponseData.ts +++ b/src/api/types/ComponentResponseData.ts @@ -3,7 +3,7 @@ */ export interface ComponentResponseData { - ast: number[]; + ast?: Record; createdAt: Date; id: string; name: string; diff --git a/src/serialization/resources/plans/types/CountPlansParams.ts b/src/serialization/resources/plans/types/CountPlansParams.ts index f561798..8edf1c6 100644 --- a/src/serialization/resources/plans/types/CountPlansParams.ts +++ b/src/serialization/resources/plans/types/CountPlansParams.ts @@ -5,6 +5,7 @@ import * as serializers from "../../../index"; import * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; +import { CountPlansResponseParamsPlanType } from "./CountPlansResponseParamsPlanType"; export const CountPlansParams: core.serialization.ObjectSchema< serializers.CountPlansParams.Raw, @@ -14,6 +15,7 @@ export const CountPlansParams: core.serialization.ObjectSchema< ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), + planType: core.serialization.property("plan_type", CountPlansResponseParamsPlanType.optional()), q: core.serialization.string().optional(), withoutEntitlementFor: core.serialization.property( "without_entitlement_for", @@ -27,6 +29,7 @@ export declare namespace CountPlansParams { ids?: string[] | null; limit?: number | null; offset?: number | null; + plan_type?: CountPlansResponseParamsPlanType.Raw | null; q?: string | null; without_entitlement_for?: string | null; } diff --git a/src/serialization/resources/plans/types/CountPlansRequestPlanType.ts b/src/serialization/resources/plans/types/CountPlansRequestPlanType.ts new file mode 100644 index 0000000..4d9f222 --- /dev/null +++ b/src/serialization/resources/plans/types/CountPlansRequestPlanType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CountPlansRequestPlanType: core.serialization.Schema< + serializers.CountPlansRequestPlanType.Raw, + Schematic.CountPlansRequestPlanType +> = core.serialization.enum_(["plan", "add_on"]); + +export declare namespace CountPlansRequestPlanType { + type Raw = "plan" | "add_on"; +} diff --git a/src/serialization/resources/plans/types/CountPlansResponseParamsPlanType.ts b/src/serialization/resources/plans/types/CountPlansResponseParamsPlanType.ts new file mode 100644 index 0000000..2afd04a --- /dev/null +++ b/src/serialization/resources/plans/types/CountPlansResponseParamsPlanType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CountPlansResponseParamsPlanType: core.serialization.Schema< + serializers.CountPlansResponseParamsPlanType.Raw, + Schematic.CountPlansResponseParamsPlanType +> = core.serialization.enum_(["plan", "add_on"]); + +export declare namespace CountPlansResponseParamsPlanType { + type Raw = "plan" | "add_on"; +} diff --git a/src/serialization/resources/plans/types/ListPlansParams.ts b/src/serialization/resources/plans/types/ListPlansParams.ts index 9af6bae..c8f6a6d 100644 --- a/src/serialization/resources/plans/types/ListPlansParams.ts +++ b/src/serialization/resources/plans/types/ListPlansParams.ts @@ -5,6 +5,7 @@ import * as serializers from "../../../index"; import * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; +import { ListPlansResponseParamsPlanType } from "./ListPlansResponseParamsPlanType"; export const ListPlansParams: core.serialization.ObjectSchema< serializers.ListPlansParams.Raw, @@ -14,6 +15,7 @@ export const ListPlansParams: core.serialization.ObjectSchema< ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), + planType: core.serialization.property("plan_type", ListPlansResponseParamsPlanType.optional()), q: core.serialization.string().optional(), withoutEntitlementFor: core.serialization.property( "without_entitlement_for", @@ -27,6 +29,7 @@ export declare namespace ListPlansParams { ids?: string[] | null; limit?: number | null; offset?: number | null; + plan_type?: ListPlansResponseParamsPlanType.Raw | null; q?: string | null; without_entitlement_for?: string | null; } diff --git a/src/serialization/resources/plans/types/ListPlansRequestPlanType.ts b/src/serialization/resources/plans/types/ListPlansRequestPlanType.ts new file mode 100644 index 0000000..cf456a8 --- /dev/null +++ b/src/serialization/resources/plans/types/ListPlansRequestPlanType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ListPlansRequestPlanType: core.serialization.Schema< + serializers.ListPlansRequestPlanType.Raw, + Schematic.ListPlansRequestPlanType +> = core.serialization.enum_(["plan", "add_on"]); + +export declare namespace ListPlansRequestPlanType { + type Raw = "plan" | "add_on"; +} diff --git a/src/serialization/resources/plans/types/ListPlansResponseParamsPlanType.ts b/src/serialization/resources/plans/types/ListPlansResponseParamsPlanType.ts new file mode 100644 index 0000000..c90fa96 --- /dev/null +++ b/src/serialization/resources/plans/types/ListPlansResponseParamsPlanType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ListPlansResponseParamsPlanType: core.serialization.Schema< + serializers.ListPlansResponseParamsPlanType.Raw, + Schematic.ListPlansResponseParamsPlanType +> = core.serialization.enum_(["plan", "add_on"]); + +export declare namespace ListPlansResponseParamsPlanType { + type Raw = "plan" | "add_on"; +} diff --git a/src/serialization/resources/plans/types/index.ts b/src/serialization/resources/plans/types/index.ts index 3132f74..fa2c234 100644 --- a/src/serialization/resources/plans/types/index.ts +++ b/src/serialization/resources/plans/types/index.ts @@ -1,6 +1,8 @@ export * from "./GetAudienceResponse"; export * from "./UpdateAudienceResponse"; export * from "./DeleteAudienceResponse"; +export * from "./ListPlansRequestPlanType"; +export * from "./ListPlansResponseParamsPlanType"; export * from "./ListPlansParams"; export * from "./ListPlansResponse"; export * from "./CreatePlanRequestBodyPlanType"; @@ -9,5 +11,7 @@ export * from "./GetPlanResponse"; export * from "./UpdatePlanResponse"; export * from "./DeletePlanResponse"; export * from "./UpsertBillingProductPlanResponse"; +export * from "./CountPlansRequestPlanType"; +export * from "./CountPlansResponseParamsPlanType"; export * from "./CountPlansParams"; export * from "./CountPlansResponse"; diff --git a/src/serialization/types/ComponentResponseData.ts b/src/serialization/types/ComponentResponseData.ts index b74c405..1131d79 100644 --- a/src/serialization/types/ComponentResponseData.ts +++ b/src/serialization/types/ComponentResponseData.ts @@ -10,7 +10,7 @@ export const ComponentResponseData: core.serialization.ObjectSchema< serializers.ComponentResponseData.Raw, Schematic.ComponentResponseData > = core.serialization.object({ - ast: core.serialization.list(core.serialization.number()), + ast: core.serialization.record(core.serialization.string(), core.serialization.number()).optional(), createdAt: core.serialization.property("created_at", core.serialization.date()), id: core.serialization.string(), name: core.serialization.string(), @@ -21,7 +21,7 @@ export const ComponentResponseData: core.serialization.ObjectSchema< export declare namespace ComponentResponseData { interface Raw { - ast: number[]; + ast?: Record | null; created_at: string; id: string; name: string;