@zinn-digital/sdk 0.1.1657 → 0.1.1660

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.
@@ -16259,6 +16259,28 @@ export interface paths {
16259
16259
  patch?: never;
16260
16260
  trace?: never;
16261
16261
  };
16262
+ "/v1/admin/zinn-campaigns/registrations/{registration_id}/decision": {
16263
+ parameters: {
16264
+ query?: never;
16265
+ header?: never;
16266
+ path: {
16267
+ registration_id: string;
16268
+ };
16269
+ cookie?: never;
16270
+ };
16271
+ get?: never;
16272
+ put?: never;
16273
+ /**
16274
+ * Record the carrier's answer to a customer's own-sender-name request (staff).
16275
+ * @description For a `sender_<country>` registration in `pending` only (`docs/1052` §3.5d). `approve: true` opens that country for that organisation alone, sending as its own requested name (a Zinn® name is refused again here); `false` rejects it, keeping `reason` for the customer. Requires `abuse.manage`. Audited (`email_marketing.sms.sender_request.decide`).
16276
+ */
16277
+ post: operations["decideZinnCampaignsRegistration"];
16278
+ delete?: never;
16279
+ options?: never;
16280
+ head?: never;
16281
+ patch?: never;
16282
+ trace?: never;
16283
+ };
16262
16284
  "/v1/ads/analytics/breakdown": {
16263
16285
  parameters: {
16264
16286
  query?: never;
@@ -34322,6 +34344,50 @@ export interface paths {
34322
34344
  patch?: never;
34323
34345
  trace?: never;
34324
34346
  };
34347
+ "/v1/email-marketing/sms/sender-requests": {
34348
+ parameters: {
34349
+ query?: never;
34350
+ header?: never;
34351
+ path?: never;
34352
+ cookie?: never;
34353
+ };
34354
+ get?: never;
34355
+ put?: never;
34356
+ /**
34357
+ * Ask to register this organisation's own SMS sender name in another country.
34358
+ * @description Gated on `email_marketing.manage`. Countries in `sender_request_countries` (on `GET /v1/email-marketing/sms`) only deliver texts from a sender registered there first. This records the request with our team, who file it with the carrier; approvals can take a few days. When approved, that country opens for this organisation alone and its texts go out under this name, never Zinn®'s. Free: nothing is charged. One open request per country. Refusal: `CAMPAIGNS_SENDER_REQUEST_REFUSED` (400, or 409 when the country is already open or already has a request waiting; `details[].code` says why). Audited (`email_marketing.sms.sender_request.create`).
34359
+ */
34360
+ post: operations["createEmailMarketingSmsSenderRequest"];
34361
+ delete?: never;
34362
+ options?: never;
34363
+ head?: never;
34364
+ patch?: never;
34365
+ trace?: never;
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
+ };
34325
34391
  "/v1/entitlements": {
34326
34392
  parameters: {
34327
34393
  query?: never;
@@ -84075,9 +84141,18 @@ export interface components {
84075
84141
  sender_id: string;
84076
84142
  /** @description Countries where `sender_id` is used. Others need a registered number. */
84077
84143
  sender_id_countries: string[];
84144
+ /** @description Countries that open once this organisation's own sender name is registered there (`POST /v1/email-marketing/sms/sender-requests`). Approvals can take a few days. */
84145
+ sender_request_countries: string[];
84146
+ /** @description The latest request per country. */
84147
+ sender_requests: components["schemas"]["EmailMarketingSenderRequest"][];
84078
84148
  /** @description The organisation's own WhatsApp Business Account is connected. */
84079
84149
  whatsapp_connected: boolean;
84080
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;
84081
84156
  };
84082
84157
  EmailMarketingSender: {
84083
84158
  /** Format: date-time */
@@ -84136,6 +84211,21 @@ export interface components {
84136
84211
  /** @description Whether `kind: pool` (Zinn® sending) may be connected. `false` for a white-labelled organisation (a reseller and its clients), which sends through its own server only, because a pool message names our relay in its headers. */
84137
84212
  pool_offered?: boolean;
84138
84213
  };
84214
+ /** @description A request to register this organisation's own SMS sender name in a country that needs one (`docs/1052` §3.5d). `pending` until our team has the carrier's answer, which can take a few days; `approved` opens the country for this organisation alone. */
84215
+ EmailMarketingSenderRequest: {
84216
+ country: string;
84217
+ /** Format: date-time */
84218
+ created_at: string;
84219
+ /** Format: date-time */
84220
+ decided_at: string | null;
84221
+ /** Format: uuid */
84222
+ id: string;
84223
+ /** @description The carrier's reason when rejected. */
84224
+ reason: string;
84225
+ sender_id: string;
84226
+ /** @enum {string} */
84227
+ status: "pending" | "approved" | "rejected";
84228
+ };
84139
84229
  EmailMarketingSms: {
84140
84230
  credit_balance_usd_micros: number;
84141
84231
  max_characters: number;
@@ -84147,8 +84237,15 @@ export interface components {
84147
84237
  }[];
84148
84238
  sender_id: string;
84149
84239
  sender_id_countries: string[];
84240
+ sender_request_countries: string[];
84241
+ sender_requests: components["schemas"]["EmailMarketingSenderRequest"][];
84150
84242
  whatsapp_connected: boolean;
84151
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;
84152
84249
  };
84153
84250
  EmailMarketingTestResult: {
84154
84251
  detail: string;
@@ -116768,12 +116865,13 @@ export interface components {
116768
116865
  ZinnCampaignsRegistrationAdmin: {
116769
116866
  brand_name: string;
116770
116867
  cost_usd_micros: number;
116868
+ country: string;
116771
116869
  /** Format: date-time */
116772
116870
  created_at: string;
116773
116871
  /** Format: uuid */
116774
116872
  id: string;
116775
- /** @enum {string} */
116776
- kind: "us_10dlc";
116873
+ /** @description `us_10dlc`, or `sender_<country>` for an own-sender-name request (§3.5d). */
116874
+ kind: string;
116777
116875
  /** Format: date-time */
116778
116876
  next_check_at: string | null;
116779
116877
  /** Format: uuid */
@@ -116785,6 +116883,8 @@ export interface components {
116785
116883
  price_usd_micros: number;
116786
116884
  reason_code: string;
116787
116885
  refunded_usd_micros: number;
116886
+ /** @description The requested own sender name (sender requests). */
116887
+ sender_id: string;
116788
116888
  /** @enum {string} */
116789
116889
  status: "submitting" | "pending" | "approved" | "rejected" | "lapsed";
116790
116890
  test: boolean;
@@ -142885,6 +142985,39 @@ export interface operations {
142885
142985
  429: components["responses"]["TooManyRequests"];
142886
142986
  };
142887
142987
  };
142988
+ decideZinnCampaignsRegistration: {
142989
+ parameters: {
142990
+ query?: never;
142991
+ header?: never;
142992
+ path: {
142993
+ registration_id: string;
142994
+ };
142995
+ cookie?: never;
142996
+ };
142997
+ requestBody: {
142998
+ content: {
142999
+ "application/json": {
143000
+ approve: boolean;
143001
+ reason?: string;
143002
+ };
143003
+ };
143004
+ };
143005
+ responses: {
143006
+ /** @description The registration after the decision. */
143007
+ 200: {
143008
+ headers: {
143009
+ [name: string]: unknown;
143010
+ };
143011
+ content: {
143012
+ "application/json": components["schemas"]["ZinnCampaignsRegistrationAdmin"];
143013
+ };
143014
+ };
143015
+ 401: components["responses"]["Unauthorized"];
143016
+ 403: components["responses"]["Forbidden"];
143017
+ 404: components["responses"]["NotFound"];
143018
+ 422: components["responses"]["UnprocessableEntity"];
143019
+ };
143020
+ };
142888
143021
  getAdsAnalyticsBreakdown: {
142889
143022
  parameters: {
142890
143023
  query?: {
@@ -174692,6 +174825,132 @@ export interface operations {
174692
174825
  403: components["responses"]["Forbidden"];
174693
174826
  };
174694
174827
  };
174828
+ createEmailMarketingSmsSenderRequest: {
174829
+ parameters: {
174830
+ query?: {
174831
+ /** @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). */
174832
+ org_id?: components["parameters"]["OrgIdQuery"];
174833
+ };
174834
+ header?: never;
174835
+ path?: never;
174836
+ cookie?: never;
174837
+ };
174838
+ requestBody: {
174839
+ content: {
174840
+ "application/json": {
174841
+ country: string;
174842
+ sender_id: string;
174843
+ };
174844
+ };
174845
+ };
174846
+ responses: {
174847
+ /** @description The request, waiting for approval. */
174848
+ 201: {
174849
+ headers: {
174850
+ [name: string]: unknown;
174851
+ };
174852
+ content: {
174853
+ "application/json": components["schemas"]["EmailMarketingSenderRequest"];
174854
+ };
174855
+ };
174856
+ /** @description The country or sender name is not allowed. */
174857
+ 400: {
174858
+ headers: {
174859
+ [name: string]: unknown;
174860
+ };
174861
+ content: {
174862
+ "application/json": components["schemas"]["Error"];
174863
+ };
174864
+ };
174865
+ 401: components["responses"]["Unauthorized"];
174866
+ 403: components["responses"]["Forbidden"];
174867
+ /** @description The country is already open, or a request for it is already waiting. */
174868
+ 409: {
174869
+ headers: {
174870
+ [name: string]: unknown;
174871
+ };
174872
+ content: {
174873
+ "application/json": components["schemas"]["Error"];
174874
+ };
174875
+ };
174876
+ };
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
+ };
174695
174954
  getEntitlementUsage: {
174696
174955
  parameters: {
174697
174956
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1657",
3
+ "version": "0.1.1660",
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>",