import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Describes the type of requirement - each type may have additional metadata properties to describe possible values, formats, etc. * * @remarks * * - `text`: free-text input, no additional requirements * - `currency`: a value representing a dollar amount, e.g. `374.55` representing `$374.55` * - `radio`: choose one of options provided, see `options` * - `select`: choose one of options provided, see `options` * - `percent`: A decimal value representing a percentage, e.g. `0.034` representing `3.4%` * - `account_number`: An account number for a tax agency, more information provided by `mask` and `prefix` * - `tax_rate`: A decimal value representing a tax rate, e.g. `0.034` representing a tax rate of `3.4%`, see `validation` for additional validation guidance * - `workers_compensation_rate`: A decimal value representing a percentage, see `risk_class_code`, `risk_class_description`, and `rate_type` */ export declare const TaxRequirementMetadataType: { readonly Text: "text"; readonly Currency: "currency"; readonly Radio: "radio"; readonly Select: "select"; readonly Percent: "percent"; readonly AccountNumber: "account_number"; readonly TaxRate: "tax_rate"; readonly WorkersCompensationRate: "workers_compensation_rate"; }; /** * Describes the type of requirement - each type may have additional metadata properties to describe possible values, formats, etc. * * @remarks * * - `text`: free-text input, no additional requirements * - `currency`: a value representing a dollar amount, e.g. `374.55` representing `$374.55` * - `radio`: choose one of options provided, see `options` * - `select`: choose one of options provided, see `options` * - `percent`: A decimal value representing a percentage, e.g. `0.034` representing `3.4%` * - `account_number`: An account number for a tax agency, more information provided by `mask` and `prefix` * - `tax_rate`: A decimal value representing a tax rate, e.g. `0.034` representing a tax rate of `3.4%`, see `validation` for additional validation guidance * - `workers_compensation_rate`: A decimal value representing a percentage, see `risk_class_code`, `risk_class_description`, and `rate_type` */ export type TaxRequirementMetadataType = ClosedEnum; /** * The actual value to be submitted */ export type TaxRequirementMetadataValue = string | boolean; export type TaxRequirementMetadataOptions = { /** * A customer facing label for the answer */ label: string; /** * The actual value to be submitted */ value: string | boolean; /** * A less verbose label that may sometimes be available */ shortLabel?: string | null | undefined; }; /** * [for `workers_compensation_rate`] The type of rate being collected. Either: * * @remarks * - `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1% * - `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr */ export declare const RateType: { readonly Percent: "percent"; readonly CurrencyPerHour: "currency_per_hour"; }; /** * [for `workers_compensation_rate`] The type of rate being collected. Either: * * @remarks * - `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1% * - `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr */ export type RateType = ClosedEnum; /** * Describes the type of tax_rate validation rule */ export declare const TaxRequirementMetadataValidationType: { readonly OneOf: "one_of"; readonly MinMax: "min_max"; }; /** * Describes the type of tax_rate validation rule */ export type TaxRequirementMetadataValidationType = ClosedEnum; /** * [for `tax_rate`] Describes the validation required for the tax rate */ export type Validation = { /** * Describes the type of tax_rate validation rule */ type: TaxRequirementMetadataValidationType; /** * [for `min_max`] The inclusive lower bound of the tax rate */ min?: string | undefined; /** * [for `min_max`] The inclusive upper bound of the tax rate */ max?: string | undefined; /** * [for `one_of`] The possible, unformatted tax rates for selection. * * @remarks * - e.g. ["0.0", "0.001"] representing 0% and 0.1% */ rates?: Array | undefined; }; export type TaxRequirementMetadata = { /** * Describes the type of requirement - each type may have additional metadata properties to describe possible values, formats, etc. * * @remarks * * - `text`: free-text input, no additional requirements * - `currency`: a value representing a dollar amount, e.g. `374.55` representing `$374.55` * - `radio`: choose one of options provided, see `options` * - `select`: choose one of options provided, see `options` * - `percent`: A decimal value representing a percentage, e.g. `0.034` representing `3.4%` * - `account_number`: An account number for a tax agency, more information provided by `mask` and `prefix` * - `tax_rate`: A decimal value representing a tax rate, e.g. `0.034` representing a tax rate of `3.4%`, see `validation` for additional validation guidance * - `workers_compensation_rate`: A decimal value representing a percentage, see `risk_class_code`, `risk_class_description`, and `rate_type` */ type: TaxRequirementMetadataType; /** * [for `select` or `radio`] An array of objects describing the possible values. */ options?: Array | undefined; /** * [for `workers_compensation_rate`] The industry risk class code for the rate being requested */ riskClassCode?: string | undefined; /** * [for `workers_compensation_rate`] A description of the industry risk class for the rate being requested */ riskClassDescription?: string | undefined; /** * [for `workers_compensation_rate`] The type of rate being collected. Either: * * @remarks * - `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1% * - `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr */ rateType?: RateType | undefined; /** * [for `account_number`] A pattern describing the format of the account number * * @remarks * * The mask is a sequence of characters representing the requirements of the actual account number. Each character in the mask represents a single character in the account number as follows: * - `#`: a digit (`\d`) * - `@`: a upper or lower case letter (`[a-zA-Z]`) * - `^`: an uppercase letter (`[A-Z]`) * - `%`: a digit or uppercase letter (`[0-9A-Z]`) * - any other character represents the literal character * * Examples: * - mask: `WHT-######` represents `WHT-` followed by 5 digits, e.g. `WHT-33421` * - mask: `%####-^^` supports values of `75544-AB` and `Z7654-HK` */ mask?: string | null | undefined; /** * [for `account_number`] A value that precedes the value to be collected - useful for display, but should not be submitted as part of the value. E.g. some tax agencies use an account number that is a company's federal ein plus two digits. In that case the mask would be `##` and the prefix `XXXXX1234`. */ prefix?: string | null | undefined; /** * [for `tax_rate`] Describes the validation required for the tax rate */ validation?: Validation | undefined; }; /** @internal */ export declare const TaxRequirementMetadataType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TaxRequirementMetadataValue$inboundSchema: z.ZodType; export declare function taxRequirementMetadataValueFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TaxRequirementMetadataOptions$inboundSchema: z.ZodType; export declare function taxRequirementMetadataOptionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const RateType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TaxRequirementMetadataValidationType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Validation$inboundSchema: z.ZodType; export declare function validationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TaxRequirementMetadata$inboundSchema: z.ZodType; export declare function taxRequirementMetadataFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=taxrequirementmetadata.d.ts.map