@zinn-digital/sdk 0.1.1600 → 0.1.1602
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/generated/schema.d.ts +138 -2
- package/package.json +1 -1
|
@@ -33651,6 +33651,46 @@ export interface paths {
|
|
|
33651
33651
|
patch?: never;
|
|
33652
33652
|
trace?: never;
|
|
33653
33653
|
};
|
|
33654
|
+
"/v1/email-marketing/campaigns/{campaign_id}/translate": {
|
|
33655
|
+
parameters: {
|
|
33656
|
+
query?: never;
|
|
33657
|
+
header?: never;
|
|
33658
|
+
path?: never;
|
|
33659
|
+
cookie?: never;
|
|
33660
|
+
};
|
|
33661
|
+
get?: never;
|
|
33662
|
+
put?: never;
|
|
33663
|
+
/**
|
|
33664
|
+
* Translate a campaign into every contact language that is missing or stale.
|
|
33665
|
+
* @description Gated on `email_marketing.manage`. Starts a durable workflow (`202`) that makes TWO batched calls on the house translation model for every missing or stale language at once: the short fields (subject, subject B, preheader, plain text) and the HTML body. Merge tags such as `{{first_name}}` are kept. It is the customer's AI use, metered on the organisation's AI meter (credits, then the included allowance; listed on the AI spend page as "Translating campaign emails"). Nothing to translate answers `200` with `started: false` and spends nothing. Refused with `402` before anything starts while the account is on hold (`refusal.campaigns.translateOnHold`) or when no credits or allowance are left (`refusal.campaigns.translateNoAllowance`). Each contact is sent the current translation for their language, else the source copy. Audited as `email_marketing.campaign.translate`.
|
|
33666
|
+
*/
|
|
33667
|
+
post: operations["translateEmailMarketingCampaign"];
|
|
33668
|
+
delete?: never;
|
|
33669
|
+
options?: never;
|
|
33670
|
+
head?: never;
|
|
33671
|
+
patch?: never;
|
|
33672
|
+
trace?: never;
|
|
33673
|
+
};
|
|
33674
|
+
"/v1/email-marketing/campaigns/{campaign_id}/translations": {
|
|
33675
|
+
parameters: {
|
|
33676
|
+
query?: never;
|
|
33677
|
+
header?: never;
|
|
33678
|
+
path?: never;
|
|
33679
|
+
cookie?: never;
|
|
33680
|
+
};
|
|
33681
|
+
/**
|
|
33682
|
+
* Each contact language of a campaign's list and whether its translation is current.
|
|
33683
|
+
* @description Gated on `email_marketing.view`. The languages are the distinct languages of the list's subscribed contacts, mapped onto the 58 platform languages, minus the campaign's `source_locale`. `state` is `current` (made from the copy as it is now), `stale` (the copy changed since; the contact gets the source copy until it is translated again) or `missing`. A row with `wanted: false` is a translation kept for a language no contact uses any more.
|
|
33684
|
+
*/
|
|
33685
|
+
get: operations["listEmailMarketingCampaignTranslations"];
|
|
33686
|
+
put?: never;
|
|
33687
|
+
post?: never;
|
|
33688
|
+
delete?: never;
|
|
33689
|
+
options?: never;
|
|
33690
|
+
head?: never;
|
|
33691
|
+
patch?: never;
|
|
33692
|
+
trace?: never;
|
|
33693
|
+
};
|
|
33654
33694
|
"/v1/email-marketing/contacts": {
|
|
33655
33695
|
parameters: {
|
|
33656
33696
|
query?: never;
|
|
@@ -73437,10 +73477,10 @@ export interface components {
|
|
|
73437
73477
|
migration_job_id?: string | null;
|
|
73438
73478
|
move_items?: string[];
|
|
73439
73479
|
/**
|
|
73440
|
-
* @description What a waiting move is asking the customer for. `replace_existing`: the domain is already on another site of this organisation (`existing_site`) — confirm with `replace_site_id` on the access form.
|
|
73480
|
+
* @description What a waiting move is asking the customer for. `replace_existing`: the domain is already on another site of this organisation (`existing_site`) — confirm with `replace_site_id` on the access form. `address_in_use` (stage `needs_staff`): another organisation holds the address, so no site can be created for it here; the customer chooses another address or contacts support. Who holds it is never said.
|
|
73441
73481
|
* @enum {string}
|
|
73442
73482
|
*/
|
|
73443
|
-
needs?: "" | "access" | "mailboxes" | "replace" | "replace_existing";
|
|
73483
|
+
needs?: "" | "access" | "mailboxes" | "replace" | "replace_existing" | "address_in_use";
|
|
73444
73484
|
/** Format: uuid */
|
|
73445
73485
|
org_id: string;
|
|
73446
73486
|
paused: boolean;
|
|
@@ -82781,6 +82821,7 @@ export interface components {
|
|
|
82781
82821
|
send_time_mode: "now" | "optimised";
|
|
82782
82822
|
/** Format: uuid */
|
|
82783
82823
|
sender_id: string | null;
|
|
82824
|
+
source_locale: string;
|
|
82784
82825
|
/** Format: date-time */
|
|
82785
82826
|
started_at: string | null;
|
|
82786
82827
|
/** @enum {string} */
|
|
@@ -82821,6 +82862,24 @@ export interface components {
|
|
|
82821
82862
|
status: "draft" | "sending" | "paused" | "sent" | "refused";
|
|
82822
82863
|
unsubscribed: number;
|
|
82823
82864
|
};
|
|
82865
|
+
EmailMarketingCampaignTranslateResult: components["schemas"]["EmailMarketingCampaignTranslations"] & {
|
|
82866
|
+
started: boolean;
|
|
82867
|
+
};
|
|
82868
|
+
EmailMarketingCampaignTranslations: {
|
|
82869
|
+
/** Format: uuid */
|
|
82870
|
+
campaign_id: string;
|
|
82871
|
+
locales: {
|
|
82872
|
+
locale: string;
|
|
82873
|
+
/** @enum {string} */
|
|
82874
|
+
state: "current" | "stale" | "missing";
|
|
82875
|
+
/** Format: date-time */
|
|
82876
|
+
translated_at: string | null;
|
|
82877
|
+
/** @description Whether a subscribed contact of the list uses this language. */
|
|
82878
|
+
wanted: boolean;
|
|
82879
|
+
}[];
|
|
82880
|
+
/** @description The language the campaign is written in. */
|
|
82881
|
+
source_locale: string;
|
|
82882
|
+
};
|
|
82824
82883
|
EmailMarketingCampaignWrite: {
|
|
82825
82884
|
/**
|
|
82826
82885
|
* @description A/B test: what the winner is measured on (unique opens or unique clicks per sent).
|
|
@@ -82846,6 +82905,8 @@ export interface components {
|
|
|
82846
82905
|
send_time_mode?: "now" | "optimised";
|
|
82847
82906
|
/** Format: uuid */
|
|
82848
82907
|
sender_id?: string | null;
|
|
82908
|
+
/** @description The language the campaign is written in (one of the 58 platform languages; anything else keeps the old one). Default en. */
|
|
82909
|
+
source_locale?: string;
|
|
82849
82910
|
subject?: string;
|
|
82850
82911
|
/** @description A/B test: the second subject line. Blank = no test. */
|
|
82851
82912
|
subject_b?: string;
|
|
@@ -171915,6 +171976,81 @@ export interface operations {
|
|
|
171915
171976
|
};
|
|
171916
171977
|
};
|
|
171917
171978
|
};
|
|
171979
|
+
translateEmailMarketingCampaign: {
|
|
171980
|
+
parameters: {
|
|
171981
|
+
query?: {
|
|
171982
|
+
/** @description The organization this call acts on. Optional for a caller with exactly one direct membership; **required** for anyone with more than one — which is every reseller and every agency — because the engine refuses rather than guesses (a wrong guess here writes one tenant's gateway credentials under another tenant's Vault path). */
|
|
171983
|
+
org_id?: components["parameters"]["OrgIdQuery"];
|
|
171984
|
+
};
|
|
171985
|
+
header?: never;
|
|
171986
|
+
path: {
|
|
171987
|
+
campaign_id: string;
|
|
171988
|
+
};
|
|
171989
|
+
cookie?: never;
|
|
171990
|
+
};
|
|
171991
|
+
requestBody?: never;
|
|
171992
|
+
responses: {
|
|
171993
|
+
/** @description Nothing was missing or stale; nothing was started. */
|
|
171994
|
+
200: {
|
|
171995
|
+
headers: {
|
|
171996
|
+
[name: string]: unknown;
|
|
171997
|
+
};
|
|
171998
|
+
content: {
|
|
171999
|
+
"application/json": components["schemas"]["EmailMarketingCampaignTranslateResult"];
|
|
172000
|
+
};
|
|
172001
|
+
};
|
|
172002
|
+
/** @description The translation was started; poll the translations list. */
|
|
172003
|
+
202: {
|
|
172004
|
+
headers: {
|
|
172005
|
+
[name: string]: unknown;
|
|
172006
|
+
};
|
|
172007
|
+
content: {
|
|
172008
|
+
"application/json": components["schemas"]["EmailMarketingCampaignTranslateResult"];
|
|
172009
|
+
};
|
|
172010
|
+
};
|
|
172011
|
+
401: components["responses"]["Unauthorized"];
|
|
172012
|
+
/** @description The account is on hold, or no AI credits or allowance are left. */
|
|
172013
|
+
402: {
|
|
172014
|
+
headers: {
|
|
172015
|
+
[name: string]: unknown;
|
|
172016
|
+
};
|
|
172017
|
+
content: {
|
|
172018
|
+
"application/json": components["schemas"]["Error"];
|
|
172019
|
+
};
|
|
172020
|
+
};
|
|
172021
|
+
403: components["responses"]["Forbidden"];
|
|
172022
|
+
404: components["responses"]["NotFound"];
|
|
172023
|
+
409: components["responses"]["Conflict"];
|
|
172024
|
+
};
|
|
172025
|
+
};
|
|
172026
|
+
listEmailMarketingCampaignTranslations: {
|
|
172027
|
+
parameters: {
|
|
172028
|
+
query?: {
|
|
172029
|
+
/** @description The organization this call acts on. Optional for a caller with exactly one direct membership; **required** for anyone with more than one — which is every reseller and every agency — because the engine refuses rather than guesses (a wrong guess here writes one tenant's gateway credentials under another tenant's Vault path). */
|
|
172030
|
+
org_id?: components["parameters"]["OrgIdQuery"];
|
|
172031
|
+
};
|
|
172032
|
+
header?: never;
|
|
172033
|
+
path: {
|
|
172034
|
+
campaign_id: string;
|
|
172035
|
+
};
|
|
172036
|
+
cookie?: never;
|
|
172037
|
+
};
|
|
172038
|
+
requestBody?: never;
|
|
172039
|
+
responses: {
|
|
172040
|
+
/** @description The languages. */
|
|
172041
|
+
200: {
|
|
172042
|
+
headers: {
|
|
172043
|
+
[name: string]: unknown;
|
|
172044
|
+
};
|
|
172045
|
+
content: {
|
|
172046
|
+
"application/json": components["schemas"]["EmailMarketingCampaignTranslations"];
|
|
172047
|
+
};
|
|
172048
|
+
};
|
|
172049
|
+
401: components["responses"]["Unauthorized"];
|
|
172050
|
+
403: components["responses"]["Forbidden"];
|
|
172051
|
+
404: components["responses"]["NotFound"];
|
|
172052
|
+
};
|
|
172053
|
+
};
|
|
171918
172054
|
listEmailMarketingContacts: {
|
|
171919
172055
|
parameters: {
|
|
171920
172056
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1602",
|
|
4
4
|
"description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",
|