@zinn-digital/sdk 0.1.1658 → 0.1.1661

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.
@@ -34364,6 +34364,30 @@ export interface paths {
34364
34364
  patch?: never;
34365
34365
  trace?: never;
34366
34366
  };
34367
+ "/v1/email-marketing/whatsapp/connection": {
34368
+ parameters: {
34369
+ query?: never;
34370
+ header?: never;
34371
+ path?: never;
34372
+ cookie?: never;
34373
+ };
34374
+ get?: never;
34375
+ put?: never;
34376
+ /**
34377
+ * Connect this organisation's own WhatsApp Business Account (Meta Embedded Signup).
34378
+ * @description Gated on `email_marketing.manage`. WhatsApp messages go out from the customer's OWN WhatsApp Business Account, never Zinn®'s. The dashboard opens Meta's Embedded Signup window with `whatsapp_signup.app_id` and `whatsapp_signup.config_id` from `GET /v1/email-marketing/sms`, and sends what it returns: the one-time `code`, the `waba_id` and the `phone_number_id`. The engine exchanges the code for the business token, checks the phone is on that account, subscribes our app to it and registers the phone; nothing is stored unless every step passes. The token is kept in Vault and never returned. Zinn®'s own accounts are refused. Refusal: `CAMPAIGNS_WHATSAPP_CONNECT_FAILED` (400, or 503 when signup is not set up or Meta did not answer; `details[].code` is one of `not_configured`, `ids_invalid`, `not_in_good_standing` (the account is suspended or closed), `house_account`, `code_invalid`, `waba_not_shared`, `phone_not_on_waba`, `subscribe_failed`, `register_failed`, `vendor_unavailable`). Audited (`email_marketing.whatsapp.connect`).
34379
+ */
34380
+ post: operations["connectEmailMarketingWhatsapp"];
34381
+ /**
34382
+ * Disconnect this organisation's WhatsApp Business Account.
34383
+ * @description Gated on `email_marketing.manage`. Forgets the account's ids and deletes its token from Vault. WhatsApp messages are then refused with `own_sender_required` until it is connected again. Audited (`email_marketing.whatsapp.disconnect`).
34384
+ */
34385
+ delete: operations["disconnectEmailMarketingWhatsapp"];
34386
+ options?: never;
34387
+ head?: never;
34388
+ patch?: never;
34389
+ trace?: never;
34390
+ };
34367
34391
  "/v1/entitlements": {
34368
34392
  parameters: {
34369
34393
  query?: never;
@@ -84124,6 +84148,11 @@ export interface components {
84124
84148
  /** @description The organisation's own WhatsApp Business Account is connected. */
84125
84149
  whatsapp_connected: boolean;
84126
84150
  whatsapp_display_phone: string;
84151
+ /** @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. */
84152
+ whatsapp_signup: {
84153
+ app_id: string;
84154
+ config_id: string;
84155
+ } | null;
84127
84156
  };
84128
84157
  EmailMarketingSender: {
84129
84158
  /** Format: date-time */
@@ -84212,6 +84241,11 @@ export interface components {
84212
84241
  sender_requests: components["schemas"]["EmailMarketingSenderRequest"][];
84213
84242
  whatsapp_connected: boolean;
84214
84243
  whatsapp_display_phone: string;
84244
+ /** @description Embedded Signup's app and configuration ids; null when not offered yet. */
84245
+ whatsapp_signup: {
84246
+ app_id: string;
84247
+ config_id: string;
84248
+ } | null;
84215
84249
  };
84216
84250
  EmailMarketingTestResult: {
84217
84251
  detail: string;
@@ -116974,7 +117008,7 @@ export interface components {
116974
117008
  "application/json": components["schemas"]["Error"];
116975
117009
  };
116976
117010
  };
116977
- /** @description Authenticated but not permitted (RBAC scope or tenancy). */
117011
+ /** @description Authenticated but not permitted (RBAC scope or tenancy). Code `SITE_SUSPENDED` instead when the path is a suspended or quarantined site's access surface (file manager, web editor, SSH/SFTP/FTP credentials, WordPress sign-in, staging, backup downloads, cron, deploys, databases, mail, PHP/secrets, transfer): the caller holds the role, the site is closed until it is unsuspended (ABUSEINTAKE, docs/65 §7). */
116978
117012
  Forbidden: {
116979
117013
  headers: {
116980
117014
  [name: string]: unknown;
@@ -174841,6 +174875,82 @@ export interface operations {
174841
174875
  };
174842
174876
  };
174843
174877
  };
174878
+ connectEmailMarketingWhatsapp: {
174879
+ parameters: {
174880
+ query?: {
174881
+ /** @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). */
174882
+ org_id?: components["parameters"]["OrgIdQuery"];
174883
+ };
174884
+ header?: never;
174885
+ path?: never;
174886
+ cookie?: never;
174887
+ };
174888
+ requestBody: {
174889
+ content: {
174890
+ "application/json": {
174891
+ code: string;
174892
+ phone_number_id: string;
174893
+ waba_id: string;
174894
+ };
174895
+ };
174896
+ };
174897
+ responses: {
174898
+ /** @description The organisation's own sending identities, now with WhatsApp connected. */
174899
+ 200: {
174900
+ headers: {
174901
+ [name: string]: unknown;
174902
+ };
174903
+ content: {
174904
+ "application/json": components["schemas"]["EmailMarketingOwnSenders"];
174905
+ };
174906
+ };
174907
+ /** @description The account could not be connected (`CAMPAIGNS_WHATSAPP_CONNECT_FAILED`). */
174908
+ 400: {
174909
+ headers: {
174910
+ [name: string]: unknown;
174911
+ };
174912
+ content: {
174913
+ "application/json": components["schemas"]["Error"];
174914
+ };
174915
+ };
174916
+ 401: components["responses"]["Unauthorized"];
174917
+ 403: components["responses"]["Forbidden"];
174918
+ /** @description Embedded Signup is not set up, or Meta did not answer. Nothing was stored. */
174919
+ 503: {
174920
+ headers: {
174921
+ [name: string]: unknown;
174922
+ };
174923
+ content: {
174924
+ "application/json": components["schemas"]["Error"];
174925
+ };
174926
+ };
174927
+ };
174928
+ };
174929
+ disconnectEmailMarketingWhatsapp: {
174930
+ parameters: {
174931
+ query?: {
174932
+ /** @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). */
174933
+ org_id?: components["parameters"]["OrgIdQuery"];
174934
+ };
174935
+ header?: never;
174936
+ path?: never;
174937
+ cookie?: never;
174938
+ };
174939
+ requestBody?: never;
174940
+ responses: {
174941
+ /** @description The organisation's own sending identities after the change. */
174942
+ 200: {
174943
+ headers: {
174944
+ [name: string]: unknown;
174945
+ };
174946
+ content: {
174947
+ "application/json": components["schemas"]["EmailMarketingOwnSenders"];
174948
+ };
174949
+ };
174950
+ 401: components["responses"]["Unauthorized"];
174951
+ 403: components["responses"]["Forbidden"];
174952
+ };
174953
+ };
174844
174954
  getEntitlementUsage: {
174845
174955
  parameters: {
174846
174956
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1658",
3
+ "version": "0.1.1661",
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>",