@gitbook/api 0.173.0 → 0.174.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
@@ -121,6 +121,14 @@ export declare enum CustomHostnameDnsStatus {
121
121
  DnsCloudflareProxied = "dns_cloudflare_proxied",
122
122
  DnsWrongCaa = "dns_wrong_caa"
123
123
  }
124
+ export declare enum SiteChannelRole {
125
+ Collaborator = "collaborator",
126
+ Support = "support"
127
+ }
128
+ export declare enum SiteChannelStatus {
129
+ Active = "active",
130
+ Pending = "pending"
131
+ }
124
132
  export declare enum SiteInsightsQueryRangePreset {
125
133
  LastYear = "lastYear",
126
134
  Last3Months = "last3Months",
@@ -268,6 +276,12 @@ export declare enum SiteQuestionAnswerHelpfulness {
268
276
  Medium = "medium",
269
277
  High = "high"
270
278
  }
279
+ /** Whether the response answered the question. */
280
+ export declare enum SiteQuestionAnswerResolution {
281
+ No = "no",
282
+ Partially = "partially",
283
+ Yes = "yes"
284
+ }
271
285
  /** Relevance classification of the user question. */
272
286
  export declare enum SiteQuestionAnswerRelevance {
273
287
  Relevant = "relevant",
@@ -275,12 +289,6 @@ export declare enum SiteQuestionAnswerRelevance {
275
289
  OffTopic = "off-topic",
276
290
  Unclear = "unclear"
277
291
  }
278
- /** Whether the response answered the question. */
279
- export declare enum SiteQuestionAnswerResolution {
280
- No = "no",
281
- Partially = "partially",
282
- Yes = "yes"
283
- }
284
292
  /** Relative score adjustment applied to records from a connection when searching. */
285
293
  export declare enum ContextSearchBoost {
286
294
  X08 = "x0.8",
@@ -1020,7 +1028,7 @@ export declare enum ContentVisibility {
1020
1028
  /** Data passed through a realtime channel */
1021
1029
  export type APIChannelData = APIChannelGitSyncOperationData | APIChannelSpaceContentRefsData | APIChannelChangeRequestContentRefsData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
1022
1030
  /** Channel to subscribe to for realtime updates. */
1023
- export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1031
+ export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1024
1032
  export type PublishedContentRedirect = {
1025
1033
  /** Type of target for the redirect */
1026
1034
  target: "application" | "content";
@@ -2735,6 +2743,15 @@ export interface ChangeRequest {
2735
2743
  revisionMerged?: string;
2736
2744
  /** Count of opened comments on the change request. */
2737
2745
  comments: number;
2746
+ /** Site context associated with the change request when it was created from a site topic or finding. */
2747
+ siteTopic?: {
2748
+ /** ID of the site associated with the change request. */
2749
+ site: string;
2750
+ /** ID of the site topic associated with the change request. */
2751
+ topic: string;
2752
+ /** ID of the site finding associated with the change request, when applicable. */
2753
+ finding?: string;
2754
+ };
2738
2755
  /** If true, the change request is not up-to-date with latest changes in the main content. */
2739
2756
  outdated: boolean;
2740
2757
  /** URLs associated with the object */
@@ -4754,16 +4771,16 @@ export interface CreateOrganization {
4754
4771
  * @maxLength 128
4755
4772
  */
4756
4773
  export type SiteSectionTitle = string;
4757
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4758
- export type LocalizedTitle = Record<TranslationLanguage, string>;
4774
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
4775
+ export type LocalizedString128 = Record<TranslationLanguage, string>;
4759
4776
  /**
4760
4777
  * Description of the site section
4761
4778
  * @minLength 0
4762
4779
  * @maxLength 256
4763
4780
  */
4764
4781
  export type SiteSectionDescription = string;
4765
- /** Localized section description value, keyed by locale. Contains overrides for non-default languages only. */
4766
- export type LocalizedSectionDescription = Record<TranslationLanguage, string>;
4782
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
4783
+ export type LocalizedString256 = Record<TranslationLanguage, string>;
4767
4784
  /**
4768
4785
  * Path to the section on the site
4769
4786
  * @minLength 1
@@ -4787,8 +4804,8 @@ export interface SiteSpace {
4787
4804
  section?: string;
4788
4805
  space: Space;
4789
4806
  title: string;
4790
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4791
- localizedTitle?: LocalizedTitle;
4807
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
4808
+ localizedTitle?: LocalizedString128;
4792
4809
  /** Whether this is the default space for the site */
4793
4810
  default?: boolean;
4794
4811
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
@@ -4815,12 +4832,12 @@ export interface SiteSection {
4815
4832
  id: string;
4816
4833
  /** Title of the site section */
4817
4834
  title: SiteSectionTitle;
4818
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4819
- localizedTitle?: LocalizedTitle;
4835
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
4836
+ localizedTitle?: LocalizedString128;
4820
4837
  /** Description of the site section */
4821
4838
  description?: SiteSectionDescription;
4822
- /** Localized section description value, keyed by locale. Contains overrides for non-default languages only. */
4823
- localizedDescription?: LocalizedSectionDescription;
4839
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
4840
+ localizedDescription?: LocalizedString256;
4824
4841
  /** Whether this is the default section for the site */
4825
4842
  default?: boolean;
4826
4843
  /** Whether the site section is draft and not live. */
@@ -4856,8 +4873,8 @@ export interface SiteSectionGroup {
4856
4873
  id: string;
4857
4874
  /** Title of the site section group */
4858
4875
  title: SiteSectionGroupTitle;
4859
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4860
- localizedTitle?: LocalizedTitle;
4876
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
4877
+ localizedTitle?: LocalizedString128;
4861
4878
  /**
4862
4879
  * List of site section ids that are members of the group. Use `children` instead.
4863
4880
  * @deprecated
@@ -5709,15 +5726,23 @@ export interface CustomizationThemedCodeTheme {
5709
5726
  light: CustomizationCodeTheme;
5710
5727
  dark: CustomizationCodeTheme;
5711
5728
  }
5729
+ /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
5730
+ export type LocalizedString = Record<TranslationLanguage, string>;
5712
5731
  /** @maxLength 64 */
5713
5732
  export type CustomizationContentLinkTitle = string;
5733
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
5734
+ export type LocalizedString64 = Record<TranslationLanguage, string>;
5714
5735
  export interface CustomizationContentLink {
5715
5736
  title: CustomizationContentLinkTitle;
5737
+ /** Localized overrides for the link title, keyed by locale. */
5738
+ localizedTitle?: LocalizedString64;
5716
5739
  /** A relative reference to content in GitBook. */
5717
5740
  to: ContentRef;
5718
5741
  }
5719
5742
  export interface CustomizationHeaderItem {
5720
5743
  title: string;
5744
+ /** Localized overrides for the header item title, keyed by locale. */
5745
+ localizedTitle?: LocalizedString;
5721
5746
  style?: "link" | "button-primary" | "button-secondary";
5722
5747
  to: ContentRef | null;
5723
5748
  links: CustomizationContentLink[];
@@ -5726,6 +5751,8 @@ export interface CustomizationHeaderItem {
5726
5751
  }
5727
5752
  export interface CustomizationFooterGroup {
5728
5753
  title: string;
5754
+ /** Localized overrides for the footer group title, keyed by locale. */
5755
+ localizedTitle?: LocalizedString;
5729
5756
  links: CustomizationContentLink[];
5730
5757
  }
5731
5758
  /**
@@ -5739,6 +5766,8 @@ export interface CustomizationAnnouncement {
5739
5766
  enabled: boolean;
5740
5767
  /** The text content of the announcement. */
5741
5768
  message: CustomizationAnnouncementMessage;
5769
+ /** Localized overrides for the announcement message, keyed by locale. */
5770
+ localizedMessage?: LocalizedString128;
5742
5771
  /** The content or URL the announcement links to when clicked. */
5743
5772
  link?: CustomizationContentLink;
5744
5773
  /** The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner. */
@@ -5781,7 +5810,7 @@ export interface SiteCustomizationSettingsBase {
5781
5810
  /** Title to use for the published site. If not defined, it'll fallback to the default content title. */
5782
5811
  title?: SiteTitle;
5783
5812
  /** Localized titles for the site, keyed by locale. If not defined, the localized title will not be changed. */
5784
- localizedTitle?: LocalizedTitle;
5813
+ localizedTitle?: LocalizedString128;
5785
5814
  styling: {
5786
5815
  /**
5787
5816
  * The theme to apply to the site. Supercedes the old header preset themes.
@@ -6287,6 +6316,7 @@ export interface SiteQuestion {
6287
6316
  /** Type classification of the user question. */
6288
6317
  type: SiteQuestionType;
6289
6318
  createdAt: Timestamp;
6319
+ askedAt: Timestamp;
6290
6320
  /** Aggregated stats for questions and linked answers. */
6291
6321
  stats: SiteQuestionStats;
6292
6322
  /** URLs associated with the site question. */
@@ -7582,24 +7612,28 @@ export interface SiteMcpServer {
7582
7612
  }
7583
7613
  export type SiteChannelSetup = {
7584
7614
  type: "builtin:slack";
7585
- setupSettings: object;
7615
+ setupSettings: {
7616
+ /** List of allowed Slack channel names or patterns. If empty, all channels are allowed. */
7617
+ allowedChannels?: string[];
7618
+ };
7586
7619
  } | {
7587
7620
  type: "builtin:discord";
7588
- setupSettings: object;
7621
+ setupSettings: {
7622
+ /** List of allowed Discord channel names or patterns. If empty, all channels are allowed. */
7623
+ allowedChannels?: string[];
7624
+ };
7589
7625
  };
7590
- /** Usage settings for a site channel. */
7591
- export type SiteChannelUsageSettings = object;
7592
7626
  export type SiteChannel = SiteChannelSetup & {
7593
7627
  object: "site-channel";
7594
7628
  /** Unique identifier for the site channel. */
7595
7629
  id: string;
7630
+ status: SiteChannelStatus;
7631
+ role: SiteChannelRole;
7596
7632
  /**
7597
7633
  * Number of answers linked to this channel.
7598
7634
  * @min 0
7599
7635
  */
7600
7636
  answers: number;
7601
- /** Usage settings for a site channel. */
7602
- usageSettings: SiteChannelUsageSettings;
7603
7637
  createdAt: Timestamp;
7604
7638
  urls: {
7605
7639
  /**
@@ -8339,6 +8373,11 @@ export interface APIChannelSite {
8339
8373
  channel: "site";
8340
8374
  site: string;
8341
8375
  }
8376
+ /** Subscription channel for changes in site channels. */
8377
+ export interface APIChannelSiteChannels {
8378
+ channel: "site-channels";
8379
+ site: string;
8380
+ }
8342
8381
  /** Subscription channel for changes in site context. */
8343
8382
  export interface APIChannelSiteContext {
8344
8383
  channel: "site-context";
@@ -8529,8 +8568,8 @@ export interface MergeRulesEvaluationContext {
8529
8568
  /** The user who is attempting to merge the change request. */
8530
8569
  actor: User;
8531
8570
  }
8532
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
8533
- export type LocalizedString = Record<TranslationLanguage, string>;
8571
+ /** Localized content reference, keyed by locale. Contains overrides for non-default languages only. */
8572
+ export type LocalizedContentRef = Record<TranslationLanguage, ContentRef>;
8534
8573
  export type RequestSpaceTrackPageView = SpaceTrackPageView;
8535
8574
  export type RequestSiteTrackPageView = SiteTrackPageView;
8536
8575
  export type RequestPublishIntegration = PublishIntegration;
@@ -8803,37 +8842,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8803
8842
  message: string;
8804
8843
  };
8805
8844
  }>>;
8806
- /**
8807
- * @description Transfer a space to another organization, collection or both.
8808
- *
8809
- * @tags spaces
8810
- * @name TransferSpace
8811
- * @summary Transfer a space
8812
- * @request POST:/spaces/{spaceId}/transfer
8813
- * @secure
8814
- */
8815
- transferSpace: (spaceId: EntityId, data: {
8816
- /** The unique id of the target organization */
8817
- organization: string;
8818
- }, params?: RequestParams) => Promise<HttpResponse<Space, {
8819
- error: {
8820
- /** @format int32 */
8821
- code: 404;
8822
- message: string;
8823
- };
8824
- } | {
8825
- error: {
8826
- /** @format int32 */
8827
- code: 409;
8828
- message: string;
8829
- };
8830
- } | {
8831
- error: {
8832
- /** @format int32 */
8833
- code: 412;
8834
- message: string;
8835
- };
8836
- }>>;
8837
8845
  /**
8838
8846
  * No description
8839
8847
  *
@@ -13478,8 +13486,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13478
13486
  updateSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, data: {
13479
13487
  /** Title of the site section group */
13480
13488
  title?: SiteSectionGroupTitle;
13481
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
13482
- localizedTitle?: LocalizedTitle;
13489
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
13490
+ localizedTitle?: LocalizedString128;
13483
13491
  icon?: Icon | null;
13484
13492
  /** Whether the site section group is draft and not live. */
13485
13493
  draft?: boolean;
@@ -13573,8 +13581,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13573
13581
  updateSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, data: {
13574
13582
  /** Title of the site section */
13575
13583
  title?: SiteSectionTitle;
13576
- /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
13577
- localizedTitle?: LocalizedTitle;
13584
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
13585
+ localizedTitle?: LocalizedString128;
13578
13586
  /** Path to the section on the site */
13579
13587
  path?: SiteSectionPath;
13580
13588
  /** ID of the site-space to be used as the default in this section. */
@@ -13585,8 +13593,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13585
13593
  /** Whether the site section is draft and not live. */
13586
13594
  draft?: boolean;
13587
13595
  description?: SiteSectionDescription | null;
13588
- /** Localized section description value, keyed by locale. Contains overrides for non-default languages only. */
13589
- localizedDescription?: LocalizedSectionDescription;
13596
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
13597
+ localizedDescription?: LocalizedString256;
13590
13598
  /** ID of the section group to move the section into. Set to null to move the section to the root of the site. */
13591
13599
  siteSectionGroupId?: string | null;
13592
13600
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
@@ -14077,10 +14085,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14077
14085
  to?: Timestamp;
14078
14086
  /** Filter questions by question type. */
14079
14087
  type?: SiteQuestionType;
14088
+ /** Filter questions by question relevance. */
14089
+ relevance?: SiteQuestionAnswerRelevance[];
14080
14090
  /** Filter questions by answer resolution. */
14081
- answered?: SiteQuestionAnswerResolution;
14091
+ answered?: SiteQuestionAnswerResolution[];
14082
14092
  /** Filter questions by associated site topic ID. */
14083
14093
  topic?: string;
14094
+ /**
14095
+ * An order for the items in the list
14096
+ * @default "desc"
14097
+ */
14098
+ order?: "asc" | "desc";
14099
+ /** Sort questions by latest ask activity, answered rate, or positive feedback rate. If omitted, ordering stays on canonical question creation date to preserve current behavior. */
14100
+ sort?: "askedAt" | "stats.answered" | "stats.feedback";
14084
14101
  /** Identifier of the page results to fetch. */
14085
14102
  page?: string;
14086
14103
  /**
@@ -14141,6 +14158,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14141
14158
  topic?: string[];
14142
14159
  /** Filter stats by question relevance. */
14143
14160
  relevance?: SiteQuestionAnswerRelevance[];
14161
+ /** Filter stats by answer resolution. */
14162
+ answered?: SiteQuestionAnswerResolution[];
14144
14163
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestionStats, any>>;
14145
14164
  /**
14146
14165
  * No description
@@ -14287,7 +14306,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14287
14306
  /** Title to use for the published site variant. If not defined, the title will not be changed. If set to null, the title will be unset and will fallback to the content title. */
14288
14307
  title?: SiteTitle | null;
14289
14308
  /** Localized titles for the site variant, keyed by locale. If not defined, the localized title will not be changed. If set to null, all localized titles will be removed. */
14290
- localizedTitle?: LocalizedTitle | null;
14309
+ localizedTitle?: LocalizedString128 | null;
14291
14310
  styling?: {
14292
14311
  /** The site theme. Set to null to reset the override. */
14293
14312
  theme?: CustomizationTheme | null;
@@ -15065,8 +15084,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15065
15084
  * @secure
15066
15085
  */
15067
15086
  createSiteChannel: (organizationId: EntityId, siteId: string, data: SiteChannelSetup & {
15068
- /** Usage settings for a site channel. */
15069
- usageSettings?: SiteChannelUsageSettings;
15087
+ role?: SiteChannelRole;
15070
15088
  }, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
15071
15089
  /**
15072
15090
  * No description
@@ -15078,6 +15096,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15078
15096
  * @secure
15079
15097
  */
15080
15098
  getSiteChannelById: (organizationId: EntityId, siteId: string, siteChannelId: string, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
15099
+ /**
15100
+ * No description
15101
+ *
15102
+ * @tags site-channels
15103
+ * @name UpdateSiteChannelById
15104
+ * @summary Update a site channel
15105
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/channels/{siteChannelId}
15106
+ * @secure
15107
+ */
15108
+ updateSiteChannelById: (organizationId: EntityId, siteId: string, siteChannelId: string, data: SiteChannelSetup | {
15109
+ role?: SiteChannelRole;
15110
+ }, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
15081
15111
  /**
15082
15112
  * No description
15083
15113
  *
@@ -150,8 +150,8 @@ export declare const CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
150
150
  export declare const CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
151
151
  export declare const CONTEXT_CONNECTION_STATUS_ENUM: ["pending", "syncing", "succeeded", "failed"];
152
152
  export declare const CONTEXT_SEARCH_BOOST_ENUM: ["x0.8", "x1.0", "x1.2"];
153
- export declare const SITE_QUESTION_ANSWER_RESOLUTION_ENUM: ["no", "partially", "yes"];
154
153
  export declare const SITE_QUESTION_ANSWER_RELEVANCE_ENUM: ["relevant", "spam", "off-topic", "unclear"];
154
+ export declare const SITE_QUESTION_ANSWER_RESOLUTION_ENUM: ["no", "partially", "yes"];
155
155
  export declare const SITE_QUESTION_ANSWER_HELPFULNESS_ENUM: ["low", "medium", "high"];
156
156
  export declare const SITE_CORE_CHANNEL_TYPE_ENUM: ["site", "embed", "api"];
157
157
  export declare const SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM: ["builtin:slack", "builtin:discord"];
@@ -174,6 +174,8 @@ export declare const SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
174
174
  export declare const SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
175
175
  export declare const SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
176
176
  export declare const SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
177
+ export declare const SITE_CHANNEL_STATUS_ENUM: ["active", "pending"];
178
+ export declare const SITE_CHANNEL_ROLE_ENUM: ["collaborator", "support"];
177
179
  export declare const CUSTOM_HOSTNAME_DNS_STATUS_ENUM: ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
178
180
  export declare const CUSTOM_HOSTNAME_SSL_STATUS_ENUM: ["live", "ssl_unknown", "ssl_pending", "ssl_failed", "ssl_retry_expired"];
179
181
  export declare const CUSTOM_HOSTNAME_ERROR_STATUS_ENUM: ["invalid_domain", "internal_error"];
package/dist/index.cjs CHANGED
@@ -385,6 +385,8 @@ __export(src_exports, {
385
385
  SITE_ADS_TOPIC_ENUM: () => SITE_ADS_TOPIC_ENUM,
386
386
  SITE_BASENAME_MAX_LENGTH: () => SITE_BASENAME_MAX_LENGTH,
387
387
  SITE_BASENAME_MIN_LENGTH: () => SITE_BASENAME_MIN_LENGTH,
388
+ SITE_CHANNEL_ROLE_ENUM: () => SITE_CHANNEL_ROLE_ENUM,
389
+ SITE_CHANNEL_STATUS_ENUM: () => SITE_CHANNEL_STATUS_ENUM,
388
390
  SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM: () => SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM,
389
391
  SITE_CORE_CHANNEL_TYPE_ENUM: () => SITE_CORE_CHANNEL_TYPE_ENUM,
390
392
  SITE_CUSTOMIZATION_FEATURE_ENUM: () => SITE_CUSTOMIZATION_FEATURE_ENUM,
@@ -446,6 +448,8 @@ __export(src_exports, {
446
448
  STORAGE_UPLOAD_KIND_ENUM: () => STORAGE_UPLOAD_KIND_ENUM,
447
449
  SiteAdsStatus: () => SiteAdsStatus,
448
450
  SiteAdsTopic: () => SiteAdsTopic,
451
+ SiteChannelRole: () => SiteChannelRole,
452
+ SiteChannelStatus: () => SiteChannelStatus,
449
453
  SiteConfigurableChannelType: () => SiteConfigurableChannelType,
450
454
  SiteCoreChannelType: () => SiteCoreChannelType,
451
455
  SiteCustomizationFeature: () => SiteCustomizationFeature,
@@ -496,7 +500,7 @@ module.exports = __toCommonJS(src_exports);
496
500
 
497
501
  // package.json
498
502
  var name = "@gitbook/api";
499
- var version = "0.173.0";
503
+ var version = "0.174.0";
500
504
 
501
505
  // src/client.ts
502
506
  var import_event_iterator = __toESM(require_node(), 1);
@@ -721,6 +725,16 @@ var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
721
725
  CustomHostnameDnsStatus2["DnsWrongCaa"] = "dns_wrong_caa";
722
726
  return CustomHostnameDnsStatus2;
723
727
  })(CustomHostnameDnsStatus || {});
728
+ var SiteChannelRole = /* @__PURE__ */ ((SiteChannelRole2) => {
729
+ SiteChannelRole2["Collaborator"] = "collaborator";
730
+ SiteChannelRole2["Support"] = "support";
731
+ return SiteChannelRole2;
732
+ })(SiteChannelRole || {});
733
+ var SiteChannelStatus = /* @__PURE__ */ ((SiteChannelStatus2) => {
734
+ SiteChannelStatus2["Active"] = "active";
735
+ SiteChannelStatus2["Pending"] = "pending";
736
+ return SiteChannelStatus2;
737
+ })(SiteChannelStatus || {});
724
738
  var SiteInsightsQueryRangePreset = /* @__PURE__ */ ((SiteInsightsQueryRangePreset2) => {
725
739
  SiteInsightsQueryRangePreset2["LastYear"] = "lastYear";
726
740
  SiteInsightsQueryRangePreset2["Last3Months"] = "last3Months";
@@ -883,6 +897,12 @@ var SiteQuestionAnswerHelpfulness = /* @__PURE__ */ ((SiteQuestionAnswerHelpfuln
883
897
  SiteQuestionAnswerHelpfulness2["High"] = "high";
884
898
  return SiteQuestionAnswerHelpfulness2;
885
899
  })(SiteQuestionAnswerHelpfulness || {});
900
+ var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
901
+ SiteQuestionAnswerResolution2["No"] = "no";
902
+ SiteQuestionAnswerResolution2["Partially"] = "partially";
903
+ SiteQuestionAnswerResolution2["Yes"] = "yes";
904
+ return SiteQuestionAnswerResolution2;
905
+ })(SiteQuestionAnswerResolution || {});
886
906
  var SiteQuestionAnswerRelevance = /* @__PURE__ */ ((SiteQuestionAnswerRelevance2) => {
887
907
  SiteQuestionAnswerRelevance2["Relevant"] = "relevant";
888
908
  SiteQuestionAnswerRelevance2["Spam"] = "spam";
@@ -890,12 +910,6 @@ var SiteQuestionAnswerRelevance = /* @__PURE__ */ ((SiteQuestionAnswerRelevance2
890
910
  SiteQuestionAnswerRelevance2["Unclear"] = "unclear";
891
911
  return SiteQuestionAnswerRelevance2;
892
912
  })(SiteQuestionAnswerRelevance || {});
893
- var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
894
- SiteQuestionAnswerResolution2["No"] = "no";
895
- SiteQuestionAnswerResolution2["Partially"] = "partially";
896
- SiteQuestionAnswerResolution2["Yes"] = "yes";
897
- return SiteQuestionAnswerResolution2;
898
- })(SiteQuestionAnswerResolution || {});
899
913
  var ContextSearchBoost = /* @__PURE__ */ ((ContextSearchBoost2) => {
900
914
  ContextSearchBoost2["X08"] = "x0.8";
901
915
  ContextSearchBoost2["X10"] = "x1.0";
@@ -1861,15 +1875,6 @@ var Api = class extends HttpClient {
1861
1875
  format: "json",
1862
1876
  ...params
1863
1877
  }),
1864
- transferSpace: (spaceId, data, params = {}) => this.request({
1865
- path: `/spaces/${spaceId}/transfer`,
1866
- method: "POST",
1867
- body: data,
1868
- secure: true,
1869
- type: "application/json" /* Json */,
1870
- format: "json",
1871
- ...params
1872
- }),
1873
1878
  getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
1874
1879
  path: `/spaces/${spaceId}/embed`,
1875
1880
  method: "GET",
@@ -4391,6 +4396,15 @@ var Api = class extends HttpClient {
4391
4396
  format: "json",
4392
4397
  ...params
4393
4398
  }),
4399
+ updateSiteChannelById: (organizationId, siteId, siteChannelId, data, params = {}) => this.request({
4400
+ path: `/orgs/${organizationId}/sites/${siteId}/channels/${siteChannelId}`,
4401
+ method: "PATCH",
4402
+ body: data,
4403
+ secure: true,
4404
+ type: "application/json" /* Json */,
4405
+ format: "json",
4406
+ ...params
4407
+ }),
4394
4408
  deleteSiteChannelById: (organizationId, siteId, siteChannelId, params = {}) => this.request({
4395
4409
  path: `/orgs/${organizationId}/sites/${siteId}/channels/${siteChannelId}`,
4396
4410
  method: "DELETE",
@@ -4678,8 +4692,8 @@ var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
4678
4692
  var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
4679
4693
  var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
4680
4694
  var CONTEXT_SEARCH_BOOST_ENUM = ["x0.8", "x1.0", "x1.2"];
4681
- var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
4682
4695
  var SITE_QUESTION_ANSWER_RELEVANCE_ENUM = ["relevant", "spam", "off-topic", "unclear"];
4696
+ var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
4683
4697
  var SITE_QUESTION_ANSWER_HELPFULNESS_ENUM = ["low", "medium", "high"];
4684
4698
  var SITE_CORE_CHANNEL_TYPE_ENUM = ["site", "embed", "api"];
4685
4699
  var SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM = ["builtin:slack", "builtin:discord"];
@@ -4702,6 +4716,8 @@ var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4702
4716
  var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4703
4717
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4704
4718
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4719
+ var SITE_CHANNEL_STATUS_ENUM = ["active", "pending"];
4720
+ var SITE_CHANNEL_ROLE_ENUM = ["collaborator", "support"];
4705
4721
  var CUSTOM_HOSTNAME_DNS_STATUS_ENUM = ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
4706
4722
  var CUSTOM_HOSTNAME_SSL_STATUS_ENUM = ["live", "ssl_unknown", "ssl_pending", "ssl_failed", "ssl_retry_expired"];
4707
4723
  var CUSTOM_HOSTNAME_ERROR_STATUS_ENUM = ["invalid_domain", "internal_error"];
@@ -4996,6 +5012,8 @@ var GitBookAPI = class extends Api {
4996
5012
  SITE_ADS_TOPIC_ENUM,
4997
5013
  SITE_BASENAME_MAX_LENGTH,
4998
5014
  SITE_BASENAME_MIN_LENGTH,
5015
+ SITE_CHANNEL_ROLE_ENUM,
5016
+ SITE_CHANNEL_STATUS_ENUM,
4999
5017
  SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM,
5000
5018
  SITE_CORE_CHANNEL_TYPE_ENUM,
5001
5019
  SITE_CUSTOMIZATION_FEATURE_ENUM,
@@ -5057,6 +5075,8 @@ var GitBookAPI = class extends Api {
5057
5075
  STORAGE_UPLOAD_KIND_ENUM,
5058
5076
  SiteAdsStatus,
5059
5077
  SiteAdsTopic,
5078
+ SiteChannelRole,
5079
+ SiteChannelStatus,
5060
5080
  SiteConfigurableChannelType,
5061
5081
  SiteCoreChannelType,
5062
5082
  SiteCustomizationFeature,
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.173.0";
175
+ var version = "0.174.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -397,6 +397,16 @@ var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
397
397
  CustomHostnameDnsStatus2["DnsWrongCaa"] = "dns_wrong_caa";
398
398
  return CustomHostnameDnsStatus2;
399
399
  })(CustomHostnameDnsStatus || {});
400
+ var SiteChannelRole = /* @__PURE__ */ ((SiteChannelRole2) => {
401
+ SiteChannelRole2["Collaborator"] = "collaborator";
402
+ SiteChannelRole2["Support"] = "support";
403
+ return SiteChannelRole2;
404
+ })(SiteChannelRole || {});
405
+ var SiteChannelStatus = /* @__PURE__ */ ((SiteChannelStatus2) => {
406
+ SiteChannelStatus2["Active"] = "active";
407
+ SiteChannelStatus2["Pending"] = "pending";
408
+ return SiteChannelStatus2;
409
+ })(SiteChannelStatus || {});
400
410
  var SiteInsightsQueryRangePreset = /* @__PURE__ */ ((SiteInsightsQueryRangePreset2) => {
401
411
  SiteInsightsQueryRangePreset2["LastYear"] = "lastYear";
402
412
  SiteInsightsQueryRangePreset2["Last3Months"] = "last3Months";
@@ -559,6 +569,12 @@ var SiteQuestionAnswerHelpfulness = /* @__PURE__ */ ((SiteQuestionAnswerHelpfuln
559
569
  SiteQuestionAnswerHelpfulness2["High"] = "high";
560
570
  return SiteQuestionAnswerHelpfulness2;
561
571
  })(SiteQuestionAnswerHelpfulness || {});
572
+ var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
573
+ SiteQuestionAnswerResolution2["No"] = "no";
574
+ SiteQuestionAnswerResolution2["Partially"] = "partially";
575
+ SiteQuestionAnswerResolution2["Yes"] = "yes";
576
+ return SiteQuestionAnswerResolution2;
577
+ })(SiteQuestionAnswerResolution || {});
562
578
  var SiteQuestionAnswerRelevance = /* @__PURE__ */ ((SiteQuestionAnswerRelevance2) => {
563
579
  SiteQuestionAnswerRelevance2["Relevant"] = "relevant";
564
580
  SiteQuestionAnswerRelevance2["Spam"] = "spam";
@@ -566,12 +582,6 @@ var SiteQuestionAnswerRelevance = /* @__PURE__ */ ((SiteQuestionAnswerRelevance2
566
582
  SiteQuestionAnswerRelevance2["Unclear"] = "unclear";
567
583
  return SiteQuestionAnswerRelevance2;
568
584
  })(SiteQuestionAnswerRelevance || {});
569
- var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
570
- SiteQuestionAnswerResolution2["No"] = "no";
571
- SiteQuestionAnswerResolution2["Partially"] = "partially";
572
- SiteQuestionAnswerResolution2["Yes"] = "yes";
573
- return SiteQuestionAnswerResolution2;
574
- })(SiteQuestionAnswerResolution || {});
575
585
  var ContextSearchBoost = /* @__PURE__ */ ((ContextSearchBoost2) => {
576
586
  ContextSearchBoost2["X08"] = "x0.8";
577
587
  ContextSearchBoost2["X10"] = "x1.0";
@@ -1537,15 +1547,6 @@ var Api = class extends HttpClient {
1537
1547
  format: "json",
1538
1548
  ...params
1539
1549
  }),
1540
- transferSpace: (spaceId, data, params = {}) => this.request({
1541
- path: `/spaces/${spaceId}/transfer`,
1542
- method: "POST",
1543
- body: data,
1544
- secure: true,
1545
- type: "application/json" /* Json */,
1546
- format: "json",
1547
- ...params
1548
- }),
1549
1550
  getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
1550
1551
  path: `/spaces/${spaceId}/embed`,
1551
1552
  method: "GET",
@@ -4067,6 +4068,15 @@ var Api = class extends HttpClient {
4067
4068
  format: "json",
4068
4069
  ...params
4069
4070
  }),
4071
+ updateSiteChannelById: (organizationId, siteId, siteChannelId, data, params = {}) => this.request({
4072
+ path: `/orgs/${organizationId}/sites/${siteId}/channels/${siteChannelId}`,
4073
+ method: "PATCH",
4074
+ body: data,
4075
+ secure: true,
4076
+ type: "application/json" /* Json */,
4077
+ format: "json",
4078
+ ...params
4079
+ }),
4070
4080
  deleteSiteChannelById: (organizationId, siteId, siteChannelId, params = {}) => this.request({
4071
4081
  path: `/orgs/${organizationId}/sites/${siteId}/channels/${siteChannelId}`,
4072
4082
  method: "DELETE",
@@ -4354,8 +4364,8 @@ var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
4354
4364
  var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
4355
4365
  var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
4356
4366
  var CONTEXT_SEARCH_BOOST_ENUM = ["x0.8", "x1.0", "x1.2"];
4357
- var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
4358
4367
  var SITE_QUESTION_ANSWER_RELEVANCE_ENUM = ["relevant", "spam", "off-topic", "unclear"];
4368
+ var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
4359
4369
  var SITE_QUESTION_ANSWER_HELPFULNESS_ENUM = ["low", "medium", "high"];
4360
4370
  var SITE_CORE_CHANNEL_TYPE_ENUM = ["site", "embed", "api"];
4361
4371
  var SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM = ["builtin:slack", "builtin:discord"];
@@ -4378,6 +4388,8 @@ var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4378
4388
  var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4379
4389
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4380
4390
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4391
+ var SITE_CHANNEL_STATUS_ENUM = ["active", "pending"];
4392
+ var SITE_CHANNEL_ROLE_ENUM = ["collaborator", "support"];
4381
4393
  var CUSTOM_HOSTNAME_DNS_STATUS_ENUM = ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
4382
4394
  var CUSTOM_HOSTNAME_SSL_STATUS_ENUM = ["live", "ssl_unknown", "ssl_pending", "ssl_failed", "ssl_retry_expired"];
4383
4395
  var CUSTOM_HOSTNAME_ERROR_STATUS_ENUM = ["invalid_domain", "internal_error"];
@@ -4671,6 +4683,8 @@ export {
4671
4683
  SITE_ADS_TOPIC_ENUM,
4672
4684
  SITE_BASENAME_MAX_LENGTH,
4673
4685
  SITE_BASENAME_MIN_LENGTH,
4686
+ SITE_CHANNEL_ROLE_ENUM,
4687
+ SITE_CHANNEL_STATUS_ENUM,
4674
4688
  SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM,
4675
4689
  SITE_CORE_CHANNEL_TYPE_ENUM,
4676
4690
  SITE_CUSTOMIZATION_FEATURE_ENUM,
@@ -4732,6 +4746,8 @@ export {
4732
4746
  STORAGE_UPLOAD_KIND_ENUM,
4733
4747
  SiteAdsStatus,
4734
4748
  SiteAdsTopic,
4749
+ SiteChannelRole,
4750
+ SiteChannelStatus,
4735
4751
  SiteConfigurableChannelType,
4736
4752
  SiteCoreChannelType,
4737
4753
  SiteCustomizationFeature,