@zinn-digital/sdk 0.1.1695 → 0.1.1697
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 +75 -0
- package/package.json +1 -1
|
@@ -56998,6 +56998,26 @@ export interface paths {
|
|
|
56998
56998
|
patch?: never;
|
|
56999
56999
|
trace?: never;
|
|
57000
57000
|
};
|
|
57001
|
+
"/v1/store-connect/shopper": {
|
|
57002
|
+
parameters: {
|
|
57003
|
+
query?: never;
|
|
57004
|
+
header?: never;
|
|
57005
|
+
path?: never;
|
|
57006
|
+
cookie?: never;
|
|
57007
|
+
};
|
|
57008
|
+
get?: never;
|
|
57009
|
+
put?: never;
|
|
57010
|
+
/**
|
|
57011
|
+
* The store plugin reads one shopper's text preferences and the last 20 texts this store sent them.
|
|
57012
|
+
* @description Store token only. Feeds the shopper's My Account "Messages" panel (docs/1297 §8.3). The plugin asks only for a number that is the billing phone on one of the signed-in shopper's OWN orders, and lists only the texts whose `ref` is one of those orders (an account phone is typed, so it proves nothing). Scoped to the token's ONE store: another store's consents or texts, even of the same organisation, are never returned. `consents` is every channel + purpose this number has at this store (`active: false` once withdrawn); `messages` holds only texts that were sent, newest first, at most 20. POST so the phone number never appears in a URL or a log. A preference change is posted back to `recordStoreConsents` (`withdrawn: true` to stop).
|
|
57013
|
+
*/
|
|
57014
|
+
post: operations["readStoreShopper"];
|
|
57015
|
+
delete?: never;
|
|
57016
|
+
options?: never;
|
|
57017
|
+
head?: never;
|
|
57018
|
+
patch?: never;
|
|
57019
|
+
trace?: never;
|
|
57020
|
+
};
|
|
57001
57021
|
"/v1/store-connect/status": {
|
|
57002
57022
|
parameters: {
|
|
57003
57023
|
query?: never;
|
|
@@ -112436,6 +112456,34 @@ export interface components {
|
|
|
112436
112456
|
/** @description Events already handled (never sent twice). */
|
|
112437
112457
|
duplicates: number;
|
|
112438
112458
|
};
|
|
112459
|
+
StoreShopper: {
|
|
112460
|
+
consents: {
|
|
112461
|
+
active: boolean;
|
|
112462
|
+
/** Format: date-time */
|
|
112463
|
+
changed_at: string;
|
|
112464
|
+
/** @enum {string} */
|
|
112465
|
+
channel: "sms" | "whatsapp";
|
|
112466
|
+
/** @enum {string} */
|
|
112467
|
+
purpose: "updates" | "marketing";
|
|
112468
|
+
}[];
|
|
112469
|
+
messages: {
|
|
112470
|
+
/** @enum {string} */
|
|
112471
|
+
channel: "sms" | "whatsapp";
|
|
112472
|
+
/** @description The event kind, e.g. order_received, order_shipped. */
|
|
112473
|
+
kind: string;
|
|
112474
|
+
/** @description The language the text went out in. */
|
|
112475
|
+
locale: string;
|
|
112476
|
+
order_number: string;
|
|
112477
|
+
ref: string;
|
|
112478
|
+
/** Format: date-time */
|
|
112479
|
+
sent_at: string;
|
|
112480
|
+
}[];
|
|
112481
|
+
phone: string;
|
|
112482
|
+
};
|
|
112483
|
+
StoreShopperQuery: {
|
|
112484
|
+
/** @description E.164, the signed-in shopper's own number. */
|
|
112485
|
+
phone: string;
|
|
112486
|
+
};
|
|
112439
112487
|
StoreSupportTicket: {
|
|
112440
112488
|
/** Format: date-time */
|
|
112441
112489
|
created_at: string;
|
|
@@ -212074,6 +212122,33 @@ export interface operations {
|
|
|
212074
212122
|
503: components["responses"]["ServiceUnavailable"];
|
|
212075
212123
|
};
|
|
212076
212124
|
};
|
|
212125
|
+
readStoreShopper: {
|
|
212126
|
+
parameters: {
|
|
212127
|
+
query?: never;
|
|
212128
|
+
header?: never;
|
|
212129
|
+
path?: never;
|
|
212130
|
+
cookie?: never;
|
|
212131
|
+
};
|
|
212132
|
+
requestBody: {
|
|
212133
|
+
content: {
|
|
212134
|
+
"application/json": components["schemas"]["StoreShopperQuery"];
|
|
212135
|
+
};
|
|
212136
|
+
};
|
|
212137
|
+
responses: {
|
|
212138
|
+
/** @description The shopper's preferences and recent texts. */
|
|
212139
|
+
200: {
|
|
212140
|
+
headers: {
|
|
212141
|
+
[name: string]: unknown;
|
|
212142
|
+
};
|
|
212143
|
+
content: {
|
|
212144
|
+
"application/json": components["schemas"]["StoreShopper"];
|
|
212145
|
+
};
|
|
212146
|
+
};
|
|
212147
|
+
401: components["responses"]["Unauthorized"];
|
|
212148
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
212149
|
+
429: components["responses"]["TooManyRequests"];
|
|
212150
|
+
};
|
|
212151
|
+
};
|
|
212077
212152
|
getStoreConnectStatus: {
|
|
212078
212153
|
parameters: {
|
|
212079
212154
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1697",
|
|
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>",
|