@gitbook/api 0.119.0 → 0.120.0

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/client.d.ts CHANGED
@@ -580,6 +580,15 @@ export interface DocumentInlineEmoji {
580
580
  };
581
581
  isVoid: true;
582
582
  }
583
+ export interface DocumentInlineExpression {
584
+ object: 'inline';
585
+ type: 'expression';
586
+ key?: string;
587
+ data: {
588
+ expression: string;
589
+ };
590
+ isVoid: true;
591
+ }
583
592
  export interface DocumentInlineMath {
584
593
  object: 'inline';
585
594
  type: 'inline-math';
@@ -597,7 +606,7 @@ export interface DocumentBlockParagraph {
597
606
  isVoid?: false;
598
607
  data?: object;
599
608
  }
600
- export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
609
+ export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineExpression | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
601
610
  export interface DocumentBlockHeading {
602
611
  object: 'block';
603
612
  type: 'heading-1' | 'heading-2' | 'heading-3';
@@ -1177,6 +1186,7 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
1177
1186
  git?: GitSyncBlob;
1178
1187
  layout: RevisionPageLayoutOptions;
1179
1188
  cover?: RevisionPageDocumentCover;
1189
+ variables?: Variables;
1180
1190
  /**
1181
1191
  * If true, the page is not displayed in the navigation, while still being accessible.
1182
1192
  * @default false
@@ -1377,9 +1387,14 @@ export interface RevisionPageDocumentCover {
1377
1387
  ref?: ContentRefFile | ContentRefURL;
1378
1388
  /** Content reference pointing to the source image for dark mode. */
1379
1389
  refDark?: ContentRefFile | ContentRefURL;
1380
- /** Vertical position of the cover image. */
1390
+ /**
1391
+ * Vertical position of the cover image.
1392
+ * @default 0
1393
+ */
1381
1394
  yPos: number;
1382
1395
  }
1396
+ export type VariableValue = string | number | boolean;
1397
+ export type Variables = Record<string, VariableValue>;
1383
1398
  /** Parameters for an OpenAPI computed document */
1384
1399
  export type ComputedContentSourceDocumentOpenAPI = ComputedContentSourceOpenAPIBase & {
1385
1400
  props: {
@@ -1464,6 +1479,7 @@ export interface RevisionBase {
1464
1479
  pages: RevisionPage[];
1465
1480
  files: RevisionFile[];
1466
1481
  reusableContents: RevisionReusableContent[];
1482
+ variables?: Variables;
1467
1483
  /** When the revision was created. */
1468
1484
  createdAt: Timestamp;
1469
1485
  /** Metadata about a potential associated git commit. */
@@ -2208,14 +2224,9 @@ export interface ChangeAttributeRevisionPageLayout {
2208
2224
  before?: RevisionPageLayout;
2209
2225
  after?: RevisionPageLayout;
2210
2226
  }
2211
- export type CustomFieldValue = string | number | boolean | string[];
2212
- export interface ChangeAttributeCustomFields {
2213
- before?: Record<string, {
2214
- value: CustomFieldValue;
2215
- }>;
2216
- after?: Record<string, {
2217
- value: CustomFieldValue;
2218
- }>;
2227
+ export interface ChangeAttributeVariables {
2228
+ before?: Variables;
2229
+ after?: Variables;
2219
2230
  }
2220
2231
  export interface RevisionPageDocumentChangeAttributes {
2221
2232
  title?: ChangeAttributeString;
@@ -2225,13 +2236,12 @@ export interface RevisionPageDocumentChangeAttributes {
2225
2236
  cover?: ChangeAttributeRevisionPageDocumentCover;
2226
2237
  emoji?: ChangeAttributeString;
2227
2238
  layout?: ChangeAttributeRevisionPageLayout;
2228
- customFields?: ChangeAttributeCustomFields;
2239
+ variables?: ChangeAttributeVariables;
2229
2240
  }
2230
2241
  export interface RevisionPageGroupChangeAttributes {
2231
2242
  title?: ChangeAttributeString;
2232
2243
  emoji?: ChangeAttributeString;
2233
2244
  slug?: ChangeAttributeString;
2234
- customFields?: ChangeAttributeCustomFields;
2235
2245
  }
2236
2246
  export interface ChangeAttributeContentReference {
2237
2247
  /** A relative reference to content in GitBook. */
@@ -2243,7 +2253,6 @@ export interface RevisionPageLinkChangeAttributes {
2243
2253
  title?: ChangeAttributeString;
2244
2254
  emoji?: ChangeAttributeString;
2245
2255
  target?: ChangeAttributeContentReference;
2246
- customFields?: ChangeAttributeCustomFields;
2247
2256
  }
2248
2257
  export interface RevisionSemanticChangePageEdited {
2249
2258
  type: 'page_edited';
@@ -2300,9 +2309,13 @@ export interface RevisionSemanticChangeFileDeleted {
2300
2309
  type: 'file_deleted';
2301
2310
  file: ChangedRevisionFile;
2302
2311
  }
2303
- export interface RevisionSemanticChangeCustomFieldsEdited {
2304
- type: 'custom_fields_edited';
2305
- customFields: ChangeAttributeCustomFields;
2312
+ export interface ChangeAttributeVariable {
2313
+ before?: VariableValue;
2314
+ after?: VariableValue;
2315
+ }
2316
+ export interface RevisionSemanticChangeVariablesEdited {
2317
+ type: 'variables_edited';
2318
+ variables: Record<string, ChangeAttributeVariable>;
2306
2319
  }
2307
2320
  export interface ChangedRevisionReusableContent {
2308
2321
  id: string;
@@ -2326,7 +2339,7 @@ export interface RevisionSemanticChangeReusableContentEdited {
2326
2339
  reusableContent: ChangedRevisionReusableContent;
2327
2340
  attributes: RevisionReusableContentChangeAttributes;
2328
2341
  }
2329
- export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeCustomFieldsEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited;
2342
+ export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited;
2330
2343
  export interface RevisionSemanticChanges {
2331
2344
  changes: RevisionSemanticChange[];
2332
2345
  /** How many changes were omitted because above the result limit */
@@ -2614,67 +2627,6 @@ export interface SpaceIntegrationScript {
2614
2627
  /** If true, the script will potentially load use cookies and visitors should be aware. */
2615
2628
  cookies: boolean;
2616
2629
  }
2617
- /**
2618
- * @minLength 1
2619
- * @maxLength 50
2620
- * @pattern ^[a-z_\-0-9]+$
2621
- */
2622
- export type CustomFieldName = string;
2623
- /** @maxLength 100 */
2624
- export type CustomFieldTitle = string;
2625
- /** @maxLength 200 */
2626
- export type CustomFieldDescription = string;
2627
- export declare enum CustomFieldType {
2628
- Text = "text",
2629
- Number = "number",
2630
- Boolean = "boolean",
2631
- Tags = "tags",
2632
- SelectMulti = "select:multi",
2633
- SelectSingle = "select:single"
2634
- }
2635
- /** @maxLength 100 */
2636
- export type CustomFieldPlaceholder = string;
2637
- /**
2638
- * @maxItems 50
2639
- * @minItems 1
2640
- */
2641
- export type CustomFieldOptions = string[];
2642
- /** Custom field */
2643
- export interface CustomField {
2644
- id: string;
2645
- name: CustomFieldName;
2646
- title: CustomFieldTitle;
2647
- description: CustomFieldDescription;
2648
- type: CustomFieldType;
2649
- placeholder: CustomFieldPlaceholder;
2650
- options?: CustomFieldOptions;
2651
- createdAt: Timestamp;
2652
- updatedAt: Timestamp;
2653
- /** URLs associated with the object */
2654
- urls: {
2655
- /**
2656
- * URL of the custom field in the API
2657
- * @format uri
2658
- */
2659
- location: string;
2660
- };
2661
- permissions?: {
2662
- /** Whether the user can view the object */
2663
- view: boolean;
2664
- /** Whether the user can edit the object */
2665
- edit: boolean;
2666
- };
2667
- }
2668
- export type CustomFieldValues = {
2669
- /** Custom field */
2670
- customField: CustomField;
2671
- value?: CustomFieldValue;
2672
- }[];
2673
- export interface UpdateCustomFieldValues {
2674
- values: Record<string, {
2675
- value: CustomFieldValue;
2676
- }>;
2677
- }
2678
2630
  /** Secrets stored on the integration and passed at runtime. */
2679
2631
  export type IntegrationSecrets = Record<string, string>;
2680
2632
  export interface PublishIntegration {
@@ -4616,12 +4568,6 @@ export type BillingOperationPreviewResponse = {
4616
4568
  /** User must checkout to complete the operation. */
4617
4569
  type: 'checkout';
4618
4570
  invoice?: BillingInvoicePreview;
4619
- } | {
4620
- /** User needs to go through the legacy upgrade flow. */
4621
- type: 'legacy-upgrade';
4622
- /** The plan the user must upgrade to. */
4623
- plan: BillingProduct;
4624
- invoice?: BillingInvoicePreview;
4625
4571
  };
4626
4572
  export type SiteAdaptiveJSONSchemaClaimsProperties = {
4627
4573
  type: 'boolean';
@@ -4660,6 +4606,13 @@ export interface SiteAdaptiveSchema {
4660
4606
  /** When the adaptive schema was updated. */
4661
4607
  updatedAt: Timestamp;
4662
4608
  }
4609
+ /** A template condition based on the site visitor schema. */
4610
+ export interface SiteAdaptiveTemplateCondition {
4611
+ /** A short description of the suggested condition. */
4612
+ description: string;
4613
+ /** The suggested condition. */
4614
+ condition: string;
4615
+ }
4663
4616
  /**
4664
4617
  * The theme to apply to the site. Supercedes the old header preset themes.
4665
4618
  * - `clean`: Modern theme featuring translucency and minimally-styled elements.
@@ -6406,10 +6359,6 @@ export interface SpacePublishingCustomizationChannel {
6406
6359
  channel: 'space-publishing-customization';
6407
6360
  space: string;
6408
6361
  }
6409
- export interface SpaceCustomFieldsChannel {
6410
- channel: 'space-customfields';
6411
- space: string;
6412
- }
6413
6362
  export interface SpaceContentRefsChannel {
6414
6363
  channel: 'space-content-refs';
6415
6364
  space: string;
@@ -6418,10 +6367,6 @@ export interface SpaceIntegrationsChannel {
6418
6367
  channel: 'space-integrations';
6419
6368
  space: string;
6420
6369
  }
6421
- export interface OrganizationCustomFieldsChannel {
6422
- channel: 'organization-customfields';
6423
- organization: string;
6424
- }
6425
6370
  export interface UserAPITokensChannel {
6426
6371
  channel: 'user-api-tokens';
6427
6372
  user: string;
@@ -6699,7 +6644,7 @@ export interface AgentTasksChannel {
6699
6644
  organization: string;
6700
6645
  }
6701
6646
  /** Channel to subscribe to for realtime updates. */
6702
- export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
6647
+ export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
6703
6648
  export interface GitSyncOperationChannelData {
6704
6649
  channel: 'space-gitsync-operation';
6705
6650
  data: GitSyncOperation;
@@ -6739,6 +6684,12 @@ export interface APIChannelMutationData {
6739
6684
  }
6740
6685
  /** Data passed through a realtime channel */
6741
6686
  export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | APIChannelMutationData;
6687
+ /**
6688
+ * @minLength 1
6689
+ * @maxLength 50
6690
+ * @pattern ^[a-z_\-0-9]+$
6691
+ */
6692
+ export type VariableName = string;
6742
6693
  export interface CustomizationSettings {
6743
6694
  /** Inherit customization settings from the parent collection. */
6744
6695
  inherit: boolean;
@@ -6754,8 +6705,6 @@ export interface CustomizationSettings {
6754
6705
  internationalization: {
6755
6706
  /** Language for the UI element */
6756
6707
  locale: CustomizationLocale;
6757
- /** Inherit locale from the parent collection. */
6758
- inherit: boolean;
6759
6708
  };
6760
6709
  favicon: CustomizationFavicon;
6761
6710
  header: {
@@ -7546,6 +7495,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7546
7495
  getPageById: (spaceId: string, pageId: string, query?: {
7547
7496
  /** Output format for the content. */
7548
7497
  format?: "document" | "markdown";
7498
+ /**
7499
+ * If `true` is passed, the document will be evaluated
7500
+ * @default false
7501
+ */
7502
+ evaluated?: boolean;
7549
7503
  /**
7550
7504
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
7551
7505
  * @default true
@@ -7629,6 +7583,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7629
7583
  getPageByPath: (spaceId: string, pagePath: string, query?: {
7630
7584
  /** Output format for the content. */
7631
7585
  format?: "document" | "markdown";
7586
+ /**
7587
+ * If `true` is passed, the document will be evaluated
7588
+ * @default false
7589
+ */
7590
+ evaluated?: boolean;
7632
7591
  /**
7633
7592
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
7634
7593
  * @default true
@@ -8234,6 +8193,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8234
8193
  getPageInChangeRequestById: (spaceId: string, changeRequestId: string, pageId: string, query?: {
8235
8194
  /** Output format for the content. */
8236
8195
  format?: "document" | "markdown";
8196
+ /**
8197
+ * If `true` is passed, the document will be evaluated
8198
+ * @default false
8199
+ */
8200
+ evaluated?: boolean;
8237
8201
  /**
8238
8202
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
8239
8203
  * @default true
@@ -8310,6 +8274,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8310
8274
  getPageInChangeRequestByPath: (spaceId: string, changeRequestId: string, pagePath: string, query?: {
8311
8275
  /** Output format for the content. */
8312
8276
  format?: "document" | "markdown";
8277
+ /**
8278
+ * If `true` is passed, the document will be evaluated
8279
+ * @default false
8280
+ */
8281
+ evaluated?: boolean;
8313
8282
  /**
8314
8283
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
8315
8284
  * @default true
@@ -8494,6 +8463,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8494
8463
  getPageInRevisionById: (spaceId: string, revisionId: string, pageId: string, query?: {
8495
8464
  /** Output format for the content. */
8496
8465
  format?: "document" | "markdown";
8466
+ /**
8467
+ * If `true` is passed, the document will be evaluated
8468
+ * @default false
8469
+ */
8470
+ evaluated?: boolean;
8497
8471
  /**
8498
8472
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
8499
8473
  * @default true
@@ -8505,6 +8479,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8505
8479
  */
8506
8480
  computed?: boolean;
8507
8481
  }, params?: RequestParams) => Promise<HttpResponse<RevisionPage, any>>;
8482
+ /**
8483
+ * No description
8484
+ *
8485
+ * @tags space-content
8486
+ * @name GetPageDocumentInRevisionById
8487
+ * @summary Get the document of a page in a revision
8488
+ * @request GET:/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/document
8489
+ * @secure
8490
+ */
8491
+ getPageDocumentInRevisionById: (spaceId: string, revisionId: string, pageId: string, query?: {
8492
+ /**
8493
+ * If `true` is passed, the document will be evaluated
8494
+ * @default false
8495
+ */
8496
+ evaluated?: boolean;
8497
+ }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
8508
8498
  /**
8509
8499
  * No description
8510
8500
  *
@@ -8517,6 +8507,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8517
8507
  getPageInRevisionByPath: (spaceId: string, revisionId: string, pagePath: string, query?: {
8518
8508
  /** Output format for the content. */
8519
8509
  format?: "document" | "markdown";
8510
+ /**
8511
+ * If `true` is passed, the document will be evaluated
8512
+ * @default false
8513
+ */
8514
+ evaluated?: boolean;
8520
8515
  /**
8521
8516
  * If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
8522
8517
  * @default true
@@ -8807,26 +8802,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8807
8802
  message: string;
8808
8803
  };
8809
8804
  }>>;
8810
- /**
8811
- * No description
8812
- *
8813
- * @tags custom-fields
8814
- * @name GetSpaceCustomFields
8815
- * @summary Get a space custom fields
8816
- * @request GET:/spaces/{spaceId}/custom-fields
8817
- * @secure
8818
- */
8819
- getSpaceCustomFields: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<CustomFieldValues, any>>;
8820
- /**
8821
- * No description
8822
- *
8823
- * @tags custom-fields
8824
- * @name UpdateSpaceCustomFields
8825
- * @summary Update a space custom fields
8826
- * @request PATCH:/spaces/{spaceId}/custom-fields
8827
- * @secure
8828
- */
8829
- updateSpaceCustomFields: (spaceId: string, data: UpdateCustomFieldValues, params?: RequestParams) => Promise<HttpResponse<void, any>>;
8830
8805
  /**
8831
8806
  * No description
8832
8807
  *
@@ -10267,85 +10242,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10267
10242
  /** ID of a parent collection */
10268
10243
  parent?: string;
10269
10244
  }, params?: RequestParams) => Promise<HttpResponse<Collection, any>>;
10270
- /**
10271
- * No description
10272
- *
10273
- * @tags custom-fields
10274
- * @name ListOrganizationCustomFields
10275
- * @summary List all custom fields
10276
- * @request GET:/orgs/{organizationId}/custom-fields
10277
- * @secure
10278
- */
10279
- listOrganizationCustomFields: (organizationId: string, query?: {
10280
- /** Identifier of the page results to fetch. */
10281
- page?: string;
10282
- /**
10283
- * The number of results per page
10284
- * @min 0
10285
- * @max 1000
10286
- */
10287
- limit?: number;
10288
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10289
- items: CustomField[];
10290
- }, any>>;
10291
- /**
10292
- * No description
10293
- *
10294
- * @tags custom-fields
10295
- * @name CreateOrganizationCustomField
10296
- * @summary Create a custom field
10297
- * @request POST:/orgs/{organizationId}/custom-fields
10298
- * @secure
10299
- */
10300
- createOrganizationCustomField: (organizationId: string, data: {
10301
- name: CustomFieldName;
10302
- type: CustomFieldType;
10303
- title?: CustomFieldTitle;
10304
- description?: CustomFieldDescription;
10305
- placeholder?: CustomFieldPlaceholder;
10306
- options?: CustomFieldOptions;
10307
- }, params?: RequestParams) => Promise<HttpResponse<CustomField, any>>;
10308
- /**
10309
- * No description
10310
- *
10311
- * @tags custom-fields
10312
- * @name GetOrganizationCustomFieldByName
10313
- * @summary Get a custom field by its name
10314
- * @request GET:/orgs/{organizationId}/custom-fields/{fieldName}
10315
- * @secure
10316
- */
10317
- getOrganizationCustomFieldByName: (organizationId: string, fieldName: string, params?: RequestParams) => Promise<HttpResponse<CustomField, {
10318
- error: {
10319
- /** @format int32 */
10320
- code: 404;
10321
- message: string;
10322
- };
10323
- }>>;
10324
- /**
10325
- * No description
10326
- *
10327
- * @tags custom-fields
10328
- * @name UpdateOrganizationCustomField
10329
- * @summary Update a custom field
10330
- * @request PATCH:/orgs/{organizationId}/custom-fields/{fieldName}
10331
- * @secure
10332
- */
10333
- updateOrganizationCustomField: (organizationId: string, fieldName: string, data: {
10334
- title?: CustomFieldTitle;
10335
- description?: CustomFieldDescription;
10336
- placeholder?: CustomFieldPlaceholder;
10337
- options?: CustomFieldOptions;
10338
- }, params?: RequestParams) => Promise<HttpResponse<CustomField, any>>;
10339
- /**
10340
- * No description
10341
- *
10342
- * @tags custom-fields
10343
- * @name DeleteOrganizationCustomField
10344
- * @summary Delete a custom field
10345
- * @request DELETE:/orgs/{organizationId}/custom-fields/{fieldName}
10346
- * @secure
10347
- */
10348
- deleteOrganizationCustomField: (organizationId: string, fieldName: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10349
10245
  /**
10350
10246
  * No description
10351
10247
  *
@@ -11398,6 +11294,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11398
11294
  message: string;
11399
11295
  };
11400
11296
  }>>;
11297
+ /**
11298
+ * No description
11299
+ *
11300
+ * @tags sites
11301
+ * @name ListSiteAdaptiveTemplateConditions
11302
+ * @summary List templates of conditions generated based on the site visitor schema that can be used in adaptive content expressions.
11303
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/adaptive-schema/template-conditions
11304
+ * @secure
11305
+ */
11306
+ listSiteAdaptiveTemplateConditions: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<{
11307
+ items: SiteAdaptiveTemplateCondition[];
11308
+ }, any>>;
11401
11309
  /**
11402
11310
  * @description Get the complete profile of a site in an organization to provide the published experience. It includes site, customization, structure, integration scripts etc.
11403
11311
  *
package/dist/index.cjs CHANGED
@@ -199,7 +199,6 @@ __export(src_exports, {
199
199
  ContentReferenceStatus: () => ContentReferenceStatus,
200
200
  ContentType: () => ContentType,
201
201
  ContentVisibility: () => ContentVisibility,
202
- CustomFieldType: () => CustomFieldType,
203
202
  CustomHostnameDnsStatus: () => CustomHostnameDnsStatus,
204
203
  CustomHostnameErrorStatus: () => CustomHostnameErrorStatus,
205
204
  CustomHostnameSslStatus: () => CustomHostnameSslStatus,
@@ -271,7 +270,7 @@ module.exports = __toCommonJS(src_exports);
271
270
 
272
271
  // package.json
273
272
  var name = "@gitbook/api";
274
- var version = "0.119.0";
273
+ var version = "0.120.0";
275
274
 
276
275
  // src/client.ts
277
276
  var import_event_iterator = __toESM(require_node(), 1);
@@ -611,15 +610,6 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
611
610
  IntegrationCategory2["Other"] = "other";
612
611
  return IntegrationCategory2;
613
612
  })(IntegrationCategory || {});
614
- var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
615
- CustomFieldType2["Text"] = "text";
616
- CustomFieldType2["Number"] = "number";
617
- CustomFieldType2["Boolean"] = "boolean";
618
- CustomFieldType2["Tags"] = "tags";
619
- CustomFieldType2["SelectMulti"] = "select:multi";
620
- CustomFieldType2["SelectSingle"] = "select:single";
621
- return CustomFieldType2;
622
- })(CustomFieldType || {});
623
613
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
624
614
  IntegrationInstallationStatus2["Active"] = "active";
625
615
  IntegrationInstallationStatus2["Pending"] = "pending";
@@ -1876,6 +1866,14 @@ var Api = class extends HttpClient {
1876
1866
  format: "json",
1877
1867
  ...params
1878
1868
  }),
1869
+ getPageDocumentInRevisionById: (spaceId, revisionId, pageId, query, params = {}) => this.request({
1870
+ path: `/spaces/${spaceId}/revisions/${revisionId}/page/${pageId}/document`,
1871
+ method: "GET",
1872
+ query,
1873
+ secure: true,
1874
+ format: "json",
1875
+ ...params
1876
+ }),
1879
1877
  getPageInRevisionByPath: (spaceId, revisionId, pagePath, query, params = {}) => this.request({
1880
1878
  path: `/spaces/${spaceId}/revisions/${revisionId}/path/${pagePath}`,
1881
1879
  method: "GET",
@@ -2018,21 +2016,6 @@ var Api = class extends HttpClient {
2018
2016
  format: "json",
2019
2017
  ...params
2020
2018
  }),
2021
- getSpaceCustomFields: (spaceId, params = {}) => this.request({
2022
- path: `/spaces/${spaceId}/custom-fields`,
2023
- method: "GET",
2024
- secure: true,
2025
- format: "json",
2026
- ...params
2027
- }),
2028
- updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
2029
- path: `/spaces/${spaceId}/custom-fields`,
2030
- method: "PATCH",
2031
- body: data,
2032
- secure: true,
2033
- type: "application/json" /* Json */,
2034
- ...params
2035
- }),
2036
2019
  getSpacePdf: (spaceId, query, params = {}) => this.request({
2037
2020
  path: `/spaces/${spaceId}/pdf`,
2038
2021
  method: "GET",
@@ -2643,45 +2626,6 @@ var Api = class extends HttpClient {
2643
2626
  format: "json",
2644
2627
  ...params
2645
2628
  }),
2646
- listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
2647
- path: `/orgs/${organizationId}/custom-fields`,
2648
- method: "GET",
2649
- query,
2650
- secure: true,
2651
- format: "json",
2652
- ...params
2653
- }),
2654
- createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
2655
- path: `/orgs/${organizationId}/custom-fields`,
2656
- method: "POST",
2657
- body: data,
2658
- secure: true,
2659
- type: "application/json" /* Json */,
2660
- format: "json",
2661
- ...params
2662
- }),
2663
- getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
2664
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2665
- method: "GET",
2666
- secure: true,
2667
- format: "json",
2668
- ...params
2669
- }),
2670
- updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
2671
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2672
- method: "PATCH",
2673
- body: data,
2674
- secure: true,
2675
- type: "application/json" /* Json */,
2676
- format: "json",
2677
- ...params
2678
- }),
2679
- deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
2680
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2681
- method: "DELETE",
2682
- secure: true,
2683
- ...params
2684
- }),
2685
2629
  listOrganizationIntegrations: (organizationId, query, params = {}) => this.request({
2686
2630
  path: `/orgs/${organizationId}/integrations`,
2687
2631
  method: "GET",
@@ -3097,6 +3041,13 @@ var Api = class extends HttpClient {
3097
3041
  format: "json",
3098
3042
  ...params
3099
3043
  }),
3044
+ listSiteAdaptiveTemplateConditions: (organizationId, siteId, params = {}) => this.request({
3045
+ path: `/orgs/${organizationId}/sites/${siteId}/adaptive-schema/template-conditions`,
3046
+ method: "GET",
3047
+ secure: true,
3048
+ format: "json",
3049
+ ...params
3050
+ }),
3100
3051
  getPublishedContentSite: (organizationId, siteId, query, params = {}) => this.request({
3101
3052
  path: `/orgs/${organizationId}/sites/${siteId}/published`,
3102
3053
  method: "GET",
@@ -3695,7 +3646,6 @@ var GitBookAPI = class extends Api {
3695
3646
  ContentReferenceStatus,
3696
3647
  ContentType,
3697
3648
  ContentVisibility,
3698
- CustomFieldType,
3699
3649
  CustomHostnameDnsStatus,
3700
3650
  CustomHostnameErrorStatus,
3701
3651
  CustomHostnameSslStatus,