@zernio/node 0.2.421 → 0.2.423

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
@@ -25781,7 +25781,7 @@ type ListAdAccountsResponse = ({
25781
25781
  });
25782
25782
  type ListAdAccountsError = ({
25783
25783
  error?: string;
25784
- } | unknown);
25784
+ } | unknown | ErrorResponse);
25785
25785
  type UpdateAdAccountData = {
25786
25786
  body: {
25787
25787
  /**
@@ -26920,11 +26920,15 @@ type CreateStandaloneAdError = (unknown | {
26920
26920
  type ListLeadsData = {
26921
26921
  query?: {
26922
26922
  /**
26923
- * Filter to a single connected account.
26923
+ * Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
26924
26924
  */
26925
26925
  accountId?: string;
26926
26926
  /**
26927
- * Keyset cursor from a previous response's pagination.cursor.
26927
+ * LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
26928
+ */
26929
+ adAccountId?: string;
26930
+ /**
26931
+ * Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
26928
26932
  */
26929
26933
  cursor?: string;
26930
26934
  /**
@@ -26933,7 +26937,7 @@ type ListLeadsData = {
26933
26937
  formId?: string;
26934
26938
  limit?: number;
26935
26939
  /**
26936
- * Unix seconds; only leads created at/after this Meta timestamp.
26940
+ * Unix seconds; only leads created at/after this timestamp.
26937
26941
  */
26938
26942
  since?: number;
26939
26943
  };
@@ -26984,9 +26988,13 @@ type ListLeadsError = ({
26984
26988
  type ListLeadFormsData = {
26985
26989
  query: {
26986
26990
  /**
26987
- * Connected facebook account id.
26991
+ * Connected facebook or linkedin ads account id.
26988
26992
  */
26989
26993
  accountId: string;
26994
+ /**
26995
+ * LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
26996
+ */
26997
+ adAccountId?: string;
26990
26998
  cursor?: string;
26991
26999
  limit?: number;
26992
27000
  };
@@ -27008,7 +27016,11 @@ type CreateLeadFormData = {
27008
27016
  body: {
27009
27017
  accountId: string;
27010
27018
  name: string;
27011
- questions: Array<{
27019
+ /**
27020
+ * Deprecated (Meta legacy shape): use platformSpecificData.questions.
27021
+ * @deprecated
27022
+ */
27023
+ questions?: Array<{
27012
27024
  /**
27013
27025
  * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27014
27026
  */
@@ -27028,15 +27040,138 @@ type CreateLeadFormData = {
27028
27040
  inline_context?: string;
27029
27041
  }>;
27030
27042
  privacyPolicyUrl: string;
27043
+ /**
27044
+ * Deprecated: use platformSpecificData.privacyPolicyLinkText.
27045
+ * @deprecated
27046
+ */
27031
27047
  privacyPolicyLinkText?: string;
27048
+ /**
27049
+ * Deprecated: use platformSpecificData.followUpActionUrl.
27050
+ * @deprecated
27051
+ */
27032
27052
  followUpActionUrl?: string;
27053
+ /**
27054
+ * Deprecated: use platformSpecificData.locale.
27055
+ * @deprecated
27056
+ */
27033
27057
  locale?: string;
27058
+ /**
27059
+ * Deprecated: use platformSpecificData.thankYouTitle.
27060
+ * @deprecated
27061
+ */
27034
27062
  thankYouTitle?: string;
27063
+ /**
27064
+ * Deprecated: use platformSpecificData.thankYouBody.
27065
+ * @deprecated
27066
+ */
27035
27067
  thankYouBody?: string;
27068
+ /**
27069
+ * Deprecated: use platformSpecificData.thankYouButtonText.
27070
+ * @deprecated
27071
+ */
27036
27072
  thankYouButtonText?: string;
27073
+ /**
27074
+ * Deprecated: use platformSpecificData.thankYouButtonType.
27075
+ * @deprecated
27076
+ */
27037
27077
  thankYouButtonType?: string;
27078
+ /**
27079
+ * Deprecated: use platformSpecificData.thankYouWebsiteUrl.
27080
+ * @deprecated
27081
+ */
27038
27082
  thankYouWebsiteUrl?: string;
27083
+ /**
27084
+ * Deprecated: use platformSpecificData.isOptimizedForQuality.
27085
+ * @deprecated
27086
+ */
27039
27087
  isOptimizedForQuality?: boolean;
27088
+ /**
27089
+ * Form content; the shape is selected by the accountId's platform. Unknown fields are a 400 (strict-parsed).
27090
+ */
27091
+ platformSpecificData?: ({
27092
+ questions: Array<{
27093
+ /**
27094
+ * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27095
+ */
27096
+ type: string;
27097
+ /**
27098
+ * CUSTOM questions only.
27099
+ */
27100
+ key?: string;
27101
+ /**
27102
+ * CUSTOM questions only.
27103
+ */
27104
+ label?: string;
27105
+ options?: Array<{
27106
+ key?: string;
27107
+ value?: string;
27108
+ }>;
27109
+ inline_context?: string;
27110
+ }>;
27111
+ privacyPolicyLinkText?: string;
27112
+ followUpActionUrl?: string;
27113
+ locale?: string;
27114
+ thankYouTitle?: string;
27115
+ thankYouBody?: string;
27116
+ thankYouButtonText?: string;
27117
+ thankYouButtonType?: string;
27118
+ thankYouWebsiteUrl?: string;
27119
+ isOptimizedForQuality?: boolean;
27120
+ formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
27121
+ blockDisplayForNonTargetedViewer?: boolean;
27122
+ allowOrganicLeadGen?: boolean;
27123
+ questionPageCustomHeadline?: string;
27124
+ contextCard?: {
27125
+ title?: string;
27126
+ content?: Array<(string)>;
27127
+ style?: 'LIST_STYLE' | 'PARAGRAPH_STYLE';
27128
+ buttonText?: string;
27129
+ coverPhoto?: string;
27130
+ };
27131
+ } | {
27132
+ /**
27133
+ * LinkedIn ad account id (resolves the owning organization).
27134
+ */
27135
+ adAccountId: string;
27136
+ headline: string;
27137
+ description: string;
27138
+ /**
27139
+ * Defaults to DRAFT.
27140
+ */
27141
+ state?: 'DRAFT' | 'PUBLISHED';
27142
+ locale?: {
27143
+ country?: string;
27144
+ language?: string;
27145
+ };
27146
+ consents?: Array<{
27147
+ description: string;
27148
+ /**
27149
+ * Whether the viewer must tick this consent to submit. Defaults to false.
27150
+ */
27151
+ required?: boolean;
27152
+ }>;
27153
+ questions: Array<({
27154
+ kind: 'text';
27155
+ name: string;
27156
+ question: string;
27157
+ required?: boolean;
27158
+ responseEditable?: boolean;
27159
+ /**
27160
+ * Defaults to 300 on LinkedIn's side.
27161
+ */
27162
+ maxResponseLength?: number;
27163
+ } | {
27164
+ kind: 'multipleChoice';
27165
+ name: string;
27166
+ question: string;
27167
+ required?: boolean;
27168
+ responseEditable?: boolean;
27169
+ choices: Array<{
27170
+ id: number;
27171
+ text: string;
27172
+ }>;
27173
+ })>;
27174
+ });
27040
27175
  };
27041
27176
  };
27042
27177
  type CreateLeadFormResponse = ({
@@ -27051,9 +27186,15 @@ type CreateLeadFormError = ({
27051
27186
  } | unknown);
27052
27187
  type GetLeadFormData = {
27053
27188
  path: {
27189
+ /**
27190
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27191
+ */
27054
27192
  formId: string;
27055
27193
  };
27056
27194
  query: {
27195
+ /**
27196
+ * Connected facebook or linkedin ads account id (selects the platform).
27197
+ */
27057
27198
  accountId: string;
27058
27199
  };
27059
27200
  };
@@ -27068,9 +27209,15 @@ type GetLeadFormError = ({
27068
27209
  });
27069
27210
  type ArchiveLeadFormData = {
27070
27211
  path: {
27212
+ /**
27213
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27214
+ */
27071
27215
  formId: string;
27072
27216
  };
27073
27217
  query: {
27218
+ /**
27219
+ * Connected facebook or linkedin ads account id (selects the platform).
27220
+ */
27074
27221
  accountId: string;
27075
27222
  };
27076
27223
  };
package/dist/index.d.ts CHANGED
@@ -25781,7 +25781,7 @@ type ListAdAccountsResponse = ({
25781
25781
  });
25782
25782
  type ListAdAccountsError = ({
25783
25783
  error?: string;
25784
- } | unknown);
25784
+ } | unknown | ErrorResponse);
25785
25785
  type UpdateAdAccountData = {
25786
25786
  body: {
25787
25787
  /**
@@ -26920,11 +26920,15 @@ type CreateStandaloneAdError = (unknown | {
26920
26920
  type ListLeadsData = {
26921
26921
  query?: {
26922
26922
  /**
26923
- * Filter to a single connected account.
26923
+ * Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
26924
26924
  */
26925
26925
  accountId?: string;
26926
26926
  /**
26927
- * Keyset cursor from a previous response's pagination.cursor.
26927
+ * LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
26928
+ */
26929
+ adAccountId?: string;
26930
+ /**
26931
+ * Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
26928
26932
  */
26929
26933
  cursor?: string;
26930
26934
  /**
@@ -26933,7 +26937,7 @@ type ListLeadsData = {
26933
26937
  formId?: string;
26934
26938
  limit?: number;
26935
26939
  /**
26936
- * Unix seconds; only leads created at/after this Meta timestamp.
26940
+ * Unix seconds; only leads created at/after this timestamp.
26937
26941
  */
26938
26942
  since?: number;
26939
26943
  };
@@ -26984,9 +26988,13 @@ type ListLeadsError = ({
26984
26988
  type ListLeadFormsData = {
26985
26989
  query: {
26986
26990
  /**
26987
- * Connected facebook account id.
26991
+ * Connected facebook or linkedin ads account id.
26988
26992
  */
26989
26993
  accountId: string;
26994
+ /**
26995
+ * LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
26996
+ */
26997
+ adAccountId?: string;
26990
26998
  cursor?: string;
26991
26999
  limit?: number;
26992
27000
  };
@@ -27008,7 +27016,11 @@ type CreateLeadFormData = {
27008
27016
  body: {
27009
27017
  accountId: string;
27010
27018
  name: string;
27011
- questions: Array<{
27019
+ /**
27020
+ * Deprecated (Meta legacy shape): use platformSpecificData.questions.
27021
+ * @deprecated
27022
+ */
27023
+ questions?: Array<{
27012
27024
  /**
27013
27025
  * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27014
27026
  */
@@ -27028,15 +27040,138 @@ type CreateLeadFormData = {
27028
27040
  inline_context?: string;
27029
27041
  }>;
27030
27042
  privacyPolicyUrl: string;
27043
+ /**
27044
+ * Deprecated: use platformSpecificData.privacyPolicyLinkText.
27045
+ * @deprecated
27046
+ */
27031
27047
  privacyPolicyLinkText?: string;
27048
+ /**
27049
+ * Deprecated: use platformSpecificData.followUpActionUrl.
27050
+ * @deprecated
27051
+ */
27032
27052
  followUpActionUrl?: string;
27053
+ /**
27054
+ * Deprecated: use platformSpecificData.locale.
27055
+ * @deprecated
27056
+ */
27033
27057
  locale?: string;
27058
+ /**
27059
+ * Deprecated: use platformSpecificData.thankYouTitle.
27060
+ * @deprecated
27061
+ */
27034
27062
  thankYouTitle?: string;
27063
+ /**
27064
+ * Deprecated: use platformSpecificData.thankYouBody.
27065
+ * @deprecated
27066
+ */
27035
27067
  thankYouBody?: string;
27068
+ /**
27069
+ * Deprecated: use platformSpecificData.thankYouButtonText.
27070
+ * @deprecated
27071
+ */
27036
27072
  thankYouButtonText?: string;
27073
+ /**
27074
+ * Deprecated: use platformSpecificData.thankYouButtonType.
27075
+ * @deprecated
27076
+ */
27037
27077
  thankYouButtonType?: string;
27078
+ /**
27079
+ * Deprecated: use platformSpecificData.thankYouWebsiteUrl.
27080
+ * @deprecated
27081
+ */
27038
27082
  thankYouWebsiteUrl?: string;
27083
+ /**
27084
+ * Deprecated: use platformSpecificData.isOptimizedForQuality.
27085
+ * @deprecated
27086
+ */
27039
27087
  isOptimizedForQuality?: boolean;
27088
+ /**
27089
+ * Form content; the shape is selected by the accountId's platform. Unknown fields are a 400 (strict-parsed).
27090
+ */
27091
+ platformSpecificData?: ({
27092
+ questions: Array<{
27093
+ /**
27094
+ * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27095
+ */
27096
+ type: string;
27097
+ /**
27098
+ * CUSTOM questions only.
27099
+ */
27100
+ key?: string;
27101
+ /**
27102
+ * CUSTOM questions only.
27103
+ */
27104
+ label?: string;
27105
+ options?: Array<{
27106
+ key?: string;
27107
+ value?: string;
27108
+ }>;
27109
+ inline_context?: string;
27110
+ }>;
27111
+ privacyPolicyLinkText?: string;
27112
+ followUpActionUrl?: string;
27113
+ locale?: string;
27114
+ thankYouTitle?: string;
27115
+ thankYouBody?: string;
27116
+ thankYouButtonText?: string;
27117
+ thankYouButtonType?: string;
27118
+ thankYouWebsiteUrl?: string;
27119
+ isOptimizedForQuality?: boolean;
27120
+ formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
27121
+ blockDisplayForNonTargetedViewer?: boolean;
27122
+ allowOrganicLeadGen?: boolean;
27123
+ questionPageCustomHeadline?: string;
27124
+ contextCard?: {
27125
+ title?: string;
27126
+ content?: Array<(string)>;
27127
+ style?: 'LIST_STYLE' | 'PARAGRAPH_STYLE';
27128
+ buttonText?: string;
27129
+ coverPhoto?: string;
27130
+ };
27131
+ } | {
27132
+ /**
27133
+ * LinkedIn ad account id (resolves the owning organization).
27134
+ */
27135
+ adAccountId: string;
27136
+ headline: string;
27137
+ description: string;
27138
+ /**
27139
+ * Defaults to DRAFT.
27140
+ */
27141
+ state?: 'DRAFT' | 'PUBLISHED';
27142
+ locale?: {
27143
+ country?: string;
27144
+ language?: string;
27145
+ };
27146
+ consents?: Array<{
27147
+ description: string;
27148
+ /**
27149
+ * Whether the viewer must tick this consent to submit. Defaults to false.
27150
+ */
27151
+ required?: boolean;
27152
+ }>;
27153
+ questions: Array<({
27154
+ kind: 'text';
27155
+ name: string;
27156
+ question: string;
27157
+ required?: boolean;
27158
+ responseEditable?: boolean;
27159
+ /**
27160
+ * Defaults to 300 on LinkedIn's side.
27161
+ */
27162
+ maxResponseLength?: number;
27163
+ } | {
27164
+ kind: 'multipleChoice';
27165
+ name: string;
27166
+ question: string;
27167
+ required?: boolean;
27168
+ responseEditable?: boolean;
27169
+ choices: Array<{
27170
+ id: number;
27171
+ text: string;
27172
+ }>;
27173
+ })>;
27174
+ });
27040
27175
  };
27041
27176
  };
27042
27177
  type CreateLeadFormResponse = ({
@@ -27051,9 +27186,15 @@ type CreateLeadFormError = ({
27051
27186
  } | unknown);
27052
27187
  type GetLeadFormData = {
27053
27188
  path: {
27189
+ /**
27190
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27191
+ */
27054
27192
  formId: string;
27055
27193
  };
27056
27194
  query: {
27195
+ /**
27196
+ * Connected facebook or linkedin ads account id (selects the platform).
27197
+ */
27057
27198
  accountId: string;
27058
27199
  };
27059
27200
  };
@@ -27068,9 +27209,15 @@ type GetLeadFormError = ({
27068
27209
  });
27069
27210
  type ArchiveLeadFormData = {
27070
27211
  path: {
27212
+ /**
27213
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27214
+ */
27071
27215
  formId: string;
27072
27216
  };
27073
27217
  query: {
27218
+ /**
27219
+ * Connected facebook or linkedin ads account id (selects the platform).
27220
+ */
27074
27221
  accountId: string;
27075
27222
  };
27076
27223
  };
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.421",
39
+ version: "0.2.423",
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.421",
8
+ version: "0.2.423",
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.421",
3
+ "version": "0.2.423",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -7199,6 +7199,9 @@ export const getAdAccountFinance = <ThrowOnError extends boolean = false>(option
7199
7199
  * without a BC fall back to the OAuth-time `advertiser_ids` list. Cached for 1h on the
7200
7200
  * SocialAccount; lazy-refreshed on first call after expiry.
7201
7201
  *
7202
+ * For Google Ads: responds `429` when Google's API quota is temporarily exhausted
7203
+ * (instead of an empty list). Retry after a delay.
7204
+ *
7202
7205
  */
7203
7206
  export const listAdAccounts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListAdAccountsData, ThrowOnError>) => {
7204
7207
  return (options?.client ?? client).get<ListAdAccountsResponse, ListAdAccountsError, ThrowOnError>({
@@ -7293,7 +7296,7 @@ export const createStandaloneAd = <ThrowOnError extends boolean = false>(options
7293
7296
 
7294
7297
  /**
7295
7298
  * List submitted leads
7296
- * Returns persisted Meta Lead Gen leads for your team, newest-first, with keyset pagination on `cursor`. Leads are ingested in real time from the `leadgen` webhook. Requires the Ads add-on.
7299
+ * Returns submitted Lead Gen leads for your team, newest-first, with keyset pagination on `cursor`. For Meta (default) leads are served from the persisted cache, ingested in real time from the `leadgen` webhook. When `accountId` is a LinkedIn ads account, leads are fetched live from LinkedIn's `leadFormResponses` (LinkedIn has no webhook and enforces 90-day retention, so nothing is persisted) and `adAccountId` is required. Reading LinkedIn responses needs the `r_marketing_leadgen_automation` permission; accounts connected before it was added must reconnect. Requires the Ads add-on.
7297
7300
  *
7298
7301
  */
7299
7302
  export const listLeads = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListLeadsData, ThrowOnError>) => {
@@ -7305,7 +7308,8 @@ export const listLeads = <ThrowOnError extends boolean = false>(options?: Option
7305
7308
 
7306
7309
  /**
7307
7310
  * List lead forms
7308
- * Lists the Lead Gen forms owned by the connected Facebook Page. Requires the Ads add-on.
7311
+ * Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page. LinkedIn: forms owned by the ad account's Company Page — pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
7312
+ *
7309
7313
  */
7310
7314
  export const listLeadForms = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListLeadFormsData, ThrowOnError>) => {
7311
7315
  return (options?.client ?? client).get<ListLeadFormsResponse, ListLeadFormsError, ThrowOnError>({
@@ -7316,7 +7320,7 @@ export const listLeadForms = <ThrowOnError extends boolean = false>(options: Opt
7316
7320
 
7317
7321
  /**
7318
7322
  * Create a lead form
7319
- * Creates a Lead Gen form on the connected Facebook Page (POST /{page-id}/leadgen_forms). NOT idempotent — a retry creates a second form. Prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. Requires the Ads add-on.
7323
+ * Creates a Lead Gen form. 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); 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.
7320
7324
  *
7321
7325
  */
7322
7326
  export const createLeadForm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateLeadFormData, ThrowOnError>) => {
@@ -7338,7 +7342,7 @@ export const getLeadForm = <ThrowOnError extends boolean = false>(options: Optio
7338
7342
 
7339
7343
  /**
7340
7344
  * Archive a lead form
7341
- * Meta has no hard delete for forms; this archives the form (status=ARCHIVED).
7345
+ * Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE).
7342
7346
  */
7343
7347
  export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ArchiveLeadFormData, ThrowOnError>) => {
7344
7348
  return (options?.client ?? client).delete<ArchiveLeadFormResponse, ArchiveLeadFormError, ThrowOnError>({
@@ -26276,7 +26276,7 @@ export type ListAdAccountsResponse = ({
26276
26276
 
26277
26277
  export type ListAdAccountsError = ({
26278
26278
  error?: string;
26279
- } | unknown);
26279
+ } | unknown | ErrorResponse);
26280
26280
 
26281
26281
  export type UpdateAdAccountData = {
26282
26282
  body: {
@@ -27431,11 +27431,15 @@ export type CreateStandaloneAdError = (unknown | {
27431
27431
  export type ListLeadsData = {
27432
27432
  query?: {
27433
27433
  /**
27434
- * Filter to a single connected account.
27434
+ * Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
27435
27435
  */
27436
27436
  accountId?: string;
27437
27437
  /**
27438
- * Keyset cursor from a previous response's pagination.cursor.
27438
+ * LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
27439
+ */
27440
+ adAccountId?: string;
27441
+ /**
27442
+ * Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
27439
27443
  */
27440
27444
  cursor?: string;
27441
27445
  /**
@@ -27444,7 +27448,7 @@ export type ListLeadsData = {
27444
27448
  formId?: string;
27445
27449
  limit?: number;
27446
27450
  /**
27447
- * Unix seconds; only leads created at/after this Meta timestamp.
27451
+ * Unix seconds; only leads created at/after this timestamp.
27448
27452
  */
27449
27453
  since?: number;
27450
27454
  };
@@ -27498,9 +27502,13 @@ export type ListLeadsError = ({
27498
27502
  export type ListLeadFormsData = {
27499
27503
  query: {
27500
27504
  /**
27501
- * Connected facebook account id.
27505
+ * Connected facebook or linkedin ads account id.
27502
27506
  */
27503
27507
  accountId: string;
27508
+ /**
27509
+ * LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
27510
+ */
27511
+ adAccountId?: string;
27504
27512
  cursor?: string;
27505
27513
  limit?: number;
27506
27514
  };
@@ -27525,7 +27533,11 @@ export type CreateLeadFormData = {
27525
27533
  body: {
27526
27534
  accountId: string;
27527
27535
  name: string;
27528
- questions: Array<{
27536
+ /**
27537
+ * Deprecated (Meta legacy shape): use platformSpecificData.questions.
27538
+ * @deprecated
27539
+ */
27540
+ questions?: Array<{
27529
27541
  /**
27530
27542
  * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27531
27543
  */
@@ -27545,15 +27557,138 @@ export type CreateLeadFormData = {
27545
27557
  inline_context?: string;
27546
27558
  }>;
27547
27559
  privacyPolicyUrl: string;
27560
+ /**
27561
+ * Deprecated: use platformSpecificData.privacyPolicyLinkText.
27562
+ * @deprecated
27563
+ */
27548
27564
  privacyPolicyLinkText?: string;
27565
+ /**
27566
+ * Deprecated: use platformSpecificData.followUpActionUrl.
27567
+ * @deprecated
27568
+ */
27549
27569
  followUpActionUrl?: string;
27570
+ /**
27571
+ * Deprecated: use platformSpecificData.locale.
27572
+ * @deprecated
27573
+ */
27550
27574
  locale?: string;
27575
+ /**
27576
+ * Deprecated: use platformSpecificData.thankYouTitle.
27577
+ * @deprecated
27578
+ */
27551
27579
  thankYouTitle?: string;
27580
+ /**
27581
+ * Deprecated: use platformSpecificData.thankYouBody.
27582
+ * @deprecated
27583
+ */
27552
27584
  thankYouBody?: string;
27585
+ /**
27586
+ * Deprecated: use platformSpecificData.thankYouButtonText.
27587
+ * @deprecated
27588
+ */
27553
27589
  thankYouButtonText?: string;
27590
+ /**
27591
+ * Deprecated: use platformSpecificData.thankYouButtonType.
27592
+ * @deprecated
27593
+ */
27554
27594
  thankYouButtonType?: string;
27595
+ /**
27596
+ * Deprecated: use platformSpecificData.thankYouWebsiteUrl.
27597
+ * @deprecated
27598
+ */
27555
27599
  thankYouWebsiteUrl?: string;
27600
+ /**
27601
+ * Deprecated: use platformSpecificData.isOptimizedForQuality.
27602
+ * @deprecated
27603
+ */
27556
27604
  isOptimizedForQuality?: boolean;
27605
+ /**
27606
+ * Form content; the shape is selected by the accountId's platform. Unknown fields are a 400 (strict-parsed).
27607
+ */
27608
+ platformSpecificData?: ({
27609
+ questions: Array<{
27610
+ /**
27611
+ * EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
27612
+ */
27613
+ type: string;
27614
+ /**
27615
+ * CUSTOM questions only.
27616
+ */
27617
+ key?: string;
27618
+ /**
27619
+ * CUSTOM questions only.
27620
+ */
27621
+ label?: string;
27622
+ options?: Array<{
27623
+ key?: string;
27624
+ value?: string;
27625
+ }>;
27626
+ inline_context?: string;
27627
+ }>;
27628
+ privacyPolicyLinkText?: string;
27629
+ followUpActionUrl?: string;
27630
+ locale?: string;
27631
+ thankYouTitle?: string;
27632
+ thankYouBody?: string;
27633
+ thankYouButtonText?: string;
27634
+ thankYouButtonType?: string;
27635
+ thankYouWebsiteUrl?: string;
27636
+ isOptimizedForQuality?: boolean;
27637
+ formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
27638
+ blockDisplayForNonTargetedViewer?: boolean;
27639
+ allowOrganicLeadGen?: boolean;
27640
+ questionPageCustomHeadline?: string;
27641
+ contextCard?: {
27642
+ title?: string;
27643
+ content?: Array<(string)>;
27644
+ style?: 'LIST_STYLE' | 'PARAGRAPH_STYLE';
27645
+ buttonText?: string;
27646
+ coverPhoto?: string;
27647
+ };
27648
+ } | {
27649
+ /**
27650
+ * LinkedIn ad account id (resolves the owning organization).
27651
+ */
27652
+ adAccountId: string;
27653
+ headline: string;
27654
+ description: string;
27655
+ /**
27656
+ * Defaults to DRAFT.
27657
+ */
27658
+ state?: 'DRAFT' | 'PUBLISHED';
27659
+ locale?: {
27660
+ country?: string;
27661
+ language?: string;
27662
+ };
27663
+ consents?: Array<{
27664
+ description: string;
27665
+ /**
27666
+ * Whether the viewer must tick this consent to submit. Defaults to false.
27667
+ */
27668
+ required?: boolean;
27669
+ }>;
27670
+ questions: Array<({
27671
+ kind: 'text';
27672
+ name: string;
27673
+ question: string;
27674
+ required?: boolean;
27675
+ responseEditable?: boolean;
27676
+ /**
27677
+ * Defaults to 300 on LinkedIn's side.
27678
+ */
27679
+ maxResponseLength?: number;
27680
+ } | {
27681
+ kind: 'multipleChoice';
27682
+ name: string;
27683
+ question: string;
27684
+ required?: boolean;
27685
+ responseEditable?: boolean;
27686
+ choices: Array<{
27687
+ id: number;
27688
+ text: string;
27689
+ }>;
27690
+ })>;
27691
+ });
27557
27692
  };
27558
27693
  };
27559
27694
 
@@ -27571,9 +27706,15 @@ export type CreateLeadFormError = ({
27571
27706
 
27572
27707
  export type GetLeadFormData = {
27573
27708
  path: {
27709
+ /**
27710
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27711
+ */
27574
27712
  formId: string;
27575
27713
  };
27576
27714
  query: {
27715
+ /**
27716
+ * Connected facebook or linkedin ads account id (selects the platform).
27717
+ */
27577
27718
  accountId: string;
27578
27719
  };
27579
27720
  };
@@ -27591,9 +27732,15 @@ export type GetLeadFormError = ({
27591
27732
 
27592
27733
  export type ArchiveLeadFormData = {
27593
27734
  path: {
27735
+ /**
27736
+ * Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
27737
+ */
27594
27738
  formId: string;
27595
27739
  };
27596
27740
  query: {
27741
+ /**
27742
+ * Connected facebook or linkedin ads account id (selects the platform).
27743
+ */
27597
27744
  accountId: string;
27598
27745
  };
27599
27746
  };