Ingests Square invoices/payments, extracts event scheduling from order notes, and pushes approved entries to a CalDAV calendar after human review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
444 B
TypeScript
12 lines
444 B
TypeScript
import { SquareClient, SquareEnvironment } from "square";
|
|
import { env } from "../env.js";
|
|
|
|
export const squareClient = new SquareClient({
|
|
token: env.SQUARE_ACCESS_TOKEN,
|
|
environment: env.SQUARE_ENVIRONMENT === "production" ? SquareEnvironment.Production : SquareEnvironment.Sandbox,
|
|
});
|
|
|
|
export const squareLocationIds: string[] = env.SQUARE_LOCATION_ID
|
|
? env.SQUARE_LOCATION_ID.split(",").map((id) => id.trim()).filter(Boolean)
|
|
: [];
|