Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
]
}
},
"originGitCommit": "26286134afce586aa5dbd02bffc9f25da6217032",
"originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.5.2",
"requestedVersion": "1.5.3",
"ciProvider": "github",
"sdkVersion": "1.5.2"
"sdkVersion": "1.5.3"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@schematichq/schematic-typescript-node",
"version": "1.5.2",
"version": "1.5.3",
"private": false,
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@schematichq/schematic-typescript-node",
"X-Fern-SDK-Version": "1.5.2",
"User-Agent": "@schematichq/schematic-typescript-node/1.5.2",
"X-Fern-SDK-Version": "1.5.3",
"User-Agent": "@schematichq/schematic-typescript-node/1.5.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
*/
export interface CheckoutDataRequestBody {
companyId: string;
currency?: string;
selectedPlanId?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type * as Schematic from "../../../../index";
*/
export interface PublishPlanVersionRequestBody {
activationStrategy?: Schematic.CustomPlanActivationStrategy;
couponExternalId?: string;
customerEmail?: string;
daysUntilDue?: number;
excludedCompanyIds: string[];
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/PlanChangeResponseData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface PlanChangeResponseData {
createdAt: Date;
environmentId: string;
id: string;
/** The integration that performed this change, when the actor is an integration-owned API key (e.g. a billing-provider sync). */
integration?: Schematic.IntegrationResponseData;
/** True when this change moved the company to a different version of the same plan (e.g. a plan version migration) rather than to a different plan. */
isVersionUpgrade: boolean;
previousBasePlan?: Schematic.PlanSnapshotView;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/RulesEngineSchemaVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** The current schema version hash for rules engine types. The first enum value is always the current version. */
export const RulesEngineSchemaVersion = {
V97288F60: "v97288f60",
V5B3E7220: "v5b3e7220",
PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility",
} as const;
export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ export const CheckoutDataRequestBody: core.serialization.Schema<
Schematic.CheckoutDataRequestBody
> = core.serialization.object({
companyId: core.serialization.property("company_id", core.serialization.string()),
currency: core.serialization.string().optional(),
selectedPlanId: core.serialization.property("selected_plan_id", core.serialization.string().optional()),
});

export declare namespace CheckoutDataRequestBody {
export interface Raw {
company_id: string;
currency?: string | null;
selected_plan_id?: string | null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const PublishPlanVersionRequestBody: core.serialization.Schema<
Schematic.PublishPlanVersionRequestBody
> = core.serialization.object({
activationStrategy: core.serialization.property("activation_strategy", CustomPlanActivationStrategy.optional()),
couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()),
customerEmail: core.serialization.property("customer_email", core.serialization.string().optional()),
daysUntilDue: core.serialization.property("days_until_due", core.serialization.number().optional()),
excludedCompanyIds: core.serialization.property(
Expand All @@ -23,6 +24,7 @@ export const PublishPlanVersionRequestBody: core.serialization.Schema<
export declare namespace PublishPlanVersionRequestBody {
export interface Raw {
activation_strategy?: CustomPlanActivationStrategy.Raw | null;
coupon_external_id?: string | null;
customer_email?: string | null;
days_until_due?: number | null;
excluded_company_ids: string[];
Expand Down
3 changes: 3 additions & 0 deletions src/serialization/types/PlanChangeResponseData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ActorType } from "./ActorType";
import { ApiKeyResponseData } from "./ApiKeyResponseData";
import { AuditLogListResponseData } from "./AuditLogListResponseData";
import { CompanyResponseData } from "./CompanyResponseData";
import { IntegrationResponseData } from "./IntegrationResponseData";
import { PlanChangeAction } from "./PlanChangeAction";
import { PlanChangeBasePlanAction } from "./PlanChangeBasePlanAction";
import { PlanChangeSubscriptionAction } from "./PlanChangeSubscriptionAction";
Expand All @@ -32,6 +33,7 @@ export const PlanChangeResponseData: core.serialization.ObjectSchema<
createdAt: core.serialization.property("created_at", core.serialization.date()),
environmentId: core.serialization.property("environment_id", core.serialization.string()),
id: core.serialization.string(),
integration: IntegrationResponseData.optional(),
isVersionUpgrade: core.serialization.property("is_version_upgrade", core.serialization.boolean()),
previousBasePlan: core.serialization.property("previous_base_plan", PlanSnapshotView.optional()),
previousBasePlanVersion: core.serialization.property(
Expand Down Expand Up @@ -65,6 +67,7 @@ export declare namespace PlanChangeResponseData {
created_at: string;
environment_id: string;
id: string;
integration?: IntegrationResponseData.Raw | null;
is_version_upgrade: boolean;
previous_base_plan?: PlanSnapshotView.Raw | null;
previous_base_plan_version?: PlanVersionSnapshotView.Raw | null;
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/types/RulesEngineSchemaVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type * as serializers from "../index";
export const RulesEngineSchemaVersion: core.serialization.Schema<
serializers.RulesEngineSchemaVersion.Raw,
Schematic.RulesEngineSchemaVersion
> = core.serialization.enum_(["v97288f60", "placeholder-for-fern-compatibility"]);
> = core.serialization.enum_(["v5b3e7220", "placeholder-for-fern-compatibility"]);

export declare namespace RulesEngineSchemaVersion {
export type Raw = "v97288f60" | "placeholder-for-fern-compatibility";
export type Raw = "v5b3e7220" | "placeholder-for-fern-compatibility";
}
12 changes: 6 additions & 6 deletions tests/wire/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe("AccountsClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: { ids: ["ids"], limit: 1000000, offset: 1000000, q: "q" },
};

Expand All @@ -277,7 +277,7 @@ describe("AccountsClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
ids: ["ids"],
Expand Down Expand Up @@ -1145,7 +1145,7 @@ describe("AccountsClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: { environment_id: "environment_id", limit: 1000000, offset: 1000000, require_environment: true },
};

Expand All @@ -1159,7 +1159,7 @@ describe("AccountsClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
environmentId: "environment_id",
Expand Down Expand Up @@ -1619,7 +1619,7 @@ describe("AccountsClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
actor_type: "api_key",
end_time: "2024-01-15T09:30:00Z",
Expand All @@ -1644,7 +1644,7 @@ describe("AccountsClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
actorType: "api_key",
Expand Down
8 changes: 4 additions & 4 deletions tests/wire/billing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ describe("BillingClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
company_ids: ["company_ids"],
limit: 1000000,
Expand Down Expand Up @@ -1018,7 +1018,7 @@ describe("BillingClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
companyIds: ["company_ids"],
Expand Down Expand Up @@ -3833,7 +3833,7 @@ describe("BillingClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
ids: ["ids"],
is_active: true,
Expand Down Expand Up @@ -3876,7 +3876,7 @@ describe("BillingClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
ids: ["ids"],
Expand Down
48 changes: 38 additions & 10 deletions tests/wire/companies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,7 @@ describe("CompaniesClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
credit_type_ids: ["credit_type_ids"],
has_scheduled_downgrade: true,
Expand Down Expand Up @@ -2465,7 +2465,7 @@ describe("CompaniesClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
creditTypeIds: ["credit_type_ids"],
Expand Down Expand Up @@ -8797,7 +8797,7 @@ describe("CompaniesClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: { entity_type: "company", ids: ["ids"], limit: 1000000, offset: 1000000, q: "q" },
};

Expand All @@ -8818,7 +8818,7 @@ describe("CompaniesClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
entityType: "company",
Expand Down Expand Up @@ -9533,7 +9533,7 @@ describe("CompaniesClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
entity_type: "company",
ids: ["ids"],
Expand Down Expand Up @@ -9564,7 +9564,7 @@ describe("CompaniesClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
entityType: "company",
Expand Down Expand Up @@ -9861,6 +9861,13 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
environment_id: "environment_id",
id: "id",
integration: {
created_at: "2024-01-15T09:30:00Z",
id: "id",
state: "active",
type: "clerk",
updated_at: "2024-01-15T09:30:00Z",
},
is_version_upgrade: true,
previous_base_plan: {
deleted: true,
Expand Down Expand Up @@ -9972,6 +9979,13 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
environmentId: "environment_id",
id: "id",
integration: {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
id: "id",
state: "active",
type: "clerk",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
isVersionUpgrade: true,
previousBasePlan: {
deleted: true,
Expand Down Expand Up @@ -10157,6 +10171,13 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
environment_id: "environment_id",
id: "id",
integration: {
created_at: "2024-01-15T09:30:00Z",
id: "id",
state: "active",
type: "clerk",
updated_at: "2024-01-15T09:30:00Z",
},
is_version_upgrade: true,
previous_base_plan: { deleted: true, description: "description", icon: "icon", id: "id", name: "name" },
previous_base_plan_version: { id: "id", name: "name", version: 1000000 },
Expand Down Expand Up @@ -10292,6 +10313,13 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
environmentId: "environment_id",
id: "id",
integration: {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
id: "id",
state: "active",
type: "clerk",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
isVersionUpgrade: true,
previousBasePlan: {
deleted: true,
Expand Down Expand Up @@ -10923,7 +10951,7 @@ describe("CompaniesClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
ids: ["ids"],
limit: 1000000,
Expand All @@ -10946,7 +10974,7 @@ describe("CompaniesClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
ids: ["ids"],
Expand Down Expand Up @@ -11929,7 +11957,7 @@ describe("CompaniesClient", () => {
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });

const rawResponseBody = {
data: { count: 1 },
data: { count: 1000000 },
params: {
company_id: "company_id",
ids: ["ids"],
Expand All @@ -11952,7 +11980,7 @@ describe("CompaniesClient", () => {
});
expect(response).toEqual({
data: {
count: 1,
count: 1000000,
},
params: {
companyId: "company_id",
Expand Down
Loading