@pilot-status/sdk 0.26.0 → 0.28.0
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/CHANGELOG.md +50 -0
- package/README.md +141 -5
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/resources/ads.d.ts +23 -12
- package/dist/resources/ads.d.ts.map +1 -1
- package/dist/resources/ads.js +28 -12
- package/dist/resources/ads.js.map +1 -1
- package/dist/resources/api-keys.d.ts +52 -4
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +68 -3
- package/dist/resources/api-keys.js.map +1 -1
- package/dist/resources/flows.d.ts +56 -1
- package/dist/resources/flows.d.ts.map +1 -1
- package/dist/resources/flows.js +93 -0
- package/dist/resources/flows.js.map +1 -1
- package/dist/resources/knowledge.d.ts +14 -0
- package/dist/resources/knowledge.d.ts.map +1 -0
- package/dist/resources/knowledge.js +27 -0
- package/dist/resources/knowledge.js.map +1 -0
- package/dist/resources/lead-pages.d.ts +7 -3
- package/dist/resources/lead-pages.d.ts.map +1 -1
- package/dist/resources/lead-pages.js +9 -2
- package/dist/resources/lead-pages.js.map +1 -1
- package/dist/resources/messages.d.ts +23 -1
- package/dist/resources/messages.d.ts.map +1 -1
- package/dist/resources/messages.js +34 -0
- package/dist/resources/messages.js.map +1 -1
- package/dist/resources/numbers.d.ts +36 -1
- package/dist/resources/numbers.d.ts.map +1 -1
- package/dist/resources/numbers.js +67 -0
- package/dist/resources/numbers.js.map +1 -1
- package/dist/resources/phone-lines.d.ts +67 -1
- package/dist/resources/phone-lines.d.ts.map +1 -1
- package/dist/resources/phone-lines.js +116 -0
- package/dist/resources/phone-lines.js.map +1 -1
- package/dist/resources/workspace-webhooks.d.ts +17 -1
- package/dist/resources/workspace-webhooks.d.ts.map +1 -1
- package/dist/resources/workspace-webhooks.js +21 -0
- package/dist/resources/workspace-webhooks.js.map +1 -1
- package/dist/resources/workspace.d.ts +47 -9
- package/dist/resources/workspace.d.ts.map +1 -1
- package/dist/resources/workspace.js +81 -8
- package/dist/resources/workspace.js.map +1 -1
- package/dist/types.d.ts +352 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/user-agent.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pilot-status/sdk`.
|
|
4
4
|
|
|
5
|
+
## 0.28.0 - 2026-11-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Ads are per OFFICIAL number. `ads.listAccounts({ whatsappNumberId? })` and
|
|
10
|
+
`leadPages.list({ whatsappNumberId? })` narrow to one number (`?whatsappNumberId=`).
|
|
11
|
+
`ads.linkAccount(adAccountId, { whatsappNumberId? })` names the number the account is
|
|
12
|
+
linked to: REQUIRED with an account-wide (workspace) key; a number-scoped key defaults to its
|
|
13
|
+
own number. The ad-account routes now accept number-scoped keys.
|
|
14
|
+
- `LinkedAdAccount.whatsappNumberId` and `AdAccountLinkResult.link.whatsappNumberId`
|
|
15
|
+
(`string | null`; `null` = legacy workspace-wide link).
|
|
16
|
+
- Error code constants `ADS_REQUIRE_OFFICIAL_NUMBER` (422: the number is not official) and
|
|
17
|
+
`AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER` (409: the account is already linked to another number
|
|
18
|
+
of the workspace; the body carries its `whatsappNumberId`).
|
|
19
|
+
- Types `AdAccountListParams`, `AdAccountLinkOptions`, `LeadPageListParams`.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `ads.unlinkAccount()` with a number-scoped key only reaches that number's accounts (404
|
|
24
|
+
`NOT_FOUND` otherwise).
|
|
25
|
+
|
|
26
|
+
## 0.27.0 - 2026-11-27
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `knowledge.search({ query, type?, language?, limit? })` → POST `/v1/knowledge/search`: searches the API docs, the blog and the
|
|
31
|
+
public site pages (pt-BR, en, es) and returns `{ results: [{ title, url, type, language, updated, snippet, score }] }`
|
|
32
|
+
(types `KnowledgeSearchParams`, `KnowledgeSearchResult`). Any key; `type` is `doc` | `blog` | `page`; `limit` 1–20, default 5.
|
|
33
|
+
- Named number keys: `apiKeys.listNumberKeys/createNumberKey/revokeNumberKey` → GET/POST `/v1/numbers/{numberId}/api-keys`, DELETE
|
|
34
|
+
`/v1/numbers/{numberId}/api-keys/{keyId}` (raw key shown once; max 20 per number incl. default;
|
|
35
|
+
the default key cannot be revoked here: 409 `primary_key_use_regenerate`). Regenerating a number
|
|
36
|
+
key now revokes ONLY the default number key; named keys survive.
|
|
37
|
+
- `workspace.webhooks.rotateSecret(id)` (POST `/v1/workspace/webhooks/{id}/rotate-secret`, no body) →
|
|
38
|
+
`{ id, hasSecret: true, secret }` (type `WorkspaceWebhookRotateSecretResult`). The new `plwh_` secret is
|
|
39
|
+
returned once and the old one stops working immediately. Works with an account key + `workspaceId` /
|
|
40
|
+
`withWorkspace` (`x-workspace-id`).
|
|
41
|
+
- Methods for the remaining `/v1` endpoints:
|
|
42
|
+
- `messages.unreadCounts()` (GET `/v1/messages/unread/counts`), `messages.resend(id)` (POST `/v1/messages/{id}/resend`).
|
|
43
|
+
- `apiKeys.regenerate()` (POST `/v1/api-keys/regenerate`) — **revokes the calling key**.
|
|
44
|
+
- `workspace.members.invite/update/remove/resend/updateNumbers` (`/v1/workspace/members*`). Member writes
|
|
45
|
+
were previously documented as OAuth-only; the backend accepts an account key (`ps_account_`), classic
|
|
46
|
+
`ps_` keys get 403 `MACHINE_CREDENTIAL_CANNOT_MANAGE_MEMBERS`.
|
|
47
|
+
- `flows.getJson`, `flows.preview`, `flows.listTraces`, `flows.getEndpoint`/`setEndpoint`/`registerEndpoint`,
|
|
48
|
+
`flows.syncFromMeta`.
|
|
49
|
+
- `phoneLines.list/get/available/buy/cancel` and `listActivations/createActivation/getActivation/cancelActivation`
|
|
50
|
+
(`buy` charges and requires an idempotency key; `cancel` has no refund).
|
|
51
|
+
- `numbers.contacts.block/unblock` (POST/DELETE `/v1/numbers/{id}/contacts/{phone}/block`, Meta + QR Code) and
|
|
52
|
+
`numbers.chats.archive/unarchive` (POST/DELETE `/v1/numbers/{id}/chats/{jid}/archive`, QR Code only: official
|
|
53
|
+
numbers get 422 `NOT_AVAILABLE_FOR_OFFICIAL_NUMBERS`).
|
|
54
|
+
|
|
5
55
|
## 0.26.0 - 2026-11-24
|
|
6
56
|
|
|
7
57
|
### Added
|
package/README.md
CHANGED
|
@@ -134,6 +134,24 @@ for (const k of keys) {
|
|
|
134
134
|
// NUMBER-scoped: that number's masked keys
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
// Rotate THE key of the calling scope (POST /v1/api-keys/regenerate).
|
|
139
|
+
// ⛔ It REVOKES THE KEY YOU ARE CALLING WITH: the old key stops working immediately.
|
|
140
|
+
// Store `fresh.key` (shown once) and build a new client with it.
|
|
141
|
+
const fresh = await client.apiKeys.regenerate();
|
|
142
|
+
const next = new PilotStatusClient({ apiKey: fresh.key });
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
> **Rotating without downtime.** `regenerateNumber` revokes ONLY the number's default key, immediately
|
|
147
|
+
> (named number keys survive; `regenerate` revokes the calling key). Zero-downtime: create a named number
|
|
148
|
+
> key, switch to it, then regenerate/revoke the old one.
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
// Named number keys (workspace key, or account key + workspaceId; number keys get 403).
|
|
152
|
+
const { data } = await client.apiKeys.listNumberKeys("wn_1");
|
|
153
|
+
const { apiKey } = await client.apiKeys.createNumberKey("wn_1", { name: "ci" }); // apiKey.key shown once
|
|
154
|
+
await client.apiKeys.revokeNumberKey("wn_1", apiKey.id); // 409 primary_key_use_regenerate for the default key
|
|
137
155
|
```
|
|
138
156
|
|
|
139
157
|
### Workspace
|
|
@@ -152,6 +170,34 @@ await client.workspace.updateSettings({ mainTimezone: "America/Sao_Paulo", mainL
|
|
|
152
170
|
// the currency and the billing mode do not change through the API
|
|
153
171
|
```
|
|
154
172
|
|
|
173
|
+
#### Managing members (account key only)
|
|
174
|
+
|
|
175
|
+
Member writes need a USER on the wire: use an **account key** (`ps_account_…` +
|
|
176
|
+
`workspaceId`). Every classic `ps_` key gets `403 MACHINE_CREDENTIAL_CANNOT_MANAGE_MEMBERS`;
|
|
177
|
+
the user's live role decides the rest.
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
const account = new PilotStatusClient({ apiKey: "ps_account_...", workspaceId: "ws_1" });
|
|
181
|
+
|
|
182
|
+
// Invite (role defaults to AGENT). sendEmail:false → no email, inviteUrl returned ONCE
|
|
183
|
+
const { member, inviteUrl } = await account.workspace.members.invite({
|
|
184
|
+
email: "ana@acme.com.br",
|
|
185
|
+
role: "AGENT",
|
|
186
|
+
allowedNumberIds: ["wn_1"], // [] or omitted = every number
|
|
187
|
+
sendEmail: false,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
// Lost the link? Resend ALWAYS rotates the token (the old link dies)
|
|
191
|
+
await account.workspace.members.resend(member.id, { sendEmail: false });
|
|
192
|
+
|
|
193
|
+
await account.workspace.members.update(member.id, { role: "ADMIN" }); // OWNER only
|
|
194
|
+
await account.workspace.members.updateNumbers(member.id, ["wn_1", "wn_2"]); // [] = all numbers
|
|
195
|
+
|
|
196
|
+
// Remove an active member / revoke a pending invite. A member who created live API keys
|
|
197
|
+
// stops with 409 MEMBER_HAS_API_KEYS until you say what to do with them:
|
|
198
|
+
await account.workspace.members.remove(member.id, { apiKeyAction: "revoke" }); // or "keep"
|
|
199
|
+
```
|
|
200
|
+
|
|
155
201
|
#### Archive and ownership transfer (OWNER, account key only — 0.23.0)
|
|
156
202
|
|
|
157
203
|
Both need the OWNER on the wire: use the owner's **account key** with `workspaceId`
|
|
@@ -172,11 +218,8 @@ const { name } = await owner.workspace.get();
|
|
|
172
218
|
await owner.workspace.archive(name!); // { archived: true, archivedAt } — 400 CONFIRMATION_MISMATCH otherwise
|
|
173
219
|
```
|
|
174
220
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
`x-api-key` request has none. Those calls answer
|
|
178
|
-
`403 MACHINE_CREDENTIAL_CANNOT_MANAGE_MEMBERS` for any `ps_` key, so this SDK
|
|
179
|
-
deliberately does not expose them — use the dashboard or an OAuth connector.
|
|
221
|
+
Member writes (invite, resend, role, numbers, removal) are under *Managing members*
|
|
222
|
+
above: they need an account key, never a classic `ps_` key.
|
|
180
223
|
|
|
181
224
|
### Numbers (WhatsApp)
|
|
182
225
|
|
|
@@ -328,6 +371,23 @@ for (const n of blocked) {
|
|
|
328
371
|
|
|
329
372
|
The SDK never retries a POST on its own, so `pay()` sends exactly one request.
|
|
330
373
|
|
|
374
|
+
#### Blocking contacts and archiving chats
|
|
375
|
+
|
|
376
|
+
```ts
|
|
377
|
+
// Block / unblock — QR (Evolution GO) AND official (Meta) numbers. Needs contacts:manage.
|
|
378
|
+
await client.numbers.contacts.block("wn_1", "+5511999998888"); // { success, blocked: true, ... }
|
|
379
|
+
await client.numbers.contacts.unblock("wn_1", "+5511999998888");
|
|
380
|
+
|
|
381
|
+
// Archive / unarchive — QR (Evolution GO) numbers ONLY. `jid` is a phone or a full jid.
|
|
382
|
+
await client.numbers.chats.archive("wn_1", "5511999998888");
|
|
383
|
+
await client.numbers.chats.unarchive("wn_1", "120363000000000000@g.us");
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
On an official (Meta) number `archive()`/`unarchive()` throw `UnprocessableEntityError`
|
|
387
|
+
(422 `NOT_AVAILABLE_FOR_OFFICIAL_NUMBERS`: Meta has no archive API); an Evolution V2 number
|
|
388
|
+
gets 422 `FEATURE_NOT_SUPPORTED`. Path segments are URL-encoded by the SDK. Webhooks receive
|
|
389
|
+
`contact.blocked` / `contact.unblocked` / `chat.archived` / `chat.unarchived`.
|
|
390
|
+
|
|
331
391
|
## Messages, conversations and the 24h window
|
|
332
392
|
|
|
333
393
|
```ts
|
|
@@ -337,6 +397,14 @@ const log = await client.messages.list({ status: "FAILED,SENT", direction: "out"
|
|
|
337
397
|
// Unread inbound — `total` is the real count, NOT messages.length
|
|
338
398
|
const { total, messages } = await client.messages.unread();
|
|
339
399
|
|
|
400
|
+
// Unread count PER NUMBER in one call (omit the ids = every number the key reaches; max 100)
|
|
401
|
+
const counts = await client.messages.unreadCounts({ whatsappNumberIds: ["wn_1", "wn_2"] });
|
|
402
|
+
// { byNumber: [{ whatsappNumberId, number, displayName, total }], total }
|
|
403
|
+
|
|
404
|
+
// Resend a FAILED or CANCELED message (number-scoped key) — a NEW message, 202
|
|
405
|
+
const resent = await client.messages.resend("msg_123"); // { id, status, ..., originalMessageId }
|
|
406
|
+
// any other status is 409; a second resend of the same message within 120 s is refused
|
|
407
|
+
|
|
340
408
|
// Read receipts and typing indicators, without sending a message
|
|
341
409
|
await client.messages.markRead("+5511999999999");
|
|
342
410
|
await client.messages.typing({ to: "+5511999999999", state: "typing" });
|
|
@@ -459,6 +527,32 @@ const { released, circuitOpen } = await client.webhooks.reactivate(hook.id);
|
|
|
459
527
|
`deliveryTimeoutMs` (per-destination delivery deadline) is writable by platform staff
|
|
460
528
|
only — anyone else gets `403 DELIVERY_TIMEOUT_STAFF_ONLY` — so the SDK does not send it.
|
|
461
529
|
|
|
530
|
+
## WhatsApp Flows: preview, JSON, endpoint, traces and sync
|
|
531
|
+
|
|
532
|
+
Number-scoped key of a Meta number; `{id}` is the LOCAL id from `client.flows.list()`.
|
|
533
|
+
|
|
534
|
+
```ts
|
|
535
|
+
// Read the Flow JSON back (flows:read); uploadJson() is the write
|
|
536
|
+
const { flowJson } = await client.flows.getJson(flowId);
|
|
537
|
+
|
|
538
|
+
// A preview link (works on a DRAFT; flows:manage).
|
|
539
|
+
// ⛔ The link needs NO login — anyone holding it sees the Flow; and for a data_exchange
|
|
540
|
+
// Flow it drives your REAL endpoint. invalidate:true kills the previous link.
|
|
541
|
+
const { previewUrl, expiresAt } = await client.flows.preview(flowId, { invalidate: true });
|
|
542
|
+
|
|
543
|
+
// data_exchange wiring (flows:manage)
|
|
544
|
+
const state = await client.flows.getEndpoint(flowId); // { url, hasSecret, endpointUri, metaEndpointUri, drift, warnings }
|
|
545
|
+
const saved = await client.flows.setEndpoint(flowId, { url: "https://api.acme.com/flow", rotateSecret: true });
|
|
546
|
+
// saved.secret = the HMAC secret (store it). url:null removes the destination. This does NOT touch Meta:
|
|
547
|
+
await client.flows.registerEndpoint(flowId); // points the Flow at our proxy ON META ({ confirmOverwrite: true } to replace another)
|
|
548
|
+
|
|
549
|
+
// What our proxy saw on recent exchanges (NOT paginated; ~24 h window, `notice` when empty)
|
|
550
|
+
const { traces } = await client.flows.listTraces(flowId);
|
|
551
|
+
|
|
552
|
+
// Re-read the number's Flows from Meta into the catalogue (429 while one is running)
|
|
553
|
+
const { created, updated, seen, truncated } = await client.flows.syncFromMeta();
|
|
554
|
+
```
|
|
555
|
+
|
|
462
556
|
## Chatwoot, billing and embed sessions
|
|
463
557
|
|
|
464
558
|
```ts
|
|
@@ -640,6 +734,32 @@ is refused. The verification routes also require `phone_lines:purchase`, which o
|
|
|
640
734
|
routes `phone_lines:webhooks` (both ADMIN and up). These routes do not use
|
|
641
735
|
`whatsappNumberId`.
|
|
642
736
|
|
|
737
|
+
### Lines and activation codes
|
|
738
|
+
|
|
739
|
+
```ts
|
|
740
|
+
import { randomUUID } from "node:crypto";
|
|
741
|
+
|
|
742
|
+
const { lines } = await client.phoneLines.list({ includeClosed: true }); // phone_lines:read
|
|
743
|
+
const { line } = await client.phoneLines.get("pl_1");
|
|
744
|
+
|
|
745
|
+
// Search and BUY (OWNER, phone_lines:purchase, approved verification).
|
|
746
|
+
// 💸 buy() CHARGES MONEY: each line is a monthly subscription, charged now.
|
|
747
|
+
const offer = await client.phoneLines.available("11"); // { numbers: [{ number, display }], price, currency }
|
|
748
|
+
const idempotencyKey = randomUUID(); // keep it: a retry after a timeout MUST reuse it
|
|
749
|
+
const { results } = await client.phoneLines.buy([offer.numbers[0].number], { idempotencyKey });
|
|
750
|
+
for (const r of results) if (!r.ok) console.warn(r.number, r.code); // HTTP 200 ≠ success: read each item
|
|
751
|
+
|
|
752
|
+
// 💸 Cancel a line (OWNER). A paid line is NOT refunded and runs to currentPeriodEnd;
|
|
753
|
+
// ⛔ an UNPAID line is returned to the carrier NOW — irreversible.
|
|
754
|
+
await client.phoneLines.cancel("pl_1");
|
|
755
|
+
|
|
756
|
+
// Capture a WhatsApp verification CALL (5-minute window), then poll for the code
|
|
757
|
+
const { activation } = await client.phoneLines.createActivation("pl_1");
|
|
758
|
+
const polled = await client.phoneLines.getActivation(activation.id); // status, code (⛔ a credential)
|
|
759
|
+
await client.phoneLines.cancelActivation("pl_1", activation.id); // ends a WAITING request only (no charge)
|
|
760
|
+
const { activations } = await client.phoneLines.listActivations("pl_1", { limit: 20 });
|
|
761
|
+
```
|
|
762
|
+
|
|
643
763
|
### Workspace verification (unlocks buying lines)
|
|
644
764
|
|
|
645
765
|
```ts
|
|
@@ -788,6 +908,22 @@ const { webhook } = await client.workspace.webhooks.create({
|
|
|
788
908
|
});
|
|
789
909
|
```
|
|
790
910
|
|
|
911
|
+
Lost or leaked the secret? `rotateSecret(id)` (0.27.0, `POST /v1/workspace/webhooks/{id}/rotate-secret`,
|
|
912
|
+
no body) mints a new one and returns it **once**: `{ id, hasSecret: true, secret: "plwh_…" }`.
|
|
913
|
+
⛔ The rotation is immediate, with no overlap — the old secret stops verifying the very next
|
|
914
|
+
delivery, so update your verifier right away.
|
|
915
|
+
|
|
916
|
+
```ts
|
|
917
|
+
// workspace ps_ key, full-workspace OAuth, or an account key + workspace:
|
|
918
|
+
const account = new PilotStatusClient({ apiKey: "ps_account_…", workspaceId: "ws_1" });
|
|
919
|
+
const { secret } = await account.workspace.webhooks.rotateSecret("plw_1"); // sends x-workspace-id
|
|
920
|
+
// another workspace with the same key: account.withWorkspace("ws_2").workspace.webhooks.rotateSecret(id)
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
Errors: 400 `WORKSPACE_ID_REQUIRED` (account key without `workspaceId`), 403
|
|
924
|
+
`WORKSPACE_MEMBERSHIP_REQUIRED` / `NUMBER_SCOPE_NOT_ALLOWED` (`ForbiddenError`), 404
|
|
925
|
+
`WEBHOOK_NOT_FOUND` (`NotFoundError`, also for another workspace's webhook).
|
|
926
|
+
|
|
791
927
|
## Receiving webhooks (verify, then parse)
|
|
792
928
|
|
|
793
929
|
`parseCustomerWebhook` proves the **shape** of an event, nothing else — anyone on
|
package/dist/client.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { NumbersResource } from "./resources/numbers.js";
|
|
|
17
17
|
import { PhoneLinesResource } from "./resources/phone-lines.js";
|
|
18
18
|
import { StoriesResource } from "./resources/stories.js";
|
|
19
19
|
import { ServiceWindowResource } from "./resources/service-window.js";
|
|
20
|
+
import { KnowledgeResource } from "./resources/knowledge.js";
|
|
20
21
|
import { SubscriptionResource } from "./resources/subscription.js";
|
|
21
22
|
import { TemplatesResource } from "./resources/templates.js";
|
|
22
23
|
import { GroupsResource } from "./resources/groups.js";
|
|
@@ -97,6 +98,8 @@ export declare class PilotStatusClient {
|
|
|
97
98
|
/** Meta Lead Ads Pages and Instant Form configuration (`/v1/lead-pages/*`). */
|
|
98
99
|
readonly leadPages: LeadPagesResource;
|
|
99
100
|
readonly serviceWindow: ServiceWindowResource;
|
|
101
|
+
/** Search the docs, the blog and the public pages (`POST /v1/knowledge/search`). */
|
|
102
|
+
readonly knowledge: KnowledgeResource;
|
|
100
103
|
readonly meta: MetaResource;
|
|
101
104
|
readonly webhooks: WebhooksResource;
|
|
102
105
|
readonly branding: BrandingResource;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oB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BAAiB;CAGtD"}
|
package/dist/client.js
CHANGED
|
@@ -17,6 +17,7 @@ import { NumbersResource } from "./resources/numbers.js";
|
|
|
17
17
|
import { PhoneLinesResource } from "./resources/phone-lines.js";
|
|
18
18
|
import { StoriesResource } from "./resources/stories.js";
|
|
19
19
|
import { ServiceWindowResource } from "./resources/service-window.js";
|
|
20
|
+
import { KnowledgeResource } from "./resources/knowledge.js";
|
|
20
21
|
import { SubscriptionResource } from "./resources/subscription.js";
|
|
21
22
|
import { TemplatesResource } from "./resources/templates.js";
|
|
22
23
|
import { GroupsResource } from "./resources/groups.js";
|
|
@@ -51,6 +52,8 @@ export class PilotStatusClient {
|
|
|
51
52
|
/** Meta Lead Ads Pages and Instant Form configuration (`/v1/lead-pages/*`). */
|
|
52
53
|
leadPages;
|
|
53
54
|
serviceWindow;
|
|
55
|
+
/** Search the docs, the blog and the public pages (`POST /v1/knowledge/search`). */
|
|
56
|
+
knowledge;
|
|
54
57
|
meta;
|
|
55
58
|
webhooks;
|
|
56
59
|
branding;
|
|
@@ -102,6 +105,7 @@ export class PilotStatusClient {
|
|
|
102
105
|
this.ads = new AdsResource(http);
|
|
103
106
|
this.leadPages = new LeadPagesResource(http);
|
|
104
107
|
this.serviceWindow = new ServiceWindowResource(http);
|
|
108
|
+
this.knowledge = new KnowledgeResource(http);
|
|
105
109
|
this.meta = new MetaResource(http);
|
|
106
110
|
this.webhooks = new WebhooksResource(http);
|
|
107
111
|
this.branding = new BrandingResource(http);
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,C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AC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,gBAAwB;QACjC,OAAO,IAAI,iBAAiB,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,WAAmB;QAC/B,OAAO,IAAI,iBAAiB,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -110,4 +110,14 @@ export declare class ServerError extends PilotStatusHttpError {
|
|
|
110
110
|
* that case. Adding a branch is how a status becomes catchable.
|
|
111
111
|
*/
|
|
112
112
|
export declare function createHttpError(params: ConstructorParameters<typeof PilotStatusHttpError>[0]): PilotStatusHttpError;
|
|
113
|
+
/**
|
|
114
|
+
* `code` of the 422 every ads / Lead Ads route answers when the number the call is about is
|
|
115
|
+
* not an official (Cloud API / WABA) number: ads exist only on official numbers.
|
|
116
|
+
*/
|
|
117
|
+
export declare const ADS_REQUIRE_OFFICIAL_NUMBER = "ADS_REQUIRE_OFFICIAL_NUMBER";
|
|
118
|
+
/**
|
|
119
|
+
* `code` of the 409 `ads.linkAccount()` answers when the ad account is already linked to
|
|
120
|
+
* ANOTHER number of the workspace; the body carries that number's `whatsappNumberId`.
|
|
121
|
+
*/
|
|
122
|
+
export declare const AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER = "AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER";
|
|
113
123
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAC1B;IACI,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,GACD,OAAO,CAAC;AAEd,qBAAa,gBAAiB,SAAQ,KAAK;IAC9B,IAAI,EAAE,MAAM,CAAsB;gBAE/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAM7D;AAED,qBAAa,oBAAqB,SAAQ,gBAAgB;IAC7C,IAAI,EAAE,MAAM,CAA0B;IAE/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG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
|
return new PilotStatusHttpError(params);
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* `code` of the 422 every ads / Lead Ads route answers when the number the call is about is
|
|
134
|
+
* not an official (Cloud API / WABA) number: ads exist only on official numbers.
|
|
135
|
+
*/
|
|
136
|
+
export const ADS_REQUIRE_OFFICIAL_NUMBER = "ADS_REQUIRE_OFFICIAL_NUMBER";
|
|
137
|
+
/**
|
|
138
|
+
* `code` of the 409 `ads.linkAccount()` answers when the ad account is already linked to
|
|
139
|
+
* ANOTHER number of the workspace; the body carries that number's `whatsappNumberId`.
|
|
140
|
+
*/
|
|
141
|
+
export const AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER = "AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER";
|
|
132
142
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAC9B,IAAI,GAAW,kBAAkB,CAAC;IAE3C,YAAY,OAAe,EAAE,OAA6B;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,IAA4B,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACxD,CAAC;IACL,CAAC;CACJ;AAED,MAAM,OAAO,oBAAqB,SAAQ,gBAAgB;IAC7C,IAAI,GAAW,sBAAsB,CAAC;IAEtC,MAAM,CAAS;IACf,MAAM,CAAS;IACf,GAAG,CAAS;IACZ,IAAI,CAAmC;IACvC,OAAO,CAAqB;IAC5B,OAAO,CAAyB;IAEzC,YAAY,MASX;QACG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,MA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C,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,qCAAqC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { PilotStatusClient, DEFAULT_BASE_URL } from "./client.js";
|
|
2
2
|
export type { PilotStatusClientOptions } from "./client.js";
|
|
3
|
-
export { PilotStatusError, PilotStatusHttpError, AuthenticationError, ValidationError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, ServerError, } from "./errors.js";
|
|
3
|
+
export { PilotStatusError, PilotStatusHttpError, AuthenticationError, ValidationError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, ServerError, ADS_REQUIRE_OFFICIAL_NUMBER, AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER, } from "./errors.js";
|
|
4
4
|
export type { PilotStatusErrorBody } from "./errors.js";
|
|
5
5
|
export { NUMBER_STATUS_FAILURE_CODES, KNOWN_MESSAGE_ORIGINS } from "./types.js";
|
|
6
6
|
/**
|
|
@@ -13,7 +13,7 @@ export { PhoneLinesResource, PhoneLineVerificationResource, PhoneLineWebhooksRes
|
|
|
13
13
|
/** Account-level workspaces (account key) and the workspace webhooks. */
|
|
14
14
|
export { WorkspacesResource, WorkspaceApiKeysResource } from "./resources/workspaces.js";
|
|
15
15
|
export { WorkspaceWebhooksResource } from "./resources/workspace-webhooks.js";
|
|
16
|
-
export type { MessageStatus, Button, ButtonType, MarketingOptions, SendMessageInput, SendMessageOptions, SendMessageHeader, SendMessageAccepted, MessageDetails, MessageMetaPricing, MessageLogDirection, MessageLogEntry, KnownMessageOrigin, MessageListParams, MessageListResult, GroupMessagesParams, GroupMessagesResult, UnreadMessagesParams, UnreadMessagesResult, MarkReadResult, TypingState, TypingInput, TypingResult, DashboardStats, ApiKeyCreated, ApiKeyListItem, ApiKeyListResult, NumberApiKeyReveal, RegeneratedNumberKey, WhatsAppNumberInstance, WhatsAppNumberListItem, NumberListItemApiKeyRef, NumberCoexistence, CreateNumberInput, CreateNumberResult, CreatedNumber, CreateMetaNumberInput, CheckNumbersInput, CheckNumbersResult, NumberConnectResult, NumberStatusResult, NumberStatusFailureCode, NumberDetail, NumberSettings, NumberSettingsInput, NumberSettingsSync, NumberPiiInput, NumberLogoutResult, NumberRestoreResult, NumberPurgeResult, NumberPayResult, NumberPayErrorBody, UpdateNumberInput, UpdateNumberResult, ChatHistoryMedia, ChatHistoryMessage, MessageHistoryParams, MessageHistoryResult, NumberLinkBundle, RemotePairingInput, RemotePairingResult, RemotePairingInfo, RemotePairingStatus, RemotePairingConnectResult, CancelMessagesResult, DeleteNumberResult, TemplateCategory, TemplateExamples, TemplateListItem, TemplateDetail, CreateTemplateInput, UpdateTemplateInput, TemplateDeleteResult, TemplateInsightsDays, TemplateInsightsOptions, TemplateInsightsTotals, TemplateInsightsClick, TemplateInsightsDay, TemplateInsights, TemplateSubmitResult, TemplateSyncResult, TemplateDeletePreview, FlowCategory, Flow, FlowListParams, FlowListResult, CreateFlowInput, FlowCreated, UpdateFlowInput, FlowUpdateResult, FlowDeleteResult, FlowJsonUploadResult, FlowJsonValidationFailure, FlowPublishInput, FlowPublishResult, FlowDeprecateInput, FlowDeprecateResult, FlowResponse, FlowResponseMedia, FlowSubmittedExchange, FlowResponseListParams, FlowResponseListResult, FlowEndpointKeyMetaStatus, FlowEndpointKeyStatus, FlowEndpointKeyRotateInput, FlowEndpointKeyRotateResult, GroupListItem, GroupDetail, GroupParticipant, CreateGroupInput, GroupActionResult, GroupInviteResult, GroupPinAction, NewsletterListItem, MediaDownloadResult, ConversationListParams, ConversationListResult, ConversationSummary, LeadListParams, LeadListResult, LeadGetResult, Lead, LeadField, ChatReferral, ReferralListParams, ReferralMessage, ReferralListResult, ReferralSummaryParams, ReferralSummaryAd, ReferralSummaryResult, LinkedAdAccount, AdAccountCandidate, AdAccountListResult, AdAccountLinkResult, AdAccountUnlinkResult, AdsSummaryParams, AdsSummaryAd, AdsSummaryResult, LeadPageLink, LeadPageCandidate, LeadPageListResult, LeadPageLinkInput, LeadPageLinkResult, LeadPageUpdateInput, LeadPageUpdateResult, LeadPageUnlinkResult, LeadPageResyncResult, LeadVariableSource, LeadFormConfig, LeadFormQuestion, LeadForm, LeadFormListResult, LeadFormConfigInput, LeadFormConfigResult, ServiceWindowType, ServiceWindowResult, MetaPricingParams, MetaPricingResult, Webhook, CreateWebhookInput, UpdateWebhookInput, WebhookDeleteResult, WebhookLogsParams, WebhookLogEntry, CreatedWebhook, WebhookRotateSecretResult, WebhookCircuitStatus, WebhookReactivateResult, BrandingInput, BrandingResult, EmbedSurface, EmbedSessionInput, EmbedSessionResult, CheckoutPurpose, CheckoutInput, CheckoutResult, CheckoutMethod, AddCardCheckoutResult, CardTopupCheckoutResult, PixTopupCheckoutResult, PixCharge, WalletTopupStatus, WalletTopup, WalletTopupResponse, CardSetupIntent, SavedCard, CardSetupIntentSync, CreatePaymentIntentInput, CreatePaymentIntentOptions, WalletTopupPaymentIntent, CreatePaymentIntentResult, PaymentIntentSync, ExtraNumbersPreview, ExtraNumbersPurchaseResult, ExtraNumbersScheduleResult, ChatwootChannelMode, ChatwootStatus, ChatwootConnectInput, ChatwootUpdateInput, ChatwootTestInput, ChatwootTestResult, ChatwootHistoryReplayInput, ChatwootHistoryReplayState, WorkspaceRole, WorkspaceMemberStatus, WorkspaceDetail, WorkspaceMember, WorkspaceMemberList, WorkspaceRenameResult, WorkspaceLanguage, WorkspaceSettings, WorkspaceSettingsResponse, UpdateWorkspaceSettingsInput, WorkspaceArchiveResult, WorkspaceTransferOwnershipResult, CallDirection, CallStatus, CallDetails, CallInitiateInput, CallInitiateAccepted, CallActionResult, CallListResult, CallingSettingsResult, CallSettingsUpdateInput, CallSettingsUpdateResult, CallPermissionResult, CallPermissionRequestInput, CallPermissionRequestResult, CallRealtimeSessionMode, CallRealtimeSessionResult, VerificationStatus, VerificationDocumentType, VerificationContactChannel, VerificationContactChannelPath, VerificationDocumentStatus, VerificationReviewReason, VerificationDetails, VerificationState, StartVerificationParams, StartVerificationOptions, StartVerificationResult, ActivationAudio, PhoneLineWebhookSubscription, PhoneLineWebhook, CreatedPhoneLineWebhook, PhoneLineWebhookList, PhoneLineWebhookResponse, CreatePhoneLineWebhookResponse, CreatePhoneLineWebhookInput, UpdatePhoneLineWebhookInput, PhoneLineWebhookDeleteResult, PhoneLineWebhookDeliveryStatus, PhoneLineWebhookDelivery, PhoneLineWebhookDeliveryDetail, ListPhoneLineWebhookDeliveriesParams, PhoneLineWebhookDeliveryList, PhoneLineWebhookDeliveryResponse, WorkspaceWebhookSubscription, WorkspaceWebhook, CreatedWorkspaceWebhook, WorkspaceWebhookList, WorkspaceWebhookResponse, CreateWorkspaceWebhookResponse, WorkspaceWebhookDeleteResult, WorkspaceWebhookDelivery, WorkspaceWebhookDeliveryDetail, ListWorkspaceWebhookDeliveriesParams, WorkspaceWebhookDeliveryList, WorkspaceWebhookDeliveryResponse, CreateWorkspaceWebhookInput, UpdateWorkspaceWebhookInput, AccountWorkspace, AccountWorkspaceList, CreateWorkspaceInput, MintedWorkspaceKey, CreatedWorkspace, WorkspaceSharedCard, WorkspaceSharedCardResult, WorkspaceKey, WorkspaceKeyList, CreateWorkspaceKeyInput, CreatedWorkspaceKey, RevokedWorkspaceKey, } from "./types.js";
|
|
16
|
+
export type { MessageStatus, Button, ButtonType, MarketingOptions, SendMessageInput, SendMessageOptions, SendMessageHeader, SendMessageAccepted, MessageDetails, MessageMetaPricing, MessageLogDirection, MessageLogEntry, KnownMessageOrigin, MessageListParams, MessageListResult, GroupMessagesParams, GroupMessagesResult, UnreadMessagesParams, UnreadMessagesResult, MarkReadResult, TypingState, TypingInput, TypingResult, DashboardStats, ApiKeyCreated, ApiKeyListItem, ApiKeyListResult, NumberApiKeyReveal, RegeneratedNumberKey, NumberApiKey, NumberApiKeyList, CreatedNumberApiKey, RevokedNumberApiKey, WhatsAppNumberInstance, WhatsAppNumberListItem, NumberListItemApiKeyRef, NumberCoexistence, CreateNumberInput, CreateNumberResult, CreatedNumber, CreateMetaNumberInput, CheckNumbersInput, CheckNumbersResult, NumberConnectResult, NumberStatusResult, NumberStatusFailureCode, NumberDetail, NumberSettings, NumberSettingsInput, NumberSettingsSync, NumberPiiInput, NumberLogoutResult, NumberRestoreResult, NumberPurgeResult, NumberPayResult, NumberPayErrorBody, UpdateNumberInput, UpdateNumberResult, ChatHistoryMedia, ChatHistoryMessage, MessageHistoryParams, MessageHistoryResult, NumberLinkBundle, RemotePairingInput, RemotePairingResult, RemotePairingInfo, RemotePairingStatus, RemotePairingConnectResult, CancelMessagesResult, DeleteNumberResult, TemplateCategory, TemplateExamples, TemplateListItem, TemplateDetail, CreateTemplateInput, UpdateTemplateInput, TemplateDeleteResult, TemplateInsightsDays, TemplateInsightsOptions, TemplateInsightsTotals, TemplateInsightsClick, TemplateInsightsDay, TemplateInsights, TemplateSubmitResult, TemplateSyncResult, TemplateDeletePreview, FlowCategory, Flow, FlowListParams, FlowListResult, CreateFlowInput, FlowCreated, UpdateFlowInput, FlowUpdateResult, FlowDeleteResult, FlowJsonUploadResult, FlowJsonValidationFailure, FlowPublishInput, FlowPublishResult, FlowDeprecateInput, FlowDeprecateResult, FlowResponse, FlowResponseMedia, FlowSubmittedExchange, FlowResponseListParams, FlowResponseListResult, FlowEndpointKeyMetaStatus, FlowEndpointKeyStatus, FlowEndpointKeyRotateInput, FlowEndpointKeyRotateResult, GroupListItem, GroupDetail, GroupParticipant, CreateGroupInput, GroupActionResult, GroupInviteResult, GroupPinAction, NewsletterListItem, MediaDownloadResult, ConversationListParams, ConversationListResult, ConversationSummary, LeadListParams, LeadListResult, LeadGetResult, Lead, LeadField, ChatReferral, ReferralListParams, ReferralMessage, ReferralListResult, ReferralSummaryParams, ReferralSummaryAd, ReferralSummaryResult, LinkedAdAccount, AdAccountCandidate, AdAccountListResult, AdAccountListParams, AdAccountLinkOptions, AdAccountLinkResult, AdAccountUnlinkResult, AdsSummaryParams, AdsSummaryAd, AdsSummaryResult, LeadPageLink, LeadPageCandidate, LeadPageListResult, LeadPageListParams, LeadPageLinkInput, LeadPageLinkResult, LeadPageUpdateInput, LeadPageUpdateResult, LeadPageUnlinkResult, LeadPageResyncResult, LeadVariableSource, LeadFormConfig, LeadFormQuestion, LeadForm, LeadFormListResult, LeadFormConfigInput, LeadFormConfigResult, ServiceWindowType, ServiceWindowResult, KnowledgeType, KnowledgeLanguage, KnowledgeSearchParams, KnowledgeSearchHit, KnowledgeSearchResult, MetaPricingParams, MetaPricingResult, Webhook, CreateWebhookInput, UpdateWebhookInput, WebhookDeleteResult, WebhookLogsParams, WebhookLogEntry, CreatedWebhook, WebhookRotateSecretResult, WebhookCircuitStatus, WebhookReactivateResult, BrandingInput, BrandingResult, EmbedSurface, EmbedSessionInput, EmbedSessionResult, CheckoutPurpose, CheckoutInput, CheckoutResult, CheckoutMethod, AddCardCheckoutResult, CardTopupCheckoutResult, PixTopupCheckoutResult, PixCharge, WalletTopupStatus, WalletTopup, WalletTopupResponse, CardSetupIntent, SavedCard, CardSetupIntentSync, CreatePaymentIntentInput, CreatePaymentIntentOptions, WalletTopupPaymentIntent, CreatePaymentIntentResult, PaymentIntentSync, ExtraNumbersPreview, ExtraNumbersPurchaseResult, ExtraNumbersScheduleResult, ChatwootChannelMode, ChatwootStatus, ChatwootConnectInput, ChatwootUpdateInput, ChatwootTestInput, ChatwootTestResult, ChatwootHistoryReplayInput, ChatwootHistoryReplayState, WorkspaceRole, WorkspaceMemberStatus, WorkspaceDetail, WorkspaceMember, WorkspaceMemberList, WorkspaceRenameResult, WorkspaceLanguage, WorkspaceSettings, WorkspaceSettingsResponse, UpdateWorkspaceSettingsInput, WorkspaceArchiveResult, WorkspaceTransferOwnershipResult, CallDirection, CallStatus, CallDetails, CallInitiateInput, CallInitiateAccepted, CallActionResult, CallListResult, CallingSettingsResult, CallSettingsUpdateInput, CallSettingsUpdateResult, CallPermissionResult, CallPermissionRequestInput, CallPermissionRequestResult, CallRealtimeSessionMode, CallRealtimeSessionResult, VerificationStatus, VerificationDocumentType, VerificationContactChannel, VerificationContactChannelPath, VerificationDocumentStatus, VerificationReviewReason, VerificationDetails, VerificationState, StartVerificationParams, StartVerificationOptions, StartVerificationResult, ActivationAudio, PhoneLineWebhookSubscription, PhoneLineWebhook, CreatedPhoneLineWebhook, PhoneLineWebhookList, PhoneLineWebhookResponse, CreatePhoneLineWebhookResponse, CreatePhoneLineWebhookInput, UpdatePhoneLineWebhookInput, PhoneLineWebhookDeleteResult, PhoneLineWebhookDeliveryStatus, PhoneLineWebhookDelivery, PhoneLineWebhookDeliveryDetail, ListPhoneLineWebhookDeliveriesParams, PhoneLineWebhookDeliveryList, PhoneLineWebhookDeliveryResponse, WorkspaceWebhookSubscription, WorkspaceWebhook, CreatedWorkspaceWebhook, WorkspaceWebhookList, WorkspaceWebhookResponse, CreateWorkspaceWebhookResponse, WorkspaceWebhookDeleteResult, WorkspaceWebhookDelivery, WorkspaceWebhookDeliveryDetail, ListWorkspaceWebhookDeliveriesParams, WorkspaceWebhookDeliveryList, WorkspaceWebhookDeliveryResponse, WorkspaceWebhookRotateSecretResult, CreateWorkspaceWebhookInput, UpdateWorkspaceWebhookInput, AccountWorkspace, AccountWorkspaceList, CreateWorkspaceInput, MintedWorkspaceKey, CreatedWorkspace, WorkspaceSharedCard, WorkspaceSharedCardResult, WorkspaceKey, WorkspaceKeyList, CreateWorkspaceKeyInput, CreatedWorkspaceKey, RevokedWorkspaceKey, UnreadCountsParams, UnreadCountByNumber, UnreadCountsResult, ResendMessageResult, RegeneratedApiKey, InviteWorkspaceMemberInput, InviteWorkspaceMemberResult, ResendWorkspaceInviteOptions, ResendWorkspaceInviteResult, UpdateWorkspaceMemberInput, WorkspaceMemberResult, RemoveWorkspaceMemberOptions, RemoveWorkspaceMemberResult, FlowPreviewInput, FlowPreviewResult, FlowTrace, FlowTraceList, FlowEndpointWarning, FlowEndpointState, SetFlowEndpointInput, SetFlowEndpointResult, RegisterFlowEndpointInput, RegisterFlowEndpointResult, FlowMetaSyncResult, FlowJsonDocument, PhoneLineStatus, PhoneLine, ListPhoneLinesParams, PhoneLineList, PhoneLineResponse, AvailablePhoneLines, BuyPhoneLinesOptions, PhoneLinePurchaseOutcome, PhoneLinePurchaseResult, PhoneLineActivationStatus, PhoneLineActivation, ListPhoneLineActivationsParams, PhoneLineActivationList, PhoneLineActivationResponse, ContactBlockResult, ChatArchiveResult, } from "./types.js";
|
|
17
17
|
export type { CustomerWebhookEvent, UnknownCustomerWebhookEvent, WhatsAppMessageType, MessageSentEvent, MessageDeliveredEvent, MessageReadEvent, MessageFailedEvent, MessageReplyEvent, MessageReceivedEvent, MessageGroupEvent, MessageNewsletterEvent, NumberCreatedEvent, NumberConnectedEvent, NumberDisconnectedEvent, NumberRemovedEvent, NumberRestoredEvent, CallRingingEvent, CallConnectedEvent, CallEndedEvent, CallMissedEvent, CallPermissionUpdatedEvent, EvolutionGoCallEventData, EvolutionGoCallOfferEvent, EvolutionGoCallAcceptEvent, EvolutionGoCallTerminateEvent, EvolutionGoCallEvent, FlowResponseReceivedEvent, FlowResponseReceivedEventData, FlowResponseMediaAttachment, LeadReceivedEvent, LeadReceivedEventData, ChatContactStateEventData, ChatArchivedEvent, ChatUnarchivedEvent, ContactBlockedEvent, ContactUnblockedEvent, LeadReceivedField, PhoneLineWebhookEvent, PhoneLineWebhookEventName, PhoneLineReturnedReason, PhoneLinePurchasedEvent, PhoneLineAudioReceivedEvent, PhoneLineCodeReceivedEvent, PhoneLineCodeFailedEvent, PhoneLineRenewedEvent, PhoneLinePaymentFailedEvent, PhoneLineSuspendedEvent, PhoneLineReturnedEvent, PhoneLineCanceledEvent, PhoneLineVerificationUpdatedEvent, WalletTopupPaidEvent, WorkspaceWebhookEvent, WorkspaceWebhookEventName, } from "./webhooks/types.js";
|
|
18
18
|
export { parseCustomerWebhook, isCustomerWebhookEvent, isUnknownCustomerWebhookEvent, CUSTOMER_WEBHOOK_EVENTS, } from "./webhooks/parse.js";
|
|
19
19
|
export type { StoryType, StoryFont, StoryRecipientsMode, CreateStoryInput, CreateStoryOptions, CreateStoryAccepted, StoryDetails, RevokeStoryResult, } from "./types.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEhF;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,sGAAsG;AACtG,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAEpC,yEAAyE;AACzE,OAAO,EAAE,kBAAkB,E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jB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,iCAAiC,EACjC,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// mutation-exempt-file: PURE RE-EXPORT BARREL — every non-blank line is `export … from`, ⚠️ (this used to say "209 lines" and the file had 219: a count in a justification rots the moment an export is added, and a reader who counts and finds a mismatch distrusts the whole exemption — or "verifies" it away. The claim is now the one that stays checkable no matter how the file grows.) with no statement, no expression and no branch to mutate. EVERY value it re-exports is ASSERTED in the test of the module it comes from — the list below is the claim, and it is checkable name by name (⚠️ this used to say "7"; measured 2026-09-06 there are SIX blocks carrying nineteen names, because `CUSTOMER_WEBHOOK_EVENTS` ships in the same block as `parseCustomerWebhook` even though a different test asserts it. A count that disagrees with the enumeration beside it makes a reader doubt both), so nothing here is unmeasured: `PilotStatusClient`/`DEFAULT_BASE_URL` in `client.test.ts`; the 10 error classes (`UnprocessableEntityError` included, 16 references, structural assertions on the prototype chain) in `errors.test.ts`; `NUMBER_STATUS_FAILURE_CODES` and `KNOWN_MESSAGE_ORIGINS` in `resources/resources.test.ts`, each list asserted whole; `flowJsonValidationErrors` in `resources/flows.test.ts`; `parseCustomerWebhook`/`isCustomerWebhookEvent` in `webhooks/parse.test.ts`; `CUSTOMER_WEBHOOK_EVENTS` in `webhooks/readme-events.test.ts`, compared name-by-name against `README.md`; `verifyWebhookSignature`/`WEBHOOK_SIGNATURE_HEADER` in `webhooks/signature.test.ts`; `PhoneLinesResource`/`PhoneLineVerificationResource`/`PhoneLineWebhooksResource`/`toDataUri`/`parseContentDispositionFileName` in `resources/phone-lines.test.ts`; `WorkspacesResource`/`WorkspaceApiKeysResource` in `resources/workspaces.test.ts`; `WorkspaceWebhooksResource` in `resources/workspace-webhooks.test.ts`. Everything else it forwards is `export type`, erased before a mutant could exist. This is the declared escape hatch for the gate's OWN documented limit — `mutate-diff.mjs` does not follow barrels, so a barrel resolves to `index` and lands in `semTeste`; the same reason already excludes this exact file from `vitest.coverage.config.ts` ("pure re-export barrel"). A dropped export is caught by `tsc`, in this package and in every consumer, not by mutation.
|
|
1
|
+
// mutation-exempt-file: PURE RE-EXPORT BARREL — every non-blank line is `export … from`, ⚠️ (this used to say "209 lines" and the file had 219: a count in a justification rots the moment an export is added, and a reader who counts and finds a mismatch distrusts the whole exemption — or "verifies" it away. The claim is now the one that stays checkable no matter how the file grows.) with no statement, no expression and no branch to mutate. EVERY value it re-exports is ASSERTED in the test of the module it comes from — the list below is the claim, and it is checkable name by name (⚠️ this used to say "7"; measured 2026-09-06 there are SIX blocks carrying nineteen names, because `CUSTOMER_WEBHOOK_EVENTS` ships in the same block as `parseCustomerWebhook` even though a different test asserts it. A count that disagrees with the enumeration beside it makes a reader doubt both), so nothing here is unmeasured: `PilotStatusClient`/`DEFAULT_BASE_URL` in `client.test.ts`; the 10 error classes (`UnprocessableEntityError` included, 16 references, structural assertions on the prototype chain) and the ads codes `ADS_REQUIRE_OFFICIAL_NUMBER`/`AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER` in `errors.test.ts`; `NUMBER_STATUS_FAILURE_CODES` and `KNOWN_MESSAGE_ORIGINS` in `resources/resources.test.ts`, each list asserted whole; `flowJsonValidationErrors` in `resources/flows.test.ts`; `parseCustomerWebhook`/`isCustomerWebhookEvent` in `webhooks/parse.test.ts`; `CUSTOMER_WEBHOOK_EVENTS` in `webhooks/readme-events.test.ts`, compared name-by-name against `README.md`; `verifyWebhookSignature`/`WEBHOOK_SIGNATURE_HEADER` in `webhooks/signature.test.ts`; `PhoneLinesResource`/`PhoneLineVerificationResource`/`PhoneLineWebhooksResource`/`toDataUri`/`parseContentDispositionFileName` in `resources/phone-lines.test.ts`; `WorkspacesResource`/`WorkspaceApiKeysResource` in `resources/workspaces.test.ts`; `WorkspaceWebhooksResource` in `resources/workspace-webhooks.test.ts`. Everything else it forwards is `export type`, erased before a mutant could exist. This is the declared escape hatch for the gate's OWN documented limit — `mutate-diff.mjs` does not follow barrels, so a barrel resolves to `index` and lands in `semTeste`; the same reason already excludes this exact file from `vitest.coverage.config.ts` ("pure re-export barrel"). A dropped export is caught by `tsc`, in this package and in every consumer, not by mutation.
|
|
2
2
|
export { PilotStatusClient, DEFAULT_BASE_URL } from "./client.js";
|
|
3
|
-
export { PilotStatusError, PilotStatusHttpError, AuthenticationError, ValidationError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, ServerError, } from "./errors.js";
|
|
3
|
+
export { PilotStatusError, PilotStatusHttpError, AuthenticationError, ValidationError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, ServerError, ADS_REQUIRE_OFFICIAL_NUMBER, AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER, } from "./errors.js";
|
|
4
4
|
export { NUMBER_STATUS_FAILURE_CODES, KNOWN_MESSAGE_ORIGINS } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* Reads Meta's refusal list out of the error `flows.uploadJson()` throws. It is the
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,i3EAAi3E;AAEj3E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGlE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEhF;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,sGAAsG;AACtG,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAEpC,yEAAyE;AACzE,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AA6Y9E,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC"}
|
package/dist/resources/ads.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { HttpClient } from "../http.js";
|
|
2
|
-
import type { AdAccountLinkResult, AdAccountListResult, AdAccountUnlinkResult, AdsSummaryParams, AdsSummaryResult } from "../types.js";
|
|
2
|
+
import type { AdAccountLinkOptions, AdAccountLinkResult, AdAccountListParams, AdAccountListResult, AdAccountUnlinkResult, AdsSummaryParams, AdsSummaryResult } from "../types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Meta ads configuration (`/v1/ads/*`): the ad accounts connected to the workspace
|
|
5
|
-
* ad / ad set / campaign NAMES can be resolved) and the ads volume report.
|
|
4
|
+
* Meta ads configuration (`/v1/ads/*`): the ad accounts connected to the workspace's
|
|
5
|
+
* numbers (so ad / ad set / campaign NAMES can be resolved) and the ads volume report.
|
|
6
|
+
*
|
|
7
|
+
* Ads are per OFFICIAL number: each ad account is linked to ONE official (Cloud API / WABA)
|
|
8
|
+
* WhatsApp number, and a number that is not official is refused with 422
|
|
9
|
+
* `ADS_REQUIRE_OFFICIAL_NUMBER`. A number-scoped key works on its own number; an
|
|
10
|
+
* account-wide key works on any number of the workspace.
|
|
6
11
|
*
|
|
7
12
|
* Access to an ad account comes from the advertiser adding the Pilot Status business
|
|
8
13
|
* portfolio (`partnerBusinessId`) as a PARTNER with `ads_read` in Meta Business Manager —
|
|
@@ -12,20 +17,26 @@ export declare class AdsResource {
|
|
|
12
17
|
#private;
|
|
13
18
|
constructor(http: HttpClient);
|
|
14
19
|
/**
|
|
15
|
-
* Connected ad accounts and the ones that may be connected
|
|
16
|
-
*
|
|
20
|
+
* Connected ad accounts and the ones that may be connected, with `integrations:manage`.
|
|
21
|
+
* `params.whatsappNumberId` narrows to one number (inside the key's scope, else 403
|
|
22
|
+
* `NUMBER_NOT_IN_GRANT`); a number-scoped key lists its own number's accounts.
|
|
23
|
+
* 422 `ADS_REQUIRE_OFFICIAL_NUMBER` when that number is not official.
|
|
17
24
|
*/
|
|
18
|
-
listAccounts(): Promise<AdAccountListResult>;
|
|
25
|
+
listAccounts(params?: AdAccountListParams): Promise<AdAccountListResult>;
|
|
19
26
|
/**
|
|
20
|
-
* Connect one ad account (`act_<digits>`)
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
27
|
+
* Connect one ad account (`act_<digits>`) to one official number. `options.whatsappNumberId`
|
|
28
|
+
* is REQUIRED with an account-wide (workspace) key; a number-scoped key defaults to its
|
|
29
|
+
* own number. Answers 201 `{ link }`. Refusals: 422 `ADS_REQUIRE_OFFICIAL_NUMBER`,
|
|
30
|
+
* 409 `AD_ACCOUNT_LINKED_TO_ANOTHER_NUMBER` (body carries the current `whatsappNumberId`),
|
|
31
|
+
* 409 `AD_ACCOUNT_NOT_PROVEN` (no ad of that account brought a conversation to this
|
|
32
|
+
* number), 409 `AD_ACCOUNT_NOT_SHARED` (partner grant not there yet), 403
|
|
33
|
+
* `NUMBER_NOT_IN_GRANT`, 502 `ADS_LOOKUP_UNAVAILABLE`, 503 `ADS_NOT_CONFIGURED`.
|
|
24
34
|
*/
|
|
25
|
-
linkAccount(adAccountId: string): Promise<AdAccountLinkResult>;
|
|
35
|
+
linkAccount(adAccountId: string, options?: AdAccountLinkOptions): Promise<AdAccountLinkResult>;
|
|
26
36
|
/**
|
|
27
37
|
* Disconnect one ad account. Soft: names already resolved stay. 404 `NOT_FOUND` when
|
|
28
|
-
* it is not linked to this workspace
|
|
38
|
+
* it is not linked to this workspace — or, with a number-scoped key, when it is linked
|
|
39
|
+
* to another number. 422 `ADS_REQUIRE_OFFICIAL_NUMBER` when the key's number is not official.
|
|
29
40
|
*/
|
|
30
41
|
unlinkAccount(adAccountId: string): Promise<AdAccountUnlinkResult>;
|
|
31
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ads.d.ts","sourceRoot":"","sources":["../../src/resources/ads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB
|
|
1
|
+
{"version":3,"file":"ads.d.ts","sourceRoot":"","sources":["../../src/resources/ads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,qBAAa,WAAW;;gBAGV,IAAI,EAAE,UAAU;IAI5B;;;;;OAKG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAU9E;;;;;;;;OAQG;IACG,WAAW,CACf,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IAW/B;;;;OAIG;IACG,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAOxE;;;;;;OAMG;IACG,OAAO,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAWpE"}
|