@getlatedev/node 0.2.1162 → 0.2.1163
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/README.md +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +35 -4
- package/src/generated/types.gen.ts +1 -1
package/README.md
CHANGED
|
@@ -1203,8 +1203,8 @@ try {
|
|
|
1203
1203
|
### Support Assistant
|
|
1204
1204
|
| Method | Description |
|
|
1205
1205
|
|--------|-------------|
|
|
1206
|
-
| `supportAssistant.getSupportAnswer()` | Get a support answer
|
|
1207
|
-
| `supportAssistant.askSupportQuestion()` | Ask a support question
|
|
1206
|
+
| `supportAssistant.getSupportAnswer()` | Get a support answer |
|
|
1207
|
+
| `supportAssistant.askSupportQuestion()` | Ask a support question |
|
|
1208
1208
|
|
|
1209
1209
|
### Tracking Tags
|
|
1210
1210
|
| Method | Description |
|
package/dist/index.d.mts
CHANGED
|
@@ -12260,7 +12260,7 @@ type SupportRun = {
|
|
|
12260
12260
|
answer: (string) | null;
|
|
12261
12261
|
usage: SupportRunUsage;
|
|
12262
12262
|
/**
|
|
12263
|
-
* The amount billed for the run, in USD: the
|
|
12263
|
+
* The amount billed for the run, in USD: the tokens in `usage` at the Support Assistant rates (see Ask a support question), never above `maxCostUsd`. 0 for a failed run.
|
|
12264
12264
|
*/
|
|
12265
12265
|
costUsd: number;
|
|
12266
12266
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -12260,7 +12260,7 @@ type SupportRun = {
|
|
|
12260
12260
|
answer: (string) | null;
|
|
12261
12261
|
usage: SupportRunUsage;
|
|
12262
12262
|
/**
|
|
12263
|
-
* The amount billed for the run, in USD: the
|
|
12263
|
+
* The amount billed for the run, in USD: the tokens in `usage` at the Support Assistant rates (see Ask a support question), never above `maxCostUsd`. 0 for a failed run.
|
|
12264
12264
|
*/
|
|
12265
12265
|
costUsd: number;
|
|
12266
12266
|
/**
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1163",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1163",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -1458,6 +1458,13 @@ export const verifyWhatsAppNumber = <ThrowOnError extends boolean = false>(optio
|
|
|
1458
1458
|
*
|
|
1459
1459
|
* A failing or stalled analytics sync (see `analyticsSync`) raises a healthy account to at least `warning`.
|
|
1460
1460
|
*
|
|
1461
|
+
* On Facebook, Instagram and Threads the token is also probed live. A probe Meta refuses with a
|
|
1462
|
+
* dead-token error sets `tokenStatus.valid` to `false` and names Meta's code, subcode and
|
|
1463
|
+
* fbtrace in `issues`, unless an analytics sync succeeded with that token in the last six
|
|
1464
|
+
* hours: then the token stays `valid` and `issues` reports the probe as inconclusive, since
|
|
1465
|
+
* Meta answers a transient 190 to live tokens now and then. Neither verdict disconnects the
|
|
1466
|
+
* account; that happens only when a real operation fails, and `account.disconnected` is sent.
|
|
1467
|
+
*
|
|
1461
1468
|
* For WhatsApp accounts the response also includes `platformConnection`, a live probe of the
|
|
1462
1469
|
* Meta link behind the channel (the same read as `GET /v1/whatsapp/number-info`). The OAuth
|
|
1463
1470
|
* token can be perfectly valid while Meta refuses to serve the phone-number object (for
|
|
@@ -9014,8 +9021,32 @@ export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(opt
|
|
|
9014
9021
|
};
|
|
9015
9022
|
|
|
9016
9023
|
/**
|
|
9017
|
-
* Ask a support question
|
|
9018
|
-
*
|
|
9024
|
+
* Ask a support question
|
|
9025
|
+
* Asks Ana, the Zernio support agent, a question about your workspace. Each question
|
|
9026
|
+
* starts a run that answers asynchronously: this returns 202 with a `runId`, and the
|
|
9027
|
+
* answer arrives through the `support.run.completed` and `support.run.failed` webhooks.
|
|
9028
|
+
* `GET /v1/support/runs/{runId}` is the fallback. Pass `threadId` to continue an earlier
|
|
9029
|
+
* conversation, and `context` to point Ana at a post, account or profile. When Ana finds
|
|
9030
|
+
* a problem on Zernio's side she opens a support ticket with the team (see
|
|
9031
|
+
* `supportTicket` on the run) and the run ends as `needs_human`.
|
|
9032
|
+
*
|
|
9033
|
+
* **Pricing.** Each question is billed once, when its run finishes, for the tokens Ana used:
|
|
9034
|
+
*
|
|
9035
|
+
* - Input: $6 per million tokens
|
|
9036
|
+
* - Output: $30 per million tokens
|
|
9037
|
+
* - Cache reads: $0.60 per million tokens
|
|
9038
|
+
* - Cache writes: $7.50 per million tokens
|
|
9039
|
+
*
|
|
9040
|
+
* Most questions cost between $0.10 and $0.50. A run never bills more than its
|
|
9041
|
+
* `maxCostUsd` ($0.50 to $3, $3 by default): near the cap Ana stops investigating and
|
|
9042
|
+
* answers with what she found. Runs that end as `needs_human` are billed like any other;
|
|
9043
|
+
* failed runs are free. The run's `usage` holds the token counts and `costUsd` the amount
|
|
9044
|
+
* billed. Charges appear as "Support API" on your invoice.
|
|
9045
|
+
*
|
|
9046
|
+
* Requires an unrestricted API key, usage-based billing and a card on file. Limits per
|
|
9047
|
+
* account: 3 active runs and $100 of runs per UTC month. Send an Idempotency-Key header
|
|
9048
|
+
* to make retries safe.
|
|
9049
|
+
*
|
|
9019
9050
|
*/
|
|
9020
9051
|
export const askSupportQuestion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AskSupportQuestionData, ThrowOnError>) => {
|
|
9021
9052
|
return (options?.client ?? client).post<AskSupportQuestionResponse, AskSupportQuestionError, ThrowOnError>({
|
|
@@ -9025,8 +9056,8 @@ export const askSupportQuestion = <ThrowOnError extends boolean = false>(options
|
|
|
9025
9056
|
};
|
|
9026
9057
|
|
|
9027
9058
|
/**
|
|
9028
|
-
* Get a support answer
|
|
9029
|
-
*
|
|
9059
|
+
* Get a support answer
|
|
9060
|
+
* Returns a run started by your team, with Ana's answer once it is ready. Prefer the `support.run.completed` and `support.run.failed` webhooks; use this as the fallback, waiting `pollAfterSeconds` between polls. `costUsd` is the amount billed for the question, never above `maxCostUsd`, and 0 for a failed run (rates on Ask a support question).
|
|
9030
9061
|
*/
|
|
9031
9062
|
export const getSupportAnswer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetSupportAnswerData, ThrowOnError>) => {
|
|
9032
9063
|
return (options?.client ?? client).get<GetSupportAnswerResponse, GetSupportAnswerError, ThrowOnError>({
|
|
@@ -10723,7 +10723,7 @@ export type SupportRun = {
|
|
|
10723
10723
|
answer: (string) | null;
|
|
10724
10724
|
usage: SupportRunUsage;
|
|
10725
10725
|
/**
|
|
10726
|
-
* The amount billed for the run, in USD: the
|
|
10726
|
+
* The amount billed for the run, in USD: the tokens in `usage` at the Support Assistant rates (see Ask a support question), never above `maxCostUsd`. 0 for a failed run.
|
|
10727
10727
|
*/
|
|
10728
10728
|
costUsd: number;
|
|
10729
10729
|
/**
|