@getlatedev/node 0.2.1165 → 0.2.1167

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/index.d.mts CHANGED
@@ -12248,7 +12248,7 @@ type SupportRun = {
12248
12248
  */
12249
12249
  threadId: string;
12250
12250
  /**
12251
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12251
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12252
12252
  */
12253
12253
  status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
12254
12254
  /**
@@ -12256,12 +12256,12 @@ type SupportRun = {
12256
12256
  */
12257
12257
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
12258
12258
  /**
12259
- * Ana's answer. Null while the run is in progress or when it failed.
12259
+ * The assistant's answer. Null while the run is in progress or when it failed.
12260
12260
  */
12261
12261
  answer: (string) | null;
12262
12262
  usage: SupportRunUsage;
12263
12263
  /**
12264
- * 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
+ * The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run.
12265
12265
  */
12266
12266
  costUsd: number;
12267
12267
  /**
@@ -12272,7 +12272,7 @@ type SupportRun = {
12272
12272
  startedAt: (string) | null;
12273
12273
  finishedAt: (string) | null;
12274
12274
  /**
12275
- * Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
12275
+ * Set when the assistant opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
12276
12276
  */
12277
12277
  supportTicket: {
12278
12278
  openedAt: string;
@@ -12283,7 +12283,7 @@ type SupportRun = {
12283
12283
  pollAfterSeconds?: number;
12284
12284
  };
12285
12285
  /**
12286
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12286
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12287
12287
  */
12288
12288
  type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
12289
12289
  /**
@@ -38574,7 +38574,7 @@ type AskSupportQuestionData = {
38574
38574
  */
38575
38575
  threadId?: string;
38576
38576
  /**
38577
- * Ids Ana should look at. Each must belong to your workspace.
38577
+ * Ids the assistant should look at. Each must belong to your workspace.
38578
38578
  */
38579
38579
  context?: {
38580
38580
  postId?: string;
package/dist/index.d.ts CHANGED
@@ -12248,7 +12248,7 @@ type SupportRun = {
12248
12248
  */
12249
12249
  threadId: string;
12250
12250
  /**
12251
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12251
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12252
12252
  */
12253
12253
  status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
12254
12254
  /**
@@ -12256,12 +12256,12 @@ type SupportRun = {
12256
12256
  */
12257
12257
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
12258
12258
  /**
12259
- * Ana's answer. Null while the run is in progress or when it failed.
12259
+ * The assistant's answer. Null while the run is in progress or when it failed.
12260
12260
  */
12261
12261
  answer: (string) | null;
12262
12262
  usage: SupportRunUsage;
12263
12263
  /**
12264
- * 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
+ * The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run.
12265
12265
  */
12266
12266
  costUsd: number;
12267
12267
  /**
@@ -12272,7 +12272,7 @@ type SupportRun = {
12272
12272
  startedAt: (string) | null;
12273
12273
  finishedAt: (string) | null;
12274
12274
  /**
12275
- * Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
12275
+ * Set when the assistant opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
12276
12276
  */
12277
12277
  supportTicket: {
12278
12278
  openedAt: string;
@@ -12283,7 +12283,7 @@ type SupportRun = {
12283
12283
  pollAfterSeconds?: number;
12284
12284
  };
12285
12285
  /**
12286
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12286
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
12287
12287
  */
12288
12288
  type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
12289
12289
  /**
@@ -38574,7 +38574,7 @@ type AskSupportQuestionData = {
38574
38574
  */
38575
38575
  threadId?: string;
38576
38576
  /**
38577
- * Ids Ana should look at. Each must belong to your workspace.
38577
+ * Ids the assistant should look at. Each must belong to your workspace.
38578
38578
  */
38579
38579
  context?: {
38580
38580
  postId?: string;
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.1165",
39
+ version: "0.2.1167",
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.1165",
8
+ version: "0.2.1167",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1165",
3
+ "version": "0.2.1167",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9022,7 +9022,7 @@ export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(opt
9022
9022
 
9023
9023
  /**
9024
9024
  * List a thread's support answers
9025
- * Lists the runs of one thread that your team started, with Ana's answers, oldest first. Replies from the Zernio team after a support ticket arrive by email and are not included. Runs are kept for 90 days. Page through a long thread with `limit` and `cursor`: pass `nextCursor` as `cursor` until it is null.
9025
+ * Lists the runs of one thread that your team started, with their answers, oldest first. Replies from the Zernio team after a support ticket arrive by email and are not included. Runs are kept for 90 days. Page through a long thread with `limit` and `cursor`: pass `nextCursor` as `cursor` until it is null.
9026
9026
  */
9027
9027
  export const listSupportAnswers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListSupportAnswersData, ThrowOnError>) => {
9028
9028
  return (options?.client ?? client).get<ListSupportAnswersResponse, ListSupportAnswersError, ThrowOnError>({
@@ -9033,26 +9033,28 @@ export const listSupportAnswers = <ThrowOnError extends boolean = false>(options
9033
9033
 
9034
9034
  /**
9035
9035
  * Ask a support question
9036
- * Asks Ana, the Zernio support agent, a question about your workspace. Each question
9036
+ * Asks the Zernio Support Assistant a question about your workspace. Each question
9037
9037
  * starts a run that answers asynchronously: this returns 202 with a `runId`, and the
9038
9038
  * answer arrives through the `support.run.completed` and `support.run.failed` webhooks.
9039
9039
  * `GET /v1/support/runs/{runId}` is the fallback. Pass `threadId` to continue an earlier
9040
- * conversation, and `context` to point Ana at a post, account or profile. When Ana finds
9041
- * a problem on Zernio's side she opens a support ticket with the team (see
9042
- * `supportTicket` on the run) and the run ends as `needs_human`.
9040
+ * conversation, and `context` to point the assistant at a post, account or profile.
9041
+ * When the assistant finds a problem on Zernio's side it opens a support ticket with
9042
+ * the team (see `supportTicket` on the run) and the run ends as `needs_human`.
9043
9043
  *
9044
- * **Pricing.** Each question is billed once, when its run finishes, for the tokens Ana used:
9044
+ * **Pricing.** You pay per question, once it finishes. The exact amount charged is the
9045
+ * run's `costUsd`.
9045
9046
  *
9046
- * - Input: $6 per million tokens
9047
- * - Output: $30 per million tokens
9048
- * - Cache reads: $0.60 per million tokens
9049
- * - Cache writes: $7.50 per million tokens
9047
+ * | Question | You pay |
9048
+ * | --- | --- |
9049
+ * | Typical question | $0.10 to $0.50 |
9050
+ * | Most one question can cost | Its `maxCostUsd`: $0.50 to $3, $3 by default |
9051
+ * | Handed to the Zernio team (`needs_human`) | Charged like an answered question |
9052
+ * | Failed or expired | $0 |
9053
+ * | All questions in a UTC month | At most $100 per account |
9050
9054
  *
9051
- * Most questions cost between $0.10 and $0.50. A run never bills more than its
9052
- * `maxCostUsd` ($0.50 to $3, $3 by default): near the cap Ana stops investigating and
9053
- * answers with what she found. Runs that end as `needs_human` are billed like any other;
9054
- * failed runs are free. The run's `usage` holds the token counts and `costUsd` the amount
9055
- * billed. Charges appear as "Support API" on your invoice.
9055
+ * Near its `maxCostUsd` a run stops investigating and answers with what it found so far,
9056
+ * so it never charges more than the cap; with nothing to answer yet it fails and costs
9057
+ * nothing. Charges appear as "Support API" on your invoice.
9056
9058
  *
9057
9059
  * Requires an unrestricted API key, usage-based billing and a card on file. Limits per
9058
9060
  * account: 3 active runs and $100 of runs per UTC month. Send an Idempotency-Key header
@@ -9068,7 +9070,7 @@ export const askSupportQuestion = <ThrowOnError extends boolean = false>(options
9068
9070
 
9069
9071
  /**
9070
9072
  * Get a support answer
9071
- * 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).
9073
+ * Returns a run started by your team, with the 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 (pricing on Ask a support question).
9072
9074
  */
9073
9075
  export const getSupportAnswer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetSupportAnswerData, ThrowOnError>) => {
9074
9076
  return (options?.client ?? client).get<GetSupportAnswerResponse, GetSupportAnswerError, ThrowOnError>({
@@ -10710,7 +10710,7 @@ export type SupportRun = {
10710
10710
  */
10711
10711
  threadId: string;
10712
10712
  /**
10713
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
10713
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
10714
10714
  */
10715
10715
  status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
10716
10716
  /**
@@ -10718,12 +10718,12 @@ export type SupportRun = {
10718
10718
  */
10719
10719
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
10720
10720
  /**
10721
- * Ana's answer. Null while the run is in progress or when it failed.
10721
+ * The assistant's answer. Null while the run is in progress or when it failed.
10722
10722
  */
10723
10723
  answer: (string) | null;
10724
10724
  usage: SupportRunUsage;
10725
10725
  /**
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.
10726
+ * The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run.
10727
10727
  */
10728
10728
  costUsd: number;
10729
10729
  /**
@@ -10734,7 +10734,7 @@ export type SupportRun = {
10734
10734
  startedAt: (string) | null;
10735
10735
  finishedAt: (string) | null;
10736
10736
  /**
10737
- * Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
10737
+ * Set when the assistant opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
10738
10738
  */
10739
10739
  supportTicket: {
10740
10740
  openedAt: string;
@@ -10746,7 +10746,7 @@ export type SupportRun = {
10746
10746
  };
10747
10747
 
10748
10748
  /**
10749
- * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
10749
+ * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
10750
10750
  */
10751
10751
  export type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
10752
10752
 
@@ -38846,7 +38846,7 @@ export type AskSupportQuestionData = {
38846
38846
  */
38847
38847
  threadId?: string;
38848
38848
  /**
38849
- * Ids Ana should look at. Each must belong to your workspace.
38849
+ * Ids the assistant should look at. Each must belong to your workspace.
38850
38850
  */
38851
38851
  context?: {
38852
38852
  postId?: string;