@zinn-digital/sdk 0.1.1798 → 0.1.1801

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;
@@ -87147,6 +87195,7 @@ export interface components {
87147
87195
  /** @description The organisation's own WhatsApp Business Account is connected. */
87148
87196
  whatsapp_connected: boolean;
87149
87197
  whatsapp_display_phone: string;
87198
+ whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
87150
87199
  /** @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
87200
  whatsapp_signup: {
87152
87201
  app_id: string;
@@ -87386,6 +87435,7 @@ export interface components {
87386
87435
  sender_requests: components["schemas"]["EmailMarketingSenderRequest"][];
87387
87436
  whatsapp_connected: boolean;
87388
87437
  whatsapp_display_phone: string;
87438
+ whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
87389
87439
  /** @description Embedded Signup's app and configuration ids; null when not offered yet. */
87390
87440
  whatsapp_signup: {
87391
87441
  app_id: string;
@@ -87455,6 +87505,34 @@ export interface components {
87455
87505
  usecases: string[];
87456
87506
  verticals: string[];
87457
87507
  };
87508
+ /** @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. */
87509
+ EmailMarketingWhatsappHealth: {
87510
+ /** @description "unavailable" when the last read failed (the verdict shown is the one before). */
87511
+ check_error?: string;
87512
+ /** Format: date-time */
87513
+ checked_at: string | null;
87514
+ messaging_limit_tier?: string;
87515
+ reasons: {
87516
+ blocking: boolean;
87517
+ /** @enum {string} */
87518
+ code: "payment_method" | "business_verification" | "no_approved_template" | "phone_not_connected" | "display_name_pending" | "display_name_rejected" | "token_expired" | "meta_other";
87519
+ fix_url: string;
87520
+ /** @enum {string} */
87521
+ fix_where: "meta" | "app";
87522
+ /** @description Meta's numeric code (0 when none). */
87523
+ meta_code: number;
87524
+ }[];
87525
+ /** @enum {string} */
87526
+ state: "ready" | "limited" | "blocked" | "unknown" | "not_connected";
87527
+ templates_approved?: number | null;
87528
+ };
87529
+ EmailMarketingWhatsappTemplate: {
87530
+ category: string;
87531
+ language: string;
87532
+ name: string;
87533
+ /** @description Meta's review status: APPROVED, PENDING, REJECTED, PAUSED, ... */
87534
+ status: string;
87535
+ };
87458
87536
  EmailMarketingZeroBounce: {
87459
87537
  connected: boolean;
87460
87538
  /** Format: date-time */
@@ -181418,6 +181496,190 @@ export interface operations {
181418
181496
  403: components["responses"]["Forbidden"];
181419
181497
  };
181420
181498
  };
181499
+ getEmailMarketingWhatsappHealth: {
181500
+ parameters: {
181501
+ query?: {
181502
+ /** @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). */
181503
+ org_id?: components["parameters"]["OrgIdQuery"];
181504
+ };
181505
+ header?: never;
181506
+ path?: never;
181507
+ cookie?: never;
181508
+ };
181509
+ requestBody?: never;
181510
+ responses: {
181511
+ /** @description The last reading. */
181512
+ 200: {
181513
+ headers: {
181514
+ [name: string]: unknown;
181515
+ };
181516
+ content: {
181517
+ "application/json": components["schemas"]["EmailMarketingWhatsappHealth"];
181518
+ };
181519
+ };
181520
+ 401: components["responses"]["Unauthorized"];
181521
+ 403: components["responses"]["Forbidden"];
181522
+ };
181523
+ };
181524
+ checkEmailMarketingWhatsappHealth: {
181525
+ parameters: {
181526
+ query?: {
181527
+ /** @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). */
181528
+ org_id?: components["parameters"]["OrgIdQuery"];
181529
+ };
181530
+ header?: never;
181531
+ path?: never;
181532
+ cookie?: never;
181533
+ };
181534
+ requestBody?: never;
181535
+ responses: {
181536
+ /** @description The reading after the check. */
181537
+ 200: {
181538
+ headers: {
181539
+ [name: string]: unknown;
181540
+ };
181541
+ content: {
181542
+ "application/json": components["schemas"]["EmailMarketingWhatsappHealth"];
181543
+ };
181544
+ };
181545
+ 401: components["responses"]["Unauthorized"];
181546
+ 403: components["responses"]["Forbidden"];
181547
+ };
181548
+ };
181549
+ listEmailMarketingWhatsappTemplates: {
181550
+ parameters: {
181551
+ query?: {
181552
+ /** @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). */
181553
+ org_id?: components["parameters"]["OrgIdQuery"];
181554
+ };
181555
+ header?: never;
181556
+ path?: never;
181557
+ cookie?: never;
181558
+ };
181559
+ requestBody?: never;
181560
+ responses: {
181561
+ /** @description Every template on the account. */
181562
+ 200: {
181563
+ headers: {
181564
+ [name: string]: unknown;
181565
+ };
181566
+ content: {
181567
+ "application/json": {
181568
+ results: components["schemas"]["EmailMarketingWhatsappTemplate"][];
181569
+ };
181570
+ };
181571
+ };
181572
+ /** @description The connection's token no longer works (`token_expired`). */
181573
+ 400: {
181574
+ headers: {
181575
+ [name: string]: unknown;
181576
+ };
181577
+ content: {
181578
+ "application/json": components["schemas"]["Error"];
181579
+ };
181580
+ };
181581
+ 401: components["responses"]["Unauthorized"];
181582
+ /** @description The account is not in good standing (`not_in_good_standing`), so no call is made to Meta for it. */
181583
+ 402: {
181584
+ headers: {
181585
+ [name: string]: unknown;
181586
+ };
181587
+ content: {
181588
+ "application/json": components["schemas"]["Error"];
181589
+ };
181590
+ };
181591
+ 403: components["responses"]["Forbidden"];
181592
+ /** @description No WhatsApp account is connected. */
181593
+ 409: {
181594
+ headers: {
181595
+ [name: string]: unknown;
181596
+ };
181597
+ content: {
181598
+ "application/json": components["schemas"]["Error"];
181599
+ };
181600
+ };
181601
+ /** @description Meta did not answer. */
181602
+ 503: {
181603
+ headers: {
181604
+ [name: string]: unknown;
181605
+ };
181606
+ content: {
181607
+ "application/json": components["schemas"]["Error"];
181608
+ };
181609
+ };
181610
+ };
181611
+ };
181612
+ createEmailMarketingWhatsappTemplate: {
181613
+ parameters: {
181614
+ query?: {
181615
+ /** @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). */
181616
+ org_id?: components["parameters"]["OrgIdQuery"];
181617
+ };
181618
+ header?: never;
181619
+ path?: never;
181620
+ cookie?: never;
181621
+ };
181622
+ requestBody: {
181623
+ content: {
181624
+ "application/json": {
181625
+ body: string;
181626
+ /** @enum {string} */
181627
+ category: "MARKETING" | "UTILITY";
181628
+ language: string;
181629
+ name: string;
181630
+ };
181631
+ };
181632
+ };
181633
+ responses: {
181634
+ /** @description Submitted; `status` is Meta's first answer (usually PENDING). */
181635
+ 201: {
181636
+ headers: {
181637
+ [name: string]: unknown;
181638
+ };
181639
+ content: {
181640
+ "application/json": components["schemas"]["EmailMarketingWhatsappTemplate"];
181641
+ };
181642
+ };
181643
+ /** @description The template was refused (`CAMPAIGNS_WHATSAPP_TEMPLATE_REFUSED`). */
181644
+ 400: {
181645
+ headers: {
181646
+ [name: string]: unknown;
181647
+ };
181648
+ content: {
181649
+ "application/json": components["schemas"]["Error"];
181650
+ };
181651
+ };
181652
+ 401: components["responses"]["Unauthorized"];
181653
+ /** @description The account is not in good standing (`not_in_good_standing`), so no call is made to Meta for it. */
181654
+ 402: {
181655
+ headers: {
181656
+ [name: string]: unknown;
181657
+ };
181658
+ content: {
181659
+ "application/json": components["schemas"]["Error"];
181660
+ };
181661
+ };
181662
+ 403: components["responses"]["Forbidden"];
181663
+ /** @description No WhatsApp account is connected. */
181664
+ 409: {
181665
+ headers: {
181666
+ [name: string]: unknown;
181667
+ };
181668
+ content: {
181669
+ "application/json": components["schemas"]["Error"];
181670
+ };
181671
+ };
181672
+ /** @description Meta did not answer. */
181673
+ 503: {
181674
+ headers: {
181675
+ [name: string]: unknown;
181676
+ };
181677
+ content: {
181678
+ "application/json": components["schemas"]["Error"];
181679
+ };
181680
+ };
181681
+ };
181682
+ };
181421
181683
  getEmailMarketingZeroBounce: {
181422
181684
  parameters: {
181423
181685
  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.1801",
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>",