@zinn-digital/sdk 0.1.1746 → 0.1.1748

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.
@@ -22313,7 +22313,7 @@ export interface paths {
22313
22313
  };
22314
22314
  /**
22315
22315
  * The social-network autopilot on this org's X, Meta and TikTok accounts.
22316
- * @description Gated on `ads.view`. Read from our own rows (no network call). Per X and Meta account: `levers` says what the autopilot judges there (`audiences` and `creatives` are judged by the scheduled audit; Meta `placements` by the placement guard and `budgets` by the cross-network budget, `elsewhere` with the screen in `where`; X offers no placement change on a running line item, `not_offered`). `review` is the latest audit: audiences (X line items, Meta ad sets) and creatives (X promoted Tweets, Meta ads) judged, the spend found wasted (`waste_micros`, micros of the account currency: spend with no conversion), what was proposed or applied and `findings` (at most 50). A creative is stopped only while its audience keeps another creative that is not waste. `needs_permission` means Meta has not granted Zinn® Ads `ads_management`, or (TTFULL) TikTok answered that this grant cannot write (measured, `vendor_grants.writes` false): judged, nothing proposed. TikTok audiences are ad groups and its creatives are ads, and only SERVING ones are judged. `pending` counts the pauses waiting for a person (docs/1006 §121, za-55).
22316
+ * @description Gated on `ads.view`. Read from our own rows (no network call). Per X and Meta account: `levers` says what the autopilot judges there (`audiences` and `creatives` are judged by the scheduled audit; Meta `placements` by the placement guard and `budgets` by the cross-network budget, `elsewhere` with the screen in `where`; X offers no placement change on a running line item, `not_offered`). `review` is the latest audit: audiences (X line items, Meta ad sets) and creatives (X promoted Tweets, Meta ads) judged, the spend found wasted (`waste_micros`, micros of the account currency: spend with no conversion), what was proposed or applied and `findings` (at most 50). A creative is stopped only while its audience keeps another creative that is not waste. `needs_permission` means Meta has not granted Zinn® Ads `ads_management` (Pinterest: `ads:write`, PINFULL), or (TTFULL) TikTok answered that this grant cannot write (measured, `vendor_grants.writes` false): judged, nothing proposed. TikTok and Pinterest audiences are ad groups and their creatives are ads (Pinterest: promoted Pins), and only SERVING ones are judged. `pending` counts the pauses waiting for a person (docs/1006 §121, za-55).
22317
22317
  */
22318
22318
  get: operations["getAdsSocial"];
22319
22319
  put?: never;
@@ -57777,6 +57777,46 @@ export interface paths {
57777
57777
  patch?: never;
57778
57778
  trace?: never;
57779
57779
  };
57780
+ "/v1/store-connect/people": {
57781
+ parameters: {
57782
+ query?: never;
57783
+ header?: never;
57784
+ path?: never;
57785
+ cookie?: never;
57786
+ };
57787
+ get?: never;
57788
+ put?: never;
57789
+ /**
57790
+ * The store plugin syncs its WordPress users and store customers into Zinn® Campaigns contacts.
57791
+ * @description Store token only (docs/1297 §9.5, docs/1052 F30). A batch of 1-100 people from the plugin's resumable backfill, its live hooks or its daily reconcile, applied as one batched upsert keyed by organisation + e-mail hash. `op: upsert` creates or fills in the contact and records this store's source (`attributes.sources[]`); it never sets a contact's status, so an unsubscribed, bounced or complained person stays suppressed, and a new person whose address is on the organisation's suppression list arrives suppressed. A synced person gets NO consent and joins NO list, so no campaign can select them; the one exception is the e-mail soft opt-in, written only when `soft_opt_in` states the opt-out the store gave and only for a store customer with at least one paid order (never SMS or WhatsApp). `op: delete` removes this store's source and the contact with its last source unless it holds a consent of its own; `op: erase` (the WordPress privacy eraser) deletes the contact on its last source whatever it holds and keeps only the suppression hash and the number's opt-out. A person the engine cannot take is listed in `rejected` by index (an invalid or role address, or `contactLimit` when the plan's contact allowance is full, with `limit_reached: true`); the rest of the batch still applies.
57792
+ */
57793
+ post: operations["syncStorePeople"];
57794
+ delete?: never;
57795
+ options?: never;
57796
+ head?: never;
57797
+ patch?: never;
57798
+ trace?: never;
57799
+ };
57800
+ "/v1/store-connect/people/summary": {
57801
+ parameters: {
57802
+ query?: never;
57803
+ header?: never;
57804
+ path?: never;
57805
+ cookie?: never;
57806
+ };
57807
+ /**
57808
+ * The store plugin reads how many people it has synced per source, for its daily reconcile.
57809
+ * @description Store token only (docs/1297 §9.5 rule 1). Per source (`wp_user`, `woo_customer`, …): the number of people this store has synced and the XOR of each one's 64-bit id hash (the first 8 bytes of `sha256("<source>:<external_id>")`, as 16 hex digits). The plugin compares both with its own and re-queues any gap; its health panel shows `synced N of M`.
57810
+ */
57811
+ get: operations["getStorePeopleSummary"];
57812
+ put?: never;
57813
+ post?: never;
57814
+ delete?: never;
57815
+ options?: never;
57816
+ head?: never;
57817
+ patch?: never;
57818
+ trace?: never;
57819
+ };
57780
57820
  "/v1/store-connect/shopper": {
57781
57821
  parameters: {
57782
57822
  query?: never;
@@ -66923,6 +66963,11 @@ export interface components {
66923
66963
  */
66924
66964
  pacing_target_minor: number | null;
66925
66965
  pending_changes: number;
66966
+ /** @description PINFULL: on a Pinterest connection, whether its sign-in granted `ads:write` (read from Pinterest's own token answer, never typed) so approved changes can be sent, and whether the card offers "Reconnect Pinterest Ads" to add it. On Trial access Pinterest lets only the app creator's own account grant it. `null` for every other network. */
66967
+ pinterest_write?: {
66968
+ granted: boolean;
66969
+ needs_reconnect: boolean;
66970
+ } | null;
66926
66971
  platform: components["schemas"]["AdsPlatform"];
66927
66972
  /** @description PUSHTESTS (za-16, docs/1006 §82) — the confidence a budget test's result needs: a test is called worse only when its results per click moved with p below 1 - this/100. Recommended 90 (`push_test_confidence_recommended`). */
66928
66973
  push_test_confidence_pct: number;
@@ -72722,7 +72767,7 @@ export interface components {
72722
72767
  }[];
72723
72768
  pending: number;
72724
72769
  /** @enum {string} */
72725
- platform: "x" | "meta" | "tiktok";
72770
+ platform: "x" | "meta" | "tiktok" | "pinterest";
72726
72771
  review: {
72727
72772
  applied: number;
72728
72773
  /** Format: date-time */
@@ -113910,6 +113955,66 @@ export interface components {
113910
113955
  */
113911
113956
  tracking_url?: string;
113912
113957
  };
113958
+ StorePeopleBatch: {
113959
+ people: components["schemas"]["StorePersonInput"][];
113960
+ /** @description Present only when the store switched the e-mail soft opt-in on. The opt-out it gave at collection, in full (at least 20 characters), kept as evidence. */
113961
+ soft_opt_in?: {
113962
+ opt_out_statement: string;
113963
+ };
113964
+ };
113965
+ StorePeopleSummary: {
113966
+ sources: {
113967
+ count: number;
113968
+ hash: string;
113969
+ source: string;
113970
+ }[];
113971
+ };
113972
+ StorePeopleSynced: {
113973
+ created: number;
113974
+ deleted: number;
113975
+ limit_reached: boolean;
113976
+ rejected: {
113977
+ /** @enum {string} */
113978
+ code: "itemInvalid" | "opInvalid" | "sourceInvalid" | "externalIdInvalid" | "emailInvalid" | "contactLimit";
113979
+ index: number;
113980
+ }[];
113981
+ /** @description E-mail soft opt-ins written by this batch. */
113982
+ soft_opt_in: number;
113983
+ /** @description Upserted people whose contact is suppressed. */
113984
+ suppressed: number;
113985
+ upserted: number;
113986
+ };
113987
+ StorePersonInput: {
113988
+ country?: string;
113989
+ /** @description Required for upsert. */
113990
+ email?: string;
113991
+ /** @description The store's own id for the person. */
113992
+ external_id: string;
113993
+ first_name?: string;
113994
+ last_name?: string;
113995
+ /** Format: date-time */
113996
+ last_order_at?: string;
113997
+ locale?: string;
113998
+ /**
113999
+ * @default upsert
114000
+ * @enum {string}
114001
+ */
114002
+ op: "upsert" | "delete" | "erase";
114003
+ order_count?: number;
114004
+ /** @description Orders the customer paid for; the soft opt-in needs at least 1. */
114005
+ paid_orders?: number;
114006
+ /** @description E.164; any other value is ignored. */
114007
+ phone?: string;
114008
+ /** Format: date-time */
114009
+ registered_at?: string;
114010
+ role?: string;
114011
+ /** @description wp_user, woo_customer or an integration key. */
114012
+ source: string;
114013
+ total_spent?: {
114014
+ amount_minor: number;
114015
+ currency: string;
114016
+ };
114017
+ };
113913
114018
  StoreShopper: {
113914
114019
  consents: {
113915
114020
  active: boolean;
@@ -214759,6 +214864,12 @@ export interface operations {
214759
214864
  requestBody: {
214760
214865
  content: {
214761
214866
  "application/json": {
214867
+ /**
214868
+ * @description Which of our plugins connects. A store holds one active token per plugin; re-connecting one plugin revokes only its own earlier token.
214869
+ * @default zinn-order-updates
214870
+ * @enum {string}
214871
+ */
214872
+ client?: "zinn-order-updates" | "zinn-campaigns";
214762
214873
  code_challenge: string;
214763
214874
  /**
214764
214875
  * @default S256
@@ -214982,6 +215093,55 @@ export interface operations {
214982
215093
  503: components["responses"]["ServiceUnavailable"];
214983
215094
  };
214984
215095
  };
215096
+ syncStorePeople: {
215097
+ parameters: {
215098
+ query?: never;
215099
+ header?: never;
215100
+ path?: never;
215101
+ cookie?: never;
215102
+ };
215103
+ requestBody: {
215104
+ content: {
215105
+ "application/json": components["schemas"]["StorePeopleBatch"];
215106
+ };
215107
+ };
215108
+ responses: {
215109
+ /** @description Applied. */
215110
+ 200: {
215111
+ headers: {
215112
+ [name: string]: unknown;
215113
+ };
215114
+ content: {
215115
+ "application/json": components["schemas"]["StorePeopleSynced"];
215116
+ };
215117
+ };
215118
+ 401: components["responses"]["Unauthorized"];
215119
+ 422: components["responses"]["UnprocessableEntity"];
215120
+ 429: components["responses"]["TooManyRequests"];
215121
+ };
215122
+ };
215123
+ getStorePeopleSummary: {
215124
+ parameters: {
215125
+ query?: never;
215126
+ header?: never;
215127
+ path?: never;
215128
+ cookie?: never;
215129
+ };
215130
+ requestBody?: never;
215131
+ responses: {
215132
+ /** @description The per-source counts and hashes. */
215133
+ 200: {
215134
+ headers: {
215135
+ [name: string]: unknown;
215136
+ };
215137
+ content: {
215138
+ "application/json": components["schemas"]["StorePeopleSummary"];
215139
+ };
215140
+ };
215141
+ 401: components["responses"]["Unauthorized"];
215142
+ 429: components["responses"]["TooManyRequests"];
215143
+ };
215144
+ };
214985
215145
  readStoreShopper: {
214986
215146
  parameters: {
214987
215147
  query?: never;
@@ -215131,6 +215291,12 @@ export interface operations {
215131
215291
  requestBody: {
215132
215292
  content: {
215133
215293
  "application/json": {
215294
+ /**
215295
+ * @description Must match the client the code was approved for. A store holds one active token per plugin; re-connecting one plugin revokes only its own earlier token.
215296
+ * @default zinn-order-updates
215297
+ * @enum {string}
215298
+ */
215299
+ client?: "zinn-order-updates" | "zinn-campaigns";
215134
215300
  code: string;
215135
215301
  code_verifier: string;
215136
215302
  integrations?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1746",
3
+ "version": "0.1.1748",
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>",