@zernio/node 0.2.1175 → 0.2.1177

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.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@zernio/node",
39
- version: "0.2.1175",
39
+ version: "0.2.1177",
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: "@zernio/node",
8
- version: "0.2.1175",
8
+ version: "0.2.1177",
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": "@zernio/node",
3
- "version": "0.2.1175",
3
+ "version": "0.2.1177",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -12856,7 +12856,7 @@ export const listLeadForms = <ThrowOnError extends boolean = false>(options: Opt
12856
12856
  * Create a lead form
12857
12857
  * Creates a lead form on a Facebook Page or LinkedIn Company Page to collect contact details from ads.
12858
12858
  *
12859
- * The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads` ads connection (its Page comes from the Facebook account linked to the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
12859
+ * The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads` ads connection (its Page comes from the Facebook account linked to the same profile), an Instagram account (the Page its ads run under: its own linked Page, else the Facebook or business-login Meta ads account on the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
12860
12860
  *
12861
12861
  */
12862
12862
  export const createLeadForm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateLeadFormData, ThrowOnError>) => {
@@ -10750,6 +10750,10 @@ export type SupportRun = {
10750
10750
  * The assistant's answer. Null while the run is in progress or when it failed.
10751
10751
  */
10752
10752
  answer: (string) | null;
10753
+ /**
10754
+ * The answer as structured fields you can route on. Null while in progress, when the run failed or went to a person (needs_human), or when no diagnosis could be produced.
10755
+ */
10756
+ diagnosis: (SupportRunDiagnosis | null);
10753
10757
  usage: SupportRunUsage;
10754
10758
  /**
10755
10759
  * The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run.
@@ -10784,6 +10788,39 @@ export type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'fai
10784
10788
  */
10785
10789
  export type stopReason = 'answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired';
10786
10790
 
10791
+ export type SupportRunDiagnosis = {
10792
+ /**
10793
+ * What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`.
10794
+ */
10795
+ category: 'account_connection' | 'content_rejected' | 'rate_limited' | 'platform_issue' | 'zernio_issue' | 'billing' | 'configuration' | 'how_to' | 'other';
10796
+ /**
10797
+ * The cause the answer gives, in one sentence. Null when the answer reports no problem, for example a how-to question.
10798
+ */
10799
+ cause: (string) | null;
10800
+ /**
10801
+ * The steps the answer recommends, in order. Empty when it recommends none.
10802
+ */
10803
+ fixSteps: Array<(string)>;
10804
+ /**
10805
+ * Links to docs.zernio.com that the answer itself cites. Empty when it cites none.
10806
+ */
10807
+ docsLinks: Array<(string)>;
10808
+ /**
10809
+ * Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`.
10810
+ */
10811
+ whoMustAct: 'integrator' | 'end_user' | 'zernio' | 'platform' | 'none';
10812
+ };
10813
+
10814
+ /**
10815
+ * What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`.
10816
+ */
10817
+ export type category = 'account_connection' | 'content_rejected' | 'rate_limited' | 'platform_issue' | 'zernio_issue' | 'billing' | 'configuration' | 'how_to' | 'other';
10818
+
10819
+ /**
10820
+ * Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`.
10821
+ */
10822
+ export type whoMustAct = 'integrator' | 'end_user' | 'zernio' | 'platform' | 'none';
10823
+
10787
10824
  export type SupportRunUsage = {
10788
10825
  inputTokens: number;
10789
10826
  outputTokens: number;
@@ -15505,7 +15542,7 @@ export type changeType = 'scheduled' | 'applied';
15505
15542
  /**
15506
15543
  * The category right now, regardless of changeType.
15507
15544
  */
15508
- export type category = 'UTILITY' | 'MARKETING' | 'AUTHENTICATION';
15545
+ export type category2 = 'UTILITY' | 'MARKETING' | 'AUTHENTICATION';
15509
15546
 
15510
15547
  /**
15511
15548
  * Present only when changeType is `applied`. The category before this change.
@@ -49215,7 +49252,7 @@ export type ListLeadsError = (ErrorResponse | unknown);
49215
49252
  export type ListLeadFormsData = {
49216
49253
  query: {
49217
49254
  /**
49218
- * Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
49255
+ * Connected Meta ads, Facebook, Instagram or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile; an Instagram account uses the Page its ads run under (its own linked Page, else the Facebook or business-login Meta ads account on the same profile).
49219
49256
  */
49220
49257
  accountId: string;
49221
49258
  /**
@@ -49434,7 +49471,7 @@ export type GetLeadFormData = {
49434
49471
  };
49435
49472
  query: {
49436
49473
  /**
49437
- * Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
49474
+ * Connected Meta ads, facebook, instagram or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile; an Instagram account uses the Page its ads run under (its own linked Page, else the Facebook or business-login Meta ads account on the same profile).
49438
49475
  */
49439
49476
  accountId: string;
49440
49477
  /**
@@ -49463,7 +49500,7 @@ export type ArchiveLeadFormData = {
49463
49500
  };
49464
49501
  query: {
49465
49502
  /**
49466
- * Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
49503
+ * Connected Meta ads, facebook, instagram or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile; an Instagram account uses the Page its ads run under (its own linked Page, else the Facebook or business-login Meta ads account on the same profile).
49467
49504
  */
49468
49505
  accountId: string;
49469
49506
  };