UNPKG

@spotable/attio-sdk

Version:
97 lines (93 loc) 1.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateAttributeTypes = generateAttributeTypes; const fs_1 = require("../../helpers/fs"); const logger_1 = require("../../helpers/logger"); const fileHeader_1 = require("./fileHeader"); const FILE_NAME = "attribute.ts"; function generateAttributeTypes(outputDir) { logger_1.default.debug(`Generating attribute types file: ${FILE_NAME}`); const attributeContent = ` ${(0, fileHeader_1.generateFileHeader)(FILE_NAME)} export interface AttioAttribute { id: { workspace_id: string; object_id: string; attribute_id: string; }; title: string; description: string | null; api_slug: string; type: string; is_system_attribute: boolean; is_writable: boolean; is_required: boolean; is_unique: boolean; is_multiselect: boolean; is_default_value_enabled: boolean; is_archived: boolean; default_value: any; relationship: any; config: Record<string, any>; created_at: string; } export type CurrencyCode = | "AUD" | "BRL" | "BEL" | "CAD" | "CNY" | "COP" | "CZK" | "DKK" | "EUR" | "HKD" | "ISK" | "INR" | "ILS" | "JPY" | "KRW" | "MYR" | "MXN" | "NTD" | "NZD" | "NGN" | "NOK" | "XPF" | "PEN" | "PHP" | "PLN" | "GBP" | "SAR" | "SGD" | "ZAR" | "SEK" | "CHF" | "AED" | "USD"; export interface AttioSelectOption { id: { workspace_id: string; object_id: string; attribute_id: string; option_id: string; }; title: string; is_archived: boolean; } export interface AttioStatus { id: { workspace_id: string; object_id: string; attribute_id: string; status_id: string; }; title: string; is_archived: boolean; celebration_enabled: boolean; target_time_in_status: string | null; } `; (0, fs_1.writeGeneratedFile)(outputDir, FILE_NAME, attributeContent); } //# sourceMappingURL=attributeTypes.js.map