@getlatedev/node 0.2.1161 → 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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +38 -7
- package/src/generated/types.gen.ts +17 -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
|
@@ -11234,6 +11234,10 @@ type Profile = {
|
|
|
11234
11234
|
* IANA timezone new posts on this profile use when the request names no `timezone`. Null means UTC.
|
|
11235
11235
|
*/
|
|
11236
11236
|
timezone?: (string) | null;
|
|
11237
|
+
/**
|
|
11238
|
+
* Your own identifier for this profile, set on create or update. Null when none is set.
|
|
11239
|
+
*/
|
|
11240
|
+
externalId?: (string) | null;
|
|
11237
11241
|
isDefault?: boolean;
|
|
11238
11242
|
/**
|
|
11239
11243
|
* Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
|
|
@@ -12256,7 +12260,7 @@ type SupportRun = {
|
|
|
12256
12260
|
answer: (string) | null;
|
|
12257
12261
|
usage: SupportRunUsage;
|
|
12258
12262
|
/**
|
|
12259
|
-
* 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.
|
|
12260
12264
|
*/
|
|
12261
12265
|
costUsd: number;
|
|
12262
12266
|
/**
|
|
@@ -20355,6 +20359,10 @@ type GetUserError = (ErrorResponse | unknown | {
|
|
|
20355
20359
|
});
|
|
20356
20360
|
type ListProfilesData = {
|
|
20357
20361
|
query?: {
|
|
20362
|
+
/**
|
|
20363
|
+
* Exact-match filter on the externalId you set on the profile, to find the profile of one of your tenants without storing its Zernio id. Team members can each own a profile with the same externalId, so the result is a list.
|
|
20364
|
+
*/
|
|
20365
|
+
externalId?: string;
|
|
20358
20366
|
/**
|
|
20359
20367
|
* When true, includes over-limit profiles (marked with isOverLimit: true).
|
|
20360
20368
|
*/
|
|
@@ -20384,6 +20392,10 @@ type CreateProfileData = {
|
|
|
20384
20392
|
* IANA timezone new posts on this profile use when they name no `timezone`. Omit to keep UTC. An unknown name returns 400.
|
|
20385
20393
|
*/
|
|
20386
20394
|
timezone?: string;
|
|
20395
|
+
/**
|
|
20396
|
+
* Your own identifier for this profile, typically the id of the tenant or client it serves in your system (1 to 255 characters, trimmed). Unique among the profiles of the user who owns the profile: a duplicate returns 409 profile_external_id_conflict. Look a profile up by it with GET /v1/profiles?externalId=.
|
|
20397
|
+
*/
|
|
20398
|
+
externalId?: string;
|
|
20387
20399
|
};
|
|
20388
20400
|
headers?: {
|
|
20389
20401
|
/**
|
|
@@ -20470,6 +20482,10 @@ type UpdateProfileData = {
|
|
|
20470
20482
|
* IANA timezone new posts on this profile use when they name no `timezone`. Set to null to go back to UTC. An unknown name returns 400.
|
|
20471
20483
|
*/
|
|
20472
20484
|
timezone?: (string) | null;
|
|
20485
|
+
/**
|
|
20486
|
+
* Your own identifier for this profile (1 to 255 characters, trimmed). Set to null to clear it. A value another profile of the same owner already holds returns 409 profile_external_id_conflict.
|
|
20487
|
+
*/
|
|
20488
|
+
externalId?: (string) | null;
|
|
20473
20489
|
isDefault?: boolean;
|
|
20474
20490
|
};
|
|
20475
20491
|
path: {
|
package/dist/index.d.ts
CHANGED
|
@@ -11234,6 +11234,10 @@ type Profile = {
|
|
|
11234
11234
|
* IANA timezone new posts on this profile use when the request names no `timezone`. Null means UTC.
|
|
11235
11235
|
*/
|
|
11236
11236
|
timezone?: (string) | null;
|
|
11237
|
+
/**
|
|
11238
|
+
* Your own identifier for this profile, set on create or update. Null when none is set.
|
|
11239
|
+
*/
|
|
11240
|
+
externalId?: (string) | null;
|
|
11237
11241
|
isDefault?: boolean;
|
|
11238
11242
|
/**
|
|
11239
11243
|
* Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
|
|
@@ -12256,7 +12260,7 @@ type SupportRun = {
|
|
|
12256
12260
|
answer: (string) | null;
|
|
12257
12261
|
usage: SupportRunUsage;
|
|
12258
12262
|
/**
|
|
12259
|
-
* 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.
|
|
12260
12264
|
*/
|
|
12261
12265
|
costUsd: number;
|
|
12262
12266
|
/**
|
|
@@ -20355,6 +20359,10 @@ type GetUserError = (ErrorResponse | unknown | {
|
|
|
20355
20359
|
});
|
|
20356
20360
|
type ListProfilesData = {
|
|
20357
20361
|
query?: {
|
|
20362
|
+
/**
|
|
20363
|
+
* Exact-match filter on the externalId you set on the profile, to find the profile of one of your tenants without storing its Zernio id. Team members can each own a profile with the same externalId, so the result is a list.
|
|
20364
|
+
*/
|
|
20365
|
+
externalId?: string;
|
|
20358
20366
|
/**
|
|
20359
20367
|
* When true, includes over-limit profiles (marked with isOverLimit: true).
|
|
20360
20368
|
*/
|
|
@@ -20384,6 +20392,10 @@ type CreateProfileData = {
|
|
|
20384
20392
|
* IANA timezone new posts on this profile use when they name no `timezone`. Omit to keep UTC. An unknown name returns 400.
|
|
20385
20393
|
*/
|
|
20386
20394
|
timezone?: string;
|
|
20395
|
+
/**
|
|
20396
|
+
* Your own identifier for this profile, typically the id of the tenant or client it serves in your system (1 to 255 characters, trimmed). Unique among the profiles of the user who owns the profile: a duplicate returns 409 profile_external_id_conflict. Look a profile up by it with GET /v1/profiles?externalId=.
|
|
20397
|
+
*/
|
|
20398
|
+
externalId?: string;
|
|
20387
20399
|
};
|
|
20388
20400
|
headers?: {
|
|
20389
20401
|
/**
|
|
@@ -20470,6 +20482,10 @@ type UpdateProfileData = {
|
|
|
20470
20482
|
* IANA timezone new posts on this profile use when they name no `timezone`. Set to null to go back to UTC. An unknown name returns 400.
|
|
20471
20483
|
*/
|
|
20472
20484
|
timezone?: (string) | null;
|
|
20485
|
+
/**
|
|
20486
|
+
* Your own identifier for this profile (1 to 255 characters, trimmed). Set to null to clear it. A value another profile of the same owner already holds returns 409 profile_external_id_conflict.
|
|
20487
|
+
*/
|
|
20488
|
+
externalId?: (string) | null;
|
|
20473
20489
|
isDefault?: boolean;
|
|
20474
20490
|
};
|
|
20475
20491
|
path: {
|
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
|
@@ -1267,7 +1267,7 @@ export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
1267
1267
|
|
|
1268
1268
|
/**
|
|
1269
1269
|
* List profiles
|
|
1270
|
-
* Returns profiles sorted default-first, then by creation date. Filter with name (exact match) and paginate with limit/skip; without those params the full list is returned unchanged. Use includeOverLimit=true to include profiles that exceed the plan limit.
|
|
1270
|
+
* Returns profiles sorted default-first, then by creation date. Filter with name or externalId (exact match) and paginate with limit/skip; without those params the full list is returned unchanged. Use includeOverLimit=true to include profiles that exceed the plan limit.
|
|
1271
1271
|
*/
|
|
1272
1272
|
export const listProfiles = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListProfilesData, ThrowOnError>) => {
|
|
1273
1273
|
return (options?.client ?? client).get<ListProfilesResponse, ListProfilesError, ThrowOnError>({
|
|
@@ -1278,7 +1278,7 @@ export const listProfiles = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
1278
1278
|
|
|
1279
1279
|
/**
|
|
1280
1280
|
* Create profile
|
|
1281
|
-
* Creates a new profile with a name, optional description, and color. Names are unique per team: a duplicate returns a 409 whose details.existingProfileId carries the id of the existing profile. Send an Idempotency-Key header to make retries safe: a retried create with the same key and body replays the original 201 (same _id) instead of conflicting.
|
|
1281
|
+
* Creates a new profile with a name, optional description, and color. Names are unique per team: a duplicate returns a 409 whose details.existingProfileId carries the id of the existing profile. Set externalId to your own tenant or client id to find the profile later without storing its Zernio id. A duplicate externalId returns the same kind of 409, with code profile_external_id_conflict. Send an Idempotency-Key header to make retries safe: a retried create with the same key and body replays the original 201 (same _id) instead of conflicting.
|
|
1282
1282
|
*/
|
|
1283
1283
|
export const createProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateProfileData, ThrowOnError>) => {
|
|
1284
1284
|
return (options?.client ?? client).post<CreateProfileResponse, CreateProfileError, ThrowOnError>({
|
|
@@ -1300,7 +1300,7 @@ export const getProfile = <ThrowOnError extends boolean = false>(options: Option
|
|
|
1300
1300
|
|
|
1301
1301
|
/**
|
|
1302
1302
|
* Update profile
|
|
1303
|
-
* Updates a profile's name, description, color, default timezone, or default status.
|
|
1303
|
+
* Updates a profile's name, description, color, default timezone, externalId, or default status.
|
|
1304
1304
|
*/
|
|
1305
1305
|
export const updateProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateProfileData, ThrowOnError>) => {
|
|
1306
1306
|
return (options?.client ?? client).put<UpdateProfileResponse, UpdateProfileError, ThrowOnError>({
|
|
@@ -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>({
|
|
@@ -9636,6 +9636,10 @@ export type Profile = {
|
|
|
9636
9636
|
* IANA timezone new posts on this profile use when the request names no `timezone`. Null means UTC.
|
|
9637
9637
|
*/
|
|
9638
9638
|
timezone?: (string) | null;
|
|
9639
|
+
/**
|
|
9640
|
+
* Your own identifier for this profile, set on create or update. Null when none is set.
|
|
9641
|
+
*/
|
|
9642
|
+
externalId?: (string) | null;
|
|
9639
9643
|
isDefault?: boolean;
|
|
9640
9644
|
/**
|
|
9641
9645
|
* Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
|
|
@@ -10719,7 +10723,7 @@ export type SupportRun = {
|
|
|
10719
10723
|
answer: (string) | null;
|
|
10720
10724
|
usage: SupportRunUsage;
|
|
10721
10725
|
/**
|
|
10722
|
-
* 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.
|
|
10723
10727
|
*/
|
|
10724
10728
|
costUsd: number;
|
|
10725
10729
|
/**
|
|
@@ -19222,6 +19226,10 @@ export type GetUserError = (ErrorResponse | unknown | {
|
|
|
19222
19226
|
|
|
19223
19227
|
export type ListProfilesData = {
|
|
19224
19228
|
query?: {
|
|
19229
|
+
/**
|
|
19230
|
+
* Exact-match filter on the externalId you set on the profile, to find the profile of one of your tenants without storing its Zernio id. Team members can each own a profile with the same externalId, so the result is a list.
|
|
19231
|
+
*/
|
|
19232
|
+
externalId?: string;
|
|
19225
19233
|
/**
|
|
19226
19234
|
* When true, includes over-limit profiles (marked with isOverLimit: true).
|
|
19227
19235
|
*/
|
|
@@ -19254,6 +19262,10 @@ export type CreateProfileData = {
|
|
|
19254
19262
|
* IANA timezone new posts on this profile use when they name no `timezone`. Omit to keep UTC. An unknown name returns 400.
|
|
19255
19263
|
*/
|
|
19256
19264
|
timezone?: string;
|
|
19265
|
+
/**
|
|
19266
|
+
* Your own identifier for this profile, typically the id of the tenant or client it serves in your system (1 to 255 characters, trimmed). Unique among the profiles of the user who owns the profile: a duplicate returns 409 profile_external_id_conflict. Look a profile up by it with GET /v1/profiles?externalId=.
|
|
19267
|
+
*/
|
|
19268
|
+
externalId?: string;
|
|
19257
19269
|
};
|
|
19258
19270
|
headers?: {
|
|
19259
19271
|
/**
|
|
@@ -19346,6 +19358,10 @@ export type UpdateProfileData = {
|
|
|
19346
19358
|
* IANA timezone new posts on this profile use when they name no `timezone`. Set to null to go back to UTC. An unknown name returns 400.
|
|
19347
19359
|
*/
|
|
19348
19360
|
timezone?: (string) | null;
|
|
19361
|
+
/**
|
|
19362
|
+
* Your own identifier for this profile (1 to 255 characters, trimmed). Set to null to clear it. A value another profile of the same owner already holds returns 409 profile_external_id_conflict.
|
|
19363
|
+
*/
|
|
19364
|
+
externalId?: (string) | null;
|
|
19349
19365
|
isDefault?: boolean;
|
|
19350
19366
|
};
|
|
19351
19367
|
path: {
|