/** * Mithril: Ontario legal operations, cited and signed. A typed client for * https://mithril.law/api/v1, generated from https://mithril.law/openapi.json * (surface version 1.0.0). One file, no dependencies: it * uses fetch (Node 18 or later, Deno, Bun or a browser). * * curl -O https://mithril.law/agents/sdk/mithril.ts * * import { Mithril } from "./mithril"; * const mithril = new Mithril(); * const run = await mithril.employmentSeveranceCheck({"endedHow":"let_go_without_cause","endDate":"2026-09-01","yearsOfService":10,"monthsOfService":11,"age":45,"role":"staff","pay":{"kind":"salary","annualSalary":104000},"payroll":"yes","hasBenefits":true,"terminationClause":"no","exemptions":[],"workingNoticeWeeks":0,"massTermination":"no","businessClosure":"no"}); * * Every run answers with a summary, cited steps, a boundary (automated, * needs_person or needs_lawyer) and a receipt signed with the key at * https://mithril.law/.well-known/jwks.json. The software provides legal * information and document preparation, sold by Jonathan Kleiman. It is not * legal advice. */ /* eslint-disable */ export type Cite = { sourceId: string; label: string; url: string }; export type Step = { label: string; value?: string; detail?: string; cites?: Cite[] }; export type NextAction = { id: string; label: string; operation?: string; sku?: string }; export type Boundary = | { kind: "automated"; actions?: NextAction[] } | { kind: "needs_person"; reason: string; actions: NextAction[] } | { kind: "needs_lawyer"; reason: string; actions: NextAction[] }; /** One run of an operation: the answer, the law it used and its signed receipt. */ export type Run = { object: "run"; id: string; createdAt: string; operation: { id: string; version: number; title: string }; result: { summary: string; steps: Step[]; boundary: Boundary; output: O; headline?: { label: string; value: string }; warnings?: string[]; documents?: { id: string; filename: string; url: string }[]; }; law: { asOf: string; verified: boolean; rules: { id: string; title: string; status: string; verifiedAt?: string }[] }; receipt: { jws: string; url: string }; }; /** Nothing was run: the facts named here are missing or not in the right form. Ask the person; never guess. */ export type MissingFact = { path: string; title: string; description?: string | null; type: string; allowed?: unknown[] | null; problem: string; example: unknown }; export type RunOptions = { /** Sent as Idempotency-Key: the same key never runs twice. A new UUID is made when you leave it out. */ idempotencyKey?: string; signal?: AbortSignal; }; export class MithrilError extends Error { readonly status: number; readonly code: string; readonly hint?: string; readonly details?: unknown; constructor(status: number, code: string, message: string, hint?: string, details?: unknown) { super(message); this.name = "MithrilError"; this.status = status; this.code = code; this.hint = hint; this.details = details; } /** The facts that were missing, when code is invalid_input. */ get missing(): { path: string; message: string }[] { return this.code === "invalid_input" && Array.isArray(this.details) ? (this.details as { path: string; message: string }[]) : []; } } /** The facts corporate.annual_maintenance takes (version 1). */ export type CorporateAnnualMaintenanceInput = { /** Which year end are you closing?. The last day of the financial year the resolutions are for, for example December 31, 2026. */ fiscalYearEnded: string; /** Company. A company on your founder plan. Leave empty and fill in the corporation instead. */ companyId?: string; /** The corporation */ company?: { /** Where the corporation is incorporated */ jurisdiction: "on" | "ca"; /** Corporate name. Exactly as on the certificate of incorporation. */ name: string; /** Date of incorporation. The date on the certificate of incorporation. */ incorporatedOn: string; /** Fiscal year end. Month and day the financial year ends, for example 12-31 for December 31. */ fiscalYearEnd?: string; /** Registered office */ registeredOffice: { /** Street address. Number and street, with the unit or suite if there is one. A post office box alone is not accepted. */ street: string; /** City or town */ city: string; /** Province or territory */ province?: "Ontario" | "Quebec" | "British Columbia" | "Alberta" | "Manitoba" | "Saskatchewan" | "Nova Scotia" | "New Brunswick" | "Newfoundland and Labrador" | "Prince Edward Island" | "Yukon" | "Northwest Territories" | "Nunavut"; /** Postal code. For example M5V 2T6. */ postalCode: string; }; /** Current directors */ directors: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Address for service */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Resident Canadian. Yes if this person is a Canadian citizen who ordinarily lives in Canada, or a permanent resident who ordinarily lives in Canada (and has not been eligible to apply for citizenship for more than a year). A federal corporation needs enough of these directors. */ residentCanadian: boolean; /** Email. Used to send documents for signature. Optional. */ email?: string; }>; /** Current officers */ officers: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Office. The title this person holds. One person can hold several offices. */ office: "President" | "Secretary" | "Treasurer" | "Chief Executive Officer" | "Chief Financial Officer" | "Chair" | "Vice-President"; }>; /** Current shareholders */ shareholders: Array<{ /** Shareholder’s full legal name. As it appears on government ID. */ fullName: string; /** Type of shareholder. individual: a person. corporation: a company, such as a holding company. */ kind?: "individual" | "corporation"; /** Address. For an individual, their residential address. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Shares held */ holdings: Array<{ /** Class of shares. As named in the articles, for example Common shares. */ shareClass?: string; /** Number of shares held */ shares: number; }>; /** Email. Used to send documents for signature. Optional. */ email?: string; /** Details for the register of individuals with significant control */ details?: { /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship. Federal corporations must record it. */ citizenship?: string; /** Address for service. Federal only, if the person wants this published instead of their home address. */ addressForService?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; }; /** Individuals who control this corporation’s shares. Only for a corporate shareholder. */ controllers?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Residential address */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship */ citizenship?: string; }>; }>; /** Share classes in the articles */ shareClasses?: Array<{ /** Class name. As named in the articles. */ name: string; /** Votes per share. 0 for non-voting shares. */ votesPerShare?: number; /** Fair market value per share (CAD). Only matters if there is more than one class. Used for the 25% test by value. */ fairMarketValuePerShare?: string; }>; /** Corporation number */ corporationNumber?: string; /** Last annual meeting. The date of the last annual meeting or the last annual shareholder resolutions. Leave empty if there has not been one. */ lastAnnualMeeting?: string; /** Shareholder agreement in place */ shareholderAgreementInPlace?: boolean; /** Unanimous shareholder agreement. Yes if the shareholders signed an agreement that restricts the directors’ powers. */ unanimousShareholderAgreement?: boolean; /** Articles give pre-emptive rights. Yes if the articles give existing shareholders the first right to buy new shares. */ articlesGrantPreemptiveRights?: boolean; }; /** Every shareholder agrees to no auditor. Yes if every shareholder, including any with non-voting shares, agrees the company will not appoint an auditor. */ allShareholdersAgreeNoAuditor?: boolean; /** Directors to elect. Full names. Leave empty to re-elect the current directors. */ directorsToElect?: Array; /** Every director can serve. Confirm each director to be elected is at least 18, not bankrupt and not found incapable. */ directorsConfirmedQualified: boolean; }; /** What corporate.annual_maintenance answers, in result.output. */ export type CorporateAnnualMaintenanceOutput = { corporationName: string; fiscalYearEnded: string; annualResolutions: { due: string; statutoryLatest: string; statementsLatest: string; sendStatementsBy: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }; annualReturn: { opens: string; due: string; feeCents: number; where: string; steps: Array; cites: Array<{ sourceId: string; label: string; url: string; }>; }; auditor: { exempt: boolean; reason: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }; registerUpdates: Array<{ register: string; change: string; }>; documents: Array<{ key: string; title: string; }>; }; /** The facts corporate.incorporation_plan takes (version 1). */ export type CorporateIncorporationPlanInput = { /** Where will the business operate?. ontario_only: only in Ontario. multiple_provinces: in Ontario and other provinces. national_or_international: across Canada or outside Canada. */ operatesIn: "ontario_only" | "multiple_provinces" | "national_or_international"; /** Number of founders. Everyone who will own the company at the start. The plan assumes each founder is also a director. */ founders: number; /** Founders who are resident Canadians. How many founders are Canadian citizens or permanent residents who ordinarily live in Canada. */ residentCanadianFounders: number; /** What will it be called?. word_name: a name you choose, such as Maple Robotics Inc. numbered: the registry assigns a number, such as 1234567 Ontario Inc. */ name: "word_name" | "numbered"; /** What shares will it have?. common_only: one class of common shares (the simple choice). common_and_preferred: common shares plus preferred shares. other: anything else. */ shareStructure?: "common_only" | "common_and_preferred" | "other"; /** Raising money within 12 months. Yes if you expect to take money from investors, including a SAFE or convertible note, in the next 12 months. */ raisingMoneySoon?: boolean; /** Shareholder agreement in place. Yes if the founders already have a signed shareholder agreement. */ shareholderAgreementInPlace?: boolean; /** When should it start?. The date you want the company to exist. Leave empty for as soon as possible. */ startDate?: string; }; /** What corporate.incorporation_plan answers, in result.output. */ export type CorporateIncorporationPlanOutput = { jurisdiction: "on" | "ca"; jurisdictionName: string; reasons: Array<{ code: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; steps: Array<{ label: string; detail: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; youWillNeed: Array; cost: { lines: Array<{ label: string; cents: number; sourceId?: string; sku?: string; }>; governmentCents: number; mithrilCents: number; totalCents: number; total: string; excluded: Array<{ label: string; reason: string; }>; }; timing: { serviceTime: string; earliestFilingDate: string; requestEffectiveDate?: string; text: string; }; afterIncorporation: Array<{ label: string; detail: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; lawyerNeededFor: Array<"shareholder_agreement" | "share_structure" | "financing">; nextActions: Array<{ id: string; label: string; sku?: string; operation?: string; }>; }; /** The facts corporate.incorporation_prepare takes (version 1). */ export type CorporateIncorporationPrepareInput = { /** Where will you incorporate?. Ontario or federal. The incorporation plan recommends one. */ jurisdiction: "on" | "ca"; /** Company name */ nameChoice: "word_name" | "numbered"; /** Corporate name. Only for a word name. Include the legal ending, for example Maple Robotics Inc. */ corporateName?: string; /** Legal ending for a numbered name. Only for a numbered company. */ legalEnding?: "Inc." | "Ltd." | "Corp." | "Incorporated" | "Limited" | "Corporation"; /** Registered office. Where the corporation’s records are kept and documents can be served. For an Ontario corporation it must be in Ontario. */ registeredOffice: { /** Street address. Number and street, with the unit or suite if there is one. A post office box alone is not accepted. */ street: string; /** City or town */ city: string; /** Province or territory */ province?: "Ontario" | "Quebec" | "British Columbia" | "Alberta" | "Manitoba" | "Saskatchewan" | "Nova Scotia" | "New Brunswick" | "Newfoundland and Labrador" | "Prince Edward Island" | "Yukon" | "Northwest Territories" | "Nunavut"; /** Postal code. For example M5V 2T6. */ postalCode: string; }; /** Email for the corporation. The registry sends the certificate and official notices here. */ officialEmail: string; /** Who are the directors?. Each director signs the articles as an incorporator. */ directors: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Address for service. Where documents can be delivered to them. This is on the public record. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Resident Canadian. Yes if this person is a Canadian citizen who ordinarily lives in Canada, or a permanent resident who ordinarily lives in Canada (and has not been eligible to apply for citizenship for more than a year). A federal corporation needs enough of these directors. */ residentCanadian: boolean; /** This person can be a director. Confirm they are at least 18, have not been found incapable of managing property or declared incapable by a court, and are not bankrupt. */ confirmedQualified: boolean; /** Email. Used to send documents for signature. Optional. */ email?: string; /** Home address. Only if different from the address for service. It goes in the register of directors, not on the public record. */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; }>; /** Who are the officers?. At least one, for example a President. */ officers: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Office. The title this person holds. One person can hold several offices. */ office: "President" | "Secretary" | "Treasurer" | "Chief Executive Officer" | "Chief Financial Officer" | "Chair" | "Vice-President"; }>; /** Who gets shares, and how many?. Everyone who will receive common shares at incorporation. */ shareholders: Array<{ /** Shareholder’s full legal name. As it appears on government ID. */ fullName: string; /** Type of shareholder. individual: a person. corporation: a company, such as a holding company. */ kind?: "individual" | "corporation"; /** Address. For the securities register. For an individual, their residential address. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Number of shares. A whole number. */ shares: number; /** Price per share (CAD). What each share costs, in dollars. Founders often pay a small amount, for example 0.001. */ pricePerShare: string; /** How the shares are paid for. money: cash or e-transfer (the usual choice). property: an asset transferred to the company. past_services: work already done for the company. */ consideration?: "money" | "property" | "past_services"; /** What is being transferred. Only if paying with property or past services. */ considerationDescription?: string; /** Email. Used to send documents for signature. Optional. */ email?: string; /** Details for the register of individuals with significant control */ details?: { /** Date of birth. Needed for the register of individuals with significant control if this person holds 25% or more. */ dateOfBirth?: string; /** Country of residence for tax purposes. For example Canada. */ taxResidence?: string; /** Citizenship. Country or countries of citizenship. Federal corporations must record it. */ citizenship?: string; }; /** Individuals who control this corporation’s shares. Only for a corporate shareholder: each individual with direct or indirect control or direction over its shares. */ controllers?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Residential address */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship */ citizenship?: string; }>; }>; /** Fiscal year end. Month and day the financial year ends, for example 12-31 for December 31. */ fiscalYearEnd?: string; /** Main business activity. In a few words, for choosing the NAICS code, for example software publishing. */ businessActivity?: string; /** Nuans report reference number. Ontario word names only, once you have the report. */ nuansReference?: string; /** Nuans report date. Ontario word names only. It must be no more than 90 days before you file. */ nuansDate?: string; /** Requested effective date. Ontario only. Leave empty to incorporate on the day you file; you may ask for a date up to 30 days later. */ effectiveDate?: string; /** Minimum number of directors */ minDirectors?: number; /** Maximum number of directors */ maxDirectors?: number; /** No auditor for the first year. Yes if every shareholder agrees the company will not appoint an auditor for its first financial year. Usual for a private company. */ noAuditorFirstYear?: boolean; /** Bank. Where the company will bank, if you know. */ bank?: string; /** Shareholder agreement in place. Yes if the shareholders already have a signed shareholder agreement. */ shareholderAgreementInPlace?: boolean; }; /** What corporate.incorporation_prepare answers, in result.output. */ export type CorporateIncorporationPrepareOutput = { corporationName: string; jurisdiction: "on" | "ca"; filingSteps: Array<{ label: string; detail: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; documents: Array<{ key: string; title: string; }>; capTable: Array<{ holder: string; shares: number; percent: number; considerationCents: number; }>; individualsWithSignificantControl: Array<{ fullName: string; grounds: Array; votesPercent: number; missing: Array; }>; deadlines: Array<{ label: string; when: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; governmentFeeCents: number; packageCents: number; }; /** The facts corporate.isc_register takes (version 1). */ export type CorporateIscRegisterInput = { /** Company. A company on your founder plan. Leave empty and fill in the corporation instead. */ companyId?: string; /** The corporation */ company?: { /** Where the corporation is incorporated */ jurisdiction: "on" | "ca"; /** Corporate name. Exactly as on the certificate of incorporation. */ name: string; /** Date of incorporation. The date on the certificate of incorporation. */ incorporatedOn: string; /** Fiscal year end. Month and day the financial year ends, for example 12-31 for December 31. */ fiscalYearEnd?: string; /** Registered office */ registeredOffice: { /** Street address. Number and street, with the unit or suite if there is one. A post office box alone is not accepted. */ street: string; /** City or town */ city: string; /** Province or territory */ province?: "Ontario" | "Quebec" | "British Columbia" | "Alberta" | "Manitoba" | "Saskatchewan" | "Nova Scotia" | "New Brunswick" | "Newfoundland and Labrador" | "Prince Edward Island" | "Yukon" | "Northwest Territories" | "Nunavut"; /** Postal code. For example M5V 2T6. */ postalCode: string; }; /** Current directors */ directors: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Address for service */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Resident Canadian. Yes if this person is a Canadian citizen who ordinarily lives in Canada, or a permanent resident who ordinarily lives in Canada (and has not been eligible to apply for citizenship for more than a year). A federal corporation needs enough of these directors. */ residentCanadian: boolean; /** Email. Used to send documents for signature. Optional. */ email?: string; }>; /** Current officers */ officers: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Office. The title this person holds. One person can hold several offices. */ office: "President" | "Secretary" | "Treasurer" | "Chief Executive Officer" | "Chief Financial Officer" | "Chair" | "Vice-President"; }>; /** Current shareholders */ shareholders: Array<{ /** Shareholder’s full legal name. As it appears on government ID. */ fullName: string; /** Type of shareholder. individual: a person. corporation: a company, such as a holding company. */ kind?: "individual" | "corporation"; /** Address. For an individual, their residential address. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Shares held */ holdings: Array<{ /** Class of shares. As named in the articles, for example Common shares. */ shareClass?: string; /** Number of shares held */ shares: number; }>; /** Email. Used to send documents for signature. Optional. */ email?: string; /** Details for the register of individuals with significant control */ details?: { /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship. Federal corporations must record it. */ citizenship?: string; /** Address for service. Federal only, if the person wants this published instead of their home address. */ addressForService?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; }; /** Individuals who control this corporation’s shares. Only for a corporate shareholder. */ controllers?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Residential address */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship */ citizenship?: string; }>; }>; /** Share classes in the articles */ shareClasses?: Array<{ /** Class name. As named in the articles. */ name: string; /** Votes per share. 0 for non-voting shares. */ votesPerShare?: number; /** Fair market value per share (CAD). Only matters if there is more than one class. Used for the 25% test by value. */ fairMarketValuePerShare?: string; }>; /** Corporation number */ corporationNumber?: string; /** Last annual meeting. The date of the last annual meeting or the last annual shareholder resolutions. Leave empty if there has not been one. */ lastAnnualMeeting?: string; /** Shareholder agreement in place */ shareholderAgreementInPlace?: boolean; /** Unanimous shareholder agreement. Yes if the shareholders signed an agreement that restricts the directors’ powers. */ unanimousShareholderAgreement?: boolean; /** Articles give pre-emptive rights. Yes if the articles give existing shareholders the first right to buy new shares. */ articlesGrantPreemptiveRights?: boolean; }; /** Date of this review. Leave empty for today. */ reviewDate?: string; /** Individuals with control in fact. Anyone who, without holding 25% of the shares, has influence that if exercised would control the company, for example through an agreement or family relationship. Leave empty if none. */ controlInFact?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Date of birth. For the register. */ dateOfBirth?: string; /** Residential address */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship. Federal corporations must record it. */ citizenship?: string; }>; /** Individuals who hold or act together. Leave empty if none. */ actingTogether?: Array<{ /** Full names of the individuals */ members: Array; /** How they act together. joint: they hold shares jointly. in_concert: they have an agreement to exercise their rights together. related: they are related persons (Ontario only). */ basis: "joint" | "in_concert" | "related"; }>; /** Current register entries. Only if you are not using a company on the founder plan. Leave empty for a first register. */ previousRegister?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Became an individual with significant control on. From the current register. */ becameOn: string; }>; }; /** What corporate.isc_register answers, in result.output. */ export type CorporateIscRegisterOutput = { corporationName: string; reviewDate: string; individuals: Array<{ fullName: string; significantControl: boolean; grounds: Array; votesPercent: number; valuePercent: number; becameOn?: string; ceasedOn?: string; }>; missing: Array<{ fullName: string; fields: Array; }>; registerFields: Array; filing: { required: boolean; when: Array; }; documents: Array<{ key: string; title: string; }>; }; /** The facts corporate.share_issuance takes (version 1). */ export type CorporateShareIssuanceInput = { /** Who is getting shares? */ subscribers: Array<{ /** Subscriber’s full legal name. As it appears on government ID. */ fullName: string; /** Type of subscriber. individual: a person. corporation: a company. */ kind?: "individual" | "corporation"; /** Address. For the securities register. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Class of shares. As named in the articles. */ shareClass?: string; /** Number of shares. A whole number. */ shares: number; /** Price per share (CAD). What each share costs, in dollars. Founders often pay a small amount, for example 0.001. */ pricePerShare: string; /** How the shares are paid for. money: cash or e-transfer. property: an asset transferred to the company. past_services: work already done for the company. */ consideration?: "money" | "property" | "past_services"; /** What is being transferred. Only if paying with property or past services. */ considerationDescription?: string; /** Email. Used to send documents for signature. Optional. */ email?: string; }>; /** Company. A company on your founder plan. Leave empty and fill in the corporation instead. */ companyId?: string; /** The corporation */ company?: { /** Where the corporation is incorporated */ jurisdiction: "on" | "ca"; /** Corporate name. Exactly as on the certificate of incorporation. */ name: string; /** Date of incorporation. The date on the certificate of incorporation. */ incorporatedOn: string; /** Fiscal year end. Month and day the financial year ends, for example 12-31 for December 31. */ fiscalYearEnd?: string; /** Registered office */ registeredOffice: { /** Street address. Number and street, with the unit or suite if there is one. A post office box alone is not accepted. */ street: string; /** City or town */ city: string; /** Province or territory */ province?: "Ontario" | "Quebec" | "British Columbia" | "Alberta" | "Manitoba" | "Saskatchewan" | "Nova Scotia" | "New Brunswick" | "Newfoundland and Labrador" | "Prince Edward Island" | "Yukon" | "Northwest Territories" | "Nunavut"; /** Postal code. For example M5V 2T6. */ postalCode: string; }; /** Current directors */ directors: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Address for service */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Resident Canadian. Yes if this person is a Canadian citizen who ordinarily lives in Canada, or a permanent resident who ordinarily lives in Canada (and has not been eligible to apply for citizenship for more than a year). A federal corporation needs enough of these directors. */ residentCanadian: boolean; /** Email. Used to send documents for signature. Optional. */ email?: string; }>; /** Current officers */ officers: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Office. The title this person holds. One person can hold several offices. */ office: "President" | "Secretary" | "Treasurer" | "Chief Executive Officer" | "Chief Financial Officer" | "Chair" | "Vice-President"; }>; /** Current shareholders */ shareholders: Array<{ /** Shareholder’s full legal name. As it appears on government ID. */ fullName: string; /** Type of shareholder. individual: a person. corporation: a company, such as a holding company. */ kind?: "individual" | "corporation"; /** Address. For an individual, their residential address. */ address: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Shares held */ holdings: Array<{ /** Class of shares. As named in the articles, for example Common shares. */ shareClass?: string; /** Number of shares held */ shares: number; }>; /** Email. Used to send documents for signature. Optional. */ email?: string; /** Details for the register of individuals with significant control */ details?: { /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship. Federal corporations must record it. */ citizenship?: string; /** Address for service. Federal only, if the person wants this published instead of their home address. */ addressForService?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; }; /** Individuals who control this corporation’s shares. Only for a corporate shareholder. */ controllers?: Array<{ /** Full legal name. As it appears on government ID. */ fullName: string; /** Residential address */ residentialAddress?: { /** Street address. Number and street, with the unit if there is one. */ street: string; /** City or town */ city: string; /** Province or state */ region: string; /** Postal or ZIP code */ postalCode: string; /** Country */ country?: string; }; /** Date of birth. For the register of individuals with significant control. */ dateOfBirth?: string; /** Country of residence for tax purposes */ taxResidence?: string; /** Citizenship */ citizenship?: string; }>; }>; /** Share classes in the articles */ shareClasses?: Array<{ /** Class name. As named in the articles. */ name: string; /** Votes per share. 0 for non-voting shares. */ votesPerShare?: number; /** Fair market value per share (CAD). Only matters if there is more than one class. Used for the 25% test by value. */ fairMarketValuePerShare?: string; }>; /** Corporation number */ corporationNumber?: string; /** Last annual meeting. The date of the last annual meeting or the last annual shareholder resolutions. Leave empty if there has not been one. */ lastAnnualMeeting?: string; /** Shareholder agreement in place */ shareholderAgreementInPlace?: boolean; /** Unanimous shareholder agreement. Yes if the shareholders signed an agreement that restricts the directors’ powers. */ unanimousShareholderAgreement?: boolean; /** Articles give pre-emptive rights. Yes if the articles give existing shareholders the first right to buy new shares. */ articlesGrantPreemptiveRights?: boolean; }; }; /** What corporate.share_issuance answers, in result.output. */ export type CorporateShareIssuanceOutput = { corporationName: string; issued: Array<{ subscriber: string; shareClass: string; shares: number; pricePerShare: string; considerationCents: number; certificateNumber: string; }>; capTableAfter: Array<{ holder: string; votes: number; votesPercent: number; }>; individualsWithSignificantControlAfter: Array<{ fullName: string; grounds: Array; }>; iscChanges: Array<{ fullName: string; change: "becomes" | "ceases"; }>; flags: Array<{ flag: string; text: string; }>; documents: Array<{ key: string; title: string; }>; }; /** The facts criminal.intake_triage takes (version 1). */ export type CriminalIntakeTriageInput = { /** Someone is in custody right now. Held by the police, or in jail or a detention centre, today. */ inCustody: boolean; /** Bail hearing date. If a bail hearing is set, its date. */ bailHearingDate?: string; /** Next court date. From the release papers, summons or appearance notice. */ nextCourtDate?: string; /** Today’s date. Leave blank to use today’s date in Ontario. */ today?: string; }; /** What criminal.intake_triage answers, in result.output. */ export type CriminalIntakeTriageOutput = { urgency: "immediate" | "soon" | "standard"; urgencyLabel: string; reasons: Array; nextAction: "book_call" | "book_consultation"; daysToBailHearing: number | null; daysToNextCourtDate: number | null; }; /** The facts criminal.legal_aid_path takes (version 1). */ export type CriminalLegalAidPathInput = { /** A certificate has already been issued. Yes if Legal Aid Ontario has already given you a certificate. */ hasCertificate?: boolean; /** In custody now. Yes if the person charged is in jail or a detention centre. */ inCustody?: boolean; /** The person charged is under 18. 12 to 17 when the offence is said to have happened. */ youth?: boolean; /** Family size. How many people in your family, including you, as Legal Aid Ontario counts them. */ familySize?: number; /** Yearly family income (CAD). Your family’s total yearly income. Used only to compare with Legal Aid Ontario’s published limit. */ familyIncome?: number; }; /** What criminal.legal_aid_path answers, in result.output. */ export type CriminalLegalAidPathOutput = { hasCertificate: boolean; inCustody: boolean; /** Who qualifies */ eligibility: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** What happens next */ next: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** What to do now */ do: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** What not to do */ dont: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** Working with me */ help: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** Income compared with the published limit. Information only. Legal Aid Ontario decides. */ incomeCheck: { familySize: number; familyIncome: number; limit: number | null; underLimit: boolean | null; } | null; }; /** The facts criminal.what_happens_next takes (version 1). */ export type CriminalWhatHappensNextInput = { /** Where things are now. Pick the closest. If you are helping someone else, answer for them. */ stage: "arrested_held" | "bail_hearing_scheduled" | "released_with_conditions" | "summons_or_appearance_notice" | "first_appearance_scheduled" | "after_first_appearance"; /** Next court date. From the release papers, summons or appearance notice, if there is one. If you are waiting for a bail hearing, the date of the hearing. */ nextCourtDate?: string; /** The person charged is under 18. Yes if they were 12 to 17 when the offence is said to have happened. */ youth?: boolean; /** Today’s date. Leave blank to use today’s date in Ontario. */ today?: string; }; /** What criminal.what_happens_next answers, in result.output. */ export type CriminalWhatHappensNextOutput = { stage: string; stageLabel: string; youth: boolean; inCustody: boolean; urgency: "immediate" | "soon" | "standard"; urgencyReasons: Array; courtDate: { date: string; daysAway: number; line: string; } | null; /** What happens next */ next: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** Your rights */ rights: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** What to do now */ do: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** What not to do */ dont: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; /** Getting a lawyer */ help: Array<{ id: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; }; /** The facts employment.demand_letter takes (version 1). */ export type EmploymentDemandLetterInput = { /** Your full name. As you want it signed. */ employeeName: string; /** Your mailing address. Street, city, province and postal code. Use a new line or a comma between parts. */ employeeAddress: string; /** Employer’s name. The company’s legal name, as on your pay stubs or contract. */ employerName: string; /** Employer’s address. Where to send the letter: street, city, province and postal code. */ employerAddress: string; /** Addressed to. The person to address it to, such as the head of human resources. Leave out if you don’t know. */ employerAttention?: string; /** Your job title. Your title when the job ended. */ jobTitle?: string; /** How did your job end?. let_go_without_cause: the employer ended your job and did not say you did anything wrong. constructive_dismissal: the employer made a big change to your job (pay, duties, hours, place) or treated you so badly that you quit because of it. laid_off: the employer laid you off. fired_for_cause: the employer says you were fired for something you did. other: anything else, such as resigning or retiring. */ endedHow: "let_go_without_cause" | "constructive_dismissal" | "laid_off" | "fired_for_cause" | "other"; /** Last day of your job. The last day you were employed. If you were laid off, the first day of the layoff. */ endDate: string; /** First day of your job. The first day you worked there. Leave out if you don’t know it; then give your years and months of service. */ startDate?: string; /** Years of service. Only if you don’t know your start date: how many full years you worked there. */ yearsOfService?: number; /** Extra months of service. Only if you don’t know your start date: full months on top of the years. */ monthsOfService?: number; /** Your age. Your age on the last day of your job. */ age: number; /** Your role. staff: you did not supervise anyone. supervisor: you supervised a team or a shift. manager: you managed people or a department. executive: you were a senior leader, such as a vice-president or officer. */ role: "staff" | "supervisor" | "manager" | "executive"; /** Your pay. How you were paid before your job ended. */ pay: { /** Salary */ kind: "salary"; /** Yearly salary. Your salary for a year, before tax, in Canadian dollars. */ annualSalary: number; /** Regular commissions. Leave out if you were not paid commissions. */ commissions?: { /** Commissions. Commissions you earned regularly, before tax, in Canadian dollars. */ amount: number; /** Over what period. last_12_weeks: the total commissions you earned in the 12 weeks before your job ended (the most exact figure). year: what you earn in commissions in a typical year (an estimate). */ period: "last_12_weeks" | "year"; }; } | { /** Hourly */ kind: "hourly"; /** Hourly rate. Your regular rate per hour, in Canadian dollars. */ hourlyRate: number; /** Regular hours a week. The hours you usually worked each week, not counting overtime. */ weeklyHours: number; /** Regular commissions. Leave out if you were not paid commissions. */ commissions?: { /** Commissions. Commissions you earned regularly, before tax, in Canadian dollars. */ amount: number; /** Over what period. last_12_weeks: the total commissions you earned in the 12 weeks before your job ended (the most exact figure). year: what you earn in commissions in a typical year (an estimate). */ period: "last_12_weeks" | "year"; }; } | { /** Pay that changes week to week */ kind: "varies"; /** Average weekly pay. Add up your regular pay (not overtime or vacation pay) for the weeks you worked in the 12 weeks before your job ended, and divide by the number of those weeks. */ averageWeeklyWages: number; }; /** Is the employer’s total payroll CAD 2.5 million or more a year?. yes, no, or unsure. Count the wages of all its employees, in Ontario and elsewhere. For example, 50 people earning CAD 50,000 each is a payroll of CAD 2.5 million. Severance pay depends on this. */ payroll: "yes" | "no" | "unsure"; /** Did you have benefits through work?. Health, dental, life or disability insurance, or a pension or RRSP plan the employer paid into. */ hasBenefits: boolean; /** Does your employment contract say what you get when your job ends?. yes if you signed a contract or offer letter with a clause about ending the job (often called termination), no if not, unsure if you don’t know. */ terminationClause: "yes" | "no" | "unsure"; /** Do any of these apply to you?. Pick every one that might apply. Leave empty if none do. Any of these means a lawyer should look at your situation first. */ exemptions?: Array<"federal_employer" | "work_outside_ontario" | "fixed_term" | "temporary_layoff" | "wilful_misconduct" | "frustration" | "refused_alternative_work" | "no_return_from_layoff" | "strike_or_lockout" | "construction" | "retirement_age" | "unreduced_pension" | "shipbuilding" | "unsure">; /** The employer’s offer. Leave out if the employer has not offered anything yet. */ offer?: { /** Amount offered. The total the employer offered, in Canadian dollars, before tax. */ amount?: number; /** Weeks of pay offered. If the offer was in weeks of pay rather than dollars. */ weeks?: number; /** Do they want you to sign a release?. A release is a document where you agree not to sue or claim anything more. */ releaseRequired?: boolean; }; /** Weeks of written notice you worked. If the employer told you in writing ahead of time and you kept working until the last day, how many weeks that was. Otherwise 0. */ workingNoticeWeeks?: number; /** Day you were told. The day you were told your job was ending, if it was before your last day. */ toldDate?: string; /** Did 50 or more people at your workplace lose their jobs within the same 4 weeks?. yes, no, or unsure. Leave as no if you don’t think so. */ massTermination?: "yes" | "no" | "unsure"; /** Did the employer close all or part of the business where you worked, with 50 or more people losing their jobs within 6 months?. yes, no, or unsure. This matters only if the payroll is under CAD 2.5 million. */ businessClosure?: "yes" | "no" | "unsure"; /** Amount to ask for. Leave out to use the default: the middle of the common-law estimate from the severance check, or the ESA minimum if that is higher. */ amountDemanded?: number; /** Days to reply. How many days the employer has to reply. You choose; 14 is common. */ responseDays?: number; /** Date of the letter. Leave out to use today’s date. */ letterDate?: string; }; /** What employment.demand_letter answers, in result.output. */ export type EmploymentDemandLetterOutput = { produced: boolean; amountDemanded: number | null; defaultAmount: number | null; esaMinimum: number | null; responseDeadline: string | null; preview: { firstParagraph: string; outline: Array; } | null; documents: Array<{ id: string; title: string; mediaType: "application/pdf" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "text/markdown"; href?: string; sku?: string; }>; }; /** The facts employment.limitation_dates takes (version 1). */ export type EmploymentLimitationDatesInput = { /** Last day of your job. The last day you were employed. If you were laid off, the first day of the layoff. */ endDate: string; /** Day you were told. The day you were told your job was ending, if it was before your last day. */ toldDate?: string; /** How did your job end?. let_go_without_cause: the employer ended your job and did not say you did anything wrong. constructive_dismissal: the employer made a big change to your job (pay, duties, hours, place) or treated you so badly that you quit because of it. laid_off: the employer laid you off. fired_for_cause: the employer says you were fired for something you did. other: anything else, such as resigning or retiring. */ endedHow?: "let_go_without_cause" | "constructive_dismissal" | "laid_off" | "fired_for_cause" | "other"; }; /** What employment.limitation_dates answers, in result.output. */ export type EmploymentLimitationDatesOutput = { civil: { from: string; lastDay: string; daysLeft: number; status: "passed" | "under_90_days" | "open"; }; esaComplaint: { from: string; lastDay: string; daysLeft: number; status: "passed" | "under_90_days" | "open"; }; exceptions: Array<{ id: string; text: string; }>; }; /** The facts employment.severance_check takes (version 1). */ export type EmploymentSeveranceCheckInput = { /** How did your job end?. let_go_without_cause: the employer ended your job and did not say you did anything wrong. constructive_dismissal: the employer made a big change to your job (pay, duties, hours, place) or treated you so badly that you quit because of it. laid_off: the employer laid you off. fired_for_cause: the employer says you were fired for something you did. other: anything else, such as resigning or retiring. */ endedHow: "let_go_without_cause" | "constructive_dismissal" | "laid_off" | "fired_for_cause" | "other"; /** Last day of your job. The last day you were employed. If you were laid off, the first day of the layoff. */ endDate: string; /** First day of your job. The first day you worked there. Leave out if you don’t know it; then give your years and months of service. */ startDate?: string; /** Years of service. Only if you don’t know your start date: how many full years you worked there. */ yearsOfService?: number; /** Extra months of service. Only if you don’t know your start date: full months on top of the years. */ monthsOfService?: number; /** Your age. Your age on the last day of your job. */ age: number; /** Your role. staff: you did not supervise anyone. supervisor: you supervised a team or a shift. manager: you managed people or a department. executive: you were a senior leader, such as a vice-president or officer. */ role: "staff" | "supervisor" | "manager" | "executive"; /** Your pay. How you were paid before your job ended. */ pay: { /** Salary */ kind: "salary"; /** Yearly salary. Your salary for a year, before tax, in Canadian dollars. */ annualSalary: number; /** Regular commissions. Leave out if you were not paid commissions. */ commissions?: { /** Commissions. Commissions you earned regularly, before tax, in Canadian dollars. */ amount: number; /** Over what period. last_12_weeks: the total commissions you earned in the 12 weeks before your job ended (the most exact figure). year: what you earn in commissions in a typical year (an estimate). */ period: "last_12_weeks" | "year"; }; } | { /** Hourly */ kind: "hourly"; /** Hourly rate. Your regular rate per hour, in Canadian dollars. */ hourlyRate: number; /** Regular hours a week. The hours you usually worked each week, not counting overtime. */ weeklyHours: number; /** Regular commissions. Leave out if you were not paid commissions. */ commissions?: { /** Commissions. Commissions you earned regularly, before tax, in Canadian dollars. */ amount: number; /** Over what period. last_12_weeks: the total commissions you earned in the 12 weeks before your job ended (the most exact figure). year: what you earn in commissions in a typical year (an estimate). */ period: "last_12_weeks" | "year"; }; } | { /** Pay that changes week to week */ kind: "varies"; /** Average weekly pay. Add up your regular pay (not overtime or vacation pay) for the weeks you worked in the 12 weeks before your job ended, and divide by the number of those weeks. */ averageWeeklyWages: number; }; /** Is the employer’s total payroll CAD 2.5 million or more a year?. yes, no, or unsure. Count the wages of all its employees, in Ontario and elsewhere. For example, 50 people earning CAD 50,000 each is a payroll of CAD 2.5 million. Severance pay depends on this. */ payroll: "yes" | "no" | "unsure"; /** Did you have benefits through work?. Health, dental, life or disability insurance, or a pension or RRSP plan the employer paid into. */ hasBenefits: boolean; /** Does your employment contract say what you get when your job ends?. yes if you signed a contract or offer letter with a clause about ending the job (often called termination), no if not, unsure if you don’t know. */ terminationClause: "yes" | "no" | "unsure"; /** Do any of these apply to you?. Pick every one that might apply. Leave empty if none do. Any of these means a lawyer should look at your situation first. */ exemptions?: Array<"federal_employer" | "work_outside_ontario" | "fixed_term" | "temporary_layoff" | "wilful_misconduct" | "frustration" | "refused_alternative_work" | "no_return_from_layoff" | "strike_or_lockout" | "construction" | "retirement_age" | "unreduced_pension" | "shipbuilding" | "unsure">; /** The employer’s offer. Leave out if the employer has not offered anything yet. */ offer?: { /** Amount offered. The total the employer offered, in Canadian dollars, before tax. */ amount?: number; /** Weeks of pay offered. If the offer was in weeks of pay rather than dollars. */ weeks?: number; /** Do they want you to sign a release?. A release is a document where you agree not to sue or claim anything more. */ releaseRequired?: boolean; }; /** Weeks of written notice you worked. If the employer told you in writing ahead of time and you kept working until the last day, how many weeks that was. Otherwise 0. */ workingNoticeWeeks?: number; /** Day you were told. The day you were told your job was ending, if it was before your last day. */ toldDate?: string; /** Did 50 or more people at your workplace lose their jobs within the same 4 weeks?. yes, no, or unsure. Leave as no if you don’t think so. */ massTermination?: "yes" | "no" | "unsure"; /** Did the employer close all or part of the business where you worked, with 50 or more people losing their jobs within 6 months?. yes, no, or unsure. This matters only if the payroll is under CAD 2.5 million. */ businessClosure?: "yes" | "no" | "unsure"; }; /** What employment.severance_check answers, in result.output. */ export type EmploymentSeveranceCheckOutput = { /** False when the facts need a lawyer before any figure can be given. */ computed: boolean; service: { years: number; months: number; days: number | null; from: "dates" | "years_and_months"; } | null; weeklyWage: number | null; weeklyWageIsEstimate: boolean; terminationPay: { noticeWeeks: number; workingNoticeWeeks: number; payWeeks: number; amount: number; } | null; vacationPay: { ratePercent: number; amount: number; } | null; severancePay: { status: "owed" | "not_owed" | "depends"; reason: string; years: number; months: number; weeks: number; weeksLabel: string; capped: boolean; amount: number; } | null; benefits: { continueWeeks: number; note: string; } | null; esaMinimum: { total: number; totalIfSeveranceOwed: number; } | null; commonLaw: { lowMonths: number; highMonths: number; midMonths: number; monthlyPay: number; lowAmount: number; midAmount: number; highAmount: number; capped: boolean; note: string; } | null; offer: { amount: number; releaseRequired: boolean; gapToEsaMinimum: number; gapToCommonLawLow: number; position: "below_esa_minimum" | "below_common_law_range" | "within_common_law_range" | "above_common_law_range" | "not_compared"; } | null; limitation: { civil: { from: string; lastDay: string; daysLeft: number; status: "passed" | "under_90_days" | "open"; }; esaComplaint: { from: string; lastDay: string; daysLeft: number; status: "passed" | "under_90_days" | "open"; }; }; lawyerReasons: Array<"exemption" | "other_ending" | "fired_for_cause" | "constructive_dismissal" | "laid_off" | "termination_clause" | "payroll_unsure" | "closure_unsure" | "mass_termination" | "offer_below_range" | "deadline_close">; nextActions: Array<{ id: "book_consultation" | "book_call" | "handoff" | "buy" | "file_yourself" | "serve" | "sign" | "run_operation" | "open_url"; label: string; operation?: string; href?: string; sku?: string; }>; }; /** The facts employment.termination_clause_check takes (version 1). */ export type EmploymentTerminationClauseCheckInput = { /** Your termination clause. Paste the part of your contract about ending the job, word for word. Include any part about probation. */ clauseText: string; /** Any separate clause about firing for cause. If your contract has a separate part about being fired for cause or misconduct, paste it here word for word. */ causeClauseText?: string; /** When did you sign the contract?. before_start: before your first day. after_start_terms_agreed_before: after you started, but it only wrote down terms you had already agreed to. after_start_new_terms: after you started, and it added new terms. unsure: you don’t know. */ signedWhen: "before_start" | "after_start_terms_agreed_before" | "after_start_new_terms" | "unsure"; /** Did you get something new for signing it?. Only if you signed after starting work: yes if you got a raise, bonus, promotion or other new benefit in exchange for signing. */ gotSomethingNewForSigning?: "yes" | "no" | "unsure"; /** Were you paid commissions or a bonus that was not up to the employer?. yes if part of your pay was commissions, or a bonus you earned by a set formula rather than at the employer’s choice. */ hadCommissionsOrBonus: "yes" | "no" | "unsure"; /** Is the employer’s total payroll CAD 2.5 million or more a year?. yes, no, or unsure. Count all its employees’ wages, in Ontario and elsewhere. */ payroll?: "yes" | "no" | "unsure"; /** Did the employer keep your benefits going after your job ended?. yes, no, or unsure. Leave out if you had no benefits. */ employerContinuedBenefits?: "yes" | "no" | "unsure"; /** Date you signed. If you know it. */ dateSigned?: string; }; /** What employment.termination_clause_check answers, in result.output. */ export type EmploymentTerminationClauseCheckOutput = { signals: Array<{ id: "cause_provision" | "benefits_excluded" | "base_salary_only" | "severance_left_out" | "notice_below_esa" | "at_any_time_wording" | "signed_after_start"; strength: "strong" | "possible" | "note"; title: string; explanation: string; found?: string; rule: string; }>; strong: number; possible: number; consequence: string; notChecked: Array; signedOn: string | null; }; /** The facts general.limitation_period takes (version 1). */ export type GeneralLimitationPeriodInput = { /** The day it happened. The day of the act or omission the claim is about: the missed payment, the accident, the work done badly. */ happenedOn?: string; /** The day you found out. The day you first knew there was a loss, that someone caused it, who, and that going to court was a sensible way to fix it. Leave blank if it is the same day it happened. */ discoveredOn?: string; /** Anything unusual?. Tick any that fit. Each one can change or remove the time limit, so it is flagged for a lawyer rather than calculated. */ situations?: Array<"minor" | "incapable" | "sexual_misconduct_or_assault" | "acknowledged" | "mediation" | "demand_obligation" | "continuing_or_series" | "concealed_or_misled" | "enforce_court_order" | "tribunal_or_other_law" | "agreement_to_extend" | "environmental">; /** Today’s date. Leave blank to use today’s date in Ontario. */ today?: string; }; /** What general.limitation_period answers, in result.output. */ export type GeneralLimitationPeriodOutput = { basic: { from: string; lastDay: string; daysLeft: number; expired: boolean; basis: "discovery_given" | "presumed_from_occurrence"; } | null; basicIfPresumed: { from: string; lastDay: string; daysLeft: number; expired: boolean; } | null; ultimate: { from: string; lastDay: string; daysLeft: number; expired: boolean; } | null; deadline: string | null; safestDeadline: string | null; daysLeft: number | null; status: "open" | "close" | "expired" | "check_with_lawyer"; flags: Array<{ id: string; label: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; }; /** The facts general.triage takes (version 1). */ export type GeneralTriageInput = { /** What happened. Pick the closest. */ category: "arrested_or_charged" | "job_ended" | "owed_money" | "sued_for_money" | "injury_or_damage" | "tenant_problem" | "landlord_problem" | "starting_business" | "other"; /** Area of law, if you know it. Leave as “Not sure” if you don’t know. */ area?: "criminal" | "employment" | "small-claims" | "ltb" | "corporate" | "unknown"; /** Someone is in custody right now. Held by the police, or in jail or a detention centre, today. */ inCustody?: boolean; /** Next court or tribunal date. If a hearing or court date is already set. */ nextDate?: string; /** The day it happened. Used to show the time limit to sue, where one may apply. */ happenedOn?: string; /** The day you found out. If you found out later than the day it happened. */ discoveredOn?: string; /** Anything unusual?. Tick any that fit. Each one can change or remove the time limit, so it is flagged for a lawyer rather than calculated. */ situations?: Array<"minor" | "incapable" | "sexual_misconduct_or_assault" | "acknowledged" | "mediation" | "demand_obligation" | "continuing_or_series" | "concealed_or_misled" | "enforce_court_order" | "tribunal_or_other_law" | "agreement_to_extend" | "environmental">; /** Today’s date. Leave blank to use today’s date in Ontario. */ today?: string; }; /** What general.triage answers, in result.output. */ export type GeneralTriageOutput = { category: string; categoryLabel: string; areas: Array; urgency: "immediate" | "soon" | "standard"; reasons: Array; /** Operations to run next. In order. Each can be run at /api/v1/operations/{id}/runs or as an MCP tool. */ operations: Array<{ id: string; title: string; summary: string; kind: string; area: string; price: string; why: string; }>; limitation: { basic: { from: string; lastDay: string; daysLeft: number; expired: boolean; basis: "discovery_given" | "presumed_from_occurrence"; } | null; basicIfPresumed: { from: string; lastDay: string; daysLeft: number; expired: boolean; } | null; ultimate: { from: string; lastDay: string; daysLeft: number; expired: boolean; } | null; deadline: string | null; safestDeadline: string | null; daysLeft: number | null; status: "open" | "close" | "expired" | "check_with_lawyer"; flags: Array<{ id: string; label: string; text: string; cites: Array<{ sourceId: string; label: string; url: string; }>; }>; } | null; limitationNote: string | null; notes: Array; more: Array<{ label: string; href: string; }>; }; /** The facts ltb.l1_prepare takes (version 1). */ export type LtbL1PrepareInput = { /** Landlords. The same landlords named on the N4. */ landlords: Array<{ /** A person */ type: "person"; /** First name */ firstName: string; /** Last name */ lastName: string; } | { /** A company */ type: "company"; /** Company name. The landlord’s legal name. */ companyName: string; }>; /** Landlord’s contact details */ landlordContact: { /** Landlord’s phone number */ phone: string; /** Landlord’s email */ email?: string; /** Landlord’s mailing address */ address: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Province or territory. Two-letter code, for example ON. */ province?: "ON" | "QC" | "NS" | "NB" | "MB" | "BC" | "PE" | "SK" | "AB" | "NL" | "NT" | "YT" | "NU"; /** Postal code */ postalCode: string; }; /** How the LTB should send documents. email: you agree to receive LTB documents by email. mail: by mail. */ communication?: "mail" | "email"; }; /** Tenants. The same tenants named on the N4, all still in the unit. */ tenants: Array<{ /** First name */ firstName: string; /** Last name */ lastName: string; }>; /** Rental unit address */ rentalUnit: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Postal code */ postalCode: string; }; /** Tenants’ mailing address. Only if different from the rental unit. */ tenantMailingAddress?: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Province or territory. Two-letter code, for example ON. */ province?: "ON" | "QC" | "NS" | "NB" | "MB" | "BC" | "PE" | "SK" | "AB" | "NL" | "NT" | "YT" | "NU"; /** Postal code */ postalCode: string; }; /** Rent */ rent: { /** Rent per period. The lawful rent for one rental period, in dollars, including any fixed amount paid to the landlord for parking or other services. */ amount: number; /** Rental period. How often rent is due. */ period?: "monthly" | "weekly" | "daily" | "yearly"; }; /** The N4 */ n4: { /** The delivery */ service: { /** How it is delivered. hand: Handed to the person; adult_in_unit: Handed to an adult in the rental unit; mailbox: Left in the mailbox (or where mail is usually delivered); under_door: Slid under the door or through the mail slot of the unit; mail: Mailed by Canada Post (regular or registered); xpresspost: Sent by Xpresspost; courier: Given to a courier; fax: Faxed; email: Emailed, with the person’s written consent to email service */ method: "hand" | "adult_in_unit" | "mailbox" | "under_door" | "mail" | "xpresspost" | "courier" | "fax" | "email"; /** The day it is delivered. The day it is handed over, left, mailed, given to the courier, faxed or emailed, for example October 5, 2026. */ date: string; /** Written consent to email service. Only for email: the person agreed in writing to receive documents by email. */ emailConsentInWriting?: boolean; }; /** Termination date on the N4 */ terminationDate: string; }; /** Rent owing by rental period. Every rental period with rent owing, from the N4’s first period up to the filing date. */ periods: Array<{ /** Period start. The day rent was due, for example September 1, 2026. */ from: string; /** Period end. The last day of the rental period, for example September 30, 2026. */ to: string; /** Rent charged. Rent for this period, in dollars. */ rentCharged: number; /** Rent paid. What the tenant paid toward this period’s rent, in dollars. */ rentPaid?: number; }>; /** NSF cheques. Cheques from the tenant returned NSF and not yet repaid. */ nsfCheques?: Array<{ /** Cheque amount. The amount of the cheque that bounced, in dollars. It is not part of the claim. */ chequeAmount: number; /** Date on the cheque */ chequeDate: string; /** Date the bank charged you */ chargeDate: string; /** Bank charge. What your bank charged you for the NSF cheque, in dollars. */ bankCharge: number; /** Your administration charge. Your own charge for handling the NSF cheque, in dollars. The most allowed is CAD 20 per cheque. */ adminCharge?: number; }>; /** Rent deposit. Only if you hold a rent deposit (last month’s rent). */ deposit?: { /** Rent deposit held. In dollars. */ amount: number; /** Date collected */ collectedOn: string; /** Last interest paid: from */ interestPaidFrom?: string; /** Last interest paid: to */ interestPaidTo?: string; }; /** Tenant still living in the unit. The L1 can only be filed while the tenant is in possession. */ tenantInPossession?: boolean; /** Filing date. The day you will file. Leave empty for today. */ filingDate?: string; /** How you will file. portal: Tribunals Ontario Portal (lower fee). mail_or_courier: to an LTB office. service_ontario: in person at a ServiceOntario Centre that accepts LTB applications. */ filingMethod?: "portal" | "mail_or_courier" | "service_ontario"; /** How you will pay (paper filing). Only for mail, courier or ServiceOntario: credit_card, certified_cheque or money_order. */ paymentMethod?: "credit_card" | "certified_cheque" | "money_order"; /** Preferred language. english or french: the language you want to use with the LTB. */ language?: "english" | "french"; /** Signature block. Who will sign the notice. The signature itself is left blank for them. */ signer: { /** Who signs. landlord: the landlord signs. representative: a lawyer, paralegal or agent signs for the landlord. */ role?: "landlord" | "representative"; /** Signer’s first name */ firstName: string; /** Signer’s last name */ lastName: string; /** Signer’s phone number */ phone: string; /** Date of signing. Leave empty to date it by hand when signing. */ signDate?: string; /** Representative details. Only when a representative signs. */ representative?: { /** Law Society of Ontario number. Only for a lawyer or paralegal. */ lsoNumber?: string; /** Company or firm name */ companyName?: string; /** Email */ email?: string; /** Representative’s address */ address?: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Province or territory. Two-letter code, for example ON. */ province?: "ON" | "QC" | "NS" | "NB" | "MB" | "BC" | "PE" | "SK" | "AB" | "NL" | "NT" | "YT" | "NU"; /** Postal code */ postalCode: string; }; }; }; }; /** What ltb.l1_prepare answers, in result.output. */ export type LtbL1PrepareOutput = { form: { code: "L1"; title: string; revision: string; }; eligibility: { eligible: boolean; earliestFilingDate: string; filingDate: string; reasons: Array; }; n4: { givenOn: string; earliestTerminationDate: string; terminationDate: string; terminationDateValid: boolean; }; rent: { periods: Array<{ from: string; to: string; chargedCents: number; paidCents: number; owingCents: number; }>; formRows: Array<{ from: string; to: string; chargedCents: number; paidCents: number; owingCents: number; }>; totalCents: number; }; nsf: { cheques: Array<{ chequeAmountCents: number; chequeDate: string; chargeDate: string; bankChargeCents: number; adminChargeCents: number; adminChargeCapped: boolean; totalCents: number; }>; totalCents: number; }; fee: { filingMethod: "portal" | "mail_or_courier" | "service_ontario"; cents: number; }; totalClaimCents: number; totalClaim: string; tenantOptions: { halfOfArrearsCents: number; halfRuleApplies: boolean; }; filing: { method: "portal" | "mail_or_courier" | "service_ontario"; include: Array; paymentMethods: Array; where: string; }; scheduleOfPartiesNeeded: boolean; scheduleAttached: boolean; document: { id: string; title: string; locked: boolean; sku: string; } | null; certificate?: { id: string; title: string; locked: boolean; sku: string; } | null; }; /** The facts ltb.n4_bulk takes (version 1). */ export type LtbN4BulkInput = { /** Landlords. The landlords of every unit in this run. */ landlords: Array<{ /** A person */ type: "person"; /** First name */ firstName: string; /** Last name */ lastName: string; } | { /** A company */ type: "company"; /** Company name. The landlord’s legal name. */ companyName: string; }>; /** The delivery */ service: { /** How it is delivered. hand: Handed to the person; adult_in_unit: Handed to an adult in the rental unit; mailbox: Left in the mailbox (or where mail is usually delivered); under_door: Slid under the door or through the mail slot of the unit; mail: Mailed by Canada Post (regular or registered); xpresspost: Sent by Xpresspost; courier: Given to a courier; fax: Faxed; email: Emailed, with the person’s written consent to email service */ method: "hand" | "adult_in_unit" | "mailbox" | "under_door" | "mail" | "xpresspost" | "courier" | "fax" | "email"; /** The day it is delivered. The day it is handed over, left, mailed, given to the courier, faxed or emailed, for example October 5, 2026. */ date: string; /** Written consent to email service. Only for email: the person agreed in writing to receive documents by email. */ emailConsentInWriting?: boolean; }; /** Termination date. Leave empty to use the earliest valid date. */ terminationDate?: string; /** Signature block. Who will sign the notice. The signature itself is left blank for them. */ signer: { /** Who signs. landlord: the landlord signs. representative: a lawyer, paralegal or agent signs for the landlord. */ role?: "landlord" | "representative"; /** Signer’s first name */ firstName: string; /** Signer’s last name */ lastName: string; /** Signer’s phone number */ phone: string; /** Date of signing. Leave empty to date it by hand when signing. */ signDate?: string; /** Representative details. Only when a representative signs. */ representative?: { /** Law Society of Ontario number. Only for a lawyer or paralegal. */ lsoNumber?: string; /** Company or firm name */ companyName?: string; /** Email */ email?: string; /** Representative’s address */ address?: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Province or territory. Two-letter code, for example ON. */ province?: "ON" | "QC" | "NS" | "NB" | "MB" | "BC" | "PE" | "SK" | "AB" | "NL" | "NT" | "YT" | "NU"; /** Postal code */ postalCode: string; }; }; }; /** Rent roll. One entry per unit, up to 500 per run. */ units: Array<{ /** Your reference. How you identify the unit in your rent roll, for example 4 or a tenant code. */ reference: string; /** Tenants */ tenants: Array<{ /** First name */ firstName: string; /** Last name */ lastName: string; }>; /** Rental unit address */ rentalUnit: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Postal code */ postalCode: string; }; /** Rent */ rent: { /** Rent per period. The lawful rent for one rental period, in dollars, including any fixed amount paid to the landlord for parking or other services. */ amount: number; /** Rental period. How often rent is due. */ period?: "monthly" | "weekly" | "daily" | "yearly"; }; /** Rent owing by rental period. Leave empty for a unit with nothing owing. */ periods?: Array<{ /** Period start. The day rent was due, for example September 1, 2026. */ from: string; /** Period end. The last day of the rental period, for example September 30, 2026. */ to: string; /** Rent charged. Rent for this period, in dollars. */ rentCharged: number; /** Rent paid. What the tenant paid toward this period’s rent, in dollars. */ rentPaid?: number; }>; }>; }; /** What ltb.n4_bulk answers, in result.output. */ export type LtbN4BulkOutput = { totals: { units: number; prepared: number; noArrears: number; invalid: number; totalOwingCents: number; totalOwing: string; }; service: { method: string; deliveredOn: string; givenOn: string | null; }; terminationDate: string | null; firstDayToFileL1: string | null; units: Array<{ reference: string; rentalUnit: string; tenants: Array; status: "prepared" | "no_arrears" | "invalid"; totalOwingCents: number | null; terminationDate: string | null; documentId: string | null; certificateId?: string | null; problems: Array<{ code: string; message: string; row?: number; }>; warnings: Array; }>; }; /** The facts ltb.n4_prepare takes (version 1). */ export type LtbN4PrepareInput = { /** Landlords. Every landlord, as named in the tenancy agreement. */ landlords: Array<{ /** A person */ type: "person"; /** First name */ firstName: string; /** Last name */ lastName: string; } | { /** A company */ type: "company"; /** Company name. The landlord’s legal name. */ companyName: string; }>; /** Tenants. Every tenant in the unit, and any subtenant or assignee. Other occupants, such as children or guests, are not named. */ tenants: Array<{ /** First name */ firstName: string; /** Last name */ lastName: string; }>; /** Rental unit address. The full address, including the unit number and postal code. */ rentalUnit: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Postal code */ postalCode: string; }; /** Rent */ rent: { /** Rent per period. The lawful rent for one rental period, in dollars, including any fixed amount paid to the landlord for parking or other services. */ amount: number; /** Rental period. How often rent is due. */ period?: "monthly" | "weekly" | "daily" | "yearly"; }; /** Rent owing by rental period. Each rental period with rent owing, oldest first: the dates, the rent charged and what was paid. */ periods: Array<{ /** Period start. The day rent was due, for example September 1, 2026. */ from: string; /** Period end. The last day of the rental period, for example September 30, 2026. */ to: string; /** Rent charged. Rent for this period, in dollars. */ rentCharged: number; /** Rent paid. What the tenant paid toward this period’s rent, in dollars. */ rentPaid?: number; }>; /** The delivery */ service: { /** How it is delivered. hand: Handed to the person; adult_in_unit: Handed to an adult in the rental unit; mailbox: Left in the mailbox (or where mail is usually delivered); under_door: Slid under the door or through the mail slot of the unit; mail: Mailed by Canada Post (regular or registered); xpresspost: Sent by Xpresspost; courier: Given to a courier; fax: Faxed; email: Emailed, with the person’s written consent to email service */ method: "hand" | "adult_in_unit" | "mailbox" | "under_door" | "mail" | "xpresspost" | "courier" | "fax" | "email"; /** The day it is delivered. The day it is handed over, left, mailed, given to the courier, faxed or emailed, for example October 5, 2026. */ date: string; /** Written consent to email service. Only for email: the person agreed in writing to receive documents by email. */ emailConsentInWriting?: boolean; }; /** Termination date. Leave empty to use the earliest valid date. A later date is allowed; an earlier one is refused. */ terminationDate?: string; /** Signature block. Who will sign the notice. The signature itself is left blank for them. */ signer: { /** Who signs. landlord: the landlord signs. representative: a lawyer, paralegal or agent signs for the landlord. */ role?: "landlord" | "representative"; /** Signer’s first name */ firstName: string; /** Signer’s last name */ lastName: string; /** Signer’s phone number */ phone: string; /** Date of signing. Leave empty to date it by hand when signing. */ signDate?: string; /** Representative details. Only when a representative signs. */ representative?: { /** Law Society of Ontario number. Only for a lawyer or paralegal. */ lsoNumber?: string; /** Company or firm name */ companyName?: string; /** Email */ email?: string; /** Representative’s address */ address?: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Province or territory. Two-letter code, for example ON. */ province?: "ON" | "QC" | "NS" | "NB" | "MB" | "BC" | "PE" | "SK" | "AB" | "NL" | "NT" | "YT" | "NU"; /** Postal code */ postalCode: string; }; }; }; /** Other amounts owed. Anything else the tenant owes, to check whether it can go on the N4. These are never added to the notice. */ otherAmounts?: Array<{ /** What it is for. parking_or_services: A fixed amount paid to the landlord for parking, storage or another service; flat_utility_rate: A flat monthly rate paid to the landlord for a utility; seasonal_air_conditioner: A seasonal air-conditioner charge; utility_share_or_bill: A share of a utility bill, or a utility bill the tenant should have paid; nsf_bank_charge: A bank charge for an NSF cheque; nsf_admin_charge: The landlord’s administration charge for an NSF cheque; rent_deposit: An unpaid rent deposit (last month’s rent); late_fee: A late payment fee; damage: The cost of damage; other_charge: Any other charge */ kind: "parking_or_services" | "flat_utility_rate" | "seasonal_air_conditioner" | "utility_share_or_bill" | "nsf_bank_charge" | "nsf_admin_charge" | "rent_deposit" | "late_fee" | "damage" | "other_charge"; /** Amount. In dollars. */ amount: number; /** Note */ description?: string; }>; }; /** What ltb.n4_prepare answers, in result.output. */ export type LtbN4PrepareOutput = { form: { code: "N4"; title: string; revision: string; }; landlords: Array; tenants: Array; rentalUnit: string; periods: Array<{ from: string; to: string; chargedCents: number; paidCents: number; owingCents: number; }>; formRows: Array<{ from: string; to: string; chargedCents: number; paidCents: number; owingCents: number; }>; scheduleAttached: boolean; totalOwingCents: number; totalOwing: string; service: { method: string; deliveredOn: string; givenOn: string; }; earliestTerminationDate: string; terminationDate: string; firstDayToFileL1: string; voidSchedule: Array<{ from: string; to: string; amountCents: number; amount: string; }>; otherAmounts: Array<{ kind: string; amountCents: number; isRent: boolean; advice: string; }>; document: { id: string; title: string; locked: boolean; sku: string; } | null; certificate?: { id: string; title: string; locked: boolean; sku: string; } | null; }; /** The facts ltb.outcomes takes (version 1). */ export type LtbOutcomesInput = { /** Application. The LTB application code, for example L1 (non-payment of rent) or T6 (maintenance). */ application: "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "L7" | "L8" | "L9" | "L10" | "T1" | "T2" | "T3" | "T4" | "T5" | "T6" | "T7" | "A1" | "A2" | "A4"; /** Only files with this application alone. Yes counts only files with this application and no other. No also counts files that combine it with others, such as L1 with L2. */ alone?: boolean; /** From month. Year and month, for example 2026-01. Leave both empty for every month held. */ fromMonth?: string; /** To month. Year and month, for example 2026-06. Included. */ toMonth?: string; }; /** What ltb.outcomes answers, in result.output. */ export type LtbOutcomesOutput = { application: string; alone: boolean; files: number; summary: { documents: number; byDocumentType: Array<{ type: "order" | "ex_parte_order" | "review_order" | "amended_order" | "other"; label: string; count: number; share: number; }>; byMonth: Array<{ month: string; count: number; }>; byFilingYear: Array<{ year: number | null; count: number; }>; filedWith: Array<{ applications: string; count: number; share: number; }>; }; shareOfAllOrders: number; coverage: { firstOrderDate: string | null; lastOrderDate: string | null; refreshedAt: string | null; resourceLastModified: string | null; }; notInDataset: Array; attribution: string; licenceUrl: string; source: string; }; /** The facts ltb.rent_increase_check takes (version 1). */ export type LtbRentIncreaseCheckInput = { /** Current rent. The rent now, per rental period, in dollars. */ currentRent: number; /** New rent. The rent after the increase, per rental period, in dollars. */ newRent: number; /** Date the increase takes effect */ effectiveDate: string; /** Date the tenancy began. The day the unit was first rented to this tenant. */ tenancyStartDate: string; /** Date of the last increase. When this tenant’s rent last went up. Leave empty if it never has. */ lastIncreaseDate?: string; /** Was there written notice? */ notice: { /** The notice. ltb_form: a notice on the LTB’s form (N1, N2 or N3). other_writing: a letter, email or text not on the LTB’s form. none: no written notice. */ kind: "ltb_form" | "other_writing" | "none"; /** How and when it was given. Needed to check the 90 days. */ service?: { /** How it is delivered. hand: Handed to the person; adult_in_unit: Handed to an adult in the rental unit; mailbox: Left in the mailbox (or where mail is usually delivered); under_door: Slid under the door or through the mail slot of the unit; mail: Mailed by Canada Post (regular or registered); xpresspost: Sent by Xpresspost; courier: Given to a courier; fax: Faxed; email: Emailed, with the person’s written consent to email service */ method: "hand" | "adult_in_unit" | "mailbox" | "under_door" | "mail" | "xpresspost" | "courier" | "fax" | "email"; /** The day it is delivered. The day it is handed over, left, mailed, given to the courier, faxed or emailed, for example October 5, 2026. */ date: string; /** Written consent to email service. Only for email: the person agreed in writing to receive documents by email. */ emailConsentInWriting?: boolean; }; }; /** Newer unit. new_building: no part of the building (or of the addition the unit is in) was lived in before November 16, 2018. new_unit_in_house: a self-contained unit created in a house after November 15, 2018 that meets s. 6.1(3). none: neither. unknown: not sure. */ exemption?: "none" | "new_building" | "new_unit_in_house" | "unknown"; /** Tenancy agreement made on or before November 15, 2018. Only matters for a newer unit: that tenancy keeps the guideline. */ tenancyAgreementOnOrBefore20181115?: boolean; /** Any basis for going above the guideline?. none. ltb_order: an LTB order allowing an above-guideline increase. agreement_s121: a signed agreement for a capital expenditure or new service. added_service_s123: an agreement to add parking or another prescribed service. */ basis?: "none" | "ltb_order" | "agreement_s121" | "added_service_s123"; }; /** What ltb.rent_increase_check answers, in result.output. */ export type LtbRentIncreaseCheckOutput = { lawful: "yes" | "no" | "depends"; increaseCents: number; increasePercent: number; twelveMonth: { ok: boolean | null; detail: string; earliestDate: string; }; notice: { ok: boolean | null; detail: string; givenOn: string | null; latestNoticeDate: string; }; guideline: { ok: boolean | null; detail: string; applies: boolean | null; year: number; percent: number | null; maxRentCents: number | null; }; reasons: Array; challengeBy: string; tenantCanDo: Array; landlordCanDo: Array; }; /** The facts ltb.tenant_path takes (version 1). */ export type LtbTenantPathInput = { /** What is the problem?. Add each one that applies, with its date. */ issues: Array<{ /** What happened. repairs_maintenance: The landlord has not repaired or maintained the unit or building; vital_service_withheld: Heat, water, electricity, gas or another vital service was cut off or interfered with; reasonable_enjoyment: The landlord seriously interfered with the use and enjoyment of the unit; harassment: The landlord harassed, threatened, coerced, obstructed or interfered with me; locks_changed: The locks were changed without giving me a key; illegal_entry: The landlord entered the unit illegally; illegal_rent_or_charge: I paid rent above what the law allows, or an illegal charge; deposit_not_returned: My last month’s rent deposit was not used for the last month or returned; compensation_not_paid: I got an N12 or N13 and was not paid the compensation owed; bad_faith_notice: I moved out after an N12 or N13 and the landlord did not do what the notice said; first_refusal_denied: I asked in writing to move back in after renovations and the landlord did not let me */ kind: "repairs_maintenance" | "vital_service_withheld" | "reasonable_enjoyment" | "harassment" | "locks_changed" | "illegal_entry" | "illegal_rent_or_charge" | "deposit_not_returned" | "compensation_not_paid" | "bad_faith_notice" | "first_refusal_denied"; /** When. The date it happened. For money: the date it was paid or kept. For a repair problem that has been fixed: the date it was fixed; if not fixed, when it started. For a notice or refusal after moving out: the date you moved out. */ date: string; /** Still happening. The problem is not fixed or the conduct continues. */ ongoing?: boolean; /** What happened, in your words */ description?: string; }>; /** Do you still live there? */ stillLivingThere: boolean; /** Date you moved out. If you no longer live there. */ movedOutOn?: string; /** Date the renovations were finished. Only if you asked to move back in after an N13 for repairs or renovations. */ renovationsCompletedOn?: string; /** Date you first told the landlord. For repair problems: when you first told the landlord about it. */ firstToldLandlordOn?: string; /** Money you want the LTB to order. The total, in dollars: abatement, costs, rent difference, compensation. */ compensationSought?: number; /** Your rent */ rent?: { /** Rent per period. The lawful rent for one rental period, in dollars, including any fixed amount paid to the landlord for parking or other services. */ amount: number; /** Rental period. How often rent is due. */ period?: "monthly" | "weekly" | "daily" | "yearly"; }; /** Tenants applying. Optional: to prepare the form’s data. */ tenants?: Array<{ /** First name */ firstName: string; /** Last name */ lastName: string; }>; /** Landlord. Optional: to prepare the form’s data. */ landlord?: { /** A person */ type: "person"; /** First name */ firstName: string; /** Last name */ lastName: string; } | { /** A company */ type: "company"; /** Company name. The landlord’s legal name. */ companyName: string; }; /** Rental unit address. Optional: to prepare the form’s data. */ rentalUnit?: { /** Unit, apartment or suite. Leave empty if there is none. */ unit?: string; /** Street number */ streetNumber: string; /** Street name. For example: King Street West. */ streetName: string; /** City or town */ municipality: string; /** Postal code */ postalCode: string; }; /** Today’s date. Leave empty to use today. */ today?: string; }; /** What ltb.tenant_path answers, in result.output. */ export type LtbTenantPathOutput = { applications: Array<{ form: "T1" | "T2" | "T5" | "T6"; title: string; issues: Array<{ kind: "repairs_maintenance" | "vital_service_withheld" | "reasonable_enjoyment" | "harassment" | "locks_changed" | "illegal_entry" | "illegal_rent_or_charge" | "deposit_not_returned" | "compensation_not_paid" | "bad_faith_notice" | "first_refusal_denied"; label: string; deadline: string | null; deadlineBasis: string; inTime: boolean | null; }>; feeCents: { portal: number; other: number; }; evidence: Array; problems: Array; }>; fileTogether: Array; compensationSoughtCents: number | null; overLtbLimit: boolean; significantClaim: boolean; formData: { tenants: Array; landlord: string | null; rentalUnit: string | null; stillLivingThere: boolean; movedOutOn: string | null; firstToldLandlordOn: string | null; rentCents: number | null; rentPeriod: string | null; issues: Array<{ form: string; kind: string; date: string; ongoing: boolean; description: string | null; }>; }; }; /** The facts ltb.termination_date takes (version 1). */ export type LtbTerminationDateInput = { /** Which notice?. N4: non-payment of rent. N5: damage, interference or too many occupants (first notice). N8: end of term (persistent late payment and other s. 58 grounds). N12: landlord, family or purchaser needs the unit. N13: demolition, conversion or extensive repairs. */ notice: "N4" | "N5" | "N8" | "N12" | "N13"; /** The delivery */ service: { /** How it is delivered. hand: Handed to the person; adult_in_unit: Handed to an adult in the rental unit; mailbox: Left in the mailbox (or where mail is usually delivered); under_door: Slid under the door or through the mail slot of the unit; mail: Mailed by Canada Post (regular or registered); xpresspost: Sent by Xpresspost; courier: Given to a courier; fax: Faxed; email: Emailed, with the person’s written consent to email service */ method: "hand" | "adult_in_unit" | "mailbox" | "under_door" | "mail" | "xpresspost" | "courier" | "fax" | "email"; /** The day it is delivered. The day it is handed over, left, mailed, given to the courier, faxed or emailed, for example October 5, 2026. */ date: string; /** Written consent to email service. Only for email: the person agreed in writing to receive documents by email. */ emailConsentInWriting?: boolean; }; /** How the rental periods run. Needed for N8, N12 and N13, and for an N4 given before September 21, 2026. */ tenancy?: { /** Daily. Rent is paid by the day. */ kind: "daily"; } | { /** Weekly. Rent is paid by the week. */ kind: "weekly"; /** Day rent is due. The weekday each weekly rental period starts. */ rentDueWeekday: "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday"; } | { /** Monthly. Rent is paid by the month. */ kind: "monthly"; /** Day of the month rent is due. The day each monthly rental period starts, 1 to 28. Usually 1. */ rentDueDay?: number; } | { /** Yearly. Rent is paid by the year. */ kind: "yearly"; /** Start of a yearly period. Any date on which a yearly rental period started, for example the tenancy’s start date. */ periodStartDate: string; } | { /** Fixed term. A lease for a set term, for example one year, that has not yet ended. */ kind: "fixed_term"; /** Last day of the term. The date the fixed term ends. */ termEndDate: string; /** How often rent is paid. daily, weekly, monthly or yearly. Only matters for an N4 given before September 21, 2026. */ rentPaid?: "daily" | "weekly" | "monthly" | "yearly"; }; /** For an N12: who needs the unit?. landlord_or_family: the landlord, a family member or a caregiver will live there (s. 48). purchaser: the buyer needs it (s. 49). */ n12Reason?: "landlord_or_family" | "purchaser"; /** Checking a notice you have?. Enter the termination date printed on it, for example December 31, 2026, and the answer checks it. Leave it empty otherwise. */ terminationDateOnNotice?: string; }; /** What ltb.termination_date answers, in result.output. */ export type LtbTerminationDateOutput = { notice: "N4" | "N5" | "N8" | "N12" | "N13"; noticeTitle: string; deliveredOn: string; givenOn: string; minimumDays: number; mustEndOnPeriodEnd: boolean; earliestTerminationDate: string; noCompensationTerminationDate: string | null; remedyPeriodEnds: string | null; applicationForm: "L1" | "L2"; firstDayToApply: string; applyNoLaterThan: string | null; check: { terminationDateOnNotice: string; valid: boolean; reasons: Array; } | null; }; /** The facts small_claims.route takes (version 1). */ export type SmallClaimsRouteInput = { /** Which side are you on. Owed money, or sued for it. */ side?: "claimant" | "defendant"; /** Amount (CAD). The amount of the claim, not counting interest and costs. */ amount?: number; /** What happened. Optional. Pick the closest; makethempay starts from it. */ category?: "invoice" | "deposit" | "loan" | "job" | "damage" | "tenancy" | "other"; }; /** What small_claims.route answers, in result.output. */ export type SmallClaimsRouteOutput = { side: string; amount: number | null; limit: number; /** Null when no amount was given. */ withinLimit: boolean | null; text: string; /** Continue at makethempay.ca. Opens makethempay with the facts given already filled in. */ link: string; }; /** The facts small_claims.start_claim takes (version 1). */ export type SmallClaimsStartClaimInput = { /** Amount owed (CAD). The unpaid amount on the invoice, without interest. */ amount: number; /** The invoice */ invoice: { /** Invoice due date. The day payment was due. */ dueDate: string; /** Invoice number. Optional. */ number?: string; /** Invoice date. Optional. The day the invoice was issued. */ date?: string; /** What it was for. Optional. One line, for example “Website build, phase 2”. */ description?: string; }; /** Who owes the money */ debtor: { /** Who owes the money: name. A person’s full name, or a business’s legal name. */ name: string; /** Who owes the money: person or business. Is this a person or a business? */ kind?: "person" | "business"; /** Who owes the money: address. Their mailing address, if you have it. */ address?: string; /** Who owes the money: email. Optional. */ email?: string; }; /** Who is owed */ sender: { /** Who is owed: name. A person’s full name, or a business’s legal name. */ name: string; /** Who is owed: person or business. Is this a person or a business? */ kind?: "person" | "business"; /** Who is owed: address. The mailing address the demand letter comes from. */ address: string; /** Who is owed: email. Where replies and payment questions should go. */ email: string; /** Who is owed: phone. Optional. */ phone?: string; }; }; /** What small_claims.start_claim answers, in result.output. */ export type SmallClaimsStartClaimOutput = { /** makethempay's claim. Exactly as makethempay returned it. */ claim: { id: string; ref: string | null; batch?: string | null; stage: string; stageLabel: string; amount: number | null; debtor: string | null; dates: Record; links: { self: string; letter: string; dashboard: string; }; }; source: "makethempay.ca"; }; /** Every operation, by id: its facts and its answer. */ export type Operations = { "corporate.annual_maintenance": { input: CorporateAnnualMaintenanceInput; output: CorporateAnnualMaintenanceOutput }; "corporate.incorporation_plan": { input: CorporateIncorporationPlanInput; output: CorporateIncorporationPlanOutput }; "corporate.incorporation_prepare": { input: CorporateIncorporationPrepareInput; output: CorporateIncorporationPrepareOutput }; "corporate.isc_register": { input: CorporateIscRegisterInput; output: CorporateIscRegisterOutput }; "corporate.share_issuance": { input: CorporateShareIssuanceInput; output: CorporateShareIssuanceOutput }; "criminal.intake_triage": { input: CriminalIntakeTriageInput; output: CriminalIntakeTriageOutput }; "criminal.legal_aid_path": { input: CriminalLegalAidPathInput; output: CriminalLegalAidPathOutput }; "criminal.what_happens_next": { input: CriminalWhatHappensNextInput; output: CriminalWhatHappensNextOutput }; "employment.demand_letter": { input: EmploymentDemandLetterInput; output: EmploymentDemandLetterOutput }; "employment.limitation_dates": { input: EmploymentLimitationDatesInput; output: EmploymentLimitationDatesOutput }; "employment.severance_check": { input: EmploymentSeveranceCheckInput; output: EmploymentSeveranceCheckOutput }; "employment.termination_clause_check": { input: EmploymentTerminationClauseCheckInput; output: EmploymentTerminationClauseCheckOutput }; "general.limitation_period": { input: GeneralLimitationPeriodInput; output: GeneralLimitationPeriodOutput }; "general.triage": { input: GeneralTriageInput; output: GeneralTriageOutput }; "ltb.l1_prepare": { input: LtbL1PrepareInput; output: LtbL1PrepareOutput }; "ltb.n4_bulk": { input: LtbN4BulkInput; output: LtbN4BulkOutput }; "ltb.n4_prepare": { input: LtbN4PrepareInput; output: LtbN4PrepareOutput }; "ltb.outcomes": { input: LtbOutcomesInput; output: LtbOutcomesOutput }; "ltb.rent_increase_check": { input: LtbRentIncreaseCheckInput; output: LtbRentIncreaseCheckOutput }; "ltb.tenant_path": { input: LtbTenantPathInput; output: LtbTenantPathOutput }; "ltb.termination_date": { input: LtbTerminationDateInput; output: LtbTerminationDateOutput }; "small_claims.route": { input: SmallClaimsRouteInput; output: SmallClaimsRouteOutput }; "small_claims.start_claim": { input: SmallClaimsStartClaimInput; output: SmallClaimsStartClaimOutput }; }; export type HandoffRequest = { area: string; kind: "consultation" | "call"; summary: string; person: { name: string; email: string; phone?: string }; parties: { name: string; role: string }[]; runId?: string; urgency?: "today" | "this_week" | "normal"; legalAid?: { certificateNumber?: string; applied?: boolean }; preferredSlotId?: string; }; export type Handoff = { object: "handoff"; id: string; status: string; consentUrl?: string; nextStep?: string; [key: string]: unknown; }; export class Mithril { readonly baseUrl: string; private readonly apiKey?: string; private readonly agent: string; /** * @param options.apiKey An API key (mk_…) or a personal access token. Free * operations run without one. * @param options.agent Your agent's name/version, sent as Mithril-Agent. */ constructor(options: { apiKey?: string; baseUrl?: string; agent?: string } = {}) { this.baseUrl = (options.baseUrl ?? "https://mithril.law").replace(/\/$/, ""); this.apiKey = options.apiKey; this.agent = options.agent ?? "my-agent/1.0"; } private async request(method: "GET" | "POST", path: string, body?: unknown, options: RunOptions = {}): Promise { const headers: Record = { Accept: "application/json", "Mithril-Agent": this.agent }; if (this.apiKey) headers.Authorization = `Bearer ${this.apiKey}`; if (body !== undefined) { headers["Content-Type"] = "application/json"; headers["Idempotency-Key"] = options.idempotencyKey ?? crypto.randomUUID(); } const res = await fetch(this.baseUrl + path, { method, headers, body: body === undefined ? undefined : JSON.stringify(body), signal: options.signal }); const data = (await res.json().catch(() => null)) as { error?: { code?: string; message?: string; hint?: string; details?: unknown } } | null; if (!res.ok || data?.error) { const e = data?.error ?? {}; throw new MithrilError(res.status, e.code ?? "http_" + res.status, e.message ?? res.statusText, e.hint, e.details); } return data as T; } /** Run any operation by id. The typed methods below call this. */ run(id: Id, input: Operations[Id]["input"], options?: RunOptions): Promise>; run(id: string, input: unknown, options?: RunOptions): Promise; run(id: string, input: unknown, options?: RunOptions): Promise { return this.request("POST", `/api/v1/operations/${encodeURIComponent(id)}/runs`, { input }, options); } /** A run by id, as it was recorded. */ getRun(id: string): Promise { return this.request("GET", `/api/v1/runs/${encodeURIComponent(id)}`); } /** Ask mithril.law to check a receipt's signature (or check it yourself against /.well-known/jwks.json). */ verifyReceipt(jws: string): Promise<{ valid: boolean; reason: string | null; superseded: boolean; [key: string]: unknown }> { return this.request("POST", `/api/v1/receipts/verify`, { jws }); } /** * Hand the matter to Jonathan Kleiman, a licensed Ontario lawyer. Give the * consentUrl to the person and to no one else. Needs an API key or a token * with handoffs:write. */ createHandoff(request: HandoffRequest, options?: RunOptions): Promise { return this.request("POST", `/api/v1/handoffs`, request, options); } getHandoff(id: string): Promise { return this.request("GET", `/api/v1/handoffs/${encodeURIComponent(id)}`); } /** * The year’s resolutions and annual return: For founders on the founder plan: the year’s director and shareholder resolutions, the annual return and its deadline, and the register updates. * Price: CAD 299 per company per year plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/corporate.annual_maintenance/runs · MCP tool corporate_annual_maintenance */ corporateAnnualMaintenance(input: CorporateAnnualMaintenanceInput, options?: RunOptions): Promise> { return this.run("corporate.annual_maintenance", input, options) as Promise>; } /** * Where to incorporate, and what it costs: For founders: Ontario or federal incorporation, the steps in order, and the whole cost, itemized, before you pay anything. * Price: Free. Runs without a key. * POST /api/v1/operations/corporate.incorporation_plan/runs · MCP tool corporate_incorporation_plan */ corporateIncorporationPlan(input: CorporateIncorporationPlanInput, options?: RunOptions): Promise> { return this.run("corporate.incorporation_plan", input, options) as Promise>; } /** * Incorporation package: For founders: every document to incorporate, filled from your answers. The articles data sheet, by-law, organizational resolutions, subscriptions, consents, share certificates, registers and minute book index. * Price: CAD 399 plus HST. The government filing fee is extra.. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/corporate.incorporation_prepare/runs · MCP tool corporate_incorporation_prepare */ corporateIncorporationPrepare(input: CorporateIncorporationPrepareInput, options?: RunOptions): Promise> { return this.run("corporate.incorporation_prepare", input, options) as Promise>; } /** * Register of individuals with significant control: For founders on the founder plan: who has significant control under the 25% tests, and the register ready to keep. * Price: CAD 299 per company per year plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/corporate.isc_register/runs · MCP tool corporate_isc_register */ corporateIscRegister(input: CorporateIscRegisterInput, options?: RunOptions): Promise> { return this.run("corporate.isc_register", input, options) as Promise>; } /** * Issue shares: For founders on the founder plan: the directors’ resolution to issue shares, the subscriptions and certificates, and the updated registers. Anything that needs a lawyer is flagged. * Price: CAD 299 per company per year plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/corporate.share_issuance/runs · MCP tool corporate_share_issuance */ corporateShareIssuance(input: CorporateShareIssuanceInput, options?: RunOptions): Promise> { return this.run("corporate.share_issuance", input, options) as Promise>; } /** * How urgent is a criminal matter: From custody and court dates only: how fast to reach me, and whether to call now or book a consultation. No legal conclusions. * Price: Free. Runs without a key. * POST /api/v1/operations/criminal.intake_triage/runs · MCP tool criminal_intake_triage */ criminalIntakeTriage(input: CriminalIntakeTriageInput, options?: RunOptions): Promise> { return this.run("criminal.intake_triage", input, options) as Promise>; } /** * Getting a legal aid lawyer for a criminal charge: How to apply to Legal Aid Ontario for a certificate, what a certificate is, and what to send me once you have one. Legal Aid certificates accepted for criminal defence matters. * Price: Free. Runs without a key. * POST /api/v1/operations/criminal.legal_aid_path/runs · MCP tool criminal_legal_aid_path */ criminalLegalAidPath(input: CriminalLegalAidPathInput, options?: RunOptions): Promise> { return this.run("criminal.legal_aid_path", input, options) as Promise>; } /** * Someone was arrested or charged: what happens next: For an accused person or their family: what happens next in order, your rights at this stage, what to do and not do, and how to get a lawyer, every line cited. * Price: Free. Runs without a key. * POST /api/v1/operations/criminal.what_happens_next/runs · MCP tool criminal_what_happens_next */ criminalWhatHappensNext(input: CriminalWhatHappensNextInput, options?: RunOptions): Promise> { return this.run("criminal.what_happens_next", input, options) as Promise>; } /** * Demand letter: A demand letter from an Ontario employee to their former employer, with the ESA sections and the common-law claim, as DOCX and PDF. The person signs and sends it. * Price: CAD 149 plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/employment.demand_letter/runs · MCP tool employment_demand_letter */ employmentDemandLetter(input: EmploymentDemandLetterInput, options?: RunOptions): Promise> { return this.run("employment.demand_letter", input, options) as Promise>; } /** * Deadlines after a job ends: The last day to sue for wrongful dismissal and the last day to file an ESA complaint in Ontario, with the choice between them. * Price: Free. Runs without a key. * POST /api/v1/operations/employment.limitation_dates/runs · MCP tool employment_limitation_dates */ employmentLimitationDates(input: EmploymentLimitationDatesInput, options?: RunOptions): Promise> { return this.run("employment.limitation_dates", input, options) as Promise>; } /** * Severance check: What an Ontario employee is owed when a job ends: the ESA minimum, an estimate of the common-law range, the employer’s offer against both, and the deadlines. * Price: Free. Runs without a key. * POST /api/v1/operations/employment.severance_check/runs · MCP tool employment_severance_check */ employmentSeveranceCheck(input: EmploymentSeveranceCheckInput, options?: RunOptions): Promise> { return this.run("employment.severance_check", input, options) as Promise>; } /** * Termination clause check: Checks the wording of an Ontario employment contract’s termination clause for defects the Court of Appeal has recognized. * Price: Free. Runs without a key. * POST /api/v1/operations/employment.termination_clause_check/runs · MCP tool employment_termination_clause_check */ employmentTerminationClauseCheck(input: EmploymentTerminationClauseCheckInput, options?: RunOptions): Promise> { return this.run("employment.termination_clause_check", input, options) as Promise>; } /** * How long you have to sue in Ontario: The Limitations Act, 2002 deadlines for a court claim: two years from discovery and 15 years from the day it happened, with the common exceptions flagged for a lawyer. * Price: Free. Runs without a key. * POST /api/v1/operations/general.limitation_period/runs · MCP tool general_limitation_period */ generalLimitationPeriod(input: GeneralLimitationPeriodInput, options?: RunOptions): Promise> { return this.run("general.limitation_period", input, options) as Promise>; } /** * Where to start with a legal problem in Ontario: The front door: from what happened and a few dates, which Mithril operations fit, how urgent it is, and the time limit to sue where one may apply. * Price: Free. Runs without a key. * POST /api/v1/operations/general.triage/runs · MCP tool general_triage */ generalTriage(input: GeneralTriageInput, options?: RunOptions): Promise> { return this.run("general.triage", input, options) as Promise>; } /** * Prepare an L1 to evict for non-payment of rent: Checks the landlord may file, adds up rent owing to the filing date, NSF charges and the fee, fills the official L1, and explains how to file it. * Price: CAD 1 per unit per month, minimum CAD 49, plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/ltb.l1_prepare/runs · MCP tool ltb_l1_prepare */ ltbL1Prepare(input: LtbL1PrepareInput, options?: RunOptions): Promise> { return this.run("ltb.l1_prepare", input, options) as Promise>; } /** * An N4 for every unit in arrears: One N4 for each unit in arrears across a rent roll, the batch in one table, and what to fix for any unit that needs it. * Price: CAD 1 per unit per month, minimum CAD 49, plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/ltb.n4_bulk/runs · MCP tool ltb_n4_bulk */ ltbN4Bulk(input: LtbN4BulkInput, options?: RunOptions): Promise> { return this.run("ltb.n4_bulk", input, options) as Promise>; } /** * Prepare an N4 for non-payment of rent: Checks what the N4 may claim, adds up the rent owing, sets the termination date, and fills the official N4 for the landlord to sign and serve. * Price: CAD 1 per unit per month, minimum CAD 49, plus HST. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/ltb.n4_prepare/runs · MCP tool ltb_n4_prepare */ ltbN4Prepare(input: LtbN4PrepareInput, options?: RunOptions): Promise> { return this.run("ltb.n4_prepare", input, options) as Promise>; } /** * LTB orders by application: How many orders the Board issued for an application, by kind of order, month and filing year, from the LTB’s open data. * Price: Free. Runs without a key. * POST /api/v1/operations/ltb.outcomes/runs · MCP tool ltb_outcomes */ ltbOutcomes(input: LtbOutcomesInput, options?: RunOptions): Promise> { return this.run("ltb.outcomes", input, options) as Promise>; } /** * Is this rent increase lawful?: Checks an increase against the guideline, the 12-month rule, the 90 days’ written notice and the exemption for newer units, then says what each side can do. * Price: Free. Runs without a key. * POST /api/v1/operations/ltb.rent_increase_check/runs · MCP tool ltb_rent_increase_check */ ltbRentIncreaseCheck(input: LtbRentIncreaseCheckInput, options?: RunOptions): Promise> { return this.run("ltb.rent_increase_check", input, options) as Promise>; } /** * Which LTB application fits a tenant’s problem: Which application fits a tenant’s problem (T1, T2, T5 or T6), the deadline for each, the fee, what to gather and the facts the form asks for. * Price: Free. Runs without a key. The facts identify a person: the receipt is private. * POST /api/v1/operations/ltb.tenant_path/runs · MCP tool ltb_tenant_path */ ltbTenantPath(input: LtbTenantPathInput, options?: RunOptions): Promise> { return this.run("ltb.tenant_path", input, options) as Promise>; } /** * Termination date for a notice: The earliest valid termination date for an N4, N5, N8, N12 or N13, when the notice counts as given, and when the landlord can apply. * Price: Free. Runs without a key. * POST /api/v1/operations/ltb.termination_date/runs · MCP tool ltb_termination_date */ ltbTerminationDate(input: LtbTerminationDateInput, options?: RunOptions): Promise> { return this.run("ltb.termination_date", input, options) as Promise>; } /** * Small claims: is it the right court, and where to go: Checks whether an amount is within the Small Claims Court’s limit, and links to makethempay.ca, which opens the claim, with the amount filled in. * Price: Free. Runs without a key. * POST /api/v1/operations/small_claims.route/runs · MCP tool small_claims_route */ smallClaimsRoute(input: SmallClaimsRouteInput, options?: RunOptions): Promise> { return this.run("small_claims.route", input, options) as Promise>; } /** * Open a small claims case at makethempay.ca from an invoice: Forwards an unpaid invoice to makethempay.ca’s Claims API, which opens the case and prepares a dated demand letter. Returns makethempay.ca’s own answer. * Price: Free. Needs an API key or a token with runs:write. The facts identify a person: the receipt is private. * POST /api/v1/operations/small_claims.start_claim/runs · MCP tool small_claims_start_claim */ smallClaimsStartClaim(input: SmallClaimsStartClaimInput, options?: RunOptions): Promise> { return this.run("small_claims.start_claim", input, options) as Promise>; } }