@gitbook/api 0.73.0 → 0.75.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 +535 -312
- package/dist/index.cjs +76 -40
- package/dist/index.js +74 -40
- package/package.json +1 -1
- package/spec/openapi.json +1195 -586
- package/spec/openapi.yaml +841 -434
package/dist/client.d.ts
CHANGED
|
@@ -1366,6 +1366,16 @@ export interface ChangeRequest {
|
|
|
1366
1366
|
updatedAt: Timestamp;
|
|
1367
1367
|
/** ID of the active revision in the change request. */
|
|
1368
1368
|
revision: string;
|
|
1369
|
+
/** ID of the initial revision in the space from which the change request was created. */
|
|
1370
|
+
revisionInitial: string;
|
|
1371
|
+
/** ID of the latest revision when updating from main space content. */
|
|
1372
|
+
revisionMergedAncestor?: string;
|
|
1373
|
+
/** When merged, ID of the revision resulting from the merge. */
|
|
1374
|
+
revisionMerged?: string;
|
|
1375
|
+
/** Count of opened comments on the change request. */
|
|
1376
|
+
comments: number;
|
|
1377
|
+
/** If true, the change request is not up-to-date with latest changes in the main content. */
|
|
1378
|
+
outdated: boolean;
|
|
1369
1379
|
/** URLs associated with the object */
|
|
1370
1380
|
urls: {
|
|
1371
1381
|
/**
|
|
@@ -1465,6 +1475,25 @@ export interface SitePointer {
|
|
|
1465
1475
|
}
|
|
1466
1476
|
/** The default content for the organization */
|
|
1467
1477
|
export type OrganizationDefaultContent = SpacePointer | CollectionPointer | SitePointer;
|
|
1478
|
+
/** Name of the product */
|
|
1479
|
+
export declare enum BillingProduct {
|
|
1480
|
+
Free2024 = "free_2024",
|
|
1481
|
+
Plus2024 = "plus_2024",
|
|
1482
|
+
Pro2024 = "pro_2024",
|
|
1483
|
+
Enterprise2024 = "enterprise_2024",
|
|
1484
|
+
Free = "free",
|
|
1485
|
+
Plus = "plus",
|
|
1486
|
+
Pro = "pro",
|
|
1487
|
+
Team = "team",
|
|
1488
|
+
Business = "business",
|
|
1489
|
+
Legacy = "legacy",
|
|
1490
|
+
Startup = "startup",
|
|
1491
|
+
Enterprise = "enterprise",
|
|
1492
|
+
Community = "community",
|
|
1493
|
+
TeamOct2019Free = "team_oct_2019_free",
|
|
1494
|
+
TeamDec2021 = "team_dec_2021",
|
|
1495
|
+
BusinessDec2021 = "business_dec_2021"
|
|
1496
|
+
}
|
|
1468
1497
|
export interface Organization {
|
|
1469
1498
|
/** Type of Object, always equals to "organization" */
|
|
1470
1499
|
object: 'organization';
|
|
@@ -1487,6 +1516,10 @@ export interface Organization {
|
|
|
1487
1516
|
sso?: boolean;
|
|
1488
1517
|
/** If true, the organization is configured to use all our AI features. */
|
|
1489
1518
|
ai?: boolean;
|
|
1519
|
+
/** If true, invite links are enabled for this organization. */
|
|
1520
|
+
inviteLinks: boolean;
|
|
1521
|
+
/** Name of the product */
|
|
1522
|
+
plan: BillingProduct;
|
|
1490
1523
|
/** URLs associated with the object */
|
|
1491
1524
|
urls: {
|
|
1492
1525
|
/**
|
|
@@ -2768,8 +2801,13 @@ export type SpaceViewEvent = SpaceEvent & {
|
|
|
2768
2801
|
/** Event received when a page has been visited on a site. */
|
|
2769
2802
|
export type SiteViewEvent = SiteEvent & {
|
|
2770
2803
|
type: 'site_view';
|
|
2771
|
-
/**
|
|
2804
|
+
/**
|
|
2805
|
+
* Unique identifier of the visited space in the site.
|
|
2806
|
+
* @deprecated
|
|
2807
|
+
*/
|
|
2772
2808
|
spaceId: string;
|
|
2809
|
+
/** The site-space that was viewed */
|
|
2810
|
+
siteSpaceId?: string;
|
|
2773
2811
|
/** Unique identifier of the visited page. */
|
|
2774
2812
|
pageId?: string;
|
|
2775
2813
|
/** Analytics info on the GitBook's content visitor. */
|
|
@@ -2972,8 +3010,8 @@ export interface IntegrationSpaceInstallation {
|
|
|
2972
3010
|
integration: string;
|
|
2973
3011
|
/** ID of the integration installation */
|
|
2974
3012
|
installation: string;
|
|
2975
|
-
/**
|
|
2976
|
-
space: string;
|
|
3013
|
+
/** The space the integration is installed on. Using the string value is deprecated in favor of space.id */
|
|
3014
|
+
space: string | Space;
|
|
2977
3015
|
status: IntegrationInstallationStatus;
|
|
2978
3016
|
/** Configuration of the integration for this space */
|
|
2979
3017
|
configuration: object;
|
|
@@ -3359,14 +3397,120 @@ export interface UpdateIntegrationSpaceInstallation {
|
|
|
3359
3397
|
/** Configuration of the integration at the account level */
|
|
3360
3398
|
configuration?: IntegrationInstallationConfiguration;
|
|
3361
3399
|
}
|
|
3400
|
+
/** The type of the site */
|
|
3401
|
+
export declare enum SiteType {
|
|
3402
|
+
Basic = "basic",
|
|
3403
|
+
Premium = "premium",
|
|
3404
|
+
Ultimate = "ultimate",
|
|
3405
|
+
Sponsored = "sponsored",
|
|
3406
|
+
LegacyBasic = "legacy-basic",
|
|
3407
|
+
LegacyPremium = "legacy-premium"
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* Title of the site
|
|
3411
|
+
* @minLength 2
|
|
3412
|
+
* @maxLength 128
|
|
3413
|
+
*/
|
|
3414
|
+
export type SiteTitle = string;
|
|
3415
|
+
/**
|
|
3416
|
+
* Custom hostname for the site, for e.g. docs.mycompany.com
|
|
3417
|
+
* @pattern ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
|
|
3418
|
+
*/
|
|
3419
|
+
export type SiteHostname = string;
|
|
3420
|
+
/**
|
|
3421
|
+
* Basename for the site. For e.g. api
|
|
3422
|
+
* @minLength 1
|
|
3423
|
+
* @maxLength 100
|
|
3424
|
+
*/
|
|
3425
|
+
export type SiteBasename = string;
|
|
3426
|
+
/**
|
|
3427
|
+
* The visibility setting of the site determines the audience of the site.
|
|
3428
|
+
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
3429
|
+
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
3430
|
+
* * `share-link`: Anyone with a secret token in the url can access the site.
|
|
3431
|
+
* * `visitor-auth`: Anyone authenticated through a JWT token can access the site.
|
|
3432
|
+
*/
|
|
3433
|
+
export declare enum SiteVisibility {
|
|
3434
|
+
Public = "public",
|
|
3435
|
+
Unlisted = "unlisted",
|
|
3436
|
+
ShareLink = "share-link",
|
|
3437
|
+
VisitorAuth = "visitor-auth"
|
|
3438
|
+
}
|
|
3439
|
+
/** Topic of the content */
|
|
3440
|
+
export declare enum SiteAdsTopic {
|
|
3441
|
+
Webdev = "webdev",
|
|
3442
|
+
Crypto = "crypto"
|
|
3443
|
+
}
|
|
3444
|
+
export type SiteAds = {
|
|
3445
|
+
status: 'pending';
|
|
3446
|
+
/** True if the user can submit the site for review. */
|
|
3447
|
+
submittable: boolean;
|
|
3448
|
+
} | {
|
|
3449
|
+
status: 'in-review';
|
|
3450
|
+
/** Topic of the content */
|
|
3451
|
+
topic: SiteAdsTopic;
|
|
3452
|
+
} | {
|
|
3453
|
+
status: 'rejected';
|
|
3454
|
+
} | {
|
|
3455
|
+
status: 'live' | 'disabled';
|
|
3456
|
+
/** Topic of the content */
|
|
3457
|
+
topic: SiteAdsTopic;
|
|
3458
|
+
/** The ad network zone ID */
|
|
3459
|
+
zoneId: string;
|
|
3460
|
+
};
|
|
3461
|
+
export interface Site {
|
|
3462
|
+
object: 'site';
|
|
3463
|
+
/** Unique identifier of the site */
|
|
3464
|
+
id: string;
|
|
3465
|
+
/** The type of the site */
|
|
3466
|
+
type: SiteType;
|
|
3467
|
+
/** Title of the site */
|
|
3468
|
+
title: SiteTitle;
|
|
3469
|
+
/** Custom hostname for the site, for e.g. docs.mycompany.com */
|
|
3470
|
+
hostname?: SiteHostname;
|
|
3471
|
+
/** Basename for the site. For e.g. api */
|
|
3472
|
+
basename?: SiteBasename;
|
|
3473
|
+
/**
|
|
3474
|
+
* The visibility setting of the site determines the audience of the site.
|
|
3475
|
+
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
3476
|
+
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
3477
|
+
* * `share-link`: Anyone with a secret token in the url can access the site.
|
|
3478
|
+
* * `visitor-auth`: Anyone authenticated through a JWT token can access the site.
|
|
3479
|
+
*/
|
|
3480
|
+
visibility: SiteVisibility;
|
|
3481
|
+
/** Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting. */
|
|
3482
|
+
published: boolean;
|
|
3483
|
+
siteSpaces: number;
|
|
3484
|
+
/** @format date-time */
|
|
3485
|
+
createdAt: string;
|
|
3486
|
+
ads?: SiteAds;
|
|
3487
|
+
/** URLs associated with the object */
|
|
3488
|
+
urls: {
|
|
3489
|
+
/**
|
|
3490
|
+
* URL of the site in the API
|
|
3491
|
+
* @format uri
|
|
3492
|
+
*/
|
|
3493
|
+
location: string;
|
|
3494
|
+
/**
|
|
3495
|
+
* URL of the site in the application
|
|
3496
|
+
* @format uri
|
|
3497
|
+
*/
|
|
3498
|
+
app: string;
|
|
3499
|
+
/**
|
|
3500
|
+
* URL of the published version of the site. Only defined when site is published.
|
|
3501
|
+
* @format uri
|
|
3502
|
+
*/
|
|
3503
|
+
published?: string;
|
|
3504
|
+
};
|
|
3505
|
+
}
|
|
3362
3506
|
/** Installation of an integration at a site level */
|
|
3363
3507
|
export interface IntegrationSiteInstallation {
|
|
3364
3508
|
/** Unique name identifier of the integration */
|
|
3365
3509
|
integration: string;
|
|
3366
3510
|
/** ID of the integration installation */
|
|
3367
3511
|
installation: string;
|
|
3368
|
-
/**
|
|
3369
|
-
site: string;
|
|
3512
|
+
/** The site the integration is installed on. Using the string value is deprecated in favor of site.id */
|
|
3513
|
+
site: string | Site;
|
|
3370
3514
|
status: IntegrationInstallationStatus;
|
|
3371
3515
|
/** Configuration of the integration for this site */
|
|
3372
3516
|
configuration: object;
|
|
@@ -3399,6 +3543,91 @@ export interface CreateOrganization {
|
|
|
3399
3543
|
type?: OrganizationType;
|
|
3400
3544
|
useCase?: OrganizationUseCase;
|
|
3401
3545
|
}
|
|
3546
|
+
/**
|
|
3547
|
+
* Title of the site section
|
|
3548
|
+
* @minLength 2
|
|
3549
|
+
* @maxLength 128
|
|
3550
|
+
*/
|
|
3551
|
+
export type SiteSectionTitle = string;
|
|
3552
|
+
/**
|
|
3553
|
+
* Path to the section on the site
|
|
3554
|
+
* @minLength 1
|
|
3555
|
+
* @maxLength 100
|
|
3556
|
+
*/
|
|
3557
|
+
export type SiteSectionPath = string;
|
|
3558
|
+
/**
|
|
3559
|
+
* Path to the space on the site
|
|
3560
|
+
* @minLength 1
|
|
3561
|
+
* @maxLength 100
|
|
3562
|
+
*/
|
|
3563
|
+
export type SiteSpacePath = string;
|
|
3564
|
+
export interface SiteSpace {
|
|
3565
|
+
/** The object type, which is always "site-space" */
|
|
3566
|
+
object: 'site-space';
|
|
3567
|
+
/** Unique identifier of the site-space */
|
|
3568
|
+
id: string;
|
|
3569
|
+
/** Path to the space on the site */
|
|
3570
|
+
path: SiteSpacePath;
|
|
3571
|
+
/** ID of the section the space belongs to in the site */
|
|
3572
|
+
section?: string;
|
|
3573
|
+
space: Space;
|
|
3574
|
+
title: string;
|
|
3575
|
+
/** Whether this is the default space for the site */
|
|
3576
|
+
default?: boolean;
|
|
3577
|
+
/** Whether the space has advanced customization feature enabled */
|
|
3578
|
+
hasAdvancedCustomizationFeature?: boolean;
|
|
3579
|
+
/** URLs associated with the object */
|
|
3580
|
+
urls: {
|
|
3581
|
+
/**
|
|
3582
|
+
* URL of the published version of the site-space. Only defined when site is published.
|
|
3583
|
+
* @format uri
|
|
3584
|
+
*/
|
|
3585
|
+
published?: string;
|
|
3586
|
+
};
|
|
3587
|
+
}
|
|
3588
|
+
export interface SiteSection {
|
|
3589
|
+
/** The object type, which is always "site-section" */
|
|
3590
|
+
object: 'site-section';
|
|
3591
|
+
/** Unique identifier of the site section */
|
|
3592
|
+
id: string;
|
|
3593
|
+
/** Title of the site section */
|
|
3594
|
+
title: SiteSectionTitle;
|
|
3595
|
+
/** Whether this is the default section for the site */
|
|
3596
|
+
default?: boolean;
|
|
3597
|
+
/** Path to the section on the site */
|
|
3598
|
+
path: SiteSectionPath;
|
|
3599
|
+
siteSpaces: SiteSpace[];
|
|
3600
|
+
/** URLs associated with the object */
|
|
3601
|
+
urls: {
|
|
3602
|
+
/**
|
|
3603
|
+
* URL of the published version of the site section. Only defined when site is published.
|
|
3604
|
+
* @format uri
|
|
3605
|
+
*/
|
|
3606
|
+
published?: string;
|
|
3607
|
+
};
|
|
3608
|
+
}
|
|
3609
|
+
export type SiteStructure = {
|
|
3610
|
+
type: 'sections';
|
|
3611
|
+
structure: SiteSection[];
|
|
3612
|
+
} | {
|
|
3613
|
+
type: 'siteSpaces';
|
|
3614
|
+
structure: SiteSpace[];
|
|
3615
|
+
};
|
|
3616
|
+
export interface OrganizationAllSite {
|
|
3617
|
+
site: Site;
|
|
3618
|
+
structure: SiteStructure;
|
|
3619
|
+
}
|
|
3620
|
+
export interface OrganizationAllCollection {
|
|
3621
|
+
collection: Collection;
|
|
3622
|
+
content: (OrganizationAllCollection | OrganizationAllSpace)[];
|
|
3623
|
+
}
|
|
3624
|
+
export interface OrganizationAllSpace {
|
|
3625
|
+
space: Space;
|
|
3626
|
+
}
|
|
3627
|
+
export interface OrganizationAllContent {
|
|
3628
|
+
sites: OrganizationAllSite[];
|
|
3629
|
+
spaces: (OrganizationAllCollection | OrganizationAllSpace)[];
|
|
3630
|
+
}
|
|
3402
3631
|
export interface OrganizationMember {
|
|
3403
3632
|
/** Type of Object, always equals to "member" */
|
|
3404
3633
|
object: 'member';
|
|
@@ -3541,25 +3770,6 @@ export interface CreateInviteToCollection {
|
|
|
3541
3770
|
export type CreateOrganizationInvite = CreateInviteToOrganization | CreateInviteToSpace | CreateInviteToCollection;
|
|
3542
3771
|
/** An invite link created in an organization */
|
|
3543
3772
|
export type OrganizationInviteLink = InviteLinkToOrganization | InviteLinkToSpace | InviteLinkToCollection;
|
|
3544
|
-
export interface BillingPortal {
|
|
3545
|
-
/** URL to the billing portal for an organization */
|
|
3546
|
-
url: string;
|
|
3547
|
-
}
|
|
3548
|
-
/** Name of the product */
|
|
3549
|
-
export declare enum BillingProduct {
|
|
3550
|
-
Free2024 = "free_2024",
|
|
3551
|
-
Plus2024 = "plus_2024",
|
|
3552
|
-
Pro2024 = "pro_2024",
|
|
3553
|
-
Enterprise2024 = "enterprise_2024",
|
|
3554
|
-
Free = "free",
|
|
3555
|
-
Plus = "plus",
|
|
3556
|
-
Pro = "pro",
|
|
3557
|
-
Team = "team",
|
|
3558
|
-
Business = "business",
|
|
3559
|
-
Legacy = "legacy",
|
|
3560
|
-
Startup = "startup",
|
|
3561
|
-
Enterprise = "enterprise"
|
|
3562
|
-
}
|
|
3563
3773
|
/** Interval for a billing subscription */
|
|
3564
3774
|
export declare enum BillingInterval {
|
|
3565
3775
|
Monthly = "monthly",
|
|
@@ -3613,6 +3823,10 @@ export type BillingUpgrade = {
|
|
|
3613
3823
|
} | {
|
|
3614
3824
|
result: 'interval_changed';
|
|
3615
3825
|
};
|
|
3826
|
+
export interface BillingPortal {
|
|
3827
|
+
/** URL to the billing portal for an organization */
|
|
3828
|
+
url: string;
|
|
3829
|
+
}
|
|
3616
3830
|
export interface CreateSpace {
|
|
3617
3831
|
/** @maxLength 50 */
|
|
3618
3832
|
title?: string;
|
|
@@ -3800,185 +4014,79 @@ export interface Capture {
|
|
|
3800
4014
|
* @minItems 1
|
|
3801
4015
|
*/
|
|
3802
4016
|
contributors: (Integration | User)[];
|
|
3803
|
-
/** Output document for the capture. Is not set when capture is not finished. */
|
|
3804
|
-
output?: Document;
|
|
3805
|
-
/** URLs associated with the object */
|
|
3806
|
-
urls: {
|
|
3807
|
-
/**
|
|
3808
|
-
* URL of the capture in the API
|
|
3809
|
-
* @format uri
|
|
3810
|
-
*/
|
|
3811
|
-
location: string;
|
|
3812
|
-
/**
|
|
3813
|
-
* URL of the capture in the app
|
|
3814
|
-
* @format uri
|
|
3815
|
-
*/
|
|
3816
|
-
app: string;
|
|
3817
|
-
};
|
|
3818
|
-
}
|
|
3819
|
-
export interface BaseCaptureEvent {
|
|
3820
|
-
/** The type of event */
|
|
3821
|
-
type: string;
|
|
3822
|
-
/**
|
|
3823
|
-
* When the event happened
|
|
3824
|
-
* @format date-time
|
|
3825
|
-
*/
|
|
3826
|
-
timestamp: string;
|
|
3827
|
-
/**
|
|
3828
|
-
* Optionally, provide the source of the event. GitBook may use this to improve the generated content.
|
|
3829
|
-
* @maxLength 50
|
|
3830
|
-
*/
|
|
3831
|
-
source?: string;
|
|
3832
|
-
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
|
|
3833
|
-
actor?: {
|
|
3834
|
-
name: string;
|
|
3835
|
-
};
|
|
3836
|
-
}
|
|
3837
|
-
export type CaptureTerminalCommandEvent = BaseCaptureEvent & {
|
|
3838
|
-
type: 'terminal.command';
|
|
3839
|
-
command: string;
|
|
3840
|
-
stdout: string;
|
|
3841
|
-
};
|
|
3842
|
-
export type CaptureSpeechEvent = BaseCaptureEvent & {
|
|
3843
|
-
type: 'speech';
|
|
3844
|
-
} & ({
|
|
3845
|
-
/** WAV audio file, encoded as base64 */
|
|
3846
|
-
audio: string;
|
|
3847
|
-
} | {
|
|
3848
|
-
/** Transcript of the speech */
|
|
3849
|
-
transcript: string;
|
|
3850
|
-
});
|
|
3851
|
-
export type CaptureThreadMessageEvent = BaseCaptureEvent & {
|
|
3852
|
-
type: 'thread.message';
|
|
3853
|
-
isFirst?: boolean;
|
|
3854
|
-
text: string;
|
|
3855
|
-
};
|
|
3856
|
-
export type CaptureFileAddedEvent = BaseCaptureEvent & {
|
|
3857
|
-
type: 'file.added';
|
|
3858
|
-
filename: string;
|
|
3859
|
-
fileSnapshot: string;
|
|
3860
|
-
};
|
|
3861
|
-
export type CaptureFileChangedEvent = BaseCaptureEvent & {
|
|
3862
|
-
type: 'file.changed';
|
|
3863
|
-
filename: string;
|
|
3864
|
-
fileDiff: string;
|
|
3865
|
-
};
|
|
3866
|
-
export type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
3867
|
-
type: 'file.removed';
|
|
3868
|
-
filename: string;
|
|
3869
|
-
fileSnapshot: string;
|
|
3870
|
-
};
|
|
3871
|
-
export type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
|
|
3872
|
-
export interface UpdateSnippetSchema {
|
|
3873
|
-
/** A new title for the snippet. */
|
|
3874
|
-
title?: string;
|
|
3875
|
-
}
|
|
3876
|
-
/** The type of the site */
|
|
3877
|
-
export declare enum SiteType {
|
|
3878
|
-
Basic = "basic",
|
|
3879
|
-
Premium = "premium",
|
|
3880
|
-
Ultimate = "ultimate",
|
|
3881
|
-
Sponsored = "sponsored",
|
|
3882
|
-
LegacyBasic = "legacy-basic",
|
|
3883
|
-
LegacyPremium = "legacy-premium"
|
|
3884
|
-
}
|
|
3885
|
-
/**
|
|
3886
|
-
* Title of the site
|
|
3887
|
-
* @minLength 2
|
|
3888
|
-
* @maxLength 128
|
|
3889
|
-
*/
|
|
3890
|
-
export type SiteTitle = string;
|
|
3891
|
-
/**
|
|
3892
|
-
* Custom hostname for the site, for e.g. docs.mycompany.com
|
|
3893
|
-
* @pattern ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
|
|
3894
|
-
*/
|
|
3895
|
-
export type SiteHostname = string;
|
|
3896
|
-
/**
|
|
3897
|
-
* Basename for the site. For e.g. api
|
|
3898
|
-
* @minLength 1
|
|
3899
|
-
* @maxLength 100
|
|
3900
|
-
*/
|
|
3901
|
-
export type SiteBasename = string;
|
|
3902
|
-
/**
|
|
3903
|
-
* The visibility setting of the site determines the audience of the site.
|
|
3904
|
-
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
3905
|
-
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
3906
|
-
* * `share-link`: Anyone with a secret token in the url can access the site.
|
|
3907
|
-
* * `visitor-auth`: Anyone authenticated through a JWT token can access the site.
|
|
3908
|
-
*/
|
|
3909
|
-
export declare enum SiteVisibility {
|
|
3910
|
-
Public = "public",
|
|
3911
|
-
Unlisted = "unlisted",
|
|
3912
|
-
ShareLink = "share-link",
|
|
3913
|
-
VisitorAuth = "visitor-auth"
|
|
3914
|
-
}
|
|
3915
|
-
/** Topic of the content */
|
|
3916
|
-
export declare enum SiteAdsTopic {
|
|
3917
|
-
Webdev = "webdev",
|
|
3918
|
-
Crypto = "crypto"
|
|
3919
|
-
}
|
|
3920
|
-
export type SiteAds = {
|
|
3921
|
-
status: 'pending';
|
|
3922
|
-
/** True if the user can submit the site for review. */
|
|
3923
|
-
submittable: boolean;
|
|
3924
|
-
} | {
|
|
3925
|
-
status: 'in-review';
|
|
3926
|
-
/** Topic of the content */
|
|
3927
|
-
topic: SiteAdsTopic;
|
|
3928
|
-
} | {
|
|
3929
|
-
status: 'rejected';
|
|
3930
|
-
} | {
|
|
3931
|
-
status: 'live' | 'disabled';
|
|
3932
|
-
/** Topic of the content */
|
|
3933
|
-
topic: SiteAdsTopic;
|
|
3934
|
-
/** The ad network zone ID */
|
|
3935
|
-
zoneId: string;
|
|
3936
|
-
};
|
|
3937
|
-
export interface Site {
|
|
3938
|
-
object: 'site';
|
|
3939
|
-
/** Unique identifier of the site */
|
|
3940
|
-
id: string;
|
|
3941
|
-
/** The type of the site */
|
|
3942
|
-
type: SiteType;
|
|
3943
|
-
/** Title of the site */
|
|
3944
|
-
title: SiteTitle;
|
|
3945
|
-
/** Custom hostname for the site, for e.g. docs.mycompany.com */
|
|
3946
|
-
hostname?: SiteHostname;
|
|
3947
|
-
/** Basename for the site. For e.g. api */
|
|
3948
|
-
basename?: SiteBasename;
|
|
3949
|
-
/**
|
|
3950
|
-
* The visibility setting of the site determines the audience of the site.
|
|
3951
|
-
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
3952
|
-
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
3953
|
-
* * `share-link`: Anyone with a secret token in the url can access the site.
|
|
3954
|
-
* * `visitor-auth`: Anyone authenticated through a JWT token can access the site.
|
|
3955
|
-
*/
|
|
3956
|
-
visibility: SiteVisibility;
|
|
3957
|
-
/** Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting. */
|
|
3958
|
-
published: boolean;
|
|
3959
|
-
siteSpaces: number;
|
|
3960
|
-
/** @format date-time */
|
|
3961
|
-
createdAt: string;
|
|
3962
|
-
ads?: SiteAds;
|
|
4017
|
+
/** Output document for the capture. Is not set when capture is not finished. */
|
|
4018
|
+
output?: Document;
|
|
3963
4019
|
/** URLs associated with the object */
|
|
3964
4020
|
urls: {
|
|
3965
4021
|
/**
|
|
3966
|
-
* URL of the
|
|
4022
|
+
* URL of the capture in the API
|
|
3967
4023
|
* @format uri
|
|
3968
4024
|
*/
|
|
3969
4025
|
location: string;
|
|
3970
4026
|
/**
|
|
3971
|
-
* URL of the
|
|
4027
|
+
* URL of the capture in the app
|
|
3972
4028
|
* @format uri
|
|
3973
4029
|
*/
|
|
3974
4030
|
app: string;
|
|
3975
|
-
/**
|
|
3976
|
-
* URL of the published version of the site. Only defined when site is published.
|
|
3977
|
-
* @format uri
|
|
3978
|
-
*/
|
|
3979
|
-
published?: string;
|
|
3980
4031
|
};
|
|
3981
4032
|
}
|
|
4033
|
+
export interface BaseCaptureEvent {
|
|
4034
|
+
/** The type of event */
|
|
4035
|
+
type: string;
|
|
4036
|
+
/**
|
|
4037
|
+
* When the event happened
|
|
4038
|
+
* @format date-time
|
|
4039
|
+
*/
|
|
4040
|
+
timestamp: string;
|
|
4041
|
+
/**
|
|
4042
|
+
* Optionally, provide the source of the event. GitBook may use this to improve the generated content.
|
|
4043
|
+
* @maxLength 50
|
|
4044
|
+
*/
|
|
4045
|
+
source?: string;
|
|
4046
|
+
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
|
|
4047
|
+
actor?: {
|
|
4048
|
+
name: string;
|
|
4049
|
+
};
|
|
4050
|
+
}
|
|
4051
|
+
export type CaptureTerminalCommandEvent = BaseCaptureEvent & {
|
|
4052
|
+
type: 'terminal.command';
|
|
4053
|
+
command: string;
|
|
4054
|
+
stdout: string;
|
|
4055
|
+
};
|
|
4056
|
+
export type CaptureSpeechEvent = BaseCaptureEvent & {
|
|
4057
|
+
type: 'speech';
|
|
4058
|
+
} & ({
|
|
4059
|
+
/** WAV audio file, encoded as base64 */
|
|
4060
|
+
audio: string;
|
|
4061
|
+
} | {
|
|
4062
|
+
/** Transcript of the speech */
|
|
4063
|
+
transcript: string;
|
|
4064
|
+
});
|
|
4065
|
+
export type CaptureThreadMessageEvent = BaseCaptureEvent & {
|
|
4066
|
+
type: 'thread.message';
|
|
4067
|
+
isFirst?: boolean;
|
|
4068
|
+
text: string;
|
|
4069
|
+
};
|
|
4070
|
+
export type CaptureFileAddedEvent = BaseCaptureEvent & {
|
|
4071
|
+
type: 'file.added';
|
|
4072
|
+
filename: string;
|
|
4073
|
+
fileSnapshot: string;
|
|
4074
|
+
};
|
|
4075
|
+
export type CaptureFileChangedEvent = BaseCaptureEvent & {
|
|
4076
|
+
type: 'file.changed';
|
|
4077
|
+
filename: string;
|
|
4078
|
+
fileDiff: string;
|
|
4079
|
+
};
|
|
4080
|
+
export type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
4081
|
+
type: 'file.removed';
|
|
4082
|
+
filename: string;
|
|
4083
|
+
fileSnapshot: string;
|
|
4084
|
+
};
|
|
4085
|
+
export type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
|
|
4086
|
+
export interface UpdateSnippetSchema {
|
|
4087
|
+
/** A new title for the snippet. */
|
|
4088
|
+
title?: string;
|
|
4089
|
+
}
|
|
3982
4090
|
/** A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request. */
|
|
3983
4091
|
export type BillingOperationPreviewResponse = {
|
|
3984
4092
|
/** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
|
|
@@ -4000,76 +4108,6 @@ export type BillingOperationPreviewResponse = {
|
|
|
4000
4108
|
plan: BillingProduct;
|
|
4001
4109
|
invoice?: BillingInvoicePreview;
|
|
4002
4110
|
};
|
|
4003
|
-
/**
|
|
4004
|
-
* Title of the site section
|
|
4005
|
-
* @minLength 2
|
|
4006
|
-
* @maxLength 128
|
|
4007
|
-
*/
|
|
4008
|
-
export type SiteSectionTitle = string;
|
|
4009
|
-
/**
|
|
4010
|
-
* Path to the section on the site
|
|
4011
|
-
* @minLength 1
|
|
4012
|
-
* @maxLength 100
|
|
4013
|
-
*/
|
|
4014
|
-
export type SiteSectionPath = string;
|
|
4015
|
-
/**
|
|
4016
|
-
* Path to the space on the site
|
|
4017
|
-
* @minLength 1
|
|
4018
|
-
* @maxLength 100
|
|
4019
|
-
*/
|
|
4020
|
-
export type SiteSpacePath = string;
|
|
4021
|
-
export interface SiteSpace {
|
|
4022
|
-
/** The object type, which is always "site-space" */
|
|
4023
|
-
object?: 'site-space';
|
|
4024
|
-
/** Unique identifier of the site-space */
|
|
4025
|
-
id: string;
|
|
4026
|
-
/** Path to the space on the site */
|
|
4027
|
-
path: SiteSpacePath;
|
|
4028
|
-
/** ID of the section the space belongs to in the site */
|
|
4029
|
-
section?: string;
|
|
4030
|
-
space: Space;
|
|
4031
|
-
title: string;
|
|
4032
|
-
/** Whether this is the default space for the site */
|
|
4033
|
-
default?: boolean;
|
|
4034
|
-
/** Whether the space has advanced customization feature enabled */
|
|
4035
|
-
hasAdvancedCustomizationFeature?: boolean;
|
|
4036
|
-
/** URLs associated with the object */
|
|
4037
|
-
urls: {
|
|
4038
|
-
/**
|
|
4039
|
-
* URL of the published version of the site-space. Only defined when site is published.
|
|
4040
|
-
* @format uri
|
|
4041
|
-
*/
|
|
4042
|
-
published?: string;
|
|
4043
|
-
};
|
|
4044
|
-
}
|
|
4045
|
-
export interface SiteSection {
|
|
4046
|
-
/** The object type, which is always "site-section" */
|
|
4047
|
-
object?: 'site-section';
|
|
4048
|
-
/** Unique identifier of the site section */
|
|
4049
|
-
id: string;
|
|
4050
|
-
/** Title of the site section */
|
|
4051
|
-
title: SiteSectionTitle;
|
|
4052
|
-
/** Whether this is the default section for the site */
|
|
4053
|
-
default?: boolean;
|
|
4054
|
-
/** Path to the section on the site */
|
|
4055
|
-
path: SiteSectionPath;
|
|
4056
|
-
siteSpaces: SiteSpace[];
|
|
4057
|
-
/** URLs associated with the object */
|
|
4058
|
-
urls: {
|
|
4059
|
-
/**
|
|
4060
|
-
* URL of the published version of the site section. Only defined when site is published.
|
|
4061
|
-
* @format uri
|
|
4062
|
-
*/
|
|
4063
|
-
published?: string;
|
|
4064
|
-
};
|
|
4065
|
-
}
|
|
4066
|
-
export type SiteStructure = {
|
|
4067
|
-
type: 'sections';
|
|
4068
|
-
structure: SiteSection[];
|
|
4069
|
-
} | {
|
|
4070
|
-
type: 'siteSpaces';
|
|
4071
|
-
structure: SiteSpace[];
|
|
4072
|
-
};
|
|
4073
4111
|
export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4074
4112
|
/** Type of Object, always equals to "publishing-auth" */
|
|
4075
4113
|
object: 'publishing-auth';
|
|
@@ -4214,11 +4252,9 @@ export interface UserSitePermission {
|
|
|
4214
4252
|
/** The content or organization that enforced this permission level. */
|
|
4215
4253
|
origin: SpacePointer | OrganizationPointer;
|
|
4216
4254
|
}
|
|
4217
|
-
export
|
|
4255
|
+
export type SiteTrackPageView = {
|
|
4218
4256
|
/** Unique identifier of the page. */
|
|
4219
4257
|
pageId?: string;
|
|
4220
|
-
/** Unique identifier of the space. */
|
|
4221
|
-
spaceId: string;
|
|
4222
4258
|
/** Analytics info on the GitBook's content visitor. */
|
|
4223
4259
|
visitor: {
|
|
4224
4260
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -4245,6 +4281,27 @@ export interface SiteTrackPageView {
|
|
|
4245
4281
|
url: string;
|
|
4246
4282
|
/** The URL of referrer that linked to the page. */
|
|
4247
4283
|
referrer: string;
|
|
4284
|
+
} & ({
|
|
4285
|
+
/** Unique identifier of the space. */
|
|
4286
|
+
spaceId: string;
|
|
4287
|
+
} | {
|
|
4288
|
+
/** The site-space that was viewed */
|
|
4289
|
+
siteSpaceId: string;
|
|
4290
|
+
});
|
|
4291
|
+
/**
|
|
4292
|
+
* The interval for grouping the results
|
|
4293
|
+
* @default "week"
|
|
4294
|
+
*/
|
|
4295
|
+
export declare enum InsightsInterval {
|
|
4296
|
+
Day = "day",
|
|
4297
|
+
Week = "week",
|
|
4298
|
+
Month = "month",
|
|
4299
|
+
Year = "year"
|
|
4300
|
+
}
|
|
4301
|
+
export interface SiteAdsStats {
|
|
4302
|
+
impressions: number;
|
|
4303
|
+
clicks: number;
|
|
4304
|
+
revenue: string;
|
|
4248
4305
|
}
|
|
4249
4306
|
/** Page entry in the content insights. */
|
|
4250
4307
|
export interface InsightsContentPage {
|
|
@@ -4259,17 +4316,6 @@ export interface InsightsContentPage {
|
|
|
4259
4316
|
/** Icon of the page, if one has been set. */
|
|
4260
4317
|
icon?: Icon;
|
|
4261
4318
|
}
|
|
4262
|
-
export interface SiteAdsStats {
|
|
4263
|
-
impressions: number;
|
|
4264
|
-
clicks: number;
|
|
4265
|
-
revenue: string;
|
|
4266
|
-
account: {
|
|
4267
|
-
/** Email address on the Ads platform. */
|
|
4268
|
-
email: string;
|
|
4269
|
-
/** URL to configure payout. */
|
|
4270
|
-
url: string;
|
|
4271
|
-
};
|
|
4272
|
-
}
|
|
4273
4319
|
export declare enum CustomHostnameDnsStatus {
|
|
4274
4320
|
DnsPassed = "dns_passed",
|
|
4275
4321
|
DnsWrongCname = "dns_wrong_cname",
|
|
@@ -4605,6 +4651,21 @@ export declare enum RevisionSemanticChangeType {
|
|
|
4605
4651
|
FileDeleted = "file_deleted",
|
|
4606
4652
|
CustomFieldsEdited = "custom_fields_edited"
|
|
4607
4653
|
}
|
|
4654
|
+
/**
|
|
4655
|
+
* Core stages of a Git Sync process. This is not exhaustive, but should cover
|
|
4656
|
+
* the important ones.
|
|
4657
|
+
* - repo_fetch: Includes fetching the latest repository contents from remote provider.
|
|
4658
|
+
* - config_check: Includes checking if the YAML config is valid, etc.
|
|
4659
|
+
* - content_process: Includes processing of pages & files to be imported/exported.
|
|
4660
|
+
* - finalize: Includes finalizing the sync process like creating the commit on git, or
|
|
4661
|
+
* creating a new revision.
|
|
4662
|
+
*/
|
|
4663
|
+
export declare enum GitSyncOperationStage {
|
|
4664
|
+
RepoFetch = "repo_fetch",
|
|
4665
|
+
ConfigCheck = "config_check",
|
|
4666
|
+
ContentProcess = "content_process",
|
|
4667
|
+
Finalize = "finalize"
|
|
4668
|
+
}
|
|
4608
4669
|
export interface OrganizationTransferResponse {
|
|
4609
4670
|
/** The unique id of the collection created in the target organization containing the content of the source organization. */
|
|
4610
4671
|
collection: string;
|
|
@@ -4699,6 +4760,8 @@ export type SiteAPIToken = ContentAPIBaseToken & {
|
|
|
4699
4760
|
site: string;
|
|
4700
4761
|
/** ID of the site-space to be used when using this token for rendering published content. */
|
|
4701
4762
|
siteSpace: string;
|
|
4763
|
+
/** ID of the site-section to be used when using this token for rendering published content. Only defined for section sites. */
|
|
4764
|
+
siteSection?: string;
|
|
4702
4765
|
/** ID of the space to be used when using this token for rendering published content. */
|
|
4703
4766
|
space: string;
|
|
4704
4767
|
};
|
|
@@ -4708,6 +4771,11 @@ export interface SpaceInfoChannel {
|
|
|
4708
4771
|
channel: 'space';
|
|
4709
4772
|
space: string;
|
|
4710
4773
|
}
|
|
4774
|
+
/** Channel notified when the main content of a space is changed. */
|
|
4775
|
+
export interface SpaceContentChannel {
|
|
4776
|
+
channel: 'space-content';
|
|
4777
|
+
space: string;
|
|
4778
|
+
}
|
|
4711
4779
|
export interface SpaceGitInfoChannel {
|
|
4712
4780
|
channel: 'space-git-info';
|
|
4713
4781
|
space: string;
|
|
@@ -4724,14 +4792,10 @@ export interface SpaceCustomFieldsChannel {
|
|
|
4724
4792
|
channel: 'space-customfields';
|
|
4725
4793
|
space: string;
|
|
4726
4794
|
}
|
|
4727
|
-
export interface
|
|
4728
|
-
channel: 'space-
|
|
4795
|
+
export interface SpaceContentRefsChannel {
|
|
4796
|
+
channel: 'space-content-refs';
|
|
4729
4797
|
space: string;
|
|
4730
4798
|
}
|
|
4731
|
-
export interface BackofficeUserInfoChannel {
|
|
4732
|
-
channel: 'backoffice-user-info';
|
|
4733
|
-
user: string;
|
|
4734
|
-
}
|
|
4735
4799
|
export interface SpaceIntegrationsChannel {
|
|
4736
4800
|
channel: 'space-integrations';
|
|
4737
4801
|
space: string;
|
|
@@ -4766,8 +4830,8 @@ export interface ChangeRequestReviewsChannel {
|
|
|
4766
4830
|
space: string;
|
|
4767
4831
|
changeRequest: string;
|
|
4768
4832
|
}
|
|
4769
|
-
export interface
|
|
4770
|
-
channel: 'space-change-request-
|
|
4833
|
+
export interface ChangeRequestContentRefsChannel {
|
|
4834
|
+
channel: 'space-change-request-content-refs';
|
|
4771
4835
|
space: string;
|
|
4772
4836
|
changeRequest: string;
|
|
4773
4837
|
}
|
|
@@ -4851,28 +4915,29 @@ export interface OrganizationExperimentalFeaturesChannel {
|
|
|
4851
4915
|
channel: 'organization-experimental-features';
|
|
4852
4916
|
organization: string;
|
|
4853
4917
|
}
|
|
4854
|
-
export interface
|
|
4918
|
+
export interface SpaceCommentsChannel {
|
|
4855
4919
|
channel: 'space-comments';
|
|
4856
4920
|
space: string;
|
|
4857
|
-
|
|
4921
|
+
}
|
|
4922
|
+
export interface ChangeRequestCommentsChannel {
|
|
4923
|
+
channel: 'space-change-request-comments';
|
|
4924
|
+
space: string;
|
|
4925
|
+
changeRequest: string;
|
|
4858
4926
|
}
|
|
4859
4927
|
export interface CommentInfoChannel {
|
|
4860
4928
|
channel: 'space-comment';
|
|
4861
4929
|
space: string;
|
|
4862
|
-
changeRequest?: string;
|
|
4863
4930
|
comment: string;
|
|
4864
4931
|
}
|
|
4865
4932
|
export interface CommentReplyInfoChannel {
|
|
4866
4933
|
channel: 'space-comment-reply';
|
|
4867
4934
|
space: string;
|
|
4868
|
-
changeRequest?: string;
|
|
4869
4935
|
comment: string;
|
|
4870
4936
|
commentReply: string;
|
|
4871
4937
|
}
|
|
4872
4938
|
export interface CommentRepliesChannel {
|
|
4873
4939
|
channel: 'space-comment-replies';
|
|
4874
4940
|
space: string;
|
|
4875
|
-
changeRequest?: string;
|
|
4876
4941
|
comment: string;
|
|
4877
4942
|
}
|
|
4878
4943
|
export interface IntegrationChannel {
|
|
@@ -4956,8 +5021,65 @@ export interface CustomHostnameChannel {
|
|
|
4956
5021
|
channel: 'custom-hostname';
|
|
4957
5022
|
customHostname: string;
|
|
4958
5023
|
}
|
|
4959
|
-
|
|
4960
|
-
|
|
5024
|
+
export interface GitSyncSettingsChannel {
|
|
5025
|
+
channel: 'space-gitsync-settings';
|
|
5026
|
+
space: string;
|
|
5027
|
+
}
|
|
5028
|
+
export interface GitSyncOperationChannel {
|
|
5029
|
+
channel: 'space-gitsync-operation';
|
|
5030
|
+
space: string;
|
|
5031
|
+
}
|
|
5032
|
+
/** 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;
|
|
5034
|
+
export interface GitSyncOperationChannelData {
|
|
5035
|
+
channel: 'space-gitsync-operation';
|
|
5036
|
+
/** Data passed on the channel messages for GitSync running in a space. */
|
|
5037
|
+
data: {
|
|
5038
|
+
direction: 'export' | 'import';
|
|
5039
|
+
/**
|
|
5040
|
+
* Core stages of a Git Sync process. This is not exhaustive, but should cover
|
|
5041
|
+
* the important ones.
|
|
5042
|
+
* - repo_fetch: Includes fetching the latest repository contents from remote provider.
|
|
5043
|
+
* - config_check: Includes checking if the YAML config is valid, etc.
|
|
5044
|
+
* - content_process: Includes processing of pages & files to be imported/exported.
|
|
5045
|
+
* - finalize: Includes finalizing the sync process like creating the commit on git, or
|
|
5046
|
+
* creating a new revision.
|
|
5047
|
+
*/
|
|
5048
|
+
stage: GitSyncOperationStage;
|
|
5049
|
+
dispatchedTasks: number;
|
|
5050
|
+
completedTasks: number;
|
|
5051
|
+
startedAt: number;
|
|
5052
|
+
updatedAt: number;
|
|
5053
|
+
} | null;
|
|
5054
|
+
}
|
|
5055
|
+
export interface SpaceContentRefsChannelData {
|
|
5056
|
+
channel: 'space-content-refs';
|
|
5057
|
+
/** Data passed on the channel messages for content refs indexation. */
|
|
5058
|
+
data: {
|
|
5059
|
+
/** ID of the latest indexed revision */
|
|
5060
|
+
revision: string;
|
|
5061
|
+
updatedAt: number;
|
|
5062
|
+
};
|
|
5063
|
+
}
|
|
5064
|
+
export interface ChangeRequestContentRefsChannelData {
|
|
5065
|
+
channel: 'space-change-request-content-refs';
|
|
5066
|
+
/** Data passed on the channel messages for content refs indexation. */
|
|
5067
|
+
data: {
|
|
5068
|
+
/** ID of the latest indexed revision */
|
|
5069
|
+
revision: string;
|
|
5070
|
+
updatedAt: number;
|
|
5071
|
+
};
|
|
5072
|
+
}
|
|
5073
|
+
export interface APIChannelMutationData {
|
|
5074
|
+
channel: '*';
|
|
5075
|
+
/** Data passed on the channels associated to API endpoints. */
|
|
5076
|
+
data: {
|
|
5077
|
+
/** ID of the API execution that triggered the mutation. */
|
|
5078
|
+
executionId: string;
|
|
5079
|
+
};
|
|
5080
|
+
}
|
|
5081
|
+
/** Data passed through a realtime channel */
|
|
5082
|
+
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | APIChannelMutationData;
|
|
4961
5083
|
/** The status of ads on the site */
|
|
4962
5084
|
export declare enum SiteAdsStatus {
|
|
4963
5085
|
Pending = "pending",
|
|
@@ -5171,7 +5293,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5171
5293
|
/**
|
|
5172
5294
|
* @description Provides publicly available information about someone with a GitBook account.
|
|
5173
5295
|
*
|
|
5174
|
-
* @tags users
|
|
5296
|
+
* @tags users, critical
|
|
5175
5297
|
* @name GetUserById
|
|
5176
5298
|
* @summary Get a user by its ID
|
|
5177
5299
|
* @request GET:/users/{userId}
|
|
@@ -5183,7 +5305,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5183
5305
|
/**
|
|
5184
5306
|
* No description
|
|
5185
5307
|
*
|
|
5186
|
-
* @tags spaces
|
|
5308
|
+
* @tags spaces, critical
|
|
5187
5309
|
* @name GetSpaceById
|
|
5188
5310
|
* @summary Get the details about a space.
|
|
5189
5311
|
* @request GET:/spaces/{spaceId}
|
|
@@ -5854,10 +5976,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5854
5976
|
*/
|
|
5855
5977
|
limit?: number;
|
|
5856
5978
|
/**
|
|
5857
|
-
* If defined, only change requests matching this status will be returned
|
|
5979
|
+
* If defined, only change requests matching this status will be returned.
|
|
5858
5980
|
* @default "open"
|
|
5859
5981
|
*/
|
|
5860
5982
|
status?: ChangeRequestStatus;
|
|
5983
|
+
/** If defined, only change requests with contributions from this user will be returned. */
|
|
5984
|
+
contributor?: string;
|
|
5861
5985
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5862
5986
|
items: ChangeRequest[];
|
|
5863
5987
|
}, Error>>;
|
|
@@ -7420,6 +7544,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7420
7544
|
limit?: number;
|
|
7421
7545
|
/** External Id to filter by */
|
|
7422
7546
|
externalId?: string;
|
|
7547
|
+
/**
|
|
7548
|
+
* If true, returns the space object in each items. If false, returns the space ID in each items.
|
|
7549
|
+
* @default false
|
|
7550
|
+
*/
|
|
7551
|
+
extended?: boolean;
|
|
7423
7552
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
7424
7553
|
items: IntegrationSpaceInstallation[];
|
|
7425
7554
|
}, Error>>;
|
|
@@ -7583,6 +7712,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7583
7712
|
* @max 1000
|
|
7584
7713
|
*/
|
|
7585
7714
|
limit?: number;
|
|
7715
|
+
/**
|
|
7716
|
+
* If true, returns the space object in each items. If false, returns the space ID in each items.
|
|
7717
|
+
* @default false
|
|
7718
|
+
*/
|
|
7719
|
+
extended?: boolean;
|
|
7586
7720
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
7587
7721
|
items: IntegrationSpaceInstallation[];
|
|
7588
7722
|
}, Error>>;
|
|
@@ -7597,6 +7731,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7597
7731
|
installIntegrationOnSpace: (integrationName: string, installationId: string, data: {
|
|
7598
7732
|
/** ID of the space to install the integration on */
|
|
7599
7733
|
space: string;
|
|
7734
|
+
}, query?: {
|
|
7735
|
+
/**
|
|
7736
|
+
* If true, returns the space object in each items. If false, returns the space ID in each items.
|
|
7737
|
+
* @default false
|
|
7738
|
+
*/
|
|
7739
|
+
extended?: boolean;
|
|
7600
7740
|
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSpaceInstallation, Error | {
|
|
7601
7741
|
error: {
|
|
7602
7742
|
/** @format int32 */
|
|
@@ -7613,7 +7753,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7613
7753
|
* @request GET:/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}
|
|
7614
7754
|
* @secure
|
|
7615
7755
|
*/
|
|
7616
|
-
getIntegrationSpaceInstallation: (integrationName: string, installationId: string, spaceId: string,
|
|
7756
|
+
getIntegrationSpaceInstallation: (integrationName: string, installationId: string, spaceId: string, query?: {
|
|
7757
|
+
/**
|
|
7758
|
+
* If true, returns the space object in each items. If false, returns the space ID in each items.
|
|
7759
|
+
* @default false
|
|
7760
|
+
*/
|
|
7761
|
+
extended?: boolean;
|
|
7762
|
+
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSpaceInstallation, Error | {
|
|
7617
7763
|
error: {
|
|
7618
7764
|
/** @format int32 */
|
|
7619
7765
|
code: 404;
|
|
@@ -7628,7 +7774,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7628
7774
|
* @request PATCH:/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}
|
|
7629
7775
|
* @secure
|
|
7630
7776
|
*/
|
|
7631
|
-
updateIntegrationSpaceInstallation: (integrationName: string, installationId: string, spaceId: string, data: UpdateIntegrationSpaceInstallation,
|
|
7777
|
+
updateIntegrationSpaceInstallation: (integrationName: string, installationId: string, spaceId: string, data: UpdateIntegrationSpaceInstallation, query?: {
|
|
7778
|
+
/**
|
|
7779
|
+
* If true, returns the space object in each items. If false, returns the space ID in each items.
|
|
7780
|
+
* @default false
|
|
7781
|
+
*/
|
|
7782
|
+
extended?: boolean;
|
|
7783
|
+
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSpaceInstallation, Error>>;
|
|
7632
7784
|
/**
|
|
7633
7785
|
* No description
|
|
7634
7786
|
*
|
|
@@ -7656,6 +7808,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7656
7808
|
* @max 1000
|
|
7657
7809
|
*/
|
|
7658
7810
|
limit?: number;
|
|
7811
|
+
/**
|
|
7812
|
+
* If true, returns the site object in each items. If false, returns the site ID in each items.
|
|
7813
|
+
* @default false
|
|
7814
|
+
*/
|
|
7815
|
+
extended?: boolean;
|
|
7659
7816
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
7660
7817
|
items: IntegrationSiteInstallation[];
|
|
7661
7818
|
}, Error>>;
|
|
@@ -7671,6 +7828,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7671
7828
|
installIntegrationOnSite: (integrationName: string, installationId: string, data: {
|
|
7672
7829
|
/** ID of the site to install the integration on */
|
|
7673
7830
|
siteId: string;
|
|
7831
|
+
}, query?: {
|
|
7832
|
+
/**
|
|
7833
|
+
* If true, returns the site object in each items. If false, returns the site ID in each items.
|
|
7834
|
+
* @default false
|
|
7835
|
+
*/
|
|
7836
|
+
extended?: boolean;
|
|
7674
7837
|
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSiteInstallation, Error | {
|
|
7675
7838
|
error: {
|
|
7676
7839
|
/** @format int32 */
|
|
@@ -7687,7 +7850,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7687
7850
|
* @request GET:/integrations/{integrationName}/installations/{installationId}/sites/{siteId}
|
|
7688
7851
|
* @secure
|
|
7689
7852
|
*/
|
|
7690
|
-
getIntegrationSiteInstallation: (integrationName: string, installationId: string, siteId: string,
|
|
7853
|
+
getIntegrationSiteInstallation: (integrationName: string, installationId: string, siteId: string, query?: {
|
|
7854
|
+
/**
|
|
7855
|
+
* If true, returns the site object in each items. If false, returns the site ID in each items.
|
|
7856
|
+
* @default false
|
|
7857
|
+
*/
|
|
7858
|
+
extended?: boolean;
|
|
7859
|
+
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSiteInstallation, Error | {
|
|
7691
7860
|
error: {
|
|
7692
7861
|
/** @format int32 */
|
|
7693
7862
|
code: 404;
|
|
@@ -7702,7 +7871,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7702
7871
|
* @request PATCH:/integrations/{integrationName}/installations/{installationId}/sites/{siteId}
|
|
7703
7872
|
* @secure
|
|
7704
7873
|
*/
|
|
7705
|
-
updateIntegrationSiteInstallation: (integrationName: string, installationId: string, siteId: string, data: UpdateIntegrationSiteInstallation,
|
|
7874
|
+
updateIntegrationSiteInstallation: (integrationName: string, installationId: string, siteId: string, data: UpdateIntegrationSiteInstallation, query?: {
|
|
7875
|
+
/**
|
|
7876
|
+
* If true, returns the site object in each items. If false, returns the site ID in each items.
|
|
7877
|
+
* @default false
|
|
7878
|
+
*/
|
|
7879
|
+
extended?: boolean;
|
|
7880
|
+
}, params?: RequestParams) => Promise<HttpResponse<IntegrationSiteInstallation, Error>>;
|
|
7706
7881
|
/**
|
|
7707
7882
|
* No description
|
|
7708
7883
|
*
|
|
@@ -7748,7 +7923,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7748
7923
|
/**
|
|
7749
7924
|
* No description
|
|
7750
7925
|
*
|
|
7751
|
-
* @tags organizations
|
|
7926
|
+
* @tags organizations, critical
|
|
7752
7927
|
* @name GetOrganizationById
|
|
7753
7928
|
* @summary Get an organization by its ID
|
|
7754
7929
|
* @request GET:/orgs/{organizationId}
|
|
@@ -7798,6 +7973,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7798
7973
|
logo?: URL | null;
|
|
7799
7974
|
sso?: boolean;
|
|
7800
7975
|
ai?: boolean;
|
|
7976
|
+
inviteLinks?: boolean;
|
|
7801
7977
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, Error | {
|
|
7802
7978
|
error: {
|
|
7803
7979
|
/** @format int32 */
|
|
@@ -7805,6 +7981,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7805
7981
|
message: string;
|
|
7806
7982
|
};
|
|
7807
7983
|
}>>;
|
|
7984
|
+
/**
|
|
7985
|
+
* @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
|
+
*
|
|
7987
|
+
* @tags organizations
|
|
7988
|
+
* @name GetOrganizationAllContent
|
|
7989
|
+
* @summary List all content in an organization
|
|
7990
|
+
* @request GET:/orgs/{organizationId}/content
|
|
7991
|
+
* @secure
|
|
7992
|
+
*/
|
|
7993
|
+
getOrganizationAllContent: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationAllContent, Error>>;
|
|
7808
7994
|
/**
|
|
7809
7995
|
* @description Lists members for the specified organization.
|
|
7810
7996
|
*
|
|
@@ -8205,7 +8391,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8205
8391
|
* @tags organizations
|
|
8206
8392
|
* @name GetOrganizationBillingPortal
|
|
8207
8393
|
* @summary Get the billing portal for an organization
|
|
8208
|
-
* @request GET:/orgs/{organizationId}/billing
|
|
8394
|
+
* @request GET:/orgs/{organizationId}/billing/portal
|
|
8209
8395
|
* @secure
|
|
8210
8396
|
*/
|
|
8211
8397
|
getOrganizationBillingPortal: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<BillingPortal, Error>>;
|
|
@@ -8985,7 +9171,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8985
9171
|
/**
|
|
8986
9172
|
* No description
|
|
8987
9173
|
*
|
|
8988
|
-
* @tags sites
|
|
9174
|
+
* @tags sites, critical
|
|
8989
9175
|
* @name ListSites
|
|
8990
9176
|
* @summary List all the sites created in an organization
|
|
8991
9177
|
* @request GET:/orgs/{organizationId}/sites
|
|
@@ -9217,6 +9403,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9217
9403
|
plan: SiteType;
|
|
9218
9404
|
/** Desired interval for new subscriptions. Defaults to the existing billing interval. */
|
|
9219
9405
|
interval?: BillingInterval;
|
|
9406
|
+
/** Reason that triggered the billing upgrade */
|
|
9407
|
+
reason?: string;
|
|
9220
9408
|
}, query?: {
|
|
9221
9409
|
/** The app screen URL to bring the user back to after a successful checkout. */
|
|
9222
9410
|
successReturnURL?: string;
|
|
@@ -9235,6 +9423,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9235
9423
|
} | {
|
|
9236
9424
|
/** The site plan was successfully updated. */
|
|
9237
9425
|
type: "success";
|
|
9426
|
+
/**
|
|
9427
|
+
* * `upgraded`: Subscription was upgraded to include the site
|
|
9428
|
+
* * `downgraded`: Subscription was downgraded by removing the site
|
|
9429
|
+
* * `no-payment-changes`: No impact on subscription (e.g. trial, unpublished)
|
|
9430
|
+
*/
|
|
9431
|
+
outcome?: "upgraded" | "downgraded" | "no-payment-changes";
|
|
9238
9432
|
}, Error>>;
|
|
9239
9433
|
/**
|
|
9240
9434
|
* No description
|
|
@@ -9428,7 +9622,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9428
9622
|
/**
|
|
9429
9623
|
* No description
|
|
9430
9624
|
*
|
|
9431
|
-
* @tags sites
|
|
9625
|
+
* @tags sites, critical
|
|
9432
9626
|
* @name ListSiteSpaces
|
|
9433
9627
|
* @summary List all the site spaces under a site in an organization
|
|
9434
9628
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/site-spaces
|
|
@@ -9826,6 +10020,45 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9826
10020
|
* @secure
|
|
9827
10021
|
*/
|
|
9828
10022
|
trackViewInSiteById: (organizationId: string, siteId: string, data: SiteTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10023
|
+
/**
|
|
10024
|
+
* No description
|
|
10025
|
+
*
|
|
10026
|
+
* @tags analytics, sites
|
|
10027
|
+
* @name GetAdsInsightsForSiteById
|
|
10028
|
+
* @summary Get analytics insights of ads on a site.
|
|
10029
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/insights/ads
|
|
10030
|
+
* @secure
|
|
10031
|
+
*/
|
|
10032
|
+
getAdsInsightsForSiteById: (organizationId: string, siteId: string, query?: {
|
|
10033
|
+
/** The interval for grouping the results */
|
|
10034
|
+
interval?: InsightsInterval;
|
|
10035
|
+
/**
|
|
10036
|
+
* The earliest timestamp for any data returned
|
|
10037
|
+
* @format date-time
|
|
10038
|
+
*/
|
|
10039
|
+
start?: string;
|
|
10040
|
+
/**
|
|
10041
|
+
* The latest timestamp for any data returned
|
|
10042
|
+
* @format date-time
|
|
10043
|
+
*/
|
|
10044
|
+
end?: string;
|
|
10045
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
10046
|
+
/** A time serie of the ads stats over the provided period */
|
|
10047
|
+
values: {
|
|
10048
|
+
/**
|
|
10049
|
+
* The start date of this interval
|
|
10050
|
+
* @format date-time
|
|
10051
|
+
*/
|
|
10052
|
+
date: string;
|
|
10053
|
+
stats: SiteAdsStats;
|
|
10054
|
+
}[];
|
|
10055
|
+
account: {
|
|
10056
|
+
/** Email address on the Ads platform. */
|
|
10057
|
+
email: string;
|
|
10058
|
+
/** URL to configure payout. */
|
|
10059
|
+
url: string;
|
|
10060
|
+
};
|
|
10061
|
+
}, Error>>;
|
|
9829
10062
|
/**
|
|
9830
10063
|
* No description
|
|
9831
10064
|
*
|
|
@@ -9854,16 +10087,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9854
10087
|
/** Topic of the content */
|
|
9855
10088
|
topic?: SiteAdsTopic;
|
|
9856
10089
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9857
|
-
/**
|
|
9858
|
-
* No description
|
|
9859
|
-
*
|
|
9860
|
-
* @tags sites
|
|
9861
|
-
* @name GetSiteAdsStatsById
|
|
9862
|
-
* @summary Get the stats about Ads on a site.
|
|
9863
|
-
* @request POST:/orgs/{organizationId}/sites/{siteId}/ads/stats
|
|
9864
|
-
* @secure
|
|
9865
|
-
*/
|
|
9866
|
-
getSiteAdsStatsById: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<SiteAdsStats, Error>>;
|
|
9867
10090
|
};
|
|
9868
10091
|
customHostnames: {
|
|
9869
10092
|
/**
|
|
@@ -9998,7 +10221,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9998
10221
|
/**
|
|
9999
10222
|
* No description
|
|
10000
10223
|
*
|
|
10001
|
-
* @tags hive
|
|
10224
|
+
* @tags hive, critical
|
|
10002
10225
|
* @name GenerateHiveAccessToken
|
|
10003
10226
|
* @summary Returns a token to authenticate with Hive.
|
|
10004
10227
|
* @request POST:/internal/hive/token
|