@zinn-digital/sdk 0.1.1745 → 0.1.1747
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.
- package/dist/generated/schema.d.ts +169 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -113910,6 +113950,66 @@ export interface components {
|
|
|
113910
113950
|
*/
|
|
113911
113951
|
tracking_url?: string;
|
|
113912
113952
|
};
|
|
113953
|
+
StorePeopleBatch: {
|
|
113954
|
+
people: components["schemas"]["StorePersonInput"][];
|
|
113955
|
+
/** @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. */
|
|
113956
|
+
soft_opt_in?: {
|
|
113957
|
+
opt_out_statement: string;
|
|
113958
|
+
};
|
|
113959
|
+
};
|
|
113960
|
+
StorePeopleSummary: {
|
|
113961
|
+
sources: {
|
|
113962
|
+
count: number;
|
|
113963
|
+
hash: string;
|
|
113964
|
+
source: string;
|
|
113965
|
+
}[];
|
|
113966
|
+
};
|
|
113967
|
+
StorePeopleSynced: {
|
|
113968
|
+
created: number;
|
|
113969
|
+
deleted: number;
|
|
113970
|
+
limit_reached: boolean;
|
|
113971
|
+
rejected: {
|
|
113972
|
+
/** @enum {string} */
|
|
113973
|
+
code: "itemInvalid" | "opInvalid" | "sourceInvalid" | "externalIdInvalid" | "emailInvalid" | "contactLimit";
|
|
113974
|
+
index: number;
|
|
113975
|
+
}[];
|
|
113976
|
+
/** @description E-mail soft opt-ins written by this batch. */
|
|
113977
|
+
soft_opt_in: number;
|
|
113978
|
+
/** @description Upserted people whose contact is suppressed. */
|
|
113979
|
+
suppressed: number;
|
|
113980
|
+
upserted: number;
|
|
113981
|
+
};
|
|
113982
|
+
StorePersonInput: {
|
|
113983
|
+
country?: string;
|
|
113984
|
+
/** @description Required for upsert. */
|
|
113985
|
+
email?: string;
|
|
113986
|
+
/** @description The store's own id for the person. */
|
|
113987
|
+
external_id: string;
|
|
113988
|
+
first_name?: string;
|
|
113989
|
+
last_name?: string;
|
|
113990
|
+
/** Format: date-time */
|
|
113991
|
+
last_order_at?: string;
|
|
113992
|
+
locale?: string;
|
|
113993
|
+
/**
|
|
113994
|
+
* @default upsert
|
|
113995
|
+
* @enum {string}
|
|
113996
|
+
*/
|
|
113997
|
+
op: "upsert" | "delete" | "erase";
|
|
113998
|
+
order_count?: number;
|
|
113999
|
+
/** @description Orders the customer paid for; the soft opt-in needs at least 1. */
|
|
114000
|
+
paid_orders?: number;
|
|
114001
|
+
/** @description E.164; any other value is ignored. */
|
|
114002
|
+
phone?: string;
|
|
114003
|
+
/** Format: date-time */
|
|
114004
|
+
registered_at?: string;
|
|
114005
|
+
role?: string;
|
|
114006
|
+
/** @description wp_user, woo_customer or an integration key. */
|
|
114007
|
+
source: string;
|
|
114008
|
+
total_spent?: {
|
|
114009
|
+
amount_minor: number;
|
|
114010
|
+
currency: string;
|
|
114011
|
+
};
|
|
114012
|
+
};
|
|
113913
114013
|
StoreShopper: {
|
|
113914
114014
|
consents: {
|
|
113915
114015
|
active: boolean;
|
|
@@ -119375,6 +119475,10 @@ export interface components {
|
|
|
119375
119475
|
/** @description The margin a message is CHARGED at: channel_margin_bps raised to the 3x-net credit floor (CREDIT3X). */
|
|
119376
119476
|
readonly effective_channel_margin_bps: number;
|
|
119377
119477
|
line_enabled: boolean;
|
|
119478
|
+
/** @description Managed delivery: e-mails our Amazon SES ACCOUNT may send per UTC day across every organisation. */
|
|
119479
|
+
managed_daily_quota_ses: number;
|
|
119480
|
+
/** @description Managed delivery: e-mails our Telnyx ACCOUNT may send per UTC day across every organisation (1,000 on a new account; a granted rise is an edit). */
|
|
119481
|
+
managed_daily_quota_telnyx: number;
|
|
119378
119482
|
pause_min_sample: number;
|
|
119379
119483
|
pilot_org_ids: string[];
|
|
119380
119484
|
review_approved_org_ids: string[];
|
|
@@ -145862,6 +145966,10 @@ export interface operations {
|
|
|
145862
145966
|
complaint_pause_enabled?: boolean;
|
|
145863
145967
|
/** @description Soft guard: over it staff are alerted, never a pause (10 = 0.1%). */
|
|
145864
145968
|
complaint_warn_bps?: number;
|
|
145969
|
+
/** @description Our SES account's managed sends per UTC day (refusal `managedQuotaInvalid` outside 0..10,000,000). */
|
|
145970
|
+
managed_daily_quota_ses?: number;
|
|
145971
|
+
/** @description Our Telnyx account's managed sends per UTC day (refusal `managedQuotaInvalid` outside 0..10,000,000). */
|
|
145972
|
+
managed_daily_quota_telnyx?: number;
|
|
145865
145973
|
pilot_org_ids?: string[];
|
|
145866
145974
|
/** @description Organisations staff approved to send more e-mail in a month than the review line (`review_monthly_emails`). */
|
|
145867
145975
|
review_approved_org_ids?: string[];
|
|
@@ -214751,6 +214859,12 @@ export interface operations {
|
|
|
214751
214859
|
requestBody: {
|
|
214752
214860
|
content: {
|
|
214753
214861
|
"application/json": {
|
|
214862
|
+
/**
|
|
214863
|
+
* @description Which of our plugins connects. A store holds one active token per plugin; re-connecting one plugin revokes only its own earlier token.
|
|
214864
|
+
* @default zinn-order-updates
|
|
214865
|
+
* @enum {string}
|
|
214866
|
+
*/
|
|
214867
|
+
client?: "zinn-order-updates" | "zinn-campaigns";
|
|
214754
214868
|
code_challenge: string;
|
|
214755
214869
|
/**
|
|
214756
214870
|
* @default S256
|
|
@@ -214974,6 +215088,55 @@ export interface operations {
|
|
|
214974
215088
|
503: components["responses"]["ServiceUnavailable"];
|
|
214975
215089
|
};
|
|
214976
215090
|
};
|
|
215091
|
+
syncStorePeople: {
|
|
215092
|
+
parameters: {
|
|
215093
|
+
query?: never;
|
|
215094
|
+
header?: never;
|
|
215095
|
+
path?: never;
|
|
215096
|
+
cookie?: never;
|
|
215097
|
+
};
|
|
215098
|
+
requestBody: {
|
|
215099
|
+
content: {
|
|
215100
|
+
"application/json": components["schemas"]["StorePeopleBatch"];
|
|
215101
|
+
};
|
|
215102
|
+
};
|
|
215103
|
+
responses: {
|
|
215104
|
+
/** @description Applied. */
|
|
215105
|
+
200: {
|
|
215106
|
+
headers: {
|
|
215107
|
+
[name: string]: unknown;
|
|
215108
|
+
};
|
|
215109
|
+
content: {
|
|
215110
|
+
"application/json": components["schemas"]["StorePeopleSynced"];
|
|
215111
|
+
};
|
|
215112
|
+
};
|
|
215113
|
+
401: components["responses"]["Unauthorized"];
|
|
215114
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
215115
|
+
429: components["responses"]["TooManyRequests"];
|
|
215116
|
+
};
|
|
215117
|
+
};
|
|
215118
|
+
getStorePeopleSummary: {
|
|
215119
|
+
parameters: {
|
|
215120
|
+
query?: never;
|
|
215121
|
+
header?: never;
|
|
215122
|
+
path?: never;
|
|
215123
|
+
cookie?: never;
|
|
215124
|
+
};
|
|
215125
|
+
requestBody?: never;
|
|
215126
|
+
responses: {
|
|
215127
|
+
/** @description The per-source counts and hashes. */
|
|
215128
|
+
200: {
|
|
215129
|
+
headers: {
|
|
215130
|
+
[name: string]: unknown;
|
|
215131
|
+
};
|
|
215132
|
+
content: {
|
|
215133
|
+
"application/json": components["schemas"]["StorePeopleSummary"];
|
|
215134
|
+
};
|
|
215135
|
+
};
|
|
215136
|
+
401: components["responses"]["Unauthorized"];
|
|
215137
|
+
429: components["responses"]["TooManyRequests"];
|
|
215138
|
+
};
|
|
215139
|
+
};
|
|
214977
215140
|
readStoreShopper: {
|
|
214978
215141
|
parameters: {
|
|
214979
215142
|
query?: never;
|
|
@@ -215123,6 +215286,12 @@ export interface operations {
|
|
|
215123
215286
|
requestBody: {
|
|
215124
215287
|
content: {
|
|
215125
215288
|
"application/json": {
|
|
215289
|
+
/**
|
|
215290
|
+
* @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.
|
|
215291
|
+
* @default zinn-order-updates
|
|
215292
|
+
* @enum {string}
|
|
215293
|
+
*/
|
|
215294
|
+
client?: "zinn-order-updates" | "zinn-campaigns";
|
|
215126
215295
|
code: string;
|
|
215127
215296
|
code_verifier: string;
|
|
215128
215297
|
integrations?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1747",
|
|
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>",
|