@zinn-digital/sdk 0.1.1991 → 0.1.1999

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.
@@ -36524,6 +36524,114 @@ export interface paths {
36524
36524
  patch?: never;
36525
36525
  trace?: never;
36526
36526
  };
36527
+ "/v1/email-marketing/site-sources": {
36528
+ parameters: {
36529
+ query?: never;
36530
+ header?: never;
36531
+ path?: never;
36532
+ cookie?: never;
36533
+ };
36534
+ /**
36535
+ * The organisation's site contact sources (a hosted site's table feeding a list).
36536
+ * @description Gated on `email_marketing.view`. One keyset page; pass `next_after` as `after`. `site_id` narrows to one site. docs/1052 §14.
36537
+ */
36538
+ get: operations["listCampaignSiteSources"];
36539
+ put?: never;
36540
+ /**
36541
+ * Connect one table of a site you host to a contact list; the first sync starts at once.
36542
+ * @description Gated on `email_marketing.manage`; audit-logged (`email_marketing.site_source.create`). The site must be the organisation's own; every table and column in the mapping is checked against the site's real schema. The import runs as a Temporal workflow, then every 6 hours.
36543
+ */
36544
+ post: operations["createCampaignSiteSource"];
36545
+ delete?: never;
36546
+ options?: never;
36547
+ head?: never;
36548
+ patch?: never;
36549
+ trace?: never;
36550
+ };
36551
+ "/v1/email-marketing/site-sources/{source_id}": {
36552
+ parameters: {
36553
+ query?: never;
36554
+ header?: never;
36555
+ path?: never;
36556
+ cookie?: never;
36557
+ };
36558
+ get?: never;
36559
+ put?: never;
36560
+ post?: never;
36561
+ /**
36562
+ * Disconnect a site source. The contacts it brought in and their consent records stay.
36563
+ * @description Gated on `email_marketing.manage`; audit-logged (`email_marketing.site_source.delete`).
36564
+ */
36565
+ delete: operations["deleteCampaignSiteSource"];
36566
+ options?: never;
36567
+ head?: never;
36568
+ /**
36569
+ * Pause, resume, re-map or re-list one site source.
36570
+ * @description Gated on `email_marketing.manage`; audit-logged (`email_marketing.site_source.update`). A new mapping reads the table again from the start; resuming makes it due at the next sweep.
36571
+ */
36572
+ patch: operations["updateCampaignSiteSource"];
36573
+ trace?: never;
36574
+ };
36575
+ "/v1/email-marketing/site-sources/{source_id}/sync": {
36576
+ parameters: {
36577
+ query?: never;
36578
+ header?: never;
36579
+ path?: never;
36580
+ cookie?: never;
36581
+ };
36582
+ get?: never;
36583
+ put?: never;
36584
+ /**
36585
+ * Sync a site source now (starts the import workflow; a running one is left alone).
36586
+ * @description Gated on `email_marketing.manage`; audit-logged (`email_marketing.site_source.sync`). Refused while paused.
36587
+ */
36588
+ post: operations["syncCampaignSiteSource"];
36589
+ delete?: never;
36590
+ options?: never;
36591
+ head?: never;
36592
+ patch?: never;
36593
+ trace?: never;
36594
+ };
36595
+ "/v1/email-marketing/site-sources/discover": {
36596
+ parameters: {
36597
+ query?: never;
36598
+ header?: never;
36599
+ path?: never;
36600
+ cookie?: never;
36601
+ };
36602
+ get?: never;
36603
+ put?: never;
36604
+ /**
36605
+ * Rank a hosted site's tables as contact sources, with optional Ask AI.
36606
+ * @description Gated on `email_marketing.manage`. Reads the site's schema only (no rows). With `ai: true` the tables are also ranked by Zinn® AI, metered as `campaigns_site_ai` against the organisation's AI allowance and audit-logged (`email_marketing.site_source.ai_ranked`).
36607
+ */
36608
+ post: operations["discoverCampaignSiteSources"];
36609
+ delete?: never;
36610
+ options?: never;
36611
+ head?: never;
36612
+ patch?: never;
36613
+ trace?: never;
36614
+ };
36615
+ "/v1/email-marketing/site-sources/preview": {
36616
+ parameters: {
36617
+ query?: never;
36618
+ header?: never;
36619
+ path?: never;
36620
+ cookie?: never;
36621
+ };
36622
+ get?: never;
36623
+ put?: never;
36624
+ /**
36625
+ * The first rows of a site table as the import would read them under a mapping.
36626
+ * @description Gated on `email_marketing.manage`. Reads at most 20 rows; nothing is saved.
36627
+ */
36628
+ post: operations["previewCampaignSiteSource"];
36629
+ delete?: never;
36630
+ options?: never;
36631
+ head?: never;
36632
+ patch?: never;
36633
+ trace?: never;
36634
+ };
36527
36635
  "/v1/email-marketing/sms": {
36528
36636
  parameters: {
36529
36637
  query?: never;
@@ -59694,6 +59802,26 @@ export interface paths {
59694
59802
  patch?: never;
59695
59803
  trace?: never;
59696
59804
  };
59805
+ "/v1/store-connect/campaigns/opt-outs": {
59806
+ parameters: {
59807
+ query?: never;
59808
+ header?: never;
59809
+ path?: never;
59810
+ cookie?: never;
59811
+ };
59812
+ /**
59813
+ * The Zinn® Campaigns WordPress plugin pulls the opt-outs of every list fed from its site.
59814
+ * @description Store token only (`Authorization: Bearer zou_…`). Opt-outs flow back by the site PULLING them: the read-only database login a site source uses never writes (docs/1052 §14). Only site sources of the token's own org whose site's primary domain is the store's host are read; a paused source still answers (pausing stops the import, never consent). One page per source: an unsubscribed member of the source's list, or a contact suppressed everywhere (unsubscribed, bounced, complained). Keep calling, passing each source's `cursor` back, while any source returns a non-null `next`; nothing is capped. A cursor that cannot be read restarts that source from the beginning.
59815
+ */
59816
+ get: operations["listStoreCampaignOptOuts"];
59817
+ put?: never;
59818
+ post?: never;
59819
+ delete?: never;
59820
+ options?: never;
59821
+ head?: never;
59822
+ patch?: never;
59823
+ trace?: never;
59824
+ };
59697
59825
  "/v1/store-connect/connection": {
59698
59826
  parameters: {
59699
59827
  query?: never;
@@ -62053,7 +62181,7 @@ export interface paths {
62053
62181
  * Add credit to your balance.
62054
62182
  * @description Charged on **your provider's own** payment account when you are a reseller's client, and on Zinn®'s when you buy directly. The credit is written when the payment **captures**: a crypto invoice awaiting confirmation (`pending`), a card awaiting 3-D Secure or a PayPal payment awaiting your approval at `action_url` (`requires_action`) returns 201 with that status and **no** balance change, because the money has not arrived. An approved PayPal top-up is captured and credited when PayPal reports the approval. 422 when your provider has not finished connecting a payment account — the charge is refused rather than settled somewhere else. 422 `PAYMENT_METHOD_REQUIRED` (refusal `refusal.wallet.topUpPaymentStep`) when a card top-up is bought from Zinn® with no saved card: nothing is written and no gateway is asked. Show the customer a choice of card, PayPal or crypto for the same amount, then repeat the request on the chosen `gateway` (1108#13).
62055
62183
  *
62056
- * ⚖️ **Credit bought from Zinn® is never refundable, including on account closure, and never expires** (owner ruling 2026-08-22). Call `GET /v1/wallet/top-ups/estimate` first and show the customer what they will actually receive — on a crypto rail that can be less than the amount quoted, because we credit what settles rather than what was asked for. Requires `billing.payment.manage`.
62184
+ * ⚖️ **Credit bought from Zinn® is never refundable, including on account closure, and never expires** (owner ruling 2026-08-22). Call `GET /v1/wallet/top-ups/estimate` first and show the customer what they will receive. ⚖️ We absorb the top-up fee on every rail (owner ruling 2026-11-21, "top up 50, get 50"): a top-up paid in full credits the full amount; a crypto invoice paid only in part credits what was sent. Requires `billing.payment.manage`.
62057
62185
  */
62058
62186
  post: operations["createClientWalletTopUp"];
62059
62187
  delete?: never;
@@ -62073,7 +62201,7 @@ export interface paths {
62073
62201
  * What a top-up will actually credit, before you pay.
62074
62202
  * @description The **pre-purchase disclosure**. Returns what we expect to put in your balance for a given amount and rail, and whether that figure can still move.
62075
62203
  *
62076
- * ⚖️ Zinn® credits **what actually settles**, net of fees, at the real settlement rate (owner ruling 2026-08-22). On a card that is exactly the amount you asked for. On a crypto rail it can be less, because the value of the coin moves between the quote and the confirmation and the network takes a fee — so `is_estimate` is `true` and the figure is indicative.
62204
+ * ⚖️ Zinn® **absorbs the top-up fee** on every rail (owner ruling 2026-11-21, "top up 50, get 50"; supersedes the 2026-08-22 "credit what settles, net of fees"). A top-up paid in full credits exactly the amount you asked for, by card, PayPal or crypto, so `is_estimate` is `false` on every rail today. A crypto invoice paid only in part credits the part that was sent.
62077
62205
  *
62078
62206
  * ⛔ A screen that renders `expected_credit_minor` without also reading `is_estimate` turns a disclosure into a promise. `refundable` and `expires` are both always `false` and are returned here, at the point of sale, because that is where a non-refundable purchase has to be disclosed. Requires `billing.view`.
62079
62207
  */
@@ -80016,9 +80144,16 @@ export interface components {
80016
80144
  BillingInterval: "monthly" | "annual";
80017
80145
  /** @description One market's rebilling policy — the operator-editable manual-renewal table (W26-K, owner ruling 2026-08-24). Every row is a claim about payment regulation frozen at the moment it was written, so it carries the reason and the source that let a later reader re-check it. */
80018
80146
  BillingMarketRule: {
80147
+ /**
80148
+ * @description Whether the card step offers "save this card and renew automatically" in this market. A market on a manual-renewal policy is never offered it, whatever this says. A country with no row is offered it.
80149
+ * @enum {string}
80150
+ */
80151
+ auto_renew_offer: "offered" | "not_offered";
80019
80152
  country: string;
80020
80153
  notice_days_before_due: number;
80021
80154
  notify_customer: boolean;
80155
+ /** @description Where a `not_offered` decision comes from (a URL or a note). */
80156
+ offer_source: string;
80022
80157
  /** @description How many organisations this rule currently governs — sent WITH the rule, because an operator about to restrict a market needs to know how many paying customers they are moving onto manual renewal BEFORE they press save. */
80023
80158
  orgs_affected: number;
80024
80159
  /**
@@ -80027,6 +80162,11 @@ export interface components {
80027
80162
  */
80028
80163
  policy: "automatic" | "manual_only" | "requires_mandate_registration";
80029
80164
  reason: string;
80165
+ /**
80166
+ * Format: date
80167
+ * @description The date the source must be read again. Null only while the offer is on.
80168
+ */
80169
+ recheck_on: string | null;
80030
80170
  source_url: string;
80031
80171
  /** Format: date-time */
80032
80172
  updated_at: string;
@@ -80036,15 +80176,23 @@ export interface components {
80036
80176
  rules: components["schemas"]["BillingMarketRule"][];
80037
80177
  };
80038
80178
  BillingMarketRuleWrite: {
80179
+ /**
80180
+ * @description Optional. Omit all three offer fields to leave the stored offer of an existing market unchanged. When the write creates a NEW market on a manual-renewal policy and omits them, the row is stored `not_offered` with the rule's `source_url` as its source and a re-check date six months out. `not_offered` requires `offer_source` and a future `recheck_on`.
80181
+ * @enum {string}
80182
+ */
80183
+ auto_renew_offer?: "offered" | "not_offered";
80039
80184
  country: string;
80040
80185
  /** @default 14 */
80041
80186
  notice_days_before_due: number;
80042
80187
  /** @default true */
80043
80188
  notify_customer: boolean;
80189
+ offer_source?: string;
80044
80190
  /** @enum {string} */
80045
80191
  policy: "automatic" | "manual_only" | "requires_mandate_registration";
80046
80192
  /** @description Required and never blank. A market restriction with no stated reason is correct on the day it is written, unfalsifiable a year later, and nobody dares remove it. */
80047
80193
  reason: string;
80194
+ /** Format: date */
80195
+ recheck_on?: string | null;
80048
80196
  source_url?: string;
80049
80197
  };
80050
80198
  /** @description The organization's one "Bill to" block — what renders on its next invoice (docs/34 §2.5). Org-scoped. `vat_status` is read-only (the validate-not-trust flow, §2.3, owns it). */
@@ -81763,6 +81911,76 @@ export interface components {
81763
81911
  description?: string;
81764
81912
  name: string;
81765
81913
  };
81914
+ CampaignSiteSource: {
81915
+ consented: number;
81916
+ /** Format: uuid */
81917
+ contact_list_id: string;
81918
+ contacts_created: number;
81919
+ /** Format: date-time */
81920
+ created_at: string;
81921
+ /** Format: uuid */
81922
+ id: string;
81923
+ /** @enum {string} */
81924
+ kind: "wp_users" | "woo_customers" | "form" | "custom_table";
81925
+ last_error: string;
81926
+ /** Format: date-time */
81927
+ last_synced_at: string | null;
81928
+ mapping: components["schemas"]["CampaignSiteSourceMapping"];
81929
+ /** Format: date-time */
81930
+ next_sync_at: string | null;
81931
+ rows_seen: number;
81932
+ /** Format: uuid */
81933
+ site_id: string;
81934
+ /** @enum {string} */
81935
+ status: "active" | "paused" | "failing";
81936
+ sync_started?: boolean;
81937
+ syncing: boolean;
81938
+ table: string;
81939
+ withdrawn: number;
81940
+ };
81941
+ CampaignSiteSourceCandidate: {
81942
+ /** @description Suggested by Ask AI (suggestions only). */
81943
+ ai?: boolean;
81944
+ columns: string[];
81945
+ /** @enum {string} */
81946
+ kind: "wp_users" | "woo_customers" | "form" | "custom_table";
81947
+ /** @description A table we recognise (WordPress, WooCommerce, a form plugin). */
81948
+ known: boolean;
81949
+ label: string;
81950
+ mapping: components["schemas"]["CampaignSiteSourceMapping"];
81951
+ rows: number;
81952
+ score: number;
81953
+ table: string;
81954
+ };
81955
+ /** @description Which table and columns of the site hold the people. `id` and either `email` or `json` are required; `json_*` name keys inside the JSON column; `eav` joins a key/value table (Gravity Forms). Every identifier is checked against the site's real schema. */
81956
+ CampaignSiteSourceMapping: {
81957
+ consent?: string;
81958
+ consent_yes?: string[];
81959
+ eav?: {
81960
+ fk?: string;
81961
+ key?: string;
81962
+ table?: string;
81963
+ value?: string;
81964
+ };
81965
+ email?: string;
81966
+ first_name?: string;
81967
+ id?: string;
81968
+ json?: string;
81969
+ json_consent?: string;
81970
+ json_email?: string;
81971
+ json_first_name?: string;
81972
+ json_last_name?: string;
81973
+ last_name?: string;
81974
+ name?: string;
81975
+ skip_col?: string;
81976
+ skip_values?: string[];
81977
+ table: string;
81978
+ };
81979
+ CampaignSiteSourcePage: {
81980
+ data: components["schemas"]["CampaignSiteSource"][];
81981
+ /** Format: uuid */
81982
+ next_after: string | null;
81983
+ };
81766
81984
  /** @description ⛔ Every skip counted separately and never silent, and **every one is present even when it is zero**. "4,127 recipients, 312 skipped — not in good standing" is rendered from these, never recomputed by the client: a total with no breakdown is indistinguishable from an audience nobody could see, and a counter that disappears at zero is indistinguishable from a fence that never ran. */
81767
81985
  CampaignSkipCounts: {
81768
81986
  channel_muted: number;
@@ -122426,8 +122644,20 @@ export interface components {
122426
122644
  /** @description Why the last attempt failed, in words safe to show the customer. */
122427
122645
  auto_topup_last_failure?: string;
122428
122646
  auto_topup_last_run_at?: string | null;
122647
+ /** @description The most automatic top-ups may buy in one calendar month (UTC), in minor units; `0` means no monthly limit. A top-up that would pass it is skipped, never charged. A saved card from a market that forbids unattended card charges is likewise never charged automatically (PayPal still is). */
122648
+ auto_topup_monthly_cap_minor?: number;
122649
+ /**
122650
+ * @description Derived. Non-empty when the rule's rail cannot run in this currency, so the rule is PAUSED: nothing is charged and no other method is substituted. `crypto_usd_only` = the account switched off USD while the rule pays in crypto; choosing another rail (or switching back to USD) resumes it. The customer is e-mailed once per switch (`wallet.auto_topup_paused`).
122651
+ * @enum {string}
122652
+ */
122653
+ auto_topup_paused_reason?: "" | "crypto_usd_only";
122429
122654
  /** @description Which saved method to charge. `null` uses the account's default. */
122430
122655
  auto_topup_payment_method_id?: components["schemas"]["Uuid"] | null;
122656
+ /**
122657
+ * @description How the automatic top-up is paid. `saved_method` charges the saved card when the balance falls below the trigger. `crypto` SENDS a crypto invoice (USD only) for the amount at the trigger, plus one reminder; nothing is credited until it is paid, and then the full amount is. `paypal_subscription` is a PayPal Subscription for a fixed amount on a schedule, never charged by the balance trigger.
122658
+ * @enum {string}
122659
+ */
122660
+ auto_topup_rail?: "saved_method" | "crypto" | "paypal_subscription";
122431
122661
  /** @description Buy more credit when the balance falls below this. */
122432
122662
  auto_topup_trigger_minor?: number;
122433
122663
  currency: string;
@@ -122439,7 +122669,13 @@ export interface components {
122439
122669
  WalletSettingsUpdate: {
122440
122670
  auto_topup_amount_minor?: number;
122441
122671
  auto_topup_enabled?: boolean;
122672
+ auto_topup_monthly_cap_minor?: number;
122442
122673
  auto_topup_payment_method_id?: components["schemas"]["Uuid"] | null;
122674
+ /**
122675
+ * @description Absent = keep. `crypto` is a 422 outside USD. `paypal_subscription` is set by the customer's PayPal approval, never by this request.
122676
+ * @enum {string}
122677
+ */
122678
+ auto_topup_rail?: "saved_method" | "crypto";
122443
122679
  auto_topup_trigger_minor?: number;
122444
122680
  low_balance_threshold_minor?: number;
122445
122681
  };
@@ -122451,7 +122687,7 @@ export interface components {
122451
122687
  /** @description ⚖️ Always `false`. Credit never expires — the deliberate other half of never refundable: *"you cannot have it back"* is only defensible alongside *"and you never lose it"*. */
122452
122688
  expires: boolean;
122453
122689
  gateway: string;
122454
- /** @description ⛔ **Not decoration.** `true` on a rail that settles at a moving rate (crypto), where the amount credited can be less than the amount quoted because we credit what actually settles. A client that renders `expected_credit_minor` without reading this turns a disclosure into a promise we did not make. */
122690
+ /** @description ⛔ **Not decoration.** `true` only on a rail whose credit could still move after the customer paid in full. While the top-up fee is absorbed (owner 2026-11-21) no rail has that property, so this is `false` everywhere; a client must still read it before rendering `expected_credit_minor` as a promise. */
122455
122691
  is_estimate: boolean;
122456
122692
  /** @description What the customer asked to add. */
122457
122693
  quoted_minor: number;
@@ -185509,6 +185745,266 @@ export interface operations {
185509
185745
  404: components["responses"]["NotFound"];
185510
185746
  };
185511
185747
  };
185748
+ listCampaignSiteSources: {
185749
+ parameters: {
185750
+ query?: {
185751
+ after?: string;
185752
+ limit?: number;
185753
+ /** @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). */
185754
+ org_id?: components["parameters"]["OrgIdQuery"];
185755
+ site_id?: string;
185756
+ };
185757
+ header?: never;
185758
+ path?: never;
185759
+ cookie?: never;
185760
+ };
185761
+ requestBody?: never;
185762
+ responses: {
185763
+ /** @description One page of site sources. */
185764
+ 200: {
185765
+ headers: {
185766
+ [name: string]: unknown;
185767
+ };
185768
+ content: {
185769
+ "application/json": components["schemas"]["CampaignSiteSourcePage"];
185770
+ };
185771
+ };
185772
+ 401: components["responses"]["Unauthorized"];
185773
+ 403: components["responses"]["Forbidden"];
185774
+ };
185775
+ };
185776
+ createCampaignSiteSource: {
185777
+ parameters: {
185778
+ query?: {
185779
+ /** @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). */
185780
+ org_id?: components["parameters"]["OrgIdQuery"];
185781
+ };
185782
+ header?: never;
185783
+ path?: never;
185784
+ cookie?: never;
185785
+ };
185786
+ requestBody: {
185787
+ content: {
185788
+ "application/json": {
185789
+ /** Format: uuid */
185790
+ contact_list_id: string;
185791
+ /** @enum {string} */
185792
+ kind?: "wp_users" | "woo_customers" | "form" | "custom_table";
185793
+ mapping: components["schemas"]["CampaignSiteSourceMapping"];
185794
+ /** Format: uuid */
185795
+ site_id: string;
185796
+ };
185797
+ };
185798
+ };
185799
+ responses: {
185800
+ /** @description Connected. */
185801
+ 201: {
185802
+ headers: {
185803
+ [name: string]: unknown;
185804
+ };
185805
+ content: {
185806
+ "application/json": components["schemas"]["CampaignSiteSource"];
185807
+ };
185808
+ };
185809
+ 400: components["responses"]["UnprocessableEntity"];
185810
+ 401: components["responses"]["Unauthorized"];
185811
+ 403: components["responses"]["Forbidden"];
185812
+ 404: components["responses"]["NotFound"];
185813
+ 409: components["responses"]["Conflict"];
185814
+ 502: components["responses"]["ServiceUnavailable"];
185815
+ };
185816
+ };
185817
+ deleteCampaignSiteSource: {
185818
+ parameters: {
185819
+ query?: {
185820
+ /** @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). */
185821
+ org_id?: components["parameters"]["OrgIdQuery"];
185822
+ };
185823
+ header?: never;
185824
+ path: {
185825
+ source_id: string;
185826
+ };
185827
+ cookie?: never;
185828
+ };
185829
+ requestBody?: never;
185830
+ responses: {
185831
+ /** @description Disconnected. */
185832
+ 204: {
185833
+ headers: {
185834
+ [name: string]: unknown;
185835
+ };
185836
+ content?: never;
185837
+ };
185838
+ 401: components["responses"]["Unauthorized"];
185839
+ 403: components["responses"]["Forbidden"];
185840
+ 404: components["responses"]["NotFound"];
185841
+ };
185842
+ };
185843
+ updateCampaignSiteSource: {
185844
+ parameters: {
185845
+ query?: {
185846
+ /** @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). */
185847
+ org_id?: components["parameters"]["OrgIdQuery"];
185848
+ };
185849
+ header?: never;
185850
+ path: {
185851
+ source_id: string;
185852
+ };
185853
+ cookie?: never;
185854
+ };
185855
+ requestBody: {
185856
+ content: {
185857
+ "application/json": {
185858
+ /** Format: uuid */
185859
+ contact_list_id?: string;
185860
+ mapping?: components["schemas"]["CampaignSiteSourceMapping"];
185861
+ /** @enum {string} */
185862
+ status?: "active" | "paused";
185863
+ };
185864
+ };
185865
+ };
185866
+ responses: {
185867
+ /** @description The source. */
185868
+ 200: {
185869
+ headers: {
185870
+ [name: string]: unknown;
185871
+ };
185872
+ content: {
185873
+ "application/json": components["schemas"]["CampaignSiteSource"];
185874
+ };
185875
+ };
185876
+ 400: components["responses"]["UnprocessableEntity"];
185877
+ 401: components["responses"]["Unauthorized"];
185878
+ 403: components["responses"]["Forbidden"];
185879
+ 404: components["responses"]["NotFound"];
185880
+ 409: components["responses"]["Conflict"];
185881
+ 502: components["responses"]["ServiceUnavailable"];
185882
+ };
185883
+ };
185884
+ syncCampaignSiteSource: {
185885
+ parameters: {
185886
+ query?: {
185887
+ /** @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). */
185888
+ org_id?: components["parameters"]["OrgIdQuery"];
185889
+ };
185890
+ header?: never;
185891
+ path: {
185892
+ source_id: string;
185893
+ };
185894
+ cookie?: never;
185895
+ };
185896
+ requestBody?: never;
185897
+ responses: {
185898
+ /** @description Started (or the 15-minute sweep will pick it up when `sync_started` is false). */
185899
+ 202: {
185900
+ headers: {
185901
+ [name: string]: unknown;
185902
+ };
185903
+ content: {
185904
+ "application/json": components["schemas"]["CampaignSiteSource"];
185905
+ };
185906
+ };
185907
+ 401: components["responses"]["Unauthorized"];
185908
+ 403: components["responses"]["Forbidden"];
185909
+ 404: components["responses"]["NotFound"];
185910
+ 409: components["responses"]["Conflict"];
185911
+ };
185912
+ };
185913
+ discoverCampaignSiteSources: {
185914
+ parameters: {
185915
+ query?: {
185916
+ /** @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). */
185917
+ org_id?: components["parameters"]["OrgIdQuery"];
185918
+ };
185919
+ header?: never;
185920
+ path?: never;
185921
+ cookie?: never;
185922
+ };
185923
+ requestBody: {
185924
+ content: {
185925
+ "application/json": {
185926
+ /** @default false */
185927
+ ai?: boolean;
185928
+ /** @description What the customer calls the people (e.g. 'members'). */
185929
+ hint?: string;
185930
+ /** Format: uuid */
185931
+ site_id: string;
185932
+ };
185933
+ };
185934
+ };
185935
+ responses: {
185936
+ /** @description The ranked candidates. */
185937
+ 200: {
185938
+ headers: {
185939
+ [name: string]: unknown;
185940
+ };
185941
+ content: {
185942
+ "application/json": {
185943
+ ai_calls?: number;
185944
+ candidates: components["schemas"]["CampaignSiteSourceCandidate"][];
185945
+ suggestions: components["schemas"]["CampaignSiteSourceCandidate"][];
185946
+ tables: number;
185947
+ };
185948
+ };
185949
+ };
185950
+ 401: components["responses"]["Unauthorized"];
185951
+ 402: components["responses"]["Forbidden"];
185952
+ 403: components["responses"]["Forbidden"];
185953
+ 404: components["responses"]["NotFound"];
185954
+ 409: components["responses"]["Conflict"];
185955
+ 502: components["responses"]["ServiceUnavailable"];
185956
+ 503: components["responses"]["ServiceUnavailable"];
185957
+ };
185958
+ };
185959
+ previewCampaignSiteSource: {
185960
+ parameters: {
185961
+ query?: {
185962
+ /** @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). */
185963
+ org_id?: components["parameters"]["OrgIdQuery"];
185964
+ };
185965
+ header?: never;
185966
+ path?: never;
185967
+ cookie?: never;
185968
+ };
185969
+ requestBody: {
185970
+ content: {
185971
+ "application/json": {
185972
+ mapping: components["schemas"]["CampaignSiteSourceMapping"];
185973
+ /** Format: uuid */
185974
+ site_id: string;
185975
+ };
185976
+ };
185977
+ };
185978
+ responses: {
185979
+ /** @description The preview rows and the JSON keys seen. */
185980
+ 200: {
185981
+ headers: {
185982
+ [name: string]: unknown;
185983
+ };
185984
+ content: {
185985
+ "application/json": {
185986
+ json_keys: string[];
185987
+ mapping: components["schemas"]["CampaignSiteSourceMapping"];
185988
+ rows: {
185989
+ /** @enum {string} */
185990
+ consent: "consented" | "declined" | "unknown";
185991
+ consent_value: string;
185992
+ email: string;
185993
+ first_name: string;
185994
+ last_name: string;
185995
+ skipped: boolean;
185996
+ }[];
185997
+ };
185998
+ };
185999
+ };
186000
+ 400: components["responses"]["UnprocessableEntity"];
186001
+ 401: components["responses"]["Unauthorized"];
186002
+ 403: components["responses"]["Forbidden"];
186003
+ 404: components["responses"]["NotFound"];
186004
+ 409: components["responses"]["Conflict"];
186005
+ 502: components["responses"]["ServiceUnavailable"];
186006
+ };
186007
+ };
185512
186008
  getEmailMarketingSms: {
185513
186009
  parameters: {
185514
186010
  query?: {
@@ -222797,6 +223293,46 @@ export interface operations {
222797
223293
  429: components["responses"]["TooManyRequests"];
222798
223294
  };
222799
223295
  };
223296
+ listStoreCampaignOptOuts: {
223297
+ parameters: {
223298
+ query?: {
223299
+ /** @description Repeatable, at most 50: `<source id>~<cursor>`, the `cursor` the last answer gave that source. */
223300
+ after?: string[];
223301
+ };
223302
+ header?: never;
223303
+ path?: never;
223304
+ cookie?: never;
223305
+ };
223306
+ requestBody?: never;
223307
+ responses: {
223308
+ /** @description One page of opt-outs per source. */
223309
+ 200: {
223310
+ headers: {
223311
+ [name: string]: unknown;
223312
+ };
223313
+ content: {
223314
+ "application/json": {
223315
+ sources: {
223316
+ /** @description Keep it; pass it back to pull only what changed since. */
223317
+ cursor: string;
223318
+ /** Format: uuid */
223319
+ id: string;
223320
+ /** @description Non-null when this source has more: call again with it. */
223321
+ next: string | null;
223322
+ opt_outs: {
223323
+ /** Format: email */
223324
+ email: string;
223325
+ /** @enum {string} */
223326
+ reason: "unsubscribed" | "bounced" | "complained";
223327
+ }[];
223328
+ }[];
223329
+ };
223330
+ };
223331
+ };
223332
+ 401: components["responses"]["Unauthorized"];
223333
+ 429: components["responses"]["TooManyRequests"];
223334
+ };
223335
+ };
222800
223336
  disconnectStore: {
222801
223337
  parameters: {
222802
223338
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1991",
3
+ "version": "0.1.1999",
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>",