@zinn-digital/sdk 0.1.1757 → 0.1.1759
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 +115 -0
- package/package.json +1 -1
|
@@ -60451,6 +60451,30 @@ export interface paths {
|
|
|
60451
60451
|
patch?: never;
|
|
60452
60452
|
trace?: never;
|
|
60453
60453
|
};
|
|
60454
|
+
"/v1/webhooks/campaigns/whatsapp": {
|
|
60455
|
+
parameters: {
|
|
60456
|
+
query?: never;
|
|
60457
|
+
header?: never;
|
|
60458
|
+
path?: never;
|
|
60459
|
+
cookie?: never;
|
|
60460
|
+
};
|
|
60461
|
+
/**
|
|
60462
|
+
* Meta's webhook verify-token handshake for WhatsApp.
|
|
60463
|
+
* @description **Unauthenticated by design.** With `hub.mode=subscribe` and `hub.verify_token` equal to the token we gave Meta when the app was subscribed, answers `hub.challenge` as plain text; anything else is `403`, and `503` while no token is configured.
|
|
60464
|
+
*/
|
|
60465
|
+
get: operations["verifyCampaignsWhatsappWebhook"];
|
|
60466
|
+
put?: never;
|
|
60467
|
+
/**
|
|
60468
|
+
* WhatsApp delivery receipts and STOP replies from Meta.
|
|
60469
|
+
* @description **Unauthenticated by design**: `X-Hub-Signature-256` (`sha256=` + the HMAC-SHA256 of the raw body under the secret of one of our Meta apps) is the authentication — `401` when it is missing or does not verify, `503` while no app secret is configured (never accepted unverified). A verified body is queued for a background run and acknowledged at once; `503` when it cannot be queued (Meta retries). The run records each `statuses[]` entry on the paid WhatsApp message with that id (`delivered` or `read`, both recorded as delivered, or `failed` with Meta's error code; the first receipt stands, so a redelivery is a no-op); a `failed` with code `131050` (the person stopped marketing messages in WhatsApp) opts the number out. A `messages[]` entry whose whole text or quick-reply button is a STOP word (STOP, UNSUBSCRIBE, "Stop promotions", ...) opts the number out of WhatsApp for the account whose connected number it reached (for our own number, every account holding it as a contact); START removes a reply opt-out. Every later WhatsApp send to that number is refused as `suppressed`.
|
|
60470
|
+
*/
|
|
60471
|
+
post: operations["receiveCampaignsWhatsappWebhook"];
|
|
60472
|
+
delete?: never;
|
|
60473
|
+
options?: never;
|
|
60474
|
+
head?: never;
|
|
60475
|
+
patch?: never;
|
|
60476
|
+
trace?: never;
|
|
60477
|
+
};
|
|
60454
60478
|
"/v1/webhooks/demo-budget": {
|
|
60455
60479
|
parameters: {
|
|
60456
60480
|
query?: never;
|
|
@@ -220121,6 +220145,97 @@ export interface operations {
|
|
|
220121
220145
|
};
|
|
220122
220146
|
};
|
|
220123
220147
|
};
|
|
220148
|
+
verifyCampaignsWhatsappWebhook: {
|
|
220149
|
+
parameters: {
|
|
220150
|
+
query?: {
|
|
220151
|
+
"hub.challenge"?: string;
|
|
220152
|
+
"hub.mode"?: string;
|
|
220153
|
+
"hub.verify_token"?: string;
|
|
220154
|
+
};
|
|
220155
|
+
header?: never;
|
|
220156
|
+
path?: never;
|
|
220157
|
+
cookie?: never;
|
|
220158
|
+
};
|
|
220159
|
+
requestBody?: never;
|
|
220160
|
+
responses: {
|
|
220161
|
+
/** @description The challenge, echoed. */
|
|
220162
|
+
200: {
|
|
220163
|
+
headers: {
|
|
220164
|
+
[name: string]: unknown;
|
|
220165
|
+
};
|
|
220166
|
+
content: {
|
|
220167
|
+
"text/plain": string;
|
|
220168
|
+
};
|
|
220169
|
+
};
|
|
220170
|
+
/** @description Not our handshake. */
|
|
220171
|
+
403: {
|
|
220172
|
+
headers: {
|
|
220173
|
+
[name: string]: unknown;
|
|
220174
|
+
};
|
|
220175
|
+
content?: never;
|
|
220176
|
+
};
|
|
220177
|
+
/** @description No verify token is configured. */
|
|
220178
|
+
503: {
|
|
220179
|
+
headers: {
|
|
220180
|
+
[name: string]: unknown;
|
|
220181
|
+
};
|
|
220182
|
+
content?: never;
|
|
220183
|
+
};
|
|
220184
|
+
};
|
|
220185
|
+
};
|
|
220186
|
+
receiveCampaignsWhatsappWebhook: {
|
|
220187
|
+
parameters: {
|
|
220188
|
+
query?: never;
|
|
220189
|
+
header?: {
|
|
220190
|
+
"X-Hub-Signature-256"?: string;
|
|
220191
|
+
};
|
|
220192
|
+
path?: never;
|
|
220193
|
+
cookie?: never;
|
|
220194
|
+
};
|
|
220195
|
+
requestBody: {
|
|
220196
|
+
content: {
|
|
220197
|
+
"application/json": {
|
|
220198
|
+
[key: string]: unknown;
|
|
220199
|
+
};
|
|
220200
|
+
};
|
|
220201
|
+
};
|
|
220202
|
+
responses: {
|
|
220203
|
+
/** @description Verified and queued. */
|
|
220204
|
+
200: {
|
|
220205
|
+
headers: {
|
|
220206
|
+
[name: string]: unknown;
|
|
220207
|
+
};
|
|
220208
|
+
content: {
|
|
220209
|
+
"application/json": {
|
|
220210
|
+
ok: boolean;
|
|
220211
|
+
/** @description The background run handling this body. */
|
|
220212
|
+
queued: string;
|
|
220213
|
+
};
|
|
220214
|
+
};
|
|
220215
|
+
};
|
|
220216
|
+
/** @description Not a JSON object. */
|
|
220217
|
+
400: {
|
|
220218
|
+
headers: {
|
|
220219
|
+
[name: string]: unknown;
|
|
220220
|
+
};
|
|
220221
|
+
content?: never;
|
|
220222
|
+
};
|
|
220223
|
+
/** @description The signature is missing or did not verify. */
|
|
220224
|
+
401: {
|
|
220225
|
+
headers: {
|
|
220226
|
+
[name: string]: unknown;
|
|
220227
|
+
};
|
|
220228
|
+
content?: never;
|
|
220229
|
+
};
|
|
220230
|
+
/** @description No app secret is configured, or the event could not be queued. */
|
|
220231
|
+
503: {
|
|
220232
|
+
headers: {
|
|
220233
|
+
[name: string]: unknown;
|
|
220234
|
+
};
|
|
220235
|
+
content?: never;
|
|
220236
|
+
};
|
|
220237
|
+
};
|
|
220238
|
+
};
|
|
220124
220239
|
reportDemoBudgetExhausted: {
|
|
220125
220240
|
parameters: {
|
|
220126
220241
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1759",
|
|
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>",
|