@gitbook/api 0.75.0 → 0.77.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 +213 -89
- package/dist/index.cjs +49 -1
- package/dist/index.js +49 -1
- package/package.json +1 -1
- package/spec/openapi.json +714 -170
- package/spec/openapi.yaml +422 -110
package/dist/client.d.ts
CHANGED
|
@@ -1597,28 +1597,10 @@ export interface Collection {
|
|
|
1597
1597
|
title: CollectionTitle;
|
|
1598
1598
|
/** Description of the collection */
|
|
1599
1599
|
description?: CollectionDescription;
|
|
1600
|
-
/** Path in the published URL */
|
|
1601
|
-
path?: string;
|
|
1602
|
-
/**
|
|
1603
|
-
* * `public`: Anyone can access the content, and the content is indexed by search engines.
|
|
1604
|
-
* * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
|
|
1605
|
-
* * `share-link`: Anyone with a secret token in the url can access the content.
|
|
1606
|
-
* * `visitor-auth`: Anyone authenticated through a JWT token can access the content.
|
|
1607
|
-
* * `in-collection`: Anyone who can access the parent collection can access the content.
|
|
1608
|
-
* Only available for spaces in a collection.
|
|
1609
|
-
* * `private`: Authorized members can access the content.
|
|
1610
|
-
*/
|
|
1611
|
-
visibility: ContentVisibility;
|
|
1612
|
-
publishingType?: 'variants';
|
|
1613
1600
|
/** ID of the organization owning this collection */
|
|
1614
1601
|
organization: string;
|
|
1615
1602
|
/** ID of the parent collection, if any */
|
|
1616
1603
|
parent?: string;
|
|
1617
|
-
/**
|
|
1618
|
-
* ID of the parent collection, if any
|
|
1619
|
-
* @deprecated
|
|
1620
|
-
*/
|
|
1621
|
-
collection?: string;
|
|
1622
1604
|
/** Default level for a piece of content */
|
|
1623
1605
|
defaultLevel: DefaultLevel;
|
|
1624
1606
|
/** URLs associated with the object */
|
|
@@ -1634,6 +1616,13 @@ export interface Collection {
|
|
|
1634
1616
|
*/
|
|
1635
1617
|
app: string;
|
|
1636
1618
|
};
|
|
1619
|
+
/** The set of permissions for the collection */
|
|
1620
|
+
permissions: {
|
|
1621
|
+
/** Can the user edit the title/description. */
|
|
1622
|
+
admin: boolean;
|
|
1623
|
+
/** Can the user create spaces/collections in this collection. */
|
|
1624
|
+
create: boolean;
|
|
1625
|
+
};
|
|
1637
1626
|
}
|
|
1638
1627
|
export interface ContentLocationCollection {
|
|
1639
1628
|
kind: 'collection';
|
|
@@ -3004,33 +2993,35 @@ export interface IntegrationEventLog {
|
|
|
3004
2993
|
export interface IntegrationEventTrace {
|
|
3005
2994
|
logs: IntegrationEventLog[];
|
|
3006
2995
|
}
|
|
3007
|
-
/**
|
|
3008
|
-
export interface
|
|
2996
|
+
/** Base properties of an installation of an integration on a site or space. */
|
|
2997
|
+
export interface IntegrationContentInstallationBase {
|
|
3009
2998
|
/** Unique name identifier of the integration */
|
|
3010
2999
|
integration: string;
|
|
3011
3000
|
/** ID of the integration installation */
|
|
3012
3001
|
installation: string;
|
|
3013
|
-
/** The space the integration is installed on. Using the string value is deprecated in favor of space.id */
|
|
3014
|
-
space: string | Space;
|
|
3015
3002
|
status: IntegrationInstallationStatus;
|
|
3016
|
-
/** Configuration of the integration for this
|
|
3003
|
+
/** Configuration of the integration for this site */
|
|
3017
3004
|
configuration: object;
|
|
3018
3005
|
/** External IDs assigned by the integration. */
|
|
3019
3006
|
externalIds: IntegrationInstallationExternalIds;
|
|
3020
3007
|
/** URLs associated with the object */
|
|
3021
3008
|
urls: {
|
|
3022
3009
|
/**
|
|
3023
|
-
* URL of the integration's
|
|
3010
|
+
* URL of the integration's installation in the API
|
|
3024
3011
|
* @format uri
|
|
3025
3012
|
*/
|
|
3026
3013
|
location: string;
|
|
3027
3014
|
/**
|
|
3028
|
-
* Public HTTP endpoint for the integration's
|
|
3015
|
+
* Public HTTP endpoint for the integration's installation
|
|
3029
3016
|
* @format uri
|
|
3030
3017
|
*/
|
|
3031
3018
|
publicEndpoint: string;
|
|
3032
3019
|
};
|
|
3033
3020
|
}
|
|
3021
|
+
export type IntegrationSpaceInstallation = IntegrationContentInstallationBase & {
|
|
3022
|
+
/** The space the integration is installed on. Using the string value is deprecated in favor of space.id */
|
|
3023
|
+
space: string | Space;
|
|
3024
|
+
};
|
|
3034
3025
|
export declare enum ContentKitIcon {
|
|
3035
3026
|
Close = "close",
|
|
3036
3027
|
Edit = "edit",
|
|
@@ -3503,33 +3494,10 @@ export interface Site {
|
|
|
3503
3494
|
published?: string;
|
|
3504
3495
|
};
|
|
3505
3496
|
}
|
|
3506
|
-
|
|
3507
|
-
export interface IntegrationSiteInstallation {
|
|
3508
|
-
/** Unique name identifier of the integration */
|
|
3509
|
-
integration: string;
|
|
3510
|
-
/** ID of the integration installation */
|
|
3511
|
-
installation: string;
|
|
3497
|
+
export type IntegrationSiteInstallation = IntegrationContentInstallationBase & {
|
|
3512
3498
|
/** The site the integration is installed on. Using the string value is deprecated in favor of site.id */
|
|
3513
3499
|
site: string | Site;
|
|
3514
|
-
|
|
3515
|
-
/** Configuration of the integration for this site */
|
|
3516
|
-
configuration: object;
|
|
3517
|
-
/** External IDs assigned by the integration. */
|
|
3518
|
-
externalIds: IntegrationInstallationExternalIds;
|
|
3519
|
-
/** URLs associated with the object */
|
|
3520
|
-
urls: {
|
|
3521
|
-
/**
|
|
3522
|
-
* URL of the integration's site installation in the API
|
|
3523
|
-
* @format uri
|
|
3524
|
-
*/
|
|
3525
|
-
location: string;
|
|
3526
|
-
/**
|
|
3527
|
-
* Public HTTP endpoint for the integration's site installation
|
|
3528
|
-
* @format uri
|
|
3529
|
-
*/
|
|
3530
|
-
publicEndpoint: string;
|
|
3531
|
-
};
|
|
3532
|
-
}
|
|
3500
|
+
};
|
|
3533
3501
|
export interface UpdateIntegrationSiteInstallation {
|
|
3534
3502
|
/** External IDs assigned by the integration. */
|
|
3535
3503
|
externalIds?: IntegrationInstallationExternalIds;
|
|
@@ -4108,29 +4076,6 @@ export type BillingOperationPreviewResponse = {
|
|
|
4108
4076
|
plan: BillingProduct;
|
|
4109
4077
|
invoice?: BillingInvoicePreview;
|
|
4110
4078
|
};
|
|
4111
|
-
export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4112
|
-
/** Type of Object, always equals to "publishing-auth" */
|
|
4113
|
-
object: 'publishing-auth';
|
|
4114
|
-
/** Private key used to sign JWT tokens. */
|
|
4115
|
-
privateKey: string;
|
|
4116
|
-
/**
|
|
4117
|
-
* URL to redirect to when the visitor auth secret is invalid.
|
|
4118
|
-
* @format uri
|
|
4119
|
-
*/
|
|
4120
|
-
fallbackURL?: string;
|
|
4121
|
-
/**
|
|
4122
|
-
* Name of the Visitor Authentication integration installed on the site (if any).
|
|
4123
|
-
* It is also the one being used as VA backend when the published auth settings are configured to use "integration" as backend.
|
|
4124
|
-
*/
|
|
4125
|
-
integration?: string;
|
|
4126
|
-
};
|
|
4127
|
-
export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4128
|
-
/**
|
|
4129
|
-
* A fallback URL that will be used if authentication fails.
|
|
4130
|
-
* @format uri
|
|
4131
|
-
*/
|
|
4132
|
-
fallbackURL?: string;
|
|
4133
|
-
};
|
|
4134
4079
|
export declare enum CustomizationIconsStyle {
|
|
4135
4080
|
Regular = "regular",
|
|
4136
4081
|
Solid = "solid",
|
|
@@ -4219,6 +4164,39 @@ export interface SiteIntegrationScript {
|
|
|
4219
4164
|
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
4220
4165
|
cookies: boolean;
|
|
4221
4166
|
}
|
|
4167
|
+
export interface PublishedContentSite {
|
|
4168
|
+
object: 'published-content-site';
|
|
4169
|
+
site: Site;
|
|
4170
|
+
structure: SiteStructure;
|
|
4171
|
+
customizations: {
|
|
4172
|
+
site: SiteCustomizationSettings;
|
|
4173
|
+
siteSpaces: Record<string, SiteCustomizationSettings>;
|
|
4174
|
+
};
|
|
4175
|
+
scripts: SiteIntegrationScript[];
|
|
4176
|
+
}
|
|
4177
|
+
export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4178
|
+
/** Type of Object, always equals to "publishing-auth" */
|
|
4179
|
+
object: 'publishing-auth';
|
|
4180
|
+
/** Private key used to sign JWT tokens. */
|
|
4181
|
+
privateKey: string;
|
|
4182
|
+
/**
|
|
4183
|
+
* URL to redirect to when the visitor auth secret is invalid.
|
|
4184
|
+
* @format uri
|
|
4185
|
+
*/
|
|
4186
|
+
fallbackURL?: string;
|
|
4187
|
+
/**
|
|
4188
|
+
* Name of the Visitor Authentication integration installed on the site (if any).
|
|
4189
|
+
* It is also the one being used as VA backend when the published auth settings are configured to use "integration" as backend.
|
|
4190
|
+
*/
|
|
4191
|
+
integration?: string;
|
|
4192
|
+
};
|
|
4193
|
+
export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4194
|
+
/**
|
|
4195
|
+
* A fallback URL that will be used if authentication fails.
|
|
4196
|
+
* @format uri
|
|
4197
|
+
*/
|
|
4198
|
+
fallbackURL?: string;
|
|
4199
|
+
};
|
|
4222
4200
|
export interface SiteSectionPointer {
|
|
4223
4201
|
type: 'site-section';
|
|
4224
4202
|
/** Unique identifier for the site section */
|
|
@@ -4316,6 +4294,38 @@ export interface InsightsContentPage {
|
|
|
4316
4294
|
/** Icon of the page, if one has been set. */
|
|
4317
4295
|
icon?: Icon;
|
|
4318
4296
|
}
|
|
4297
|
+
/**
|
|
4298
|
+
* The source path to redirect from.
|
|
4299
|
+
* @maxLength 512
|
|
4300
|
+
* @pattern ^/[a-zA-Z0-9-_.\/]+[a-zA-Z0-9-_.]$
|
|
4301
|
+
*/
|
|
4302
|
+
export type SiteRedirectSourcePath = string;
|
|
4303
|
+
export interface SiteRedirectDestinationSiteSection {
|
|
4304
|
+
kind: 'site-section';
|
|
4305
|
+
/** Unique identifier for the site section to redirect to */
|
|
4306
|
+
siteSectionId: string;
|
|
4307
|
+
}
|
|
4308
|
+
export interface SiteRedirectDestinationSiteSpace {
|
|
4309
|
+
kind: 'site-space';
|
|
4310
|
+
/** Unique identifier for the site space to redirect to */
|
|
4311
|
+
siteSpaceId: string;
|
|
4312
|
+
}
|
|
4313
|
+
export interface SiteRedirectDestinationPage {
|
|
4314
|
+
kind: 'site-page';
|
|
4315
|
+
/** Unique identifier for the site space of the page */
|
|
4316
|
+
siteSpaceId: string;
|
|
4317
|
+
/** Unique identifier for the page within the site space to redirect to */
|
|
4318
|
+
pageId: string;
|
|
4319
|
+
}
|
|
4320
|
+
export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage;
|
|
4321
|
+
export interface SiteRedirect {
|
|
4322
|
+
object: 'site-redirect';
|
|
4323
|
+
/** The unique identifier for the redirect. */
|
|
4324
|
+
id: string;
|
|
4325
|
+
/** The source path to redirect from. */
|
|
4326
|
+
source: SiteRedirectSourcePath;
|
|
4327
|
+
destination: SiteRedirectDestination;
|
|
4328
|
+
}
|
|
4319
4329
|
export declare enum CustomHostnameDnsStatus {
|
|
4320
4330
|
DnsPassed = "dns_passed",
|
|
4321
4331
|
DnsWrongCname = "dns_wrong_cname",
|
|
@@ -4672,6 +4682,14 @@ export interface OrganizationTransferResponse {
|
|
|
4672
4682
|
/** The new hostname if the source organization needed to change hostname. */
|
|
4673
4683
|
newSourceHostname?: string;
|
|
4674
4684
|
}
|
|
4685
|
+
export type IntegrationEnvironmentSpaceInstallation = IntegrationContentInstallationBase & {
|
|
4686
|
+
/** The space the integration is installed on. */
|
|
4687
|
+
space: string;
|
|
4688
|
+
};
|
|
4689
|
+
export type IntegrationEnvironmentSiteInstallation = IntegrationContentInstallationBase & {
|
|
4690
|
+
/** The site the integration is installed on. */
|
|
4691
|
+
site: string;
|
|
4692
|
+
};
|
|
4675
4693
|
/** Runtime environment provided during the execution of integration's code. */
|
|
4676
4694
|
export interface IntegrationEnvironment {
|
|
4677
4695
|
/**
|
|
@@ -4682,10 +4700,8 @@ export interface IntegrationEnvironment {
|
|
|
4682
4700
|
integration: Integration;
|
|
4683
4701
|
/** Installation of an integration on an account */
|
|
4684
4702
|
installation?: IntegrationInstallation;
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
/** Installation of an integration at a site level */
|
|
4688
|
-
siteInstallation?: IntegrationSiteInstallation;
|
|
4703
|
+
spaceInstallation?: IntegrationEnvironmentSpaceInstallation;
|
|
4704
|
+
siteInstallation?: IntegrationEnvironmentSiteInstallation;
|
|
4689
4705
|
/** Secrets stored on the integration and passed at runtime. */
|
|
4690
4706
|
secrets: IntegrationSecrets;
|
|
4691
4707
|
/**
|
|
@@ -4971,6 +4987,14 @@ export interface IntegrationSiteInstallationsChannel {
|
|
|
4971
4987
|
integration: string;
|
|
4972
4988
|
installation: string;
|
|
4973
4989
|
}
|
|
4990
|
+
export interface PublishedContentSiteChannel {
|
|
4991
|
+
channel: 'published-content-site';
|
|
4992
|
+
site: string;
|
|
4993
|
+
}
|
|
4994
|
+
export interface SiteRedirectsChannel {
|
|
4995
|
+
channel: 'site-redirects';
|
|
4996
|
+
site: string;
|
|
4997
|
+
}
|
|
4974
4998
|
export interface SiteChannel {
|
|
4975
4999
|
channel: 'site';
|
|
4976
5000
|
site: string;
|
|
@@ -5030,7 +5054,7 @@ export interface GitSyncOperationChannel {
|
|
|
5030
5054
|
space: string;
|
|
5031
5055
|
}
|
|
5032
5056
|
/** Channel to subscribe to for realtime updates. */
|
|
5033
|
-
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 | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
|
|
5057
|
+
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 | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
|
|
5034
5058
|
export interface GitSyncOperationChannelData {
|
|
5035
5059
|
channel: 'space-gitsync-operation';
|
|
5036
5060
|
/** Data passed on the channel messages for GitSync running in a space. */
|
|
@@ -5121,6 +5145,7 @@ export type SpaceVisitorAuth = VisitorAuth;
|
|
|
5121
5145
|
export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
|
|
5122
5146
|
export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
|
|
5123
5147
|
export type UserPermissions = Index;
|
|
5148
|
+
export type SiteRedirectDestinationSpace = SiteRedirectDestinationSiteSpace;
|
|
5124
5149
|
import { EventIterator } from 'event-iterator';
|
|
5125
5150
|
export type QueryParamsType = Record<string | number, any>;
|
|
5126
5151
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
@@ -5212,6 +5237,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5212
5237
|
* @secure
|
|
5213
5238
|
*/
|
|
5214
5239
|
searchContent: (query: {
|
|
5240
|
+
/** @maxLength 512 */
|
|
5215
5241
|
query: string;
|
|
5216
5242
|
/** Identifier of the page results to fetch. */
|
|
5217
5243
|
page?: string;
|
|
@@ -5460,6 +5486,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5460
5486
|
* @secure
|
|
5461
5487
|
*/
|
|
5462
5488
|
searchSpaceContent: (spaceId: string, query: {
|
|
5489
|
+
/** @maxLength 512 */
|
|
5463
5490
|
query: string;
|
|
5464
5491
|
/** Identifier of the page results to fetch. */
|
|
5465
5492
|
page?: string;
|
|
@@ -7164,16 +7191,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7164
7191
|
* @secure
|
|
7165
7192
|
*/
|
|
7166
7193
|
updateCollectionById: (collectionId: string, data: {
|
|
7167
|
-
/**
|
|
7168
|
-
* * `public`: Anyone can access the content, and the content is indexed by search engines.
|
|
7169
|
-
* * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
|
|
7170
|
-
* * `share-link`: Anyone with a secret token in the url can access the content.
|
|
7171
|
-
* * `visitor-auth`: Anyone authenticated through a JWT token can access the content.
|
|
7172
|
-
* * `in-collection`: Anyone who can access the parent collection can access the content.
|
|
7173
|
-
* Only available for spaces in a collection.
|
|
7174
|
-
* * `private`: Authorized members can access the content.
|
|
7175
|
-
*/
|
|
7176
|
-
visibility?: ContentVisibility;
|
|
7177
7194
|
/** Title of the collection */
|
|
7178
7195
|
title?: CollectionTitle;
|
|
7179
7196
|
/** Description of the collection */
|
|
@@ -7984,7 +8001,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7984
8001
|
/**
|
|
7985
8002
|
* @description Lists all spaces, collections, sites accessible by current user in the current organization. This endpoint is internal for now as the data structure is optimized for the sidebar.
|
|
7986
8003
|
*
|
|
7987
|
-
* @tags organizations
|
|
8004
|
+
* @tags organizations, critical
|
|
7988
8005
|
* @name GetOrganizationAllContent
|
|
7989
8006
|
* @summary List all content in an organization
|
|
7990
8007
|
* @request GET:/orgs/{organizationId}/content
|
|
@@ -8436,6 +8453,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8436
8453
|
* @secure
|
|
8437
8454
|
*/
|
|
8438
8455
|
searchOrganizationContent: (organizationId: string, query: {
|
|
8456
|
+
/** @maxLength 512 */
|
|
8439
8457
|
query: string;
|
|
8440
8458
|
/** Identifier of the page results to fetch. */
|
|
8441
8459
|
page?: string;
|
|
@@ -9288,6 +9306,25 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9288
9306
|
* @secure
|
|
9289
9307
|
*/
|
|
9290
9308
|
deleteSiteById: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9309
|
+
/**
|
|
9310
|
+
* No description
|
|
9311
|
+
*
|
|
9312
|
+
* @tags sites
|
|
9313
|
+
* @name GetPublishedContentSite
|
|
9314
|
+
* @summary Get the complete profile of a site in an organization to provide the published experience. It includes site, customization, structure, integration scripts etc.
|
|
9315
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/published
|
|
9316
|
+
* @secure
|
|
9317
|
+
*/
|
|
9318
|
+
getPublishedContentSite: (organizationId: string, siteId: string, query?: {
|
|
9319
|
+
/** For sites published via share-links, the share key is useful to resolve published URLs. */
|
|
9320
|
+
shareKey?: string;
|
|
9321
|
+
}, params?: RequestParams) => Promise<HttpResponse<PublishedContentSite, Error | {
|
|
9322
|
+
error: {
|
|
9323
|
+
/** @format int32 */
|
|
9324
|
+
code: 404;
|
|
9325
|
+
message: string;
|
|
9326
|
+
};
|
|
9327
|
+
}>>;
|
|
9291
9328
|
/**
|
|
9292
9329
|
* No description
|
|
9293
9330
|
*
|
|
@@ -9725,15 +9762,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9725
9762
|
mode?: "specific";
|
|
9726
9763
|
/** @minLength 1 */
|
|
9727
9764
|
siteSpaceIds: string[];
|
|
9765
|
+
/** @maxLength 512 */
|
|
9728
9766
|
query: string;
|
|
9729
9767
|
} | {
|
|
9730
9768
|
/** Search in the current site space and all section's defaults */
|
|
9731
9769
|
mode: "current";
|
|
9732
9770
|
siteSpaceId: string;
|
|
9771
|
+
/** @maxLength 512 */
|
|
9733
9772
|
query: string;
|
|
9734
9773
|
} | {
|
|
9735
9774
|
/** search in all site-spaces */
|
|
9736
9775
|
mode: "all";
|
|
9776
|
+
/** @maxLength 512 */
|
|
9737
9777
|
query: string;
|
|
9738
9778
|
}, query?: {
|
|
9739
9779
|
/** Identifier of the page results to fetch. */
|
|
@@ -10087,6 +10127,90 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10087
10127
|
/** Topic of the content */
|
|
10088
10128
|
topic?: SiteAdsTopic;
|
|
10089
10129
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10130
|
+
/**
|
|
10131
|
+
* No description
|
|
10132
|
+
*
|
|
10133
|
+
* @tags sites
|
|
10134
|
+
* @name CreateSiteRedirect
|
|
10135
|
+
* @summary Configure a redirect explicitly for a site.
|
|
10136
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/redirects
|
|
10137
|
+
* @secure
|
|
10138
|
+
*/
|
|
10139
|
+
createSiteRedirect: (organizationId: string, siteId: string, data: {
|
|
10140
|
+
/** The source path to redirect from. */
|
|
10141
|
+
source: SiteRedirectSourcePath;
|
|
10142
|
+
destination: SiteRedirectDestination;
|
|
10143
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, Error>>;
|
|
10144
|
+
/**
|
|
10145
|
+
* No description
|
|
10146
|
+
*
|
|
10147
|
+
* @tags sites
|
|
10148
|
+
* @name ListSiteRedirects
|
|
10149
|
+
* @summary List the redirects configured for a site.
|
|
10150
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/redirects
|
|
10151
|
+
* @secure
|
|
10152
|
+
*/
|
|
10153
|
+
listSiteRedirects: (organizationId: string, siteId: string, query?: {
|
|
10154
|
+
/** Identifier of the page results to fetch. */
|
|
10155
|
+
page?: string;
|
|
10156
|
+
/**
|
|
10157
|
+
* The number of results per page
|
|
10158
|
+
* @min 0
|
|
10159
|
+
* @max 1000
|
|
10160
|
+
*/
|
|
10161
|
+
limit?: number;
|
|
10162
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10163
|
+
items: SiteRedirect[];
|
|
10164
|
+
}, Error>>;
|
|
10165
|
+
/**
|
|
10166
|
+
* No description
|
|
10167
|
+
*
|
|
10168
|
+
* @tags sites
|
|
10169
|
+
* @name UpdateSiteRedirectById
|
|
10170
|
+
* @summary Update a redirect for a site
|
|
10171
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/redirects/{siteRedirectId}
|
|
10172
|
+
* @secure
|
|
10173
|
+
*/
|
|
10174
|
+
updateSiteRedirectById: (organizationId: string, siteId: string, siteRedirectId: string, data: {
|
|
10175
|
+
/** The source path to redirect from. */
|
|
10176
|
+
source?: SiteRedirectSourcePath;
|
|
10177
|
+
destination?: SiteRedirectDestination;
|
|
10178
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, Error>>;
|
|
10179
|
+
/**
|
|
10180
|
+
* No description
|
|
10181
|
+
*
|
|
10182
|
+
* @tags sites
|
|
10183
|
+
* @name DeleteSiteRedirectById
|
|
10184
|
+
* @summary Delete a redirect for a site
|
|
10185
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/redirects/{siteRedirectId}
|
|
10186
|
+
* @secure
|
|
10187
|
+
*/
|
|
10188
|
+
deleteSiteRedirectById: (organizationId: string, siteId: string, siteRedirectId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10189
|
+
/**
|
|
10190
|
+
* No description
|
|
10191
|
+
*
|
|
10192
|
+
* @tags sites
|
|
10193
|
+
* @name GetSiteRedirectBySource
|
|
10194
|
+
* @summary Resolve a redirect in a site by its source path.
|
|
10195
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/redirect
|
|
10196
|
+
* @secure
|
|
10197
|
+
*/
|
|
10198
|
+
getSiteRedirectBySource: (organizationId: string, siteId: string, query: {
|
|
10199
|
+
/** For sites published via share-links, the share key is useful to resolve published URLs. */
|
|
10200
|
+
shareKey?: string;
|
|
10201
|
+
/** The source path of the redirect. */
|
|
10202
|
+
source: SiteRedirectSourcePath;
|
|
10203
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
10204
|
+
redirect: SiteRedirect;
|
|
10205
|
+
/** URL of the destination of the redirect. */
|
|
10206
|
+
target: string;
|
|
10207
|
+
}, Error | {
|
|
10208
|
+
error: {
|
|
10209
|
+
/** @format int32 */
|
|
10210
|
+
code: 404;
|
|
10211
|
+
message: string;
|
|
10212
|
+
};
|
|
10213
|
+
}>>;
|
|
10090
10214
|
};
|
|
10091
10215
|
customHostnames: {
|
|
10092
10216
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -244,7 +244,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
244
244
|
|
|
245
245
|
// package.json
|
|
246
246
|
var name = "@gitbook/api";
|
|
247
|
-
var version = "0.
|
|
247
|
+
var version = "0.77.0";
|
|
248
248
|
|
|
249
249
|
// src/client.ts
|
|
250
250
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -2888,6 +2888,14 @@ var Api = class extends HttpClient {
|
|
|
2888
2888
|
secure: true,
|
|
2889
2889
|
...params
|
|
2890
2890
|
}),
|
|
2891
|
+
getPublishedContentSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2892
|
+
path: `/orgs/${organizationId}/sites/${siteId}/published`,
|
|
2893
|
+
method: "GET",
|
|
2894
|
+
query,
|
|
2895
|
+
secure: true,
|
|
2896
|
+
format: "json",
|
|
2897
|
+
...params
|
|
2898
|
+
}),
|
|
2891
2899
|
publishSite: (organizationId, siteId, params = {}) => this.request({
|
|
2892
2900
|
path: `/orgs/${organizationId}/sites/${siteId}/publish`,
|
|
2893
2901
|
method: "POST",
|
|
@@ -3202,6 +3210,46 @@ var Api = class extends HttpClient {
|
|
|
3202
3210
|
secure: true,
|
|
3203
3211
|
type: "application/json" /* Json */,
|
|
3204
3212
|
...params
|
|
3213
|
+
}),
|
|
3214
|
+
createSiteRedirect: (organizationId, siteId, data, params = {}) => this.request({
|
|
3215
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3216
|
+
method: "POST",
|
|
3217
|
+
body: data,
|
|
3218
|
+
secure: true,
|
|
3219
|
+
type: "application/json" /* Json */,
|
|
3220
|
+
format: "json",
|
|
3221
|
+
...params
|
|
3222
|
+
}),
|
|
3223
|
+
listSiteRedirects: (organizationId, siteId, query, params = {}) => this.request({
|
|
3224
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3225
|
+
method: "GET",
|
|
3226
|
+
query,
|
|
3227
|
+
secure: true,
|
|
3228
|
+
format: "json",
|
|
3229
|
+
...params
|
|
3230
|
+
}),
|
|
3231
|
+
updateSiteRedirectById: (organizationId, siteId, siteRedirectId, data, params = {}) => this.request({
|
|
3232
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects/${siteRedirectId}`,
|
|
3233
|
+
method: "PATCH",
|
|
3234
|
+
body: data,
|
|
3235
|
+
secure: true,
|
|
3236
|
+
type: "application/json" /* Json */,
|
|
3237
|
+
format: "json",
|
|
3238
|
+
...params
|
|
3239
|
+
}),
|
|
3240
|
+
deleteSiteRedirectById: (organizationId, siteId, siteRedirectId, params = {}) => this.request({
|
|
3241
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects/${siteRedirectId}`,
|
|
3242
|
+
method: "DELETE",
|
|
3243
|
+
secure: true,
|
|
3244
|
+
...params
|
|
3245
|
+
}),
|
|
3246
|
+
getSiteRedirectBySource: (organizationId, siteId, query, params = {}) => this.request({
|
|
3247
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirect`,
|
|
3248
|
+
method: "GET",
|
|
3249
|
+
query,
|
|
3250
|
+
secure: true,
|
|
3251
|
+
format: "json",
|
|
3252
|
+
...params
|
|
3205
3253
|
})
|
|
3206
3254
|
};
|
|
3207
3255
|
customHostnames = {
|
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.
|
|
175
|
+
var version = "0.77.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -2816,6 +2816,14 @@ var Api = class extends HttpClient {
|
|
|
2816
2816
|
secure: true,
|
|
2817
2817
|
...params
|
|
2818
2818
|
}),
|
|
2819
|
+
getPublishedContentSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2820
|
+
path: `/orgs/${organizationId}/sites/${siteId}/published`,
|
|
2821
|
+
method: "GET",
|
|
2822
|
+
query,
|
|
2823
|
+
secure: true,
|
|
2824
|
+
format: "json",
|
|
2825
|
+
...params
|
|
2826
|
+
}),
|
|
2819
2827
|
publishSite: (organizationId, siteId, params = {}) => this.request({
|
|
2820
2828
|
path: `/orgs/${organizationId}/sites/${siteId}/publish`,
|
|
2821
2829
|
method: "POST",
|
|
@@ -3130,6 +3138,46 @@ var Api = class extends HttpClient {
|
|
|
3130
3138
|
secure: true,
|
|
3131
3139
|
type: "application/json" /* Json */,
|
|
3132
3140
|
...params
|
|
3141
|
+
}),
|
|
3142
|
+
createSiteRedirect: (organizationId, siteId, data, params = {}) => this.request({
|
|
3143
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3144
|
+
method: "POST",
|
|
3145
|
+
body: data,
|
|
3146
|
+
secure: true,
|
|
3147
|
+
type: "application/json" /* Json */,
|
|
3148
|
+
format: "json",
|
|
3149
|
+
...params
|
|
3150
|
+
}),
|
|
3151
|
+
listSiteRedirects: (organizationId, siteId, query, params = {}) => this.request({
|
|
3152
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3153
|
+
method: "GET",
|
|
3154
|
+
query,
|
|
3155
|
+
secure: true,
|
|
3156
|
+
format: "json",
|
|
3157
|
+
...params
|
|
3158
|
+
}),
|
|
3159
|
+
updateSiteRedirectById: (organizationId, siteId, siteRedirectId, data, params = {}) => this.request({
|
|
3160
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects/${siteRedirectId}`,
|
|
3161
|
+
method: "PATCH",
|
|
3162
|
+
body: data,
|
|
3163
|
+
secure: true,
|
|
3164
|
+
type: "application/json" /* Json */,
|
|
3165
|
+
format: "json",
|
|
3166
|
+
...params
|
|
3167
|
+
}),
|
|
3168
|
+
deleteSiteRedirectById: (organizationId, siteId, siteRedirectId, params = {}) => this.request({
|
|
3169
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects/${siteRedirectId}`,
|
|
3170
|
+
method: "DELETE",
|
|
3171
|
+
secure: true,
|
|
3172
|
+
...params
|
|
3173
|
+
}),
|
|
3174
|
+
getSiteRedirectBySource: (organizationId, siteId, query, params = {}) => this.request({
|
|
3175
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirect`,
|
|
3176
|
+
method: "GET",
|
|
3177
|
+
query,
|
|
3178
|
+
secure: true,
|
|
3179
|
+
format: "json",
|
|
3180
|
+
...params
|
|
3133
3181
|
})
|
|
3134
3182
|
};
|
|
3135
3183
|
customHostnames = {
|