UNPKG

@spotable/attio-sdk

Version:
75 lines (66 loc) 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateSystemDataTypes = generateSystemDataTypes; const fs_1 = require("../../helpers/fs"); const logger_1 = require("../../helpers/logger"); const fileHeader_1 = require("./fileHeader"); const FILE_NAME = "systemDataTypes.ts"; function generateSystemDataTypes(outputDir) { logger_1.default.debug(`Generating system data types file: ${FILE_NAME}`); const systemTypes = ` ${(0, fileHeader_1.generateFileHeader)(FILE_NAME)} export interface Actor { type: "api-token" | "workspace-member" | "system" | "app"; id: string; } export interface Location { line_1: string; line_2: string | null; line_3: string | null; line_4: string | null; locality: string; region: string; postal_code: string; country_code: string; latitude: string; longitude: string; } export interface Domain { domain: string; root_domain: string; } export interface DomainInput { domain: string; } export interface RecordReference { target_object: string; target_record_id: string; } export interface ActorReference { referenced_actor_type: string; referenced_actor_id: string; } export interface SelectOption { id: { workspace_id: string; object_id: string; attribute_id: string; option_id: string; }; title: string; is_archived: boolean; } export interface Interaction { interaction_type: string; interacted_at: string; owner_actor: Actor; } export interface PhoneNumber { phone_number: string; original_phone_number: string; country_code: string; } `.trim(); (0, fs_1.writeGeneratedFile)(outputDir, FILE_NAME, systemTypes); } //# sourceMappingURL=systemDataTypes.js.map