@zinn-digital/sdk 0.1.2115 → 0.1.2117
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 +172 -0
- package/package.json +1 -1
|
@@ -10364,6 +10364,26 @@ export interface paths {
|
|
|
10364
10364
|
patch?: never;
|
|
10365
10365
|
trace?: never;
|
|
10366
10366
|
};
|
|
10367
|
+
"/v1/admin/mrr": {
|
|
10368
|
+
parameters: {
|
|
10369
|
+
query?: never;
|
|
10370
|
+
header?: never;
|
|
10371
|
+
path?: never;
|
|
10372
|
+
cookie?: never;
|
|
10373
|
+
};
|
|
10374
|
+
/**
|
|
10375
|
+
* THE monthly recurring revenue — one net total in USD and GBP, with its breakdown.
|
|
10376
|
+
* @description Owner ruling 2026-11-25 (DAY-0024). One definition (`engine/billing/mrr.py`): active, priced, non-comped subscriptions outside a free period, plus scheduled recurring charges, on organisations in good standing; past-due subscriptions and paying ones on suspended or closed organisations are left out and reported in `overdue`; $0 plans, trials and our own, staff and test organisations are left out. Each price is normalised to a month and converted at the stored FX rates (`fx_fetched_at`). Money is integer minor units, net of tax. `usd_minor`/`gbp_minor` are null, with `missing_rates` naming why, when a currency has no stored rate. The admin Overview and Business screens both read this endpoint.
|
|
10377
|
+
*/
|
|
10378
|
+
get: operations["getAdminMrr"];
|
|
10379
|
+
put?: never;
|
|
10380
|
+
post?: never;
|
|
10381
|
+
delete?: never;
|
|
10382
|
+
options?: never;
|
|
10383
|
+
head?: never;
|
|
10384
|
+
patch?: never;
|
|
10385
|
+
trace?: never;
|
|
10386
|
+
};
|
|
10367
10387
|
"/v1/admin/news-pool": {
|
|
10368
10388
|
parameters: {
|
|
10369
10389
|
query?: never;
|
|
@@ -36748,6 +36768,26 @@ export interface paths {
|
|
|
36748
36768
|
patch?: never;
|
|
36749
36769
|
trace?: never;
|
|
36750
36770
|
};
|
|
36771
|
+
"/v1/email-marketing/cold/sequences/{sequence_id}/steps/ai-draft": {
|
|
36772
|
+
parameters: {
|
|
36773
|
+
query?: never;
|
|
36774
|
+
header?: never;
|
|
36775
|
+
path?: never;
|
|
36776
|
+
cookie?: never;
|
|
36777
|
+
};
|
|
36778
|
+
get?: never;
|
|
36779
|
+
put?: never;
|
|
36780
|
+
/**
|
|
36781
|
+
* Write one cold sequence step (1-5 variants) from a short brief with Zinn® AI.
|
|
36782
|
+
* @description Gated on `email_marketing.manage`. One model call during the request, billed exactly like the Campaigns writer ("Writing campaign emails" on the AI spend page): the organisation's own provider key, its credit balance or its included AI allowance. Returns 1-5 plain-text variants (A-E), each a subject and a body, in the requested language, using the organisation's brand kit. A follow-up step (`follow_up: true`) may leave the subject empty so it replies in the same thread. Nothing is saved: the step editor fills empty fields and asks before replacing text the customer typed. Refused with `402` while the account is on hold or there is no AI allowance left, and `422` with a `failure` object (provider outage, a problem with the customer's own key, or ours) when the model call fails. Nothing is charged for a failed call.
|
|
36783
|
+
*/
|
|
36784
|
+
post: operations["draftEmailMarketingColdSequenceStepWithAi"];
|
|
36785
|
+
delete?: never;
|
|
36786
|
+
options?: never;
|
|
36787
|
+
head?: never;
|
|
36788
|
+
patch?: never;
|
|
36789
|
+
trace?: never;
|
|
36790
|
+
};
|
|
36751
36791
|
"/v1/email-marketing/contacts": {
|
|
36752
36792
|
parameters: {
|
|
36753
36793
|
query?: never;
|
|
@@ -67616,6 +67656,42 @@ export interface components {
|
|
|
67616
67656
|
amount_minor: number;
|
|
67617
67657
|
currency: components["schemas"]["CurrencyCode"];
|
|
67618
67658
|
};
|
|
67659
|
+
AdminMrr: {
|
|
67660
|
+
/** Format: date-time */
|
|
67661
|
+
as_of: string;
|
|
67662
|
+
by_currency: {
|
|
67663
|
+
currency: string;
|
|
67664
|
+
monthly_minor: number;
|
|
67665
|
+
}[];
|
|
67666
|
+
by_plan: {
|
|
67667
|
+
count: number;
|
|
67668
|
+
currency: string;
|
|
67669
|
+
interval: string;
|
|
67670
|
+
/** @description Per month */
|
|
67671
|
+
monthly_minor: number;
|
|
67672
|
+
plan: string;
|
|
67673
|
+
/** @description `recurring_charge` for scheduled recurring charges. */
|
|
67674
|
+
product_line: string;
|
|
67675
|
+
usd_minor: number | null;
|
|
67676
|
+
}[];
|
|
67677
|
+
/**
|
|
67678
|
+
* Format: date-time
|
|
67679
|
+
* @description Oldest fetch time among the stored rates used.
|
|
67680
|
+
*/
|
|
67681
|
+
fx_fetched_at: string | null;
|
|
67682
|
+
/** @description Net MRR in pence (USD total at the stored GBP rate). */
|
|
67683
|
+
gbp_minor: number | null;
|
|
67684
|
+
missing_rates: string[];
|
|
67685
|
+
overdue: {
|
|
67686
|
+
count: number;
|
|
67687
|
+
usd_minor: number | null;
|
|
67688
|
+
};
|
|
67689
|
+
paying_orgs: number;
|
|
67690
|
+
recurring_charges: number;
|
|
67691
|
+
subscriptions: number;
|
|
67692
|
+
/** @description Net MRR in US cents. */
|
|
67693
|
+
usd_minor: number | null;
|
|
67694
|
+
};
|
|
67619
67695
|
/** @description One currency's monthly recurring revenue, in integer minor units. ⛔ Never add two of these together: they are different currencies and there is no rate here. Present them side by side, or convert with a rate you state. */
|
|
67620
67696
|
AdminMrrByCurrency: {
|
|
67621
67697
|
currency: components["schemas"]["CurrencyCode"];
|
|
@@ -90688,6 +90764,38 @@ export interface components {
|
|
|
90688
90764
|
variants: components["schemas"]["EmailMarketingColdVariant"][];
|
|
90689
90765
|
wait_days?: number;
|
|
90690
90766
|
};
|
|
90767
|
+
EmailMarketingColdStepAiDraft: {
|
|
90768
|
+
model: string;
|
|
90769
|
+
variants: {
|
|
90770
|
+
/** @description Plain text; merge fields such as {{first_name}} are kept. */
|
|
90771
|
+
body: string;
|
|
90772
|
+
/** @enum {string} */
|
|
90773
|
+
label: "A" | "B" | "C" | "D" | "E";
|
|
90774
|
+
/** @description Empty on a follow-up that replies in the same thread. */
|
|
90775
|
+
subject: string;
|
|
90776
|
+
}[];
|
|
90777
|
+
};
|
|
90778
|
+
EmailMarketingColdStepAiDraftRequest: {
|
|
90779
|
+
/** @description What the step should say */
|
|
90780
|
+
brief: string;
|
|
90781
|
+
/**
|
|
90782
|
+
* @description A later step that replies in the same thread (the subject may be empty).
|
|
90783
|
+
* @default false
|
|
90784
|
+
*/
|
|
90785
|
+
follow_up: boolean;
|
|
90786
|
+
/** @description The language to write in (a BCP 47 tag); defaults to en. */
|
|
90787
|
+
locale?: string;
|
|
90788
|
+
/**
|
|
90789
|
+
* @default friendly
|
|
90790
|
+
* @enum {string}
|
|
90791
|
+
*/
|
|
90792
|
+
tone: "friendly" | "professional" | "playful" | "urgent" | "calm";
|
|
90793
|
+
/**
|
|
90794
|
+
* @description How many variants (A-E) to write.
|
|
90795
|
+
* @default 2
|
|
90796
|
+
*/
|
|
90797
|
+
variants: number;
|
|
90798
|
+
};
|
|
90691
90799
|
EmailMarketingColdSteps: {
|
|
90692
90800
|
steps: components["schemas"]["EmailMarketingColdStep"][];
|
|
90693
90801
|
};
|
|
@@ -142794,6 +142902,27 @@ export interface operations {
|
|
|
142794
142902
|
429: components["responses"]["TooManyRequests"];
|
|
142795
142903
|
};
|
|
142796
142904
|
};
|
|
142905
|
+
getAdminMrr: {
|
|
142906
|
+
parameters: {
|
|
142907
|
+
query?: never;
|
|
142908
|
+
header?: never;
|
|
142909
|
+
path?: never;
|
|
142910
|
+
cookie?: never;
|
|
142911
|
+
};
|
|
142912
|
+
requestBody?: never;
|
|
142913
|
+
responses: {
|
|
142914
|
+
/** @description The figure, as of now. */
|
|
142915
|
+
200: {
|
|
142916
|
+
headers: {
|
|
142917
|
+
[name: string]: unknown;
|
|
142918
|
+
};
|
|
142919
|
+
content: {
|
|
142920
|
+
"application/json": components["schemas"]["AdminMrr"];
|
|
142921
|
+
};
|
|
142922
|
+
};
|
|
142923
|
+
403: components["responses"]["Forbidden"];
|
|
142924
|
+
};
|
|
142925
|
+
};
|
|
142797
142926
|
getAdminNewsPool: {
|
|
142798
142927
|
parameters: {
|
|
142799
142928
|
query?: never;
|
|
@@ -188035,6 +188164,49 @@ export interface operations {
|
|
|
188035
188164
|
409: components["responses"]["Conflict"];
|
|
188036
188165
|
};
|
|
188037
188166
|
};
|
|
188167
|
+
draftEmailMarketingColdSequenceStepWithAi: {
|
|
188168
|
+
parameters: {
|
|
188169
|
+
query?: {
|
|
188170
|
+
/** @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). */
|
|
188171
|
+
org_id?: components["parameters"]["OrgIdQuery"];
|
|
188172
|
+
};
|
|
188173
|
+
header?: never;
|
|
188174
|
+
path: {
|
|
188175
|
+
sequence_id: string;
|
|
188176
|
+
};
|
|
188177
|
+
cookie?: never;
|
|
188178
|
+
};
|
|
188179
|
+
requestBody: {
|
|
188180
|
+
content: {
|
|
188181
|
+
"application/json": components["schemas"]["EmailMarketingColdStepAiDraftRequest"];
|
|
188182
|
+
};
|
|
188183
|
+
};
|
|
188184
|
+
responses: {
|
|
188185
|
+
/** @description The drafted variants. */
|
|
188186
|
+
200: {
|
|
188187
|
+
headers: {
|
|
188188
|
+
[name: string]: unknown;
|
|
188189
|
+
};
|
|
188190
|
+
content: {
|
|
188191
|
+
"application/json": components["schemas"]["EmailMarketingColdStepAiDraft"];
|
|
188192
|
+
};
|
|
188193
|
+
};
|
|
188194
|
+
401: components["responses"]["Unauthorized"];
|
|
188195
|
+
/** @description The account is on hold, or there is no AI allowance left to pay for the call. */
|
|
188196
|
+
402: {
|
|
188197
|
+
headers: {
|
|
188198
|
+
[name: string]: unknown;
|
|
188199
|
+
};
|
|
188200
|
+
content: {
|
|
188201
|
+
"application/json": components["schemas"]["Error"];
|
|
188202
|
+
};
|
|
188203
|
+
};
|
|
188204
|
+
403: components["responses"]["Forbidden"];
|
|
188205
|
+
404: components["responses"]["NotFound"];
|
|
188206
|
+
409: components["responses"]["Conflict"];
|
|
188207
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
188208
|
+
};
|
|
188209
|
+
};
|
|
188038
188210
|
listEmailMarketingContacts: {
|
|
188039
188211
|
parameters: {
|
|
188040
188212
|
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.2117",
|
|
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>",
|