@zinn-digital/sdk 0.1.1798 → 0.1.1804

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.
@@ -35726,6 +35726,54 @@ export interface paths {
35726
35726
  patch?: never;
35727
35727
  trace?: never;
35728
35728
  };
35729
+ "/v1/email-marketing/whatsapp/health": {
35730
+ parameters: {
35731
+ query?: never;
35732
+ header?: never;
35733
+ path?: never;
35734
+ cookie?: never;
35735
+ };
35736
+ /**
35737
+ * Can this organisation's own WhatsApp account send, and what to fix.
35738
+ * @description Gated on `email_marketing.view`. The last reading of Meta's verdict on the organisation's own WhatsApp Business Account (no call to Meta): the state and each reason with where to fix it. Re-read hourly while it cannot send, six-hourly once it can, and on connect.
35739
+ */
35740
+ get: operations["getEmailMarketingWhatsappHealth"];
35741
+ put?: never;
35742
+ /**
35743
+ * Read Meta again now ("Check again").
35744
+ * @description Gated on `email_marketing.manage`. Reads Meta now and stores the verdict (at most once every 20 seconds per organisation; inside that window, and for an account not in good standing, the last reading is returned without calling Meta). A change between "can send" and "can't send" notifies the organisation. Audited (`email_marketing.whatsapp.health_check`).
35745
+ */
35746
+ post: operations["checkEmailMarketingWhatsappHealth"];
35747
+ delete?: never;
35748
+ options?: never;
35749
+ head?: never;
35750
+ patch?: never;
35751
+ trace?: never;
35752
+ };
35753
+ "/v1/email-marketing/whatsapp/templates": {
35754
+ parameters: {
35755
+ query?: never;
35756
+ header?: never;
35757
+ path?: never;
35758
+ cookie?: never;
35759
+ };
35760
+ /**
35761
+ * The message templates on this organisation's own WhatsApp account.
35762
+ * @description Gated on `email_marketing.view`. Read from Meta (free). Meta sends no marketing WhatsApp message without an APPROVED template. Refusal `CAMPAIGNS_WHATSAPP_TEMPLATE_REFUSED` (409 `not_connected`, 503 `unavailable`, 400 `token_expired`).
35763
+ */
35764
+ get: operations["listEmailMarketingWhatsappTemplates"];
35765
+ put?: never;
35766
+ /**
35767
+ * Submit a plain-text template for Meta's review.
35768
+ * @description Gated on `email_marketing.manage`. Submits ONE template language to Meta for review (free; Meta usually decides within minutes to a day). Plain text only (no numbered placeholders). Refusal `CAMPAIGNS_WHATSAPP_TEMPLATE_REFUSED` (`details[].code`: `name_invalid`, `language_invalid`, `category_invalid`, `body_invalid`, `duplicate`, `refused`, `not_connected` 409, `unavailable` 503, `token_expired`). Audited (`email_marketing.whatsapp.template_create`).
35769
+ */
35770
+ post: operations["createEmailMarketingWhatsappTemplate"];
35771
+ delete?: never;
35772
+ options?: never;
35773
+ head?: never;
35774
+ patch?: never;
35775
+ trace?: never;
35776
+ };
35729
35777
  "/v1/email-marketing/zerobounce": {
35730
35778
  parameters: {
35731
35779
  query?: never;
@@ -72253,7 +72301,7 @@ export interface components {
72253
72301
  /** @description The value in force: the customer's own, else recommended. */
72254
72302
  value: number;
72255
72303
  };
72256
- /** @description One reason an ad may not be published (za-162..165) — `brandNotPinned`, `brandMissingHeadline`, `brandMissingDescription`, `competitorInText`, `freeSoftware`, `genericOnly`, ADCOPY1's `duplicateHeadlines` / `topicMissing` / `stitched` / `titleJunk`, za-334's `sameMeaning` (two lines make the same offer about the same thing, by meaning in every language the angle table reads), `angleOverused` (more than `want` lines of one part carry one offer `angle`), `pinnedBeyondBrand` (a pin at `position` other than headline 1), `pinnedSameAngle` (two pinned lines with one offer `angle`), `offerPinned` (an offer pinned while an unpinned line already makes it), `meaningJudgeUnavailable` (za-334 r11: the same-offer judge gave no verdict, so the ad is refused — fail closed — with the reason in `failure`), or on keywords `competitorBareName` / `competitorLandsOnHome`. A `sameMeaning` named by the semantic judge carries `by: judge` and the later line in `drop`. */
72304
+ /** @description One reason an ad may not be published (za-162..165) — `brandNotPinned`, `brandMissingHeadline`, `brandMissingDescription`, `competitorInText`, `freeSoftware`, `genericOnly`, ADCOPY1's `duplicateHeadlines` / `topicMissing` / `stitched` / `titleJunk`, za-334's `sameMeaning` (two lines make the same offer about the same thing, by meaning in every language the angle table reads), `angleOverused` (more than `want` lines of one part carry one offer `angle`), `pinnedBeyondBrand` (a pin at `position` other than headline 1), `pinnedSameAngle` (two pinned lines with one offer `angle`), `offerPinned` (an offer pinned while an unpinned line already makes it), `meaningJudgeUnavailable` (za-334 r11: the same-offer judge gave no verdict, so the ad is refused — fail closed — with the reason in `failure`), `unsupportedUrgency` (za-334 r22: a line claims a deadline, a weekday deadline or a count of what is left that none of the advertiser's own page sentences backs; refused in every ad, offer or not. r23: only an offer sentence on the page that makes the same claim, the same end date, weekday or count, backs it; the build keeps those sentences for the launch and the change gate. r24: the backing sentence must be a current OFFER sentence, its date today or later, re-checked against today at the gate. R25a: a past or expired offer sentence backs nothing, and a weekday or "today" deadline backs only while the page read still holds it), `mixedScript` (za-334 r24: a word mixes alphabets or hides an invisible character, such as "Last Chance" typed with a Cyrillic Es for the C; R25a: a lookalike of any script, Unicode UTS #39, and only when it folds to a different Latin word, so "10kΩ" or "Ωmega" is no disguise), or on keywords `competitorBareName` / `competitorLandsOnHome`. A `sameMeaning` named by the semantic judge carries `by: judge` and the later line in `drop`. */
72257
72305
  AdsQualityFinding: {
72258
72306
  /**
72259
72307
  * @description za-334 — the offer the lines repeat.
@@ -72267,6 +72315,8 @@ export interface components {
72267
72315
  drop?: string;
72268
72316
  failure?: components["schemas"]["VendorFailure"];
72269
72317
  have?: number;
72318
+ /** @description za-334 r16 — every line a multi-line finding (`sameMeaning`, `duplicateHeadlines`, `pinnedSameAngle`) names, one item per ad line; `text` joins them with " / ", which a single line may itself contain ("Monthly / Annual Plans"). */
72319
+ lines?: string[];
72270
72320
  /** @enum {string} */
72271
72321
  part: "headline" | "description" | "path" | "ad" | "keyword";
72272
72322
  /** @description za-334 — the pinned position (`pinnedBeyondBrand`). */
@@ -87147,6 +87197,7 @@ export interface components {
87147
87197
  /** @description The organisation's own WhatsApp Business Account is connected. */
87148
87198
  whatsapp_connected: boolean;
87149
87199
  whatsapp_display_phone: string;
87200
+ whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
87150
87201
  /** @description What the browser needs to open Meta's Embedded Signup window (our app id and its signup configuration id); null when WhatsApp signup is not offered yet. */
87151
87202
  whatsapp_signup: {
87152
87203
  app_id: string;
@@ -87386,6 +87437,7 @@ export interface components {
87386
87437
  sender_requests: components["schemas"]["EmailMarketingSenderRequest"][];
87387
87438
  whatsapp_connected: boolean;
87388
87439
  whatsapp_display_phone: string;
87440
+ whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
87389
87441
  /** @description Embedded Signup's app and configuration ids; null when not offered yet. */
87390
87442
  whatsapp_signup: {
87391
87443
  app_id: string;
@@ -87455,6 +87507,34 @@ export interface components {
87455
87507
  usecases: string[];
87456
87508
  verticals: string[];
87457
87509
  };
87510
+ /** @description Whether Meta lets the organisation's OWN WhatsApp Business Account send (docs/1052 §3.5j), as last read (`checked_at`). `blocked`: Meta refuses its messages and our sends are refused with `whatsapp_cannot_send` until every blocking reason is fixed. `limited`: sends go out, capped. `unknown`: Meta could not be read yet (not blocked by us). `not_connected`: no account. Each reason says where it is fixed: `meta` = a Meta Business page (open in a new tab), `app` = a dashboard path. */
87511
+ EmailMarketingWhatsappHealth: {
87512
+ /** @description "unavailable" when the last read failed (the verdict shown is the one before). */
87513
+ check_error?: string;
87514
+ /** Format: date-time */
87515
+ checked_at: string | null;
87516
+ messaging_limit_tier?: string;
87517
+ reasons: {
87518
+ blocking: boolean;
87519
+ /** @enum {string} */
87520
+ code: "payment_method" | "business_verification" | "no_approved_template" | "phone_not_connected" | "display_name_pending" | "display_name_rejected" | "token_expired" | "meta_other";
87521
+ fix_url: string;
87522
+ /** @enum {string} */
87523
+ fix_where: "meta" | "app";
87524
+ /** @description Meta's numeric code (0 when none). */
87525
+ meta_code: number;
87526
+ }[];
87527
+ /** @enum {string} */
87528
+ state: "ready" | "limited" | "blocked" | "unknown" | "not_connected";
87529
+ templates_approved?: number | null;
87530
+ };
87531
+ EmailMarketingWhatsappTemplate: {
87532
+ category: string;
87533
+ language: string;
87534
+ name: string;
87535
+ /** @description Meta's review status: APPROVED, PENDING, REJECTED, PAUSED, ... */
87536
+ status: string;
87537
+ };
87458
87538
  EmailMarketingZeroBounce: {
87459
87539
  connected: boolean;
87460
87540
  /** Format: date-time */
@@ -181418,6 +181498,190 @@ export interface operations {
181418
181498
  403: components["responses"]["Forbidden"];
181419
181499
  };
181420
181500
  };
181501
+ getEmailMarketingWhatsappHealth: {
181502
+ parameters: {
181503
+ query?: {
181504
+ /** @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). */
181505
+ org_id?: components["parameters"]["OrgIdQuery"];
181506
+ };
181507
+ header?: never;
181508
+ path?: never;
181509
+ cookie?: never;
181510
+ };
181511
+ requestBody?: never;
181512
+ responses: {
181513
+ /** @description The last reading. */
181514
+ 200: {
181515
+ headers: {
181516
+ [name: string]: unknown;
181517
+ };
181518
+ content: {
181519
+ "application/json": components["schemas"]["EmailMarketingWhatsappHealth"];
181520
+ };
181521
+ };
181522
+ 401: components["responses"]["Unauthorized"];
181523
+ 403: components["responses"]["Forbidden"];
181524
+ };
181525
+ };
181526
+ checkEmailMarketingWhatsappHealth: {
181527
+ parameters: {
181528
+ query?: {
181529
+ /** @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). */
181530
+ org_id?: components["parameters"]["OrgIdQuery"];
181531
+ };
181532
+ header?: never;
181533
+ path?: never;
181534
+ cookie?: never;
181535
+ };
181536
+ requestBody?: never;
181537
+ responses: {
181538
+ /** @description The reading after the check. */
181539
+ 200: {
181540
+ headers: {
181541
+ [name: string]: unknown;
181542
+ };
181543
+ content: {
181544
+ "application/json": components["schemas"]["EmailMarketingWhatsappHealth"];
181545
+ };
181546
+ };
181547
+ 401: components["responses"]["Unauthorized"];
181548
+ 403: components["responses"]["Forbidden"];
181549
+ };
181550
+ };
181551
+ listEmailMarketingWhatsappTemplates: {
181552
+ parameters: {
181553
+ query?: {
181554
+ /** @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). */
181555
+ org_id?: components["parameters"]["OrgIdQuery"];
181556
+ };
181557
+ header?: never;
181558
+ path?: never;
181559
+ cookie?: never;
181560
+ };
181561
+ requestBody?: never;
181562
+ responses: {
181563
+ /** @description Every template on the account. */
181564
+ 200: {
181565
+ headers: {
181566
+ [name: string]: unknown;
181567
+ };
181568
+ content: {
181569
+ "application/json": {
181570
+ results: components["schemas"]["EmailMarketingWhatsappTemplate"][];
181571
+ };
181572
+ };
181573
+ };
181574
+ /** @description The connection's token no longer works (`token_expired`). */
181575
+ 400: {
181576
+ headers: {
181577
+ [name: string]: unknown;
181578
+ };
181579
+ content: {
181580
+ "application/json": components["schemas"]["Error"];
181581
+ };
181582
+ };
181583
+ 401: components["responses"]["Unauthorized"];
181584
+ /** @description The account is not in good standing (`not_in_good_standing`), so no call is made to Meta for it. */
181585
+ 402: {
181586
+ headers: {
181587
+ [name: string]: unknown;
181588
+ };
181589
+ content: {
181590
+ "application/json": components["schemas"]["Error"];
181591
+ };
181592
+ };
181593
+ 403: components["responses"]["Forbidden"];
181594
+ /** @description No WhatsApp account is connected. */
181595
+ 409: {
181596
+ headers: {
181597
+ [name: string]: unknown;
181598
+ };
181599
+ content: {
181600
+ "application/json": components["schemas"]["Error"];
181601
+ };
181602
+ };
181603
+ /** @description Meta did not answer. */
181604
+ 503: {
181605
+ headers: {
181606
+ [name: string]: unknown;
181607
+ };
181608
+ content: {
181609
+ "application/json": components["schemas"]["Error"];
181610
+ };
181611
+ };
181612
+ };
181613
+ };
181614
+ createEmailMarketingWhatsappTemplate: {
181615
+ parameters: {
181616
+ query?: {
181617
+ /** @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). */
181618
+ org_id?: components["parameters"]["OrgIdQuery"];
181619
+ };
181620
+ header?: never;
181621
+ path?: never;
181622
+ cookie?: never;
181623
+ };
181624
+ requestBody: {
181625
+ content: {
181626
+ "application/json": {
181627
+ body: string;
181628
+ /** @enum {string} */
181629
+ category: "MARKETING" | "UTILITY";
181630
+ language: string;
181631
+ name: string;
181632
+ };
181633
+ };
181634
+ };
181635
+ responses: {
181636
+ /** @description Submitted; `status` is Meta's first answer (usually PENDING). */
181637
+ 201: {
181638
+ headers: {
181639
+ [name: string]: unknown;
181640
+ };
181641
+ content: {
181642
+ "application/json": components["schemas"]["EmailMarketingWhatsappTemplate"];
181643
+ };
181644
+ };
181645
+ /** @description The template was refused (`CAMPAIGNS_WHATSAPP_TEMPLATE_REFUSED`). */
181646
+ 400: {
181647
+ headers: {
181648
+ [name: string]: unknown;
181649
+ };
181650
+ content: {
181651
+ "application/json": components["schemas"]["Error"];
181652
+ };
181653
+ };
181654
+ 401: components["responses"]["Unauthorized"];
181655
+ /** @description The account is not in good standing (`not_in_good_standing`), so no call is made to Meta for it. */
181656
+ 402: {
181657
+ headers: {
181658
+ [name: string]: unknown;
181659
+ };
181660
+ content: {
181661
+ "application/json": components["schemas"]["Error"];
181662
+ };
181663
+ };
181664
+ 403: components["responses"]["Forbidden"];
181665
+ /** @description No WhatsApp account is connected. */
181666
+ 409: {
181667
+ headers: {
181668
+ [name: string]: unknown;
181669
+ };
181670
+ content: {
181671
+ "application/json": components["schemas"]["Error"];
181672
+ };
181673
+ };
181674
+ /** @description Meta did not answer. */
181675
+ 503: {
181676
+ headers: {
181677
+ [name: string]: unknown;
181678
+ };
181679
+ content: {
181680
+ "application/json": components["schemas"]["Error"];
181681
+ };
181682
+ };
181683
+ };
181684
+ };
181421
181685
  getEmailMarketingZeroBounce: {
181422
181686
  parameters: {
181423
181687
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1798",
3
+ "version": "0.1.1804",
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>",