@gitbook/api 0.88.1 → 0.90.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
@@ -1268,6 +1268,40 @@ export type InviteUsersAndTeams = ({
1268
1268
  /** Role to set. */
1269
1269
  role: MemberRoleOrGuest;
1270
1270
  };
1271
+ /** Permission of a user in a content. */
1272
+ export interface UserContentPermission {
1273
+ /**
1274
+ * "The role of a member in an organization.
1275
+ * "admin": Can administrate the content: create, delete spaces, ...
1276
+ * "create": Can create content.
1277
+ * "review": Can review content.
1278
+ * "edit": Can edit the content (live or change requests).
1279
+ * "comment": Can access the content and its discussions.
1280
+ * "read": Can access the content, but cannot update it in any way.
1281
+ */
1282
+ permission: MemberRole;
1283
+ user: User;
1284
+ }
1285
+ /**
1286
+ * Title of the team
1287
+ * @minLength 1
1288
+ * @maxLength 64
1289
+ */
1290
+ export type OrganizationTeamTitle = string;
1291
+ export interface OrganizationTeam {
1292
+ /** Type of Object, always equals to "team" */
1293
+ object: 'team';
1294
+ /** Unique identifier for the team. */
1295
+ id: string;
1296
+ /** Title of the team */
1297
+ title: OrganizationTeamTitle;
1298
+ /** Count of members in this team. */
1299
+ members: number;
1300
+ /** Count of spaces this team has access to. */
1301
+ spaces: number;
1302
+ /** Date at which the team was created. */
1303
+ createdAt: Timestamp;
1304
+ }
1271
1305
  export type RevisionPageGroup = RevisionPageBase & {
1272
1306
  /** @deprecated */
1273
1307
  kind: 'group';
@@ -1445,7 +1479,10 @@ export declare enum ImportContentSource {
1445
1479
  OpenApi = "open-api"
1446
1480
  }
1447
1481
  export interface ImportContent {
1448
- /** URL of the content to import. */
1482
+ /**
1483
+ * URL of the content to import.
1484
+ * @format uri
1485
+ */
1449
1486
  url: string;
1450
1487
  source: ImportContentSource;
1451
1488
  }
@@ -2479,20 +2516,6 @@ export interface UpdateCommentReplySchema {
2479
2516
  /** Reactions to remove from the comment. */
2480
2517
  removedReactions?: string[];
2481
2518
  }
2482
- /** Permission of a user in a content. */
2483
- export interface UserContentPermission {
2484
- /**
2485
- * "The role of a member in an organization.
2486
- * "admin": Can administrate the content: create, delete spaces, ...
2487
- * "create": Can create content.
2488
- * "review": Can review content.
2489
- * "edit": Can edit the content (live or change requests).
2490
- * "comment": Can access the content and its discussions.
2491
- * "read": Can access the content, but cannot update it in any way.
2492
- */
2493
- permission: MemberRole;
2494
- user: User;
2495
- }
2496
2519
  /** @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$ */
2497
2520
  export type Color = string;
2498
2521
  export interface CustomizationThemedColor {
@@ -3735,6 +3758,8 @@ export interface SiteSection {
3735
3758
  path: SiteSectionPath;
3736
3759
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
3737
3760
  condition?: Condition;
3761
+ /** ID of the section group the section belongs to in the site */
3762
+ sectionGroup?: string;
3738
3763
  siteSpaces: SiteSpace[];
3739
3764
  /** URLs associated with the object */
3740
3765
  urls: {
@@ -3804,26 +3829,6 @@ export interface MemberContentPermission {
3804
3829
  permission: MemberRole;
3805
3830
  space: Space;
3806
3831
  }
3807
- /**
3808
- * Title of the team
3809
- * @minLength 1
3810
- * @maxLength 64
3811
- */
3812
- export type OrganizationTeamTitle = string;
3813
- export interface OrganizationTeam {
3814
- /** Type of Object, always equals to "team" */
3815
- object: 'team';
3816
- /** Unique identifier for the team. */
3817
- id: string;
3818
- /** Title of the team */
3819
- title: OrganizationTeamTitle;
3820
- /** Count of members in this team. */
3821
- members: number;
3822
- /** Count of spaces this team has access to. */
3823
- spaces: number;
3824
- /** Date at which the team was created. */
3825
- createdAt: Timestamp;
3826
- }
3827
3832
  /**
3828
3833
  * "The role of a team member.
3829
3834
  * "owner": Can manage team members.
@@ -3966,6 +3971,32 @@ export type BillingUpgrade = {
3966
3971
  } | {
3967
3972
  result: 'interval_changed';
3968
3973
  };
3974
+ /** These are all the features we check to determine the new pricing site type. */
3975
+ export declare enum SiteToMigrateFeature {
3976
+ Sections = "sections",
3977
+ VisitorAuth = "visitor-auth",
3978
+ Redirects = "redirects",
3979
+ CustomHostname = "custom-hostname",
3980
+ AISearch = "AI-search",
3981
+ PDFExport = "PDF-export",
3982
+ PageRatings = "page-ratings",
3983
+ CustomLogo = "custom-logo",
3984
+ CustomThemePreset = "custom-theme-preset",
3985
+ CustomFonts = "custom-fonts",
3986
+ CustomIcons = "custom-icons",
3987
+ CustomFooterLogo = "custom-footer-logo",
3988
+ CustomFooterCopyright = "custom-footer-copyright",
3989
+ CustomFooterLinks = "custom-footer-links",
3990
+ Unlisted = "unlisted",
3991
+ ShareLinks = "share-links"
3992
+ }
3993
+ export interface SiteToMigrate {
3994
+ object: 'site-to-migrate';
3995
+ site: Site;
3996
+ /** The new type of the site */
3997
+ newType: SiteType;
3998
+ features: SiteToMigrateFeature[];
3999
+ }
3969
4000
  export interface BillingPortal {
3970
4001
  /** URL to the billing portal for an organization */
3971
4002
  url: string;
@@ -4249,6 +4280,19 @@ export type BillingOperationPreviewResponse = {
4249
4280
  plan: BillingProduct;
4250
4281
  invoice?: BillingInvoicePreview;
4251
4282
  };
4283
+ /**
4284
+ * The theme to apply to the site. Supercedes the old header preset themes.
4285
+ * - `clean`: Modern theme featuring translucency and minimally-styled elements.
4286
+ * - `muted`: Sophisticated theme with decreased contrast between elements.
4287
+ * - `bold`: High-impact theme with prominent colors and strong contrasts.
4288
+ * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
4289
+ */
4290
+ export declare enum CustomizationTheme {
4291
+ Clean = "clean",
4292
+ Muted = "muted",
4293
+ Bold = "bold",
4294
+ Gradient = "gradient"
4295
+ }
4252
4296
  export interface CustomizationTint {
4253
4297
  color: CustomizationThemedColor;
4254
4298
  }
@@ -4281,6 +4325,14 @@ export interface SiteCustomizationSettings {
4281
4325
  /** Title to use for the published site. If not defined, it'll fallback to the default content title. */
4282
4326
  title?: SiteTitle;
4283
4327
  styling: {
4328
+ /**
4329
+ * The theme to apply to the site. Supercedes the old header preset themes.
4330
+ * - `clean`: Modern theme featuring translucency and minimally-styled elements.
4331
+ * - `muted`: Sophisticated theme with decreased contrast between elements.
4332
+ * - `bold`: High-impact theme with prominent colors and strong contrasts.
4333
+ * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
4334
+ */
4335
+ theme?: CustomizationTheme;
4284
4336
  primaryColor: CustomizationThemedColor;
4285
4337
  tint?: CustomizationTint;
4286
4338
  corners: CustomizationCorners;
@@ -4328,6 +4380,7 @@ export interface SiteCustomizationSettings {
4328
4380
  /** @maxLength 300 */
4329
4381
  copyright?: string;
4330
4382
  };
4383
+ /** Customization options for the dark/light theme modes. */
4331
4384
  themes: {
4332
4385
  default: CustomizationThemeMode;
4333
4386
  /** Should the reader be able to switch between dark and light mode */
@@ -4433,6 +4486,24 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
4433
4486
  */
4434
4487
  fallbackURL?: string;
4435
4488
  };
4489
+ /**
4490
+ * Title of the site section group
4491
+ * @minLength 1
4492
+ * @maxLength 100
4493
+ */
4494
+ export type SiteSectionGroupTitle = string;
4495
+ export interface SiteSectionGroup {
4496
+ /** The object type, which is always "site-section-group" */
4497
+ object: 'site-section-group';
4498
+ /** Unique identifier of the site section group */
4499
+ id: string;
4500
+ /** Title of the site section group */
4501
+ title: SiteSectionGroupTitle;
4502
+ /** List of site section ids that are members of the group */
4503
+ sections: SiteSection[];
4504
+ /** Name of the icon */
4505
+ icon?: Icon;
4506
+ }
4436
4507
  export type SiteSearchScope = {
4437
4508
  /** Search across all sections of a site, only including the default content of each section. This scope is wide and shallow. You may optionally specify a list of additional site spaces to search in alongside the default content. */
4438
4509
  mode: 'default';
@@ -4603,6 +4674,17 @@ export type SiteInsightsEventPagePostFeedback = SiteInsightsEventBase & {
4603
4674
  rating: PageFeedbackRating;
4604
4675
  };
4605
4676
  };
4677
+ export type SiteInsightsEventPagePostFeedbackComment = SiteInsightsEventBase & {
4678
+ type: 'page_post_feedback_comment';
4679
+ feedback: {
4680
+ rating: PageFeedbackRating;
4681
+ /**
4682
+ * @minLength 1
4683
+ * @maxLength 512
4684
+ */
4685
+ comment: string;
4686
+ };
4687
+ };
4606
4688
  export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
4607
4689
  type: 'ask_question';
4608
4690
  /** Question being asked. */
@@ -4632,17 +4714,132 @@ export type SiteInsightsEventAPIClientRequest = SiteInsightsEventBase & {
4632
4714
  /** Pointer to an operation in the OpenAPI spec. */
4633
4715
  operation: OpenAPIOperationPointer;
4634
4716
  };
4635
- export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest;
4717
+ export declare enum SiteInsightsTrademarkPlacement {
4718
+ Sidebar = "sidebar",
4719
+ Ad = "ad",
4720
+ Footer = "footer",
4721
+ Pdf = "pdf"
4722
+ }
4723
+ export type SiteInsightsEventTrademarkClick = SiteInsightsEventBase & {
4724
+ type: 'trademark_click';
4725
+ placement: SiteInsightsTrademarkPlacement;
4726
+ };
4727
+ export declare enum SiteInsightsAdPlacement {
4728
+ Aside = "aside"
4729
+ }
4730
+ export interface SiteInsightsAd {
4731
+ domain: string;
4732
+ zoneId: string;
4733
+ placement: SiteInsightsAdPlacement;
4734
+ }
4735
+ export type SiteInsightsEventAdClick = SiteInsightsEventBase & {
4736
+ type: 'ad_click';
4737
+ ad: SiteInsightsAd;
4738
+ };
4739
+ export type SiteInsightsEventAdDisplay = SiteInsightsEventBase & {
4740
+ type: 'ad_display';
4741
+ ad: SiteInsightsAd;
4742
+ };
4743
+ export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventPagePostFeedbackComment | SiteInsightsEventAskQuestion | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest | SiteInsightsEventTrademarkClick | SiteInsightsEventAdClick | SiteInsightsEventAdDisplay;
4744
+ export interface SiteInsightsQueryDateTimeColumn {
4745
+ column: 'datetime';
4746
+ interval?: 'hour' | 'day' | 'week' | 'month';
4747
+ }
4748
+ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
4749
+ column: 'eventType';
4750
+ } | {
4751
+ column: 'eventsCount';
4752
+ } | {
4753
+ column: 'sessionsCount';
4754
+ } | {
4755
+ column: 'visitorsCount';
4756
+ } | {
4757
+ column: 'siteSection';
4758
+ } | {
4759
+ column: 'siteSpace';
4760
+ } | {
4761
+ column: 'siteShareKey';
4762
+ } | {
4763
+ column: 'page';
4764
+ } | {
4765
+ column: 'visitorGeoCountry';
4766
+ } | {
4767
+ column: 'visitorGeoPoint';
4768
+ /**
4769
+ * @min 0
4770
+ * @max 15
4771
+ */
4772
+ precision?: number;
4773
+ } | {
4774
+ column: 'visitorDevice';
4775
+ } | {
4776
+ column: 'visitorBrowser';
4777
+ } | {
4778
+ column: 'visitorOS';
4779
+ } | {
4780
+ column: 'visitorBot';
4781
+ } | {
4782
+ column: 'visitorLanguage';
4783
+ } | {
4784
+ column: 'eventLinkTargetValue';
4785
+ } | {
4786
+ column: 'eventLinkTargetKind';
4787
+ } | {
4788
+ column: 'eventLinkTargetDomain';
4789
+ } | {
4790
+ column: 'eventLinkPosition';
4791
+ } | {
4792
+ column: 'eventAPIOperationPath';
4793
+ } | {
4794
+ column: 'eventAPIOperationMethod';
4795
+ } | {
4796
+ column: 'eventSearchQuery';
4797
+ } | {
4798
+ column: 'eventPageFeedbackRating';
4799
+ } | {
4800
+ column: 'eventPageFeedbackComment';
4801
+ } | {
4802
+ column: 'pageFeedbackRating';
4803
+ } | {
4804
+ column: 'referrer';
4805
+ } | {
4806
+ column: 'referrerDomain';
4807
+ } | {
4808
+ column: 'utmSource';
4809
+ } | {
4810
+ column: 'utmMedium';
4811
+ } | {
4812
+ column: 'utmCampaign';
4813
+ } | {
4814
+ column: 'utmTerm';
4815
+ } | {
4816
+ column: 'utmContent';
4817
+ } | {
4818
+ column: 'visitorClaimProperty';
4819
+ } | {
4820
+ column: 'visitorClaim';
4821
+ claim: string;
4822
+ } | {
4823
+ column: 'eventAdDomain';
4824
+ } | {
4825
+ column: 'eventAdPlacement';
4826
+ } | {
4827
+ column: 'eventTrademarkPlacement';
4828
+ };
4636
4829
  export declare enum SiteInsightsEventType {
4637
4830
  PageView = "page_view",
4638
4831
  SearchOpen = "search_open",
4639
4832
  SearchTypeQuery = "search_type_query",
4640
4833
  SearchOpenResult = "search_open_result",
4641
4834
  PagePostFeedback = "page_post_feedback",
4835
+ PagePostFeedbackComment = "page_post_feedback_comment",
4642
4836
  AskQuestion = "ask_question",
4643
4837
  LinkClick = "link_click",
4644
4838
  ApiClientOpen = "api_client_open",
4645
- ApiClientRequest = "api_client_request"
4839
+ ApiClientRequest = "api_client_request",
4840
+ AdClick = "ad_click",
4841
+ AdDisplay = "ad_display",
4842
+ TrademarkClick = "trademark_click"
4646
4843
  }
4647
4844
  export declare enum SiteInsightsVisitorBrowser {
4648
4845
  Chrome = "chrome",
@@ -4731,13 +4928,20 @@ export type SiteInsightsQueryEventsValues = {
4731
4928
  values: (string | null)[];
4732
4929
  } | {
4733
4930
  column: 'page';
4734
- values: {
4931
+ values: (null | {
4735
4932
  page: string | null;
4736
4933
  space: string;
4737
- }[];
4934
+ })[];
4738
4935
  } | {
4739
4936
  column: 'visitorGeoCountry';
4740
4937
  values: (string | null)[];
4938
+ } | {
4939
+ column: 'visitorGeoPoint';
4940
+ values: ({
4941
+ latitude: number;
4942
+ longitude: number;
4943
+ h3: string;
4944
+ } | null)[];
4741
4945
  } | {
4742
4946
  column: 'visitorLanguage';
4743
4947
  values: (string | null)[];
@@ -4760,6 +4964,12 @@ export type SiteInsightsQueryEventsValues = {
4760
4964
  good: number;
4761
4965
  bad: number;
4762
4966
  }[];
4967
+ } | {
4968
+ column: 'eventPageFeedbackRating';
4969
+ values: PageFeedbackRating[];
4970
+ } | {
4971
+ column: 'eventPageFeedbackComment';
4972
+ values: string[];
4763
4973
  } | {
4764
4974
  column: 'referrer';
4765
4975
  values: string[];
@@ -4781,6 +4991,15 @@ export type SiteInsightsQueryEventsValues = {
4781
4991
  } | {
4782
4992
  column: 'utmContent';
4783
4993
  values: string[];
4994
+ } | {
4995
+ column: 'eventAdDomain';
4996
+ values: string[];
4997
+ } | {
4998
+ column: 'eventAdPlacement';
4999
+ values: SiteInsightsAdPlacement[];
5000
+ } | {
5001
+ column: 'eventTrademarkPlacement';
5002
+ values: SiteInsightsTrademarkPlacement[];
4784
5003
  };
4785
5004
  export declare enum SiteInsightsQueryOperator {
4786
5005
  In = "in",
@@ -4793,74 +5012,6 @@ export declare enum SiteInsightsQueryOperator {
4793
5012
  export type SiteInsightsQueryEventsFilter = SiteInsightsQueryEventsValues & {
4794
5013
  operator?: SiteInsightsQueryOperator;
4795
5014
  };
4796
- export interface SiteInsightsQueryDateTimeColumn {
4797
- column: 'datetime';
4798
- interval?: 'hour' | 'day' | 'week' | 'month';
4799
- }
4800
- export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
4801
- column: 'eventType';
4802
- } | {
4803
- column: 'eventsCount';
4804
- } | {
4805
- column: 'sessionsCount';
4806
- } | {
4807
- column: 'visitorsCount';
4808
- } | {
4809
- column: 'siteSection';
4810
- } | {
4811
- column: 'siteSpace';
4812
- } | {
4813
- column: 'siteShareKey';
4814
- } | {
4815
- column: 'page';
4816
- } | {
4817
- column: 'visitorGeoCountry';
4818
- } | {
4819
- column: 'visitorDevice';
4820
- } | {
4821
- column: 'visitorBrowser';
4822
- } | {
4823
- column: 'visitorOS';
4824
- } | {
4825
- column: 'visitorBot';
4826
- } | {
4827
- column: 'visitorLanguage';
4828
- } | {
4829
- column: 'eventLinkTargetValue';
4830
- } | {
4831
- column: 'eventLinkTargetKind';
4832
- } | {
4833
- column: 'eventLinkTargetDomain';
4834
- } | {
4835
- column: 'eventLinkPosition';
4836
- } | {
4837
- column: 'eventAPIOperationPath';
4838
- } | {
4839
- column: 'eventAPIOperationMethod';
4840
- } | {
4841
- column: 'eventSearchQuery';
4842
- } | {
4843
- column: 'pageFeedbackRating';
4844
- } | {
4845
- column: 'referrer';
4846
- } | {
4847
- column: 'referrerDomain';
4848
- } | {
4849
- column: 'utmSource';
4850
- } | {
4851
- column: 'utmMedium';
4852
- } | {
4853
- column: 'utmCampaign';
4854
- } | {
4855
- column: 'utmTerm';
4856
- } | {
4857
- column: 'utmContent';
4858
- } | {
4859
- column: 'visitorClaimProperty';
4860
- } | {
4861
- column: 'visitorClaim';
4862
- claim: string;
4863
- };
4864
5015
  export declare enum SiteInsightsQueryRange {
4865
5016
  LastYear = "lastYear",
4866
5017
  Last3Months = "last3Months",
@@ -4869,18 +5020,36 @@ export declare enum SiteInsightsQueryRange {
4869
5020
  Last24Hours = "last24Hours"
4870
5021
  }
4871
5022
  export interface SiteInsightsQueryEventsAggregation {
5023
+ select?: SiteInsightsQueryEventsColumn[];
4872
5024
  where?: SiteInsightsQueryEventsFilter[];
4873
- /** @minItems 1 */
4874
- groupBy: SiteInsightsQueryEventsColumn[];
5025
+ groupBy?: SiteInsightsQueryEventsColumn[];
4875
5026
  order?: {
4876
5027
  by: SiteInsightsQueryEventsColumn;
4877
5028
  direction: 'asc' | 'desc';
4878
5029
  };
4879
5030
  range: SiteInsightsQueryRange;
5031
+ /**
5032
+ * @min 1
5033
+ * @max 1000
5034
+ * @default 1000
5035
+ */
5036
+ limit?: number;
4880
5037
  }
4881
5038
  export interface SiteInsightsQueryEventsAggregationResult {
4882
5039
  columns: SiteInsightsQueryEventsValues[];
4883
5040
  }
5041
+ /** A segment of visitors with the same characteristics. */
5042
+ export interface SiteInsightsVisitorSegment {
5043
+ /** The title of the visitor profile. */
5044
+ title: string;
5045
+ claims: PlainObject;
5046
+ /** The number of events for this visitor profile. */
5047
+ events: number;
5048
+ /** The number of visitors for this visitor profile. */
5049
+ visitors: number;
5050
+ /** The number of sessions for this visitor profile. */
5051
+ sessions: number;
5052
+ }
4884
5053
  /**
4885
5054
  * The interval for grouping the results
4886
5055
  * @default "week"
@@ -6300,37 +6469,124 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6300
6469
  period?: AnalyticsSearchPeriod;
6301
6470
  }, params?: RequestParams) => Promise<HttpResponse<AnalyticsTopSearches, Error>>;
6302
6471
  /**
6303
- * @description Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
6472
+ * @description Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
6473
+ *
6474
+ * @tags analytics, spaces
6475
+ * @name GetTrafficAnalyticsForSpaceById
6476
+ * @summary Get traffic page views for a given space
6477
+ * @request GET:/spaces/{spaceId}/insights/traffic
6478
+ * @secure
6479
+ */
6480
+ getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
6481
+ interval?: AnalyticsTrafficInterval;
6482
+ }, params?: RequestParams) => Promise<HttpResponse<AnalyticsTrafficPageViews, Error>>;
6483
+ /**
6484
+ * @description Track a page view in a space.
6485
+ *
6486
+ * @tags analytics, spaces
6487
+ * @name TrackViewInSpaceById
6488
+ * @summary Track a page view in a space
6489
+ * @request POST:/spaces/{spaceId}/insights/track_view
6490
+ * @secure
6491
+ */
6492
+ trackViewInSpaceById: (spaceId: string, data: SpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
6493
+ /**
6494
+ * No description
6495
+ *
6496
+ * @tags spaces
6497
+ * @name InviteToSpace
6498
+ * @summary Invite to a space
6499
+ * @request POST:/spaces/{spaceId}/permissions
6500
+ * @secure
6501
+ */
6502
+ inviteToSpace: (spaceId: string, data: InviteUsersAndTeams, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6503
+ error: {
6504
+ /** @format int32 */
6505
+ code: 404;
6506
+ message: string;
6507
+ };
6508
+ }>>;
6509
+ /**
6510
+ * No description
6511
+ *
6512
+ * @tags spaces
6513
+ * @name UpdateTeamPermissionInSpace
6514
+ * @summary Update a team's permission in a space
6515
+ * @request PATCH:/spaces/{spaceId}/permissions/teams/{teamId}
6516
+ * @secure
6517
+ */
6518
+ updateTeamPermissionInSpace: (spaceId: string, teamId: string, data: {
6519
+ /** The role of a member in an organization, null for guests */
6520
+ role?: MemberRoleOrGuest;
6521
+ }, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6522
+ error: {
6523
+ /** @format int32 */
6524
+ code: 404;
6525
+ message: string;
6526
+ };
6527
+ }>>;
6528
+ /**
6529
+ * No description
6304
6530
  *
6305
- * @tags analytics, spaces
6306
- * @name GetTrafficAnalyticsForSpaceById
6307
- * @summary Get traffic page views for a given space
6308
- * @request GET:/spaces/{spaceId}/insights/traffic
6531
+ * @tags spaces
6532
+ * @name RemoveTeamFromSpace
6533
+ * @summary Remove a team from a space
6534
+ * @request DELETE:/spaces/{spaceId}/permissions/teams/{teamId}
6309
6535
  * @secure
6310
6536
  */
6311
- getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
6312
- interval?: AnalyticsTrafficInterval;
6313
- }, params?: RequestParams) => Promise<HttpResponse<AnalyticsTrafficPageViews, Error>>;
6537
+ removeTeamFromSpace: (spaceId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6538
+ error: {
6539
+ /** @format int32 */
6540
+ code: 400;
6541
+ message: string;
6542
+ };
6543
+ } | {
6544
+ error: {
6545
+ /** @format int32 */
6546
+ code: 404;
6547
+ message: string;
6548
+ };
6549
+ }>>;
6314
6550
  /**
6315
- * @description Track a page view in a space.
6551
+ * No description
6316
6552
  *
6317
- * @tags analytics, spaces
6318
- * @name TrackViewInSpaceById
6319
- * @summary Track a page view in a space
6320
- * @request POST:/spaces/{spaceId}/insights/track_view
6553
+ * @tags permissions, spaces
6554
+ * @name ListUserPermissionsInSpace
6555
+ * @summary List permissions for users in a space.
6556
+ * @request GET:/spaces/{spaceId}/permissions/users
6321
6557
  * @secure
6322
6558
  */
6323
- trackViewInSpaceById: (spaceId: string, data: SpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
6559
+ listUserPermissionsInSpace: (spaceId: string, query?: {
6560
+ /** Identifier of the page results to fetch. */
6561
+ page?: string;
6562
+ /**
6563
+ * The number of results per page
6564
+ * @min 0
6565
+ * @max 1000
6566
+ */
6567
+ limit?: number;
6568
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
6569
+ items: UserContentPermission[];
6570
+ }, Error | {
6571
+ error: {
6572
+ /** @format int32 */
6573
+ code: 404;
6574
+ message: string;
6575
+ };
6576
+ }>>;
6324
6577
  /**
6325
6578
  * No description
6326
6579
  *
6327
6580
  * @tags spaces
6328
- * @name InviteToSpace
6329
- * @summary Invite to a space
6330
- * @request POST:/spaces/{spaceId}/permissions
6581
+ * @name UpdateUserPermissionInSpace
6582
+ * @summary Update a user's permission a space
6583
+ * @request PATCH:/spaces/{spaceId}/permissions/users/{userId}
6331
6584
  * @secure
6332
6585
  */
6333
- inviteToSpace: (spaceId: string, data: InviteUsersAndTeams, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6586
+ updateUserPermissionInSpace: (spaceId: string, userId: string, data: {
6587
+ /** The role of a member in an organization, null for guests */
6588
+ role?: MemberRoleOrGuest;
6589
+ }, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6334
6590
  error: {
6335
6591
  /** @format int32 */
6336
6592
  code: 404;
@@ -6341,18 +6597,51 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6341
6597
  * No description
6342
6598
  *
6343
6599
  * @tags spaces
6344
- * @name RemoveTeamFromSpace
6345
- * @summary Remove a team from a space
6346
- * @request DELETE:/spaces/{spaceId}/permissions/teams/{teamId}
6600
+ * @name RemoveUserFromSpace
6601
+ * @summary Remove a user from a space
6602
+ * @request DELETE:/spaces/{spaceId}/permissions/users/{userId}
6347
6603
  * @secure
6348
6604
  */
6349
- removeTeamFromSpace: (spaceId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6605
+ removeUserFromSpace: (spaceId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
6350
6606
  error: {
6351
6607
  /** @format int32 */
6352
- code: 400;
6608
+ code: 404;
6353
6609
  message: string;
6354
6610
  };
6355
- } | {
6611
+ }>>;
6612
+ /**
6613
+ * No description
6614
+ *
6615
+ * @tags permissions, spaces
6616
+ * @name ListTeamPermissionsInSpace
6617
+ * @summary List permissions for teams in a space.
6618
+ * @request GET:/spaces/{spaceId}/permissions/teams
6619
+ * @secure
6620
+ */
6621
+ listTeamPermissionsInSpace: (spaceId: string, query?: {
6622
+ /** Identifier of the page results to fetch. */
6623
+ page?: string;
6624
+ /**
6625
+ * The number of results per page
6626
+ * @min 0
6627
+ * @max 1000
6628
+ */
6629
+ limit?: number;
6630
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
6631
+ items: {
6632
+ /**
6633
+ * "The role of a member in an organization.
6634
+ * "admin": Can administrate the content: create, delete spaces, ...
6635
+ * "create": Can create content.
6636
+ * "review": Can review content.
6637
+ * "edit": Can edit the content (live or change requests).
6638
+ * "comment": Can access the content and its discussions.
6639
+ * "read": Can access the content, but cannot update it in any way.
6640
+ */
6641
+ permission: MemberRole;
6642
+ team: OrganizationTeam;
6643
+ }[];
6644
+ }, Error | {
6356
6645
  error: {
6357
6646
  /** @format int32 */
6358
6647
  code: 404;
@@ -7973,6 +8262,136 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7973
8262
  message: string;
7974
8263
  };
7975
8264
  }>>;
8265
+ /**
8266
+ * No description
8267
+ *
8268
+ * @tags permissions, collections
8269
+ * @name ListTeamPermissionsInCollection
8270
+ * @summary List permissions for teams in a collection.
8271
+ * @request GET:/collections/{collectionId}/permissions/teams
8272
+ * @secure
8273
+ */
8274
+ listTeamPermissionsInCollection: (collectionId: string, query?: {
8275
+ /** Identifier of the page results to fetch. */
8276
+ page?: string;
8277
+ /**
8278
+ * The number of results per page
8279
+ * @min 0
8280
+ * @max 1000
8281
+ */
8282
+ limit?: number;
8283
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
8284
+ items: {
8285
+ /**
8286
+ * "The role of a member in an organization.
8287
+ * "admin": Can administrate the content: create, delete spaces, ...
8288
+ * "create": Can create content.
8289
+ * "review": Can review content.
8290
+ * "edit": Can edit the content (live or change requests).
8291
+ * "comment": Can access the content and its discussions.
8292
+ * "read": Can access the content, but cannot update it in any way.
8293
+ */
8294
+ permission: MemberRole;
8295
+ team: OrganizationTeam;
8296
+ }[];
8297
+ }, Error>>;
8298
+ /**
8299
+ * No description
8300
+ *
8301
+ * @tags collections
8302
+ * @name UpdateTeamPermissionInCollection
8303
+ * @summary Update a team's permission a collection
8304
+ * @request PATCH:/collections/{collectionId}/permissions/teams/{teamId}
8305
+ * @secure
8306
+ */
8307
+ updateTeamPermissionInCollection: (collectionId: string, teamId: string, data: {
8308
+ /** The role of a member in an organization, null for guests */
8309
+ role?: MemberRoleOrGuest;
8310
+ }, params?: RequestParams) => Promise<HttpResponse<void, Error | {
8311
+ error: {
8312
+ /** @format int32 */
8313
+ code: 404;
8314
+ message: string;
8315
+ };
8316
+ }>>;
8317
+ /**
8318
+ * No description
8319
+ *
8320
+ * @tags collections
8321
+ * @name RemoveTeamFromCollection
8322
+ * @summary Remove a team from a collection
8323
+ * @request DELETE:/collections/{collectionId}/permissions/teams/{teamId}
8324
+ * @secure
8325
+ */
8326
+ removeTeamFromCollection: (collectionId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
8327
+ error: {
8328
+ /** @format int32 */
8329
+ code: 404;
8330
+ message: string;
8331
+ };
8332
+ }>>;
8333
+ /**
8334
+ * No description
8335
+ *
8336
+ * @tags permissions, collections
8337
+ * @name ListUserPermissionsInCollection
8338
+ * @summary List permissions for users in a collection.
8339
+ * @request GET:/collections/{collectionId}/permissions/users
8340
+ * @secure
8341
+ */
8342
+ listUserPermissionsInCollection: (collectionId: string, query?: {
8343
+ /** Identifier of the page results to fetch. */
8344
+ page?: string;
8345
+ /**
8346
+ * The number of results per page
8347
+ * @min 0
8348
+ * @max 1000
8349
+ */
8350
+ limit?: number;
8351
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
8352
+ items: UserContentPermission[];
8353
+ }, Error | {
8354
+ error: {
8355
+ /** @format int32 */
8356
+ code: 404;
8357
+ message: string;
8358
+ };
8359
+ }>>;
8360
+ /**
8361
+ * No description
8362
+ *
8363
+ * @tags collections
8364
+ * @name UpdateUserPermissionInCollection
8365
+ * @summary Update a user's permission a collection
8366
+ * @request PATCH:/collections/{collectionId}/permissions/users/{userId}
8367
+ * @secure
8368
+ */
8369
+ updateUserPermissionInCollection: (collectionId: string, userId: string, data: {
8370
+ /** The role of a member in an organization, null for guests */
8371
+ role?: MemberRoleOrGuest;
8372
+ }, params?: RequestParams) => Promise<HttpResponse<void, Error | {
8373
+ error: {
8374
+ /** @format int32 */
8375
+ code: 404;
8376
+ message: string;
8377
+ };
8378
+ }>>;
8379
+ /**
8380
+ * No description
8381
+ *
8382
+ * @tags collections
8383
+ * @name RemoveUserFromCollection
8384
+ * @summary Remove a user from a collection
8385
+ * @request DELETE:/collections/{collectionId}/permissions/users/{userId}
8386
+ * @secure
8387
+ */
8388
+ removeUserFromCollection: (collectionId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
8389
+ error: {
8390
+ /** @format int32 */
8391
+ code: 404;
8392
+ message: string;
8393
+ };
8394
+ }>>;
7976
8395
  /**
7977
8396
  * No description
7978
8397
  *
@@ -9021,6 +9440,81 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9021
9440
  /** The app screen URL to bring the user back to after a canceled checkout. */
9022
9441
  cancelReturnURL?: string;
9023
9442
  }, params?: RequestParams) => Promise<HttpResponse<BillingUpgrade, Error>>;
9443
+ /**
9444
+ * No description
9445
+ *
9446
+ * @tags organizations
9447
+ * @name MigrateOrganizationPlan
9448
+ * @summary Migrate an organization's legacy billing plan to new pricing
9449
+ * @request POST:/orgs/{organizationId}/billing/migrate
9450
+ * @secure
9451
+ */
9452
+ migrateOrganizationPlan: (organizationId: string, data: {
9453
+ /** The desired billing interval */
9454
+ interval: BillingInterval;
9455
+ /** The new product to upgrade to */
9456
+ product: "free_2024" | "plus_2024" | "pro_2024";
9457
+ /** Changes to apply to the organization and its sites before upgrading */
9458
+ changes?: {
9459
+ /** A list of member identifiers to be removed */
9460
+ removeMembers?: string[];
9461
+ /** A list of site type updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. */
9462
+ updateSiteTypes?: {
9463
+ /** The site identifier */
9464
+ id: string;
9465
+ /** The new site type */
9466
+ type: "basic" | "premium" | "ultimate";
9467
+ }[];
9468
+ };
9469
+ }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9470
+ /**
9471
+ * No description
9472
+ *
9473
+ * @tags organizations
9474
+ * @name PreviewMigrateOrganizationPlan
9475
+ * @summary Preview a migration of an organization to new pricing.
9476
+ * @request GET:/orgs/{organizationId}/billing/migrate
9477
+ * @secure
9478
+ */
9479
+ previewMigrateOrganizationPlan: (organizationId: string, query: {
9480
+ /** The desired billing interval */
9481
+ interval: BillingInterval;
9482
+ /** The new product to upgrade to */
9483
+ product: "free_2024" | "plus_2024" | "pro_2024";
9484
+ /** How many members have been deselected by the user */
9485
+ removedMembersCount: number;
9486
+ }, params?: RequestParams) => Promise<HttpResponse<{
9487
+ totals: {
9488
+ /** Count of all members */
9489
+ members: number;
9490
+ /** Count of all premium sites */
9491
+ premiumSites: number;
9492
+ /** Count of all ultimate sites */
9493
+ ultimateSites: number;
9494
+ };
9495
+ invoice?: BillingInvoicePreview;
9496
+ }, Error>>;
9497
+ /**
9498
+ * No description
9499
+ *
9500
+ * @tags organizations, sites
9501
+ * @name ListSitesToMigrate
9502
+ * @summary Lists all legacy sites of an org and computes their new type and contributing features
9503
+ * @request GET:/orgs/{organizationId}/billing/migrate/sites
9504
+ * @secure
9505
+ */
9506
+ listSitesToMigrate: (organizationId: string, query?: {
9507
+ /** Identifier of the page results to fetch. */
9508
+ page?: string;
9509
+ /**
9510
+ * The number of results per page
9511
+ * @min 0
9512
+ * @max 1000
9513
+ */
9514
+ limit?: number;
9515
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
9516
+ items: SiteToMigrate[];
9517
+ }, Error>>;
9024
9518
  /**
9025
9519
  * No description
9026
9520
  *
@@ -10277,6 +10771,45 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10277
10771
  }, params?: RequestParams) => Promise<HttpResponse<List & {
10278
10772
  items: SiteSpace[];
10279
10773
  }, Error>>;
10774
+ /**
10775
+ * No description
10776
+ *
10777
+ * @tags sites
10778
+ * @name AddSectionGroupToSite
10779
+ * @summary Add a section group to a site in an organization
10780
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups
10781
+ * @secure
10782
+ */
10783
+ addSectionGroupToSite: (organizationId: string, siteId: string, data: {
10784
+ /** Title of the site section group */
10785
+ title: SiteSectionGroupTitle;
10786
+ /** IDs of the sections to be added to the section group */
10787
+ sections?: string[];
10788
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
10789
+ /**
10790
+ * No description
10791
+ *
10792
+ * @tags sites
10793
+ * @name UpdateSiteSectionGroupById
10794
+ * @summary Update a section group on a site in an organization
10795
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}
10796
+ * @secure
10797
+ */
10798
+ updateSiteSectionGroupById: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
10799
+ /** Title of the site section group */
10800
+ title?: SiteSectionGroupTitle;
10801
+ icon?: Icon | null;
10802
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
10803
+ /**
10804
+ * No description
10805
+ *
10806
+ * @tags sites
10807
+ * @name DeleteSiteSectionGroupById
10808
+ * @summary Delete a section group on a site in an organization
10809
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}
10810
+ * @secure
10811
+ */
10812
+ deleteSiteSectionGroupById: (organizationId: string, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10280
10813
  /**
10281
10814
  * No description
10282
10815
  *
@@ -10415,6 +10948,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10415
10948
  /** Output format for the content. */
10416
10949
  format?: "document" | "markdown";
10417
10950
  }, params?: RequestParams) => EventIterator<SearchAIAnswerStream>;
10951
+ /**
10952
+ * No description
10953
+ *
10954
+ * @name StreamRecommendedQuestionsInSite
10955
+ * @summary Stream a list of questions that can be asked in a site.
10956
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/ask/questions
10957
+ * @secure
10958
+ */
10959
+ streamRecommendedQuestionsInSite: (organizationId: string, siteId: string, params?: RequestParams) => EventIterator<SearchAIRecommendedQuestionStream>;
10418
10960
  /**
10419
10961
  * No description
10420
10962
  *
@@ -10733,6 +11275,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10733
11275
  * @secure
10734
11276
  */
10735
11277
  aggregateSiteEvents: (organizationId: string, siteId: string, data: SiteInsightsQueryEventsAggregation, params?: RequestParams) => Promise<HttpResponse<SiteInsightsQueryEventsAggregationResult, any>>;
11278
+ /**
11279
+ * No description
11280
+ *
11281
+ * @tags sites
11282
+ * @name ListSiteVisitorSegments
11283
+ * @summary List visitor segments in a site.
11284
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/insights/visitor-segments
11285
+ * @secure
11286
+ */
11287
+ listSiteVisitorSegments: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<List & {
11288
+ items: SiteInsightsVisitorSegment[];
11289
+ }, any>>;
10736
11290
  /**
10737
11291
  * No description
10738
11292
  *
@@ -10984,14 +11538,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10984
11538
  * @max 1000
10985
11539
  */
10986
11540
  limit?: number;
11541
+ /**
11542
+ * Filter sites by their ads review status
11543
+ * @default "in-review"
11544
+ */
11545
+ status?: "in-review" | "live" | "rejected";
10987
11546
  }, params?: RequestParams) => Promise<HttpResponse<List & {
10988
- items: {
11547
+ items: ({
10989
11548
  id: string;
10990
11549
  url: string;
10991
11550
  email: string;
10992
11551
  /** Topic of the content */
10993
11552
  topic: SiteAdsTopic;
10994
- }[];
11553
+ } & ({
11554
+ status: "in-review";
11555
+ } | {
11556
+ status: "live";
11557
+ /** The ad network zone ID */
11558
+ zoneId: string;
11559
+ } | {
11560
+ status: "rejected";
11561
+ /** Reason for the rejection */
11562
+ reason?: string;
11563
+ }))[];
10995
11564
  }, Error>>;
10996
11565
  /**
10997
11566
  * No description