@customyai/links
v0.1.2
Published
Customy Links: short links, analytics, conversions, domains and webhooks, over @customyai/core (typed errors, retries with Retry-After, pagination, Access machine tokens).
Maintainers
Readme
@customyai/links
Customy Links: enlaces cortos, analítica, conversiones, dominios, webhooks, UTM, etiquetas y grupos. Sobre @customyai/core: reintentos con Retry-After, paginación, errores tipados y la identidad de la app en Customy Access.
npm install @customyai/links @customyai/coreimport { createLinks } from "@customyai/links";
const links = createLinks({ platform, machineTokens, scopes: ["links:write"] });
const link = await links.links.create({ destinationUrl: "https://example.com/launch" });
for await (const item of links.links.iterate({ status: "active" })) console.log(item.slug);
await links.track.sale({ externalId: "user_1", amount: 49.9, currency: "USD" });- Credencial:
machineTokens(audienciacustomy-links; scopeslinks:track,links:readolinks:write) oaccessToken(llavecl_live_…/cl_test_…, token o proveedor).status()no la necesita. - Reintentos: lecturas y borrados ante red,
429y5xx; unPOSTno se repite solo. - Errores:
CustomyLinksError(unCustomySdkErrorconservice: "links"). - Webhooks:
verifyWebhook(rawBody, headers, secret).
