sinfactura-types 1.10.331 → 1.10.332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/marketing.d.ts +54 -0
- package/package.json +1 -1
package/dist/marketing.d.ts
CHANGED
|
@@ -799,6 +799,60 @@ declare global {
|
|
|
799
799
|
*/
|
|
800
800
|
complete: boolean;
|
|
801
801
|
}
|
|
802
|
+
/**
|
|
803
|
+
* The channel one `POST /marketing/copy` request generates for.
|
|
804
|
+
*
|
|
805
|
+
* ⚠️ ONE channel per request, and `'email'` ONLY in v1 — the storefront and
|
|
806
|
+
* social channels are separate, independently shippable widenings. Keeping
|
|
807
|
+
* the field singular (never an array) is what makes adding a member additive
|
|
808
|
+
* for every existing caller: a widened union cannot change the shape of a
|
|
809
|
+
* request that already names `'email'`.
|
|
810
|
+
*
|
|
811
|
+
* ⚠️ Distinct from {@link CampaignChannel}, which is a DELIVERY channel. A
|
|
812
|
+
* generated suggestion is never sent by this endpoint, so the two vocabularies
|
|
813
|
+
* are free to diverge and must not be merged.
|
|
814
|
+
*/
|
|
815
|
+
type MarketingCopyChannel = 'email';
|
|
816
|
+
/** Register of the generated copy. es-AR voseo regardless of tone. */
|
|
817
|
+
type MarketingCopyTone = 'neutral' | 'friendly' | 'urgent';
|
|
818
|
+
interface MarketingCopySuggestion {
|
|
819
|
+
/**
|
|
820
|
+
* SEGMENT-WIDE copy, never personalised text — and never a placeholder
|
|
821
|
+
* either.
|
|
822
|
+
*
|
|
823
|
+
* ⚠️ **There is no send-time substitution anywhere on this platform.** The
|
|
824
|
+
* campaign worker mails a template's subject and body exactly as stored, so
|
|
825
|
+
* a `{{nombre}}` here would be delivered as those literal characters to
|
|
826
|
+
* every recipient. The generator refuses any `{{…}}` for that reason, and
|
|
827
|
+
* the copy is written to read correctly with no recipient name at all.
|
|
828
|
+
* Carrying no person is also what makes one generation reusable across a
|
|
829
|
+
* whole segment.
|
|
830
|
+
*
|
|
831
|
+
* Email only; a channel with no subject line omits it.
|
|
832
|
+
*/
|
|
833
|
+
subject?: string;
|
|
834
|
+
/** Segment-wide copy, same rule as {@link MarketingCopySuggestion.subject}. */
|
|
835
|
+
body: string;
|
|
836
|
+
/**
|
|
837
|
+
* Every factual claim the copy makes, each VERBATIM from the grounding
|
|
838
|
+
* source the tenant supplied.
|
|
839
|
+
*
|
|
840
|
+
* ⚠️ A claim the source does not contain is DROPPED server-side rather than
|
|
841
|
+
* returned flagged, so an empty array means the copy asserts no facts — not
|
|
842
|
+
* that the belt was skipped.
|
|
843
|
+
*/
|
|
844
|
+
claims: string[];
|
|
845
|
+
}
|
|
846
|
+
interface MarketingCopyResponse {
|
|
847
|
+
channel: MarketingCopyChannel;
|
|
848
|
+
tone: MarketingCopyTone;
|
|
849
|
+
suggestions: MarketingCopySuggestion[];
|
|
850
|
+
/**
|
|
851
|
+
* `true` when the response came from the tenant's own response cache and
|
|
852
|
+
* SPENT NOTHING — no ceiling read, no model call, no meter write.
|
|
853
|
+
*/
|
|
854
|
+
cached: boolean;
|
|
855
|
+
}
|
|
802
856
|
}
|
|
803
857
|
/**
|
|
804
858
|
* The {@link AutomationTrigger} vocabulary as a RUNTIME value, so the api's Zod
|