@zinn-digital/sdk 0.1.1668 → 0.1.1669
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 +158 -0
- package/package.json +1 -1
|
@@ -56567,6 +56567,46 @@ export interface paths {
|
|
|
56567
56567
|
patch?: never;
|
|
56568
56568
|
trace?: never;
|
|
56569
56569
|
};
|
|
56570
|
+
"/v1/store-connect/consents": {
|
|
56571
|
+
parameters: {
|
|
56572
|
+
query?: never;
|
|
56573
|
+
header?: never;
|
|
56574
|
+
path?: never;
|
|
56575
|
+
cookie?: never;
|
|
56576
|
+
};
|
|
56577
|
+
get?: never;
|
|
56578
|
+
put?: never;
|
|
56579
|
+
/**
|
|
56580
|
+
* The store plugin records the shopper's checkout opt-ins, per channel and purpose.
|
|
56581
|
+
* @description Store token only. A batch of 1-100 ticks (docs/1297 §8, §9), one row per phone + channel + purpose, upserted. `updates` (order updates, transactional) never puts a shopper into a Campaigns list or marketing send; `marketing` is kept for the store to use by choice. `withdrawn: true` records an un-tick or a STOP. `evidence` keeps the wording the shopper saw (at most 10 keys).
|
|
56582
|
+
*/
|
|
56583
|
+
post: operations["recordStoreConsents"];
|
|
56584
|
+
delete?: never;
|
|
56585
|
+
options?: never;
|
|
56586
|
+
head?: never;
|
|
56587
|
+
patch?: never;
|
|
56588
|
+
trace?: never;
|
|
56589
|
+
};
|
|
56590
|
+
"/v1/store-connect/events": {
|
|
56591
|
+
parameters: {
|
|
56592
|
+
query?: never;
|
|
56593
|
+
header?: never;
|
|
56594
|
+
path?: never;
|
|
56595
|
+
cookie?: never;
|
|
56596
|
+
};
|
|
56597
|
+
get?: never;
|
|
56598
|
+
put?: never;
|
|
56599
|
+
/**
|
|
56600
|
+
* The store plugin posts order events; each new one sends the shopper an update in their language.
|
|
56601
|
+
* @description Store token only (`Authorization: Bearer zou_…`). A batch of 1-100 events (docs/1297 §4.4). `id` is the plugin's idempotency key (`<site_uuid>:<integration>:<order>:<kind>:<seq>`): a known key inserts nothing and never sends twice (`duplicates`). Each new event starts one durable send that picks the language (the shopper's `locale`, then the store's first language, then English), checks the shopper's order-updates consent and every Campaigns guard (line and channel switches, good standing, STOP opt-out, spike pause, own sender, prepaid credit), and records its outcome on the event. A kind with no template is stored and skipped. 503 when the workflow service is down: the rows are kept and a retry of the same batch starts them.
|
|
56602
|
+
*/
|
|
56603
|
+
post: operations["ingestStoreEvents"];
|
|
56604
|
+
delete?: never;
|
|
56605
|
+
options?: never;
|
|
56606
|
+
head?: never;
|
|
56607
|
+
patch?: never;
|
|
56608
|
+
trace?: never;
|
|
56609
|
+
};
|
|
56570
56610
|
"/v1/store-connect/status": {
|
|
56571
56611
|
parameters: {
|
|
56572
56612
|
query?: never;
|
|
@@ -111508,6 +111548,29 @@ export interface components {
|
|
|
111508
111548
|
/** @description Zinn® Campaigns is open for this org. */
|
|
111509
111549
|
campaigns_open: boolean;
|
|
111510
111550
|
};
|
|
111551
|
+
StoreConsentBatch: {
|
|
111552
|
+
consents: components["schemas"]["StoreConsentInput"][];
|
|
111553
|
+
};
|
|
111554
|
+
StoreConsentInput: {
|
|
111555
|
+
/** Format: date-time */
|
|
111556
|
+
captured_at: string;
|
|
111557
|
+
/** @enum {string} */
|
|
111558
|
+
channel: "sms" | "whatsapp";
|
|
111559
|
+
evidence?: {
|
|
111560
|
+
[key: string]: string;
|
|
111561
|
+
};
|
|
111562
|
+
/** @description E.164. */
|
|
111563
|
+
phone: string;
|
|
111564
|
+
/** @enum {string} */
|
|
111565
|
+
purpose: "updates" | "marketing";
|
|
111566
|
+
/** @description The order the tick was given on. */
|
|
111567
|
+
ref?: string;
|
|
111568
|
+
/** @default false */
|
|
111569
|
+
withdrawn: boolean;
|
|
111570
|
+
};
|
|
111571
|
+
StoreConsentsRecorded: {
|
|
111572
|
+
recorded: number;
|
|
111573
|
+
};
|
|
111511
111574
|
StoredVideo: {
|
|
111512
111575
|
/** Format: date-time */
|
|
111513
111576
|
created_at?: string | null;
|
|
@@ -111524,6 +111587,46 @@ export interface components {
|
|
|
111524
111587
|
StoredVideoList: {
|
|
111525
111588
|
videos: components["schemas"]["StoredVideo"][];
|
|
111526
111589
|
};
|
|
111590
|
+
StoreEventBatch: {
|
|
111591
|
+
events: components["schemas"]["StoreEventInput"][];
|
|
111592
|
+
};
|
|
111593
|
+
StoreEventInput: {
|
|
111594
|
+
customer?: {
|
|
111595
|
+
first_name?: string;
|
|
111596
|
+
/** @description E.164. */
|
|
111597
|
+
phone?: string;
|
|
111598
|
+
};
|
|
111599
|
+
/** @description The idempotency key. */
|
|
111600
|
+
id: string;
|
|
111601
|
+
integration?: string;
|
|
111602
|
+
/** @description order_received, payment_confirmed, on_hold, shipped, completed, ready_for_pickup, payment_failed, cancelled or refunded; any other kind is stored and skipped. */
|
|
111603
|
+
kind: string;
|
|
111604
|
+
/** @description The shopper's language (BCP 47), e.g. ar. */
|
|
111605
|
+
locale?: string;
|
|
111606
|
+
/** Format: date-time */
|
|
111607
|
+
occurred_at: string;
|
|
111608
|
+
order_number?: string;
|
|
111609
|
+
pay_url?: string;
|
|
111610
|
+
ref?: string;
|
|
111611
|
+
refund?: {
|
|
111612
|
+
currency: string;
|
|
111613
|
+
/** @description Integer minor units. */
|
|
111614
|
+
minor: number;
|
|
111615
|
+
};
|
|
111616
|
+
store_name?: string;
|
|
111617
|
+
totals?: {
|
|
111618
|
+
currency: string;
|
|
111619
|
+
/** @description Integer minor units. */
|
|
111620
|
+
minor: number;
|
|
111621
|
+
};
|
|
111622
|
+
tracking_url?: string;
|
|
111623
|
+
};
|
|
111624
|
+
StoreEventsAccepted: {
|
|
111625
|
+
/** @description Events being sent now. */
|
|
111626
|
+
accepted: number;
|
|
111627
|
+
/** @description Events already handled (never sent twice). */
|
|
111628
|
+
duplicates: number;
|
|
111629
|
+
};
|
|
111527
111630
|
StoreSupportTicket: {
|
|
111528
111631
|
/** Format: date-time */
|
|
111529
111632
|
created_at: string;
|
|
@@ -210296,6 +210399,61 @@ export interface operations {
|
|
|
210296
210399
|
404: components["responses"]["NotFound"];
|
|
210297
210400
|
};
|
|
210298
210401
|
};
|
|
210402
|
+
recordStoreConsents: {
|
|
210403
|
+
parameters: {
|
|
210404
|
+
query?: never;
|
|
210405
|
+
header?: never;
|
|
210406
|
+
path?: never;
|
|
210407
|
+
cookie?: never;
|
|
210408
|
+
};
|
|
210409
|
+
requestBody: {
|
|
210410
|
+
content: {
|
|
210411
|
+
"application/json": components["schemas"]["StoreConsentBatch"];
|
|
210412
|
+
};
|
|
210413
|
+
};
|
|
210414
|
+
responses: {
|
|
210415
|
+
/** @description Recorded. */
|
|
210416
|
+
200: {
|
|
210417
|
+
headers: {
|
|
210418
|
+
[name: string]: unknown;
|
|
210419
|
+
};
|
|
210420
|
+
content: {
|
|
210421
|
+
"application/json": components["schemas"]["StoreConsentsRecorded"];
|
|
210422
|
+
};
|
|
210423
|
+
};
|
|
210424
|
+
401: components["responses"]["Unauthorized"];
|
|
210425
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
210426
|
+
429: components["responses"]["TooManyRequests"];
|
|
210427
|
+
};
|
|
210428
|
+
};
|
|
210429
|
+
ingestStoreEvents: {
|
|
210430
|
+
parameters: {
|
|
210431
|
+
query?: never;
|
|
210432
|
+
header?: never;
|
|
210433
|
+
path?: never;
|
|
210434
|
+
cookie?: never;
|
|
210435
|
+
};
|
|
210436
|
+
requestBody: {
|
|
210437
|
+
content: {
|
|
210438
|
+
"application/json": components["schemas"]["StoreEventBatch"];
|
|
210439
|
+
};
|
|
210440
|
+
};
|
|
210441
|
+
responses: {
|
|
210442
|
+
/** @description Accepted; new events are being sent. */
|
|
210443
|
+
202: {
|
|
210444
|
+
headers: {
|
|
210445
|
+
[name: string]: unknown;
|
|
210446
|
+
};
|
|
210447
|
+
content: {
|
|
210448
|
+
"application/json": components["schemas"]["StoreEventsAccepted"];
|
|
210449
|
+
};
|
|
210450
|
+
};
|
|
210451
|
+
401: components["responses"]["Unauthorized"];
|
|
210452
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
210453
|
+
429: components["responses"]["TooManyRequests"];
|
|
210454
|
+
503: components["responses"]["ServiceUnavailable"];
|
|
210455
|
+
};
|
|
210456
|
+
};
|
|
210299
210457
|
getStoreConnectStatus: {
|
|
210300
210458
|
parameters: {
|
|
210301
210459
|
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.1669",
|
|
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>",
|