import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CompanyReference } from "./companyreference.js"; import { Connection } from "./connection.js"; /** * In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. * * @remarks * * Typically each company is one of your customers. * * When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. */ export type Company = { /** * Unique identifier for your SMB in Codat. */ id: string; /** * The name of the company */ name: string; /** * Additional information about the company. This can be used to store foreign IDs, references, etc. */ description?: string | undefined; /** * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. */ redirect: string; /** * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: * * @remarks * * ``` * 2020-10-08T22:40:50Z * 2021-01-01T00:00:00 * ``` * * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: * * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` * - Unqualified local time: `2021-11-15T01:00:00` * - UTC time offsets: `2021-11-15T01:00:00-05:00` * * > Time zones * > * > Not all dates from Codat will contain information about time zones. * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. */ lastSync?: string | undefined; /** * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: * * @remarks * * ``` * 2020-10-08T22:40:50Z * 2021-01-01T00:00:00 * ``` * * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: * * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` * - Unqualified local time: `2021-11-15T01:00:00` * - UTC time offsets: `2021-11-15T01:00:00-05:00` * * > Time zones * > * > Not all dates from Codat will contain information about time zones. * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. */ created?: string | undefined; /** * Name of user that created the company in Codat. */ createdByUserName?: string | null | undefined; /** * An array of products that are currently enabled for the company. */ products?: Array | undefined; /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ tags?: { [k: string]: string; } | undefined; referenceParentCompany?: CompanyReference | undefined; /** * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. */ referenceSubsidiaryCompanies?: Array | undefined; dataConnections?: Array | undefined; }; /** @internal */ export declare const Company$inboundSchema: z.ZodType; export declare function companyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=company.d.ts.map