@zinn-digital/sdk 0.1.1552 → 0.1.1557
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 +122 -2
- package/package.json +1 -1
|
@@ -16271,6 +16271,26 @@ export interface paths {
|
|
|
16271
16271
|
patch?: never;
|
|
16272
16272
|
trace?: never;
|
|
16273
16273
|
};
|
|
16274
|
+
"/v1/ads/analytics/narrative": {
|
|
16275
|
+
parameters: {
|
|
16276
|
+
query?: never;
|
|
16277
|
+
header?: never;
|
|
16278
|
+
path?: never;
|
|
16279
|
+
cookie?: never;
|
|
16280
|
+
};
|
|
16281
|
+
get?: never;
|
|
16282
|
+
put?: never;
|
|
16283
|
+
/**
|
|
16284
|
+
* The selected period in plain words - what moved, why, and where the month is heading - with every figure checked (za-285).
|
|
16285
|
+
* @description Gated on `ads.view` (none anywhere is a `404`, nothing spent); the paying organisation is ONE organisation (`org_id` in the body, the query or `X-Zinn-Org` when the caller holds several; two that differ are a `422` `orgRequired` with detail code `mismatch`), and the figures are that organisation's and its client organisations' only - the same filters as every analytics read, in the query. Written by Zinn® AI from numbered facts built from the stored figures: the period's totals against the comparison period, the campaigns whose spend moved most, the unusual days with the changes made in the days before them (by Zinn® Ads, by people on the account, by Google), the change counts and, when the period reaches this month, the month-end forecast against the spend ceiling. Every number in `text` must be a figure of a fact it cites (`cites`, `facts`), or the narrative is `withheld` and never shown. Cached per (organisation, scope, period, data hash): the same view over the same figures is read back (`cached: true`) and never paid for twice; any changed figure is a new hash, a new narrative, and the old one for that scope and period is retired. A percentage must carry its fact's direction (`fell 20%` against `+20%` is withheld), a percent word is a percentage, and no number - not a small count, not a word such as `doubled` - is shown unless a cited fact holds it. Other languages: ONE batched translation for the reader's `locale` (normalised to a language we ship, e.g. `ar-EG` is `ar`; any other value is answered in English and buys nothing) and the languages the organisation's people read, each re-checked against the same facts the same way (a translation that changed a figure, or added a direction or a number word the English lacks, is dropped and never bought again for that text; a language the check cannot read is never bought and is answered in English; translations take at most half of the hourly brake and are metered under `ads_narrative` on the PLATFORM's own scope, never the customer's included allowance, and only for an org in good standing); `locale` in the reply is the language `text` is in (`en` until a translation is held). A percentage whose direction cannot be read, or a rise/fall word against a cited money figure's own direction, is withheld. `status`: `empty` (no spend in the period or before it; no model is asked), `writing` (another request is writing it; ask again shortly), `written`, `withheld`, `refused` (no AI credit, or not in good standing - `failure` class `refused`, nothing spent) or `failed` (the AI provider failed - `failure` names the class; nothing charged; the next view tries again). Who pays is the one meter's decision: the organisation's own AI key, else its Zinn® AI credit; the model is the cheapest verified, priced one. `422` codes: `analyticsFilter`, `narrativeHourly` (60 billed calls - writes and translations, failed ones included - per organisation per hour), `orgRequired`.
|
|
16286
|
+
*/
|
|
16287
|
+
post: operations["createAdsAnalyticsNarrative"];
|
|
16288
|
+
delete?: never;
|
|
16289
|
+
options?: never;
|
|
16290
|
+
head?: never;
|
|
16291
|
+
patch?: never;
|
|
16292
|
+
trace?: never;
|
|
16293
|
+
};
|
|
16274
16294
|
"/v1/ads/analytics/summary": {
|
|
16275
16295
|
parameters: {
|
|
16276
16296
|
query?: never;
|
|
@@ -16326,7 +16346,7 @@ export interface paths {
|
|
|
16326
16346
|
put?: never;
|
|
16327
16347
|
/**
|
|
16328
16348
|
* Ask a plain question about the organisation's own ads; the answer is checked figure by figure against cited facts (za-N7).
|
|
16329
|
-
* @description Gated on `ads.view` in ONE organisation (`org_id` in the body or `X-Zinn-Org` when the caller holds several). Interactive: one Zinn® AI call in the request, no job queue. The facts are read ONLY from the organisation's own synced figures (account totals, spend per day for up to 31 recent days, campaigns ranked by spend, Google keywords and search terms that spend with no conversion, open findings, changes waiting). `status`: `answered` (every number in `answer` appears in a fact it cites — ids in `cites`, figures in `facts`), `facts_only` (the written answer failed that check and is withheld; the cited facts are the answer), `refused` (no AI credit, or the organisation is not in good standing — `error.failure` class `refused`, nothing was spent) or `failed` (the AI provider failed — `error.failure` names the class: outage with its status page, a customer key problem, or ours). Who pays is the one meter's decision: the organisation's own AI key, else its Zinn® AI credit. At most ONE `fix` is offered, built from a fact (never by the model): `pause_campaign` or `pause_keyword` for a Google campaign or keyword that spends with no conversion. `422` codes: `askQuestion` (1 to 500 characters), `askDays` (1 to 90), `askNoAccounts`, `askHourly` (60 asks per organisation per hour). `404` for a `connection_id` that is not the organisation's.
|
|
16349
|
+
* @description Gated on `ads.view` in ONE organisation (`org_id` in the body or `X-Zinn-Org` when the caller holds several). Interactive: one Zinn® AI call in the request, no job queue. The facts are read ONLY from the organisation's own synced figures (account totals, spend per day for up to 31 recent days, campaigns ranked by spend, Google keywords and search terms that spend with no conversion, open findings, changes waiting). `status`: `answered` (every number in `answer` appears in a fact it cites — ids in `cites`, figures in `facts`), `facts_only` (the written answer failed that check and is withheld; the cited facts are the answer), `refused` (no AI credit, or the organisation is not in good standing — `error.failure` class `refused`, nothing was spent) or `failed` (the AI provider failed — `error.failure` names the class: outage with its status page, a customer key problem, or ours). Who pays is the one meter's decision: the organisation's own AI key, else its Zinn® AI credit. At most ONE `fix` is offered, built from a fact (never by the model): `pause_campaign` or `pause_keyword` for a Google campaign or keyword that spends with no conversion. `focus_day` (za-285, "Ask your ads" from a chart point on /ads/analytics): the day the person clicked; that day's spend per account is always a fact, however far back inside `days`. `422` codes: `askQuestion` (1 to 500 characters), `askDays` (1 to 90), `askNoAccounts`, `askHourly` (60 asks per organisation per hour), `askFocusDay` (`focus_day` not a date inside the last `days` days). `404` for a `connection_id` that is not the organisation's.
|
|
16330
16350
|
*/
|
|
16331
16351
|
post: operations["createAdsAsk"];
|
|
16332
16352
|
delete?: never;
|
|
@@ -38252,7 +38272,7 @@ export interface paths {
|
|
|
38252
38272
|
put?: never;
|
|
38253
38273
|
/**
|
|
38254
38274
|
* Ask our AI to move a site here — free, overseen by our team.
|
|
38255
|
-
* @description The intake. The access given (`access`) is written straight to Vault and never stored, logged or returned; the request keeps only which kinds of access were given and the host each points at. A $0 `managed_migration` purchase keeps the SLA, and a support ticket is opened for the customer and linked both ways — every step the AI takes is posted there. **Refused with 403 unless eligible** (`getAiMoveEligibility`): a trial is refused with `ai_move_trial`. With no `site_id` the move creates the site, which needs `sites.create`. Requires `hosting.import.manage`.
|
|
38275
|
+
* @description The intake. The access given (`access`) is written straight to Vault and never stored, logged or returned; the request keeps only which kinds of access were given and the host each points at. A $0 `managed_migration` purchase keeps the SLA, and a support ticket is opened for the customer and linked both ways — every step the AI takes is posted there. **Refused with 403 unless eligible** (`getAiMoveEligibility`): a trial is refused with `ai_move_trial`. With no `site_id` the move creates the site, which needs `sites.create`. With `site_id` the move goes OVER that site: when it has ever served anything, `replace_confirmation` (its domain, typed) is required and checked here (`422` `replace_not_confirmed` / `replace_confirmation_mismatch`), the site is backed up before the copy writes, and it can be restored for 30 days. Requires `hosting.import.manage`.
|
|
38256
38276
|
*/
|
|
38257
38277
|
post: operations["requestAiMove"];
|
|
38258
38278
|
delete?: never;
|
|
@@ -64729,6 +64749,31 @@ export interface components {
|
|
|
64729
64749
|
narrowed: boolean;
|
|
64730
64750
|
unconverted: string[];
|
|
64731
64751
|
};
|
|
64752
|
+
/** @description za-285: the period narrative. `status` `empty` carries only `status` and `cached`. `text` is empty unless `status` is `written`. `facts` are the cited facts (figures as the strings shown). */
|
|
64753
|
+
AdsAnalyticsNarrative: {
|
|
64754
|
+
cached: boolean;
|
|
64755
|
+
can_buy?: boolean;
|
|
64756
|
+
cites?: string[];
|
|
64757
|
+
/** Format: date-time */
|
|
64758
|
+
created_at?: string;
|
|
64759
|
+
error_code?: string;
|
|
64760
|
+
facts?: components["schemas"]["AdsNarrativeFact"][];
|
|
64761
|
+
failure?: components["schemas"]["VendorFailure"] | null;
|
|
64762
|
+
/** Format: date */
|
|
64763
|
+
first_day?: string;
|
|
64764
|
+
funding?: string;
|
|
64765
|
+
/** Format: uuid */
|
|
64766
|
+
id?: string;
|
|
64767
|
+
/** Format: date */
|
|
64768
|
+
last_day?: string;
|
|
64769
|
+
locale?: string;
|
|
64770
|
+
model?: string;
|
|
64771
|
+
/** @enum {string} */
|
|
64772
|
+
status: "empty" | "writing" | "written" | "withheld" | "refused" | "failed";
|
|
64773
|
+
text?: string;
|
|
64774
|
+
/** Format: date-time */
|
|
64775
|
+
updated_at?: string | null;
|
|
64776
|
+
};
|
|
64732
64777
|
AdsAnalyticsPoint: components["schemas"]["AdsAnalyticsFigures"] & {
|
|
64733
64778
|
/** Format: date */
|
|
64734
64779
|
bucket: string;
|
|
@@ -67325,6 +67370,16 @@ export interface components {
|
|
|
67325
67370
|
/** @description Pausing or re-enabling a campaign, ad group, ad or keyword (a status-only update, UI1). */
|
|
67326
67371
|
pauses: components["schemas"]["AdsMode"];
|
|
67327
67372
|
};
|
|
67373
|
+
/** @description One fact a narrative cites. `kind`: `period`, `total`, `campaign`, `anomaly`, `changes`, `forecast`; `connection_id` is the account for a campaign fact, else empty. */
|
|
67374
|
+
AdsNarrativeFact: {
|
|
67375
|
+
connection_id: string;
|
|
67376
|
+
figures: {
|
|
67377
|
+
[key: string]: string;
|
|
67378
|
+
};
|
|
67379
|
+
id: string;
|
|
67380
|
+
/** @enum {string} */
|
|
67381
|
+
kind: "period" | "total" | "campaign" | "anomaly" | "changes" | "forecast";
|
|
67382
|
+
};
|
|
67328
67383
|
AdsNetworkNotice: {
|
|
67329
67384
|
active: boolean;
|
|
67330
67385
|
advice: string;
|
|
@@ -72915,6 +72970,8 @@ export interface components {
|
|
|
72915
72970
|
platform: "cpanel" | "plesk" | "directadmin" | "wordpress" | "moodle" | "joomla" | "static" | "other";
|
|
72916
72971
|
/** @description The line a new site is created on. */
|
|
72917
72972
|
product_line?: string;
|
|
72973
|
+
/** @description With `site_id`: the chosen site's primary domain, typed back. Required when that site has ever served anything (its content is replaced; it is backed up first and can be restored for 30 days). `422` `replace_not_confirmed` when it is missing, `replace_confirmation_mismatch` when it is not that site's domain. Ignored without `site_id`. */
|
|
72974
|
+
replace_confirmation?: string;
|
|
72918
72975
|
/**
|
|
72919
72976
|
* Format: uuid
|
|
72920
72977
|
* @description Move into this site; omit to create one.
|
|
@@ -140749,6 +140806,64 @@ export interface operations {
|
|
|
140749
140806
|
429: components["responses"]["TooManyRequests"];
|
|
140750
140807
|
};
|
|
140751
140808
|
};
|
|
140809
|
+
createAdsAnalyticsNarrative: {
|
|
140810
|
+
parameters: {
|
|
140811
|
+
query?: {
|
|
140812
|
+
/** @description Comma-separated `<connection_id>:<campaign_id>` tokens. */
|
|
140813
|
+
campaign?: components["parameters"]["AdsAnalyticsCampaign"];
|
|
140814
|
+
compare?: components["parameters"]["AdsAnalyticsCompare"];
|
|
140815
|
+
/** @description Comma-separated ad-account connection ids. */
|
|
140816
|
+
connection?: components["parameters"]["AdsAnalyticsConnection"];
|
|
140817
|
+
/** @description Comma-separated ISO 3166-1 alpha-2 codes. Reads the country-level figures. */
|
|
140818
|
+
country?: components["parameters"]["AdsAnalyticsCountry"];
|
|
140819
|
+
/** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
|
|
140820
|
+
currency?: components["parameters"]["AdsAnalyticsCurrency"];
|
|
140821
|
+
/** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
|
|
140822
|
+
device?: components["parameters"]["AdsAnalyticsDevice"];
|
|
140823
|
+
from?: components["parameters"]["AdsAnalyticsFrom"];
|
|
140824
|
+
/** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
|
|
140825
|
+
grain?: components["parameters"]["AdsAnalyticsGrain"];
|
|
140826
|
+
/** @description Comma-separated networks (google, microsoft, meta, linkedin, tiktok, x, pinterest, amazon). */
|
|
140827
|
+
network?: components["parameters"]["AdsAnalyticsNetwork"];
|
|
140828
|
+
/** @description Comma-separated product/site ids (za-290), or `unassigned`. */
|
|
140829
|
+
offering?: components["parameters"]["AdsAnalyticsOffering"];
|
|
140830
|
+
/** @description The period. `custom` takes `from` and `to`. */
|
|
140831
|
+
range?: components["parameters"]["AdsAnalyticsRange"];
|
|
140832
|
+
to?: components["parameters"]["AdsAnalyticsTo"];
|
|
140833
|
+
};
|
|
140834
|
+
header?: never;
|
|
140835
|
+
path?: never;
|
|
140836
|
+
cookie?: never;
|
|
140837
|
+
};
|
|
140838
|
+
requestBody?: {
|
|
140839
|
+
content: {
|
|
140840
|
+
"application/json": {
|
|
140841
|
+
/** @description The reader's language, e.g. en, ar. */
|
|
140842
|
+
locale?: string;
|
|
140843
|
+
/** Format: uuid */
|
|
140844
|
+
org_id?: string;
|
|
140845
|
+
};
|
|
140846
|
+
};
|
|
140847
|
+
};
|
|
140848
|
+
responses: {
|
|
140849
|
+
/** @description The narrative (read back, or written now). */
|
|
140850
|
+
200: {
|
|
140851
|
+
headers: {
|
|
140852
|
+
[name: string]: unknown;
|
|
140853
|
+
};
|
|
140854
|
+
content: {
|
|
140855
|
+
"application/json": {
|
|
140856
|
+
data: components["schemas"]["AdsAnalyticsNarrative"];
|
|
140857
|
+
};
|
|
140858
|
+
};
|
|
140859
|
+
};
|
|
140860
|
+
401: components["responses"]["Unauthorized"];
|
|
140861
|
+
403: components["responses"]["Forbidden"];
|
|
140862
|
+
404: components["responses"]["NotFound"];
|
|
140863
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
140864
|
+
429: components["responses"]["TooManyRequests"];
|
|
140865
|
+
};
|
|
140866
|
+
};
|
|
140752
140867
|
getAdsAnalyticsSummary: {
|
|
140753
140868
|
parameters: {
|
|
140754
140869
|
query?: {
|
|
@@ -140893,6 +141008,11 @@ export interface operations {
|
|
|
140893
141008
|
connection_id?: string;
|
|
140894
141009
|
/** @default 30 */
|
|
140895
141010
|
days?: number;
|
|
141011
|
+
/**
|
|
141012
|
+
* Format: date
|
|
141013
|
+
* @description za-285: the chart point (day) the question was asked from.
|
|
141014
|
+
*/
|
|
141015
|
+
focus_day?: string;
|
|
140896
141016
|
/** @description The answer's language, e.g. en, ar. */
|
|
140897
141017
|
locale?: string;
|
|
140898
141018
|
/** Format: uuid */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1557",
|
|
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>",
|