@gitbook/api 0.28.0 → 0.29.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 +221 -53
- package/dist/index.cjs +91 -18
- package/dist/index.js +89 -18
- package/package.json +1 -1
- package/spec/openapi.json +788 -228
- package/spec/openapi.yaml +500 -148
package/dist/client.d.ts
CHANGED
|
@@ -241,6 +241,10 @@ export interface ApiInformation {
|
|
|
241
241
|
/** Date of the latest release in ISO format */
|
|
242
242
|
build: string;
|
|
243
243
|
}
|
|
244
|
+
/** The context to send when blocking/unblocking */
|
|
245
|
+
export interface BlockContext {
|
|
246
|
+
block: boolean;
|
|
247
|
+
}
|
|
244
248
|
/** The context to send when purging the CDN Cache */
|
|
245
249
|
export interface RequestPurgeCDNCacheContext {
|
|
246
250
|
/** The type of purge, e.g by tags or hosts */
|
|
@@ -248,10 +252,6 @@ export interface RequestPurgeCDNCacheContext {
|
|
|
248
252
|
/** The list of tags or hosts to purge */
|
|
249
253
|
values: string[];
|
|
250
254
|
}
|
|
251
|
-
/** The context to send when blocking/unblocking a user */
|
|
252
|
-
export interface RequestBlockUserContext {
|
|
253
|
-
block: boolean;
|
|
254
|
-
}
|
|
255
255
|
/** The context to send when triggering a content indexing. */
|
|
256
256
|
export interface TriggerContentIndexingContext {
|
|
257
257
|
/** The unique identifier of the Space to index. */
|
|
@@ -1068,6 +1068,8 @@ export interface Space {
|
|
|
1068
1068
|
/** Name of integration being used as the backend for Visitor Authentication */
|
|
1069
1069
|
integration: string;
|
|
1070
1070
|
};
|
|
1071
|
+
/** ID of the active revision in the space. */
|
|
1072
|
+
revision: string;
|
|
1071
1073
|
}
|
|
1072
1074
|
/**
|
|
1073
1075
|
* Determines how a Space can be edited.
|
|
@@ -1444,6 +1446,12 @@ export interface Organization {
|
|
|
1444
1446
|
defaultRole?: MemberRoleOrGuest;
|
|
1445
1447
|
/** The default content for the organization */
|
|
1446
1448
|
defaultContent?: OrganizationDefaultContent;
|
|
1449
|
+
/** Whether SSO is enforced organization wide */
|
|
1450
|
+
sso?: boolean;
|
|
1451
|
+
/** If true, the organization is configured to use our AI-powered natural language search */
|
|
1452
|
+
aiSearch?: boolean;
|
|
1453
|
+
/** If true, the organization is configured to run content audits on any space update */
|
|
1454
|
+
aiInsights?: boolean;
|
|
1447
1455
|
/** URLs associated with the object */
|
|
1448
1456
|
urls: {
|
|
1449
1457
|
/**
|
|
@@ -1456,6 +1464,8 @@ export interface Organization {
|
|
|
1456
1464
|
* @format uri
|
|
1457
1465
|
*/
|
|
1458
1466
|
app: string;
|
|
1467
|
+
/** URL of the logo of this organization, if defined. */
|
|
1468
|
+
logo?: URL;
|
|
1459
1469
|
};
|
|
1460
1470
|
}
|
|
1461
1471
|
export declare enum OrganizationType {
|
|
@@ -1580,6 +1590,36 @@ export interface OrganizationTeamMember {
|
|
|
1580
1590
|
}
|
|
1581
1591
|
/** The default content for the organization */
|
|
1582
1592
|
export declare type OrganizationDefaultContent = SpacePointer | CollectionPointer;
|
|
1593
|
+
export declare type OrganizationInvite = {
|
|
1594
|
+
/** Type of Object, always equals to "invite" */
|
|
1595
|
+
object: 'invite';
|
|
1596
|
+
/** Unique identifier for the organization invite */
|
|
1597
|
+
id: string;
|
|
1598
|
+
/** The role of the member in the organization */
|
|
1599
|
+
role: MemberRoleOrGuest;
|
|
1600
|
+
} | {
|
|
1601
|
+
/** Type of Object, always equals to "invite" */
|
|
1602
|
+
object: 'invite';
|
|
1603
|
+
/** Unique identifier for the organization invite */
|
|
1604
|
+
id: string;
|
|
1605
|
+
/** The role of the member in the organization */
|
|
1606
|
+
role: MemberRoleOrGuest;
|
|
1607
|
+
/** The role of the member in the target space */
|
|
1608
|
+
contentLevel: MemberRoleOrGuest;
|
|
1609
|
+
/** The space the member has been invited to */
|
|
1610
|
+
space: Space;
|
|
1611
|
+
} | {
|
|
1612
|
+
/** Type of Object, always equals to "invite" */
|
|
1613
|
+
object: 'invite';
|
|
1614
|
+
/** Unique identifier for the organization invite */
|
|
1615
|
+
id: string;
|
|
1616
|
+
/** The role of the member in the organization */
|
|
1617
|
+
role: MemberRoleOrGuest;
|
|
1618
|
+
/** The role of the member in the target collection */
|
|
1619
|
+
contentLevel: MemberRoleOrGuest;
|
|
1620
|
+
/** The collection the member has been invited to */
|
|
1621
|
+
collection: Collection;
|
|
1622
|
+
};
|
|
1583
1623
|
export interface Capture {
|
|
1584
1624
|
/** Unique identifier for the capture */
|
|
1585
1625
|
id: string;
|
|
@@ -1685,13 +1725,7 @@ export declare type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
|
1685
1725
|
filename: string;
|
|
1686
1726
|
fileSnapshot: string;
|
|
1687
1727
|
};
|
|
1688
|
-
export interface
|
|
1689
|
-
/** A new title for the capture. */
|
|
1690
|
-
title?: string;
|
|
1691
|
-
/** Content of the capture. */
|
|
1692
|
-
body?: Document;
|
|
1693
|
-
}
|
|
1694
|
-
export declare type Snippet = Document & {
|
|
1728
|
+
export interface Snippet {
|
|
1695
1729
|
/** Unique identifier for the snippet */
|
|
1696
1730
|
id: string;
|
|
1697
1731
|
/** ID of the organization owning this snippet */
|
|
@@ -1733,12 +1767,10 @@ export declare type Snippet = Document & {
|
|
|
1733
1767
|
/** URL of the snippet in the app */
|
|
1734
1768
|
app: URL;
|
|
1735
1769
|
};
|
|
1736
|
-
}
|
|
1770
|
+
}
|
|
1737
1771
|
export interface UpdateSnippetSchema {
|
|
1738
1772
|
/** A new title for the snippet. */
|
|
1739
1773
|
title?: string;
|
|
1740
|
-
/** Content of the snippet. */
|
|
1741
|
-
body?: Document;
|
|
1742
1774
|
}
|
|
1743
1775
|
/** Content audit relation */
|
|
1744
1776
|
export interface ContentAuditRelation {
|
|
@@ -1784,15 +1816,13 @@ export interface ChangeRequest {
|
|
|
1784
1816
|
/** Incremental identifier of the change request */
|
|
1785
1817
|
number: number;
|
|
1786
1818
|
status: ChangeRequestStatus;
|
|
1787
|
-
/**
|
|
1788
|
-
|
|
1789
|
-
* @minLength 0
|
|
1790
|
-
* @maxLength 100
|
|
1791
|
-
*/
|
|
1792
|
-
subject: string;
|
|
1819
|
+
/** Subject of the change request */
|
|
1820
|
+
subject: ChangeRequestSubject;
|
|
1793
1821
|
createdBy: User;
|
|
1794
1822
|
createdAt: Timestamp;
|
|
1795
1823
|
updatedAt: Timestamp;
|
|
1824
|
+
/** ID of the active revision in the change request. */
|
|
1825
|
+
revision: string;
|
|
1796
1826
|
/** URLs associated with the object */
|
|
1797
1827
|
urls: {
|
|
1798
1828
|
/**
|
|
@@ -1847,6 +1877,12 @@ export declare type ChangeRequestRequestedReviewer = {
|
|
|
1847
1877
|
/** The team who was requested to review. */
|
|
1848
1878
|
team: Team;
|
|
1849
1879
|
});
|
|
1880
|
+
/**
|
|
1881
|
+
* Subject of the change request
|
|
1882
|
+
* @minLength 0
|
|
1883
|
+
* @maxLength 100
|
|
1884
|
+
*/
|
|
1885
|
+
export declare type ChangeRequestSubject = string;
|
|
1850
1886
|
export interface UpdateCommentSchema {
|
|
1851
1887
|
/** Whether the comment is resolved or not. */
|
|
1852
1888
|
resolved?: boolean;
|
|
@@ -2218,6 +2254,8 @@ export declare enum IntegrationScope {
|
|
|
2218
2254
|
SpaceGitSync = "space:git:sync",
|
|
2219
2255
|
SpaceVisitorAuth = "space:visitor:auth"
|
|
2220
2256
|
}
|
|
2257
|
+
/** A search string to filter integrations by name */
|
|
2258
|
+
export declare type IntegrationSearchQuery = any;
|
|
2221
2259
|
/** Categories for which the integration is listed in the marketplace */
|
|
2222
2260
|
export declare type IntegrationCategories = IntegrationCategory[];
|
|
2223
2261
|
/** Format the custom block as a codeblock */
|
|
@@ -2975,6 +3013,14 @@ export interface UserRiskEvaluation {
|
|
|
2975
3013
|
emailVerified: boolean;
|
|
2976
3014
|
activeDaysRemaining: number;
|
|
2977
3015
|
}
|
|
3016
|
+
/** Reason for a space to be blocked */
|
|
3017
|
+
export declare enum SpaceBlockReason {
|
|
3018
|
+
DMCA = "DMCA",
|
|
3019
|
+
THREAT_TYPE_UNSPECIFIED = "THREAT_TYPE_UNSPECIFIED",
|
|
3020
|
+
MALWARE = "MALWARE",
|
|
3021
|
+
SOCIAL_ENGINEERING = "SOCIAL_ENGINEERING",
|
|
3022
|
+
UNWANTED_SOFTWARE = "UNWANTED_SOFTWARE"
|
|
3023
|
+
}
|
|
2978
3024
|
/** JWT tokens to authenticate in Hive for all content. */
|
|
2979
3025
|
export interface HiveAccessToken {
|
|
2980
3026
|
contents: Record<string, string>;
|
|
@@ -3335,7 +3381,7 @@ export interface ContentKitURL {
|
|
|
3335
3381
|
query?: Record<string, string | ContentKitDynamicBinding>;
|
|
3336
3382
|
}
|
|
3337
3383
|
/** Channel to subscribe to for API updates. */
|
|
3338
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | {
|
|
3384
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | {
|
|
3339
3385
|
channel: 'organization';
|
|
3340
3386
|
organization: string;
|
|
3341
3387
|
} | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
@@ -3414,6 +3460,15 @@ export interface CollectionPublishingCustomizationChannel {
|
|
|
3414
3460
|
channel: 'collection-publishing-customization';
|
|
3415
3461
|
collection: string;
|
|
3416
3462
|
}
|
|
3463
|
+
export interface ChangeRequestChannel {
|
|
3464
|
+
channel: 'space-change-request';
|
|
3465
|
+
space: string;
|
|
3466
|
+
changeRequest: string;
|
|
3467
|
+
}
|
|
3468
|
+
export interface ChangeRequestsChannel {
|
|
3469
|
+
channel: 'space-change-requests';
|
|
3470
|
+
space: string;
|
|
3471
|
+
}
|
|
3417
3472
|
export interface ChangeRequestReviewsChannel {
|
|
3418
3473
|
channel: 'space-change-request-reviews';
|
|
3419
3474
|
space: string;
|
|
@@ -3574,6 +3629,7 @@ export interface CustomizationSettings {
|
|
|
3574
3629
|
primaryColor: CustomizationThemedColor;
|
|
3575
3630
|
corners: CustomizationCorners;
|
|
3576
3631
|
font: CustomizationFont;
|
|
3632
|
+
background?: CustomizationBackground;
|
|
3577
3633
|
};
|
|
3578
3634
|
internationalization: {
|
|
3579
3635
|
/** Language for the UI element */
|
|
@@ -3693,6 +3749,10 @@ export declare enum CustomizationCorners {
|
|
|
3693
3749
|
Straight = "straight",
|
|
3694
3750
|
Rounded = "rounded"
|
|
3695
3751
|
}
|
|
3752
|
+
export declare enum CustomizationBackground {
|
|
3753
|
+
Plain = "plain",
|
|
3754
|
+
Match = "match"
|
|
3755
|
+
}
|
|
3696
3756
|
export interface CustomizationThemedURL {
|
|
3697
3757
|
light: URL;
|
|
3698
3758
|
dark: URL;
|
|
@@ -3723,6 +3783,22 @@ export declare enum PageFeedbackRating {
|
|
|
3723
3783
|
Ok = "ok",
|
|
3724
3784
|
Good = "good"
|
|
3725
3785
|
}
|
|
3786
|
+
export interface ShareLink {
|
|
3787
|
+
/** Type of Object, always equals to "share-link" */
|
|
3788
|
+
object: 'share-link';
|
|
3789
|
+
/** Unique identifier for the share-link */
|
|
3790
|
+
id: string;
|
|
3791
|
+
createdAt: Timestamp;
|
|
3792
|
+
/** Name of the share link */
|
|
3793
|
+
name?: ShareLinkName;
|
|
3794
|
+
active?: boolean;
|
|
3795
|
+
}
|
|
3796
|
+
/**
|
|
3797
|
+
* Name of the share link
|
|
3798
|
+
* @minLength 0
|
|
3799
|
+
* @maxLength 50
|
|
3800
|
+
*/
|
|
3801
|
+
export declare type ShareLinkName = string;
|
|
3726
3802
|
export declare type QueryParamsType = Record<string | number, any>;
|
|
3727
3803
|
export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
3728
3804
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -4283,10 +4359,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4283
4359
|
* @request POST:/spaces/{spaceId}/change-requests
|
|
4284
4360
|
* @secure
|
|
4285
4361
|
*/
|
|
4286
|
-
createChangeRequest: (spaceId: string, data: RequestCreateChangeRequest, params?: RequestParams) => Promise<HttpResponse<ChangeRequest
|
|
4287
|
-
/** @deprecated */
|
|
4288
|
-
changeRequest: string;
|
|
4289
|
-
}, Error>>;
|
|
4362
|
+
createChangeRequest: (spaceId: string, data: RequestCreateChangeRequest, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, Error>>;
|
|
4290
4363
|
/**
|
|
4291
4364
|
* No description
|
|
4292
4365
|
*
|
|
@@ -4325,6 +4398,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4325
4398
|
message: string;
|
|
4326
4399
|
};
|
|
4327
4400
|
}>>;
|
|
4401
|
+
/**
|
|
4402
|
+
* No description
|
|
4403
|
+
*
|
|
4404
|
+
* @tags spaces
|
|
4405
|
+
* @name UpdateChangeRequestById
|
|
4406
|
+
* @summary Update the details of a change request
|
|
4407
|
+
* @request PATCH:/spaces/{spaceId}/change-requests/{changeRequestId}
|
|
4408
|
+
* @secure
|
|
4409
|
+
*/
|
|
4410
|
+
updateChangeRequestById: (spaceId: string, changeRequestId: string | number, data: {
|
|
4411
|
+
/** Subject of the change request */
|
|
4412
|
+
subject?: ChangeRequestSubject;
|
|
4413
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, Error>>;
|
|
4328
4414
|
/**
|
|
4329
4415
|
* No description
|
|
4330
4416
|
*
|
|
@@ -5076,6 +5162,43 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5076
5162
|
/** Temporary URL to print the content. The URL will work for 1h. */
|
|
5077
5163
|
url: URL;
|
|
5078
5164
|
}, Error>>;
|
|
5165
|
+
/**
|
|
5166
|
+
* No description
|
|
5167
|
+
*
|
|
5168
|
+
* @tags spaces
|
|
5169
|
+
* @name CreateSpaceShareLink
|
|
5170
|
+
* @summary Creates a new space share link
|
|
5171
|
+
* @request POST:/spaces/{spaceId}/share-links
|
|
5172
|
+
* @secure
|
|
5173
|
+
*/
|
|
5174
|
+
createSpaceShareLink: (spaceId: string, data: {
|
|
5175
|
+
/** Name of the share link */
|
|
5176
|
+
name: ShareLinkName;
|
|
5177
|
+
}, params?: RequestParams) => Promise<HttpResponse<ShareLink, Error>>;
|
|
5178
|
+
/**
|
|
5179
|
+
* No description
|
|
5180
|
+
*
|
|
5181
|
+
* @tags spaces
|
|
5182
|
+
* @name UpdateSpaceShareLinkById
|
|
5183
|
+
* @summary Update the details of a space share link
|
|
5184
|
+
* @request PATCH:/spaces/{spaceId}/share-links/{shareLinkId}
|
|
5185
|
+
* @secure
|
|
5186
|
+
*/
|
|
5187
|
+
updateSpaceShareLinkById: (spaceId: string, shareLinkId: string, data: {
|
|
5188
|
+
active?: boolean;
|
|
5189
|
+
/** Name of the share link */
|
|
5190
|
+
name?: ShareLinkName;
|
|
5191
|
+
}, params?: RequestParams) => Promise<HttpResponse<ShareLink, Error>>;
|
|
5192
|
+
/**
|
|
5193
|
+
* No description
|
|
5194
|
+
*
|
|
5195
|
+
* @tags spaces
|
|
5196
|
+
* @name DeleteSpaceShareLinkById
|
|
5197
|
+
* @summary Deletes a space share link
|
|
5198
|
+
* @request DELETE:/spaces/{spaceId}/share-links/{shareLinkId}
|
|
5199
|
+
* @secure
|
|
5200
|
+
*/
|
|
5201
|
+
deleteSpaceShareLinkById: (spaceId: string, shareLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
5079
5202
|
};
|
|
5080
5203
|
collections: {
|
|
5081
5204
|
/**
|
|
@@ -5281,6 +5404,43 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5281
5404
|
message: string;
|
|
5282
5405
|
};
|
|
5283
5406
|
}>>;
|
|
5407
|
+
/**
|
|
5408
|
+
* No description
|
|
5409
|
+
*
|
|
5410
|
+
* @tags collections
|
|
5411
|
+
* @name CreateCollectionShareLink
|
|
5412
|
+
* @summary Creates a new collection share link
|
|
5413
|
+
* @request POST:/collections/{collectionId}/share-links
|
|
5414
|
+
* @secure
|
|
5415
|
+
*/
|
|
5416
|
+
createCollectionShareLink: (collectionId: string, data: {
|
|
5417
|
+
/** Name of the share link */
|
|
5418
|
+
name: ShareLinkName;
|
|
5419
|
+
}, params?: RequestParams) => Promise<HttpResponse<ShareLink, Error>>;
|
|
5420
|
+
/**
|
|
5421
|
+
* No description
|
|
5422
|
+
*
|
|
5423
|
+
* @tags collections
|
|
5424
|
+
* @name UpdateCollectionShareLinkById
|
|
5425
|
+
* @summary Update the details of a collection share link
|
|
5426
|
+
* @request PATCH:/collections/{collectionId}/share-links/{shareLinkId}
|
|
5427
|
+
* @secure
|
|
5428
|
+
*/
|
|
5429
|
+
updateCollectionShareLinkById: (collectionId: string, shareLinkId: string, data: {
|
|
5430
|
+
active?: boolean;
|
|
5431
|
+
/** Name of the share link */
|
|
5432
|
+
name?: ShareLinkName;
|
|
5433
|
+
}, params?: RequestParams) => Promise<HttpResponse<ShareLink, Error>>;
|
|
5434
|
+
/**
|
|
5435
|
+
* No description
|
|
5436
|
+
*
|
|
5437
|
+
* @tags collections
|
|
5438
|
+
* @name DeleteCollectionShareLinkById
|
|
5439
|
+
* @summary Deletes a collection share link
|
|
5440
|
+
* @request DELETE:/collections/{collectionId}/share-links/{shareLinkId}
|
|
5441
|
+
* @secure
|
|
5442
|
+
*/
|
|
5443
|
+
deleteCollectionShareLinkById: (collectionId: string, shareLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
5284
5444
|
};
|
|
5285
5445
|
integrations: {
|
|
5286
5446
|
/**
|
|
@@ -5297,6 +5457,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5297
5457
|
page?: string;
|
|
5298
5458
|
/** The number of results per page */
|
|
5299
5459
|
limit?: number;
|
|
5460
|
+
/** A search string to filter integrations by name */
|
|
5461
|
+
search?: any;
|
|
5300
5462
|
/** Filter the integrations by category */
|
|
5301
5463
|
category?: IntegrationCategory;
|
|
5302
5464
|
/**
|
|
@@ -5729,6 +5891,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5729
5891
|
/** The role of a member in an organization, null for guests */
|
|
5730
5892
|
defaultRole?: MemberRoleOrGuest;
|
|
5731
5893
|
defaultContent?: OrganizationDefaultContent | null;
|
|
5894
|
+
logo?: URL | null;
|
|
5895
|
+
sso?: boolean;
|
|
5896
|
+
aiSearch?: boolean;
|
|
5897
|
+
aiInsights?: boolean;
|
|
5732
5898
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, Error | {
|
|
5733
5899
|
error: {
|
|
5734
5900
|
/** @format int32 */
|
|
@@ -6006,6 +6172,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6006
6172
|
* @secure
|
|
6007
6173
|
*/
|
|
6008
6174
|
joinOrganizationWithInvite: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<object, Error>>;
|
|
6175
|
+
/**
|
|
6176
|
+
* No description
|
|
6177
|
+
*
|
|
6178
|
+
* @tags organizations
|
|
6179
|
+
* @name UpdateOrganizationInviteById
|
|
6180
|
+
* @summary Update an organization invite.
|
|
6181
|
+
* @request PATCH:/orgs/{organizationId}/invites/{inviteId}
|
|
6182
|
+
* @secure
|
|
6183
|
+
*/
|
|
6184
|
+
updateOrganizationInviteById: (organizationId: string, inviteId: string, data: {
|
|
6185
|
+
/** The role of a member in an organization, null for guests */
|
|
6186
|
+
role?: MemberRoleOrGuest;
|
|
6187
|
+
/** The role of a member in an organization, null for guests */
|
|
6188
|
+
contentLevel?: MemberRoleOrGuest;
|
|
6189
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationInvite, Error>>;
|
|
6190
|
+
/**
|
|
6191
|
+
* No description
|
|
6192
|
+
*
|
|
6193
|
+
* @tags organizations
|
|
6194
|
+
* @name DeleteOrganizationInviteById
|
|
6195
|
+
* @summary Deletes an organization invite.
|
|
6196
|
+
* @request DELETE:/orgs/{organizationId}/invites/{inviteId}
|
|
6197
|
+
* @secure
|
|
6198
|
+
*/
|
|
6199
|
+
deleteOrganizationInviteById: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
6009
6200
|
/**
|
|
6010
6201
|
* No description
|
|
6011
6202
|
*
|
|
@@ -6252,6 +6443,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6252
6443
|
page?: string;
|
|
6253
6444
|
/** The number of results per page */
|
|
6254
6445
|
limit?: number;
|
|
6446
|
+
/** A search string to filter integrations by name */
|
|
6447
|
+
search?: any;
|
|
6255
6448
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
6256
6449
|
items: Integration[];
|
|
6257
6450
|
}, Error>>;
|
|
@@ -6287,6 +6480,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6287
6480
|
page?: string;
|
|
6288
6481
|
/** The number of results per page */
|
|
6289
6482
|
limit?: number;
|
|
6483
|
+
/** A search string to filter integrations by name */
|
|
6484
|
+
search?: any;
|
|
6290
6485
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
6291
6486
|
items: {
|
|
6292
6487
|
/** Installation of an integration on an account */
|
|
@@ -6462,28 +6657,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6462
6657
|
/** Output format for the content. */
|
|
6463
6658
|
format?: 'document' | 'markdown';
|
|
6464
6659
|
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
6465
|
-
/**
|
|
6466
|
-
* No description
|
|
6467
|
-
*
|
|
6468
|
-
* @tags organizations
|
|
6469
|
-
* @name DeleteCapture
|
|
6470
|
-
* @summary Delete a capture by its ID. Deprecated, use deleteSnippet.
|
|
6471
|
-
* @request DELETE:/orgs/{organizationId}/captures/{captureId}
|
|
6472
|
-
* @deprecated
|
|
6473
|
-
* @secure
|
|
6474
|
-
*/
|
|
6475
|
-
deleteCapture: (organizationId: string, captureId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
6476
|
-
/**
|
|
6477
|
-
* No description
|
|
6478
|
-
*
|
|
6479
|
-
* @tags organizations
|
|
6480
|
-
* @name UpdateCapture
|
|
6481
|
-
* @summary Update an existing capture. Deprecated, use updateSnippet.
|
|
6482
|
-
* @request PUT:/orgs/{organizationId}/captures/{captureId}
|
|
6483
|
-
* @deprecated
|
|
6484
|
-
* @secure
|
|
6485
|
-
*/
|
|
6486
|
-
updateCapture: (organizationId: string, captureId: string, data: UpdateCaptureSchema, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
6487
6660
|
/**
|
|
6488
6661
|
* No description
|
|
6489
6662
|
*
|
|
@@ -6523,8 +6696,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6523
6696
|
* @secure
|
|
6524
6697
|
*/
|
|
6525
6698
|
listSnippets: (organizationId: string, query?: {
|
|
6526
|
-
/** Output format for the content. */
|
|
6527
|
-
format?: 'document' | 'markdown';
|
|
6528
6699
|
/** Identifier of the page results to fetch. */
|
|
6529
6700
|
page?: string;
|
|
6530
6701
|
/** The number of results per page */
|
|
@@ -6553,10 +6724,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6553
6724
|
* @request GET:/orgs/{organizationId}/snippets/{snippetId}
|
|
6554
6725
|
* @secure
|
|
6555
6726
|
*/
|
|
6556
|
-
getSnippet: (organizationId: string, snippetId: string,
|
|
6557
|
-
/** Output format for the content. */
|
|
6558
|
-
format?: 'document' | 'markdown';
|
|
6559
|
-
}, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
6727
|
+
getSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
6560
6728
|
/**
|
|
6561
6729
|
* No description
|
|
6562
6730
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
ContentType: () => ContentType,
|
|
37
37
|
ContentVisibility: () => ContentVisibility,
|
|
38
38
|
CustomFieldType: () => CustomFieldType,
|
|
39
|
+
CustomizationBackground: () => CustomizationBackground,
|
|
39
40
|
CustomizationCorners: () => CustomizationCorners,
|
|
40
41
|
CustomizationFont: () => CustomizationFont,
|
|
41
42
|
CustomizationHeaderPreset: () => CustomizationHeaderPreset,
|
|
@@ -63,6 +64,7 @@ __export(src_exports, {
|
|
|
63
64
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
64
65
|
RevisionPageType: () => RevisionPageType,
|
|
65
66
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
67
|
+
SpaceBlockReason: () => SpaceBlockReason,
|
|
66
68
|
SpaceEditMode: () => SpaceEditMode,
|
|
67
69
|
TeamMemberRole: () => TeamMemberRole
|
|
68
70
|
});
|
|
@@ -70,7 +72,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
70
72
|
|
|
71
73
|
// package.json
|
|
72
74
|
var name = "@gitbook/api";
|
|
73
|
-
var version = "0.
|
|
75
|
+
var version = "0.29.0";
|
|
74
76
|
|
|
75
77
|
// src/client.ts
|
|
76
78
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
@@ -304,6 +306,14 @@ var PurgeCDNCacheContextType = /* @__PURE__ */ ((PurgeCDNCacheContextType2) => {
|
|
|
304
306
|
PurgeCDNCacheContextType2["Hosts"] = "hosts";
|
|
305
307
|
return PurgeCDNCacheContextType2;
|
|
306
308
|
})(PurgeCDNCacheContextType || {});
|
|
309
|
+
var SpaceBlockReason = /* @__PURE__ */ ((SpaceBlockReason2) => {
|
|
310
|
+
SpaceBlockReason2["DMCA"] = "DMCA";
|
|
311
|
+
SpaceBlockReason2["THREAT_TYPE_UNSPECIFIED"] = "THREAT_TYPE_UNSPECIFIED";
|
|
312
|
+
SpaceBlockReason2["MALWARE"] = "MALWARE";
|
|
313
|
+
SpaceBlockReason2["SOCIAL_ENGINEERING"] = "SOCIAL_ENGINEERING";
|
|
314
|
+
SpaceBlockReason2["UNWANTED_SOFTWARE"] = "UNWANTED_SOFTWARE";
|
|
315
|
+
return SpaceBlockReason2;
|
|
316
|
+
})(SpaceBlockReason || {});
|
|
307
317
|
var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
|
|
308
318
|
ContentKitIcon2["Close"] = "close";
|
|
309
319
|
ContentKitIcon2["Edit"] = "edit";
|
|
@@ -375,6 +385,11 @@ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
|
|
|
375
385
|
CustomizationCorners2["Rounded"] = "rounded";
|
|
376
386
|
return CustomizationCorners2;
|
|
377
387
|
})(CustomizationCorners || {});
|
|
388
|
+
var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
|
|
389
|
+
CustomizationBackground2["Plain"] = "plain";
|
|
390
|
+
CustomizationBackground2["Match"] = "match";
|
|
391
|
+
return CustomizationBackground2;
|
|
392
|
+
})(CustomizationBackground || {});
|
|
378
393
|
var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
379
394
|
PageFeedbackRating2["Bad"] = "bad";
|
|
380
395
|
PageFeedbackRating2["Ok"] = "ok";
|
|
@@ -829,6 +844,15 @@ var Api = class extends HttpClient {
|
|
|
829
844
|
format: "json",
|
|
830
845
|
...params
|
|
831
846
|
}),
|
|
847
|
+
updateChangeRequestById: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
848
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
|
|
849
|
+
method: "PATCH",
|
|
850
|
+
body: data,
|
|
851
|
+
secure: true,
|
|
852
|
+
type: "application/json" /* Json */,
|
|
853
|
+
format: "json",
|
|
854
|
+
...params
|
|
855
|
+
}),
|
|
832
856
|
mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
|
|
833
857
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
|
|
834
858
|
method: "POST",
|
|
@@ -1253,6 +1277,30 @@ var Api = class extends HttpClient {
|
|
|
1253
1277
|
secure: true,
|
|
1254
1278
|
format: "json",
|
|
1255
1279
|
...params
|
|
1280
|
+
}),
|
|
1281
|
+
createSpaceShareLink: (spaceId, data, params = {}) => this.request({
|
|
1282
|
+
path: `/spaces/${spaceId}/share-links`,
|
|
1283
|
+
method: "POST",
|
|
1284
|
+
body: data,
|
|
1285
|
+
secure: true,
|
|
1286
|
+
type: "application/json" /* Json */,
|
|
1287
|
+
format: "json",
|
|
1288
|
+
...params
|
|
1289
|
+
}),
|
|
1290
|
+
updateSpaceShareLinkById: (spaceId, shareLinkId, data, params = {}) => this.request({
|
|
1291
|
+
path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
|
|
1292
|
+
method: "PATCH",
|
|
1293
|
+
body: data,
|
|
1294
|
+
secure: true,
|
|
1295
|
+
type: "application/json" /* Json */,
|
|
1296
|
+
format: "json",
|
|
1297
|
+
...params
|
|
1298
|
+
}),
|
|
1299
|
+
deleteSpaceShareLinkById: (spaceId, shareLinkId, params = {}) => this.request({
|
|
1300
|
+
path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
|
|
1301
|
+
method: "DELETE",
|
|
1302
|
+
secure: true,
|
|
1303
|
+
...params
|
|
1256
1304
|
})
|
|
1257
1305
|
};
|
|
1258
1306
|
this.collections = {
|
|
@@ -1343,6 +1391,30 @@ var Api = class extends HttpClient {
|
|
|
1343
1391
|
type: "application/json" /* Json */,
|
|
1344
1392
|
format: "json",
|
|
1345
1393
|
...params
|
|
1394
|
+
}),
|
|
1395
|
+
createCollectionShareLink: (collectionId, data, params = {}) => this.request({
|
|
1396
|
+
path: `/collections/${collectionId}/share-links`,
|
|
1397
|
+
method: "POST",
|
|
1398
|
+
body: data,
|
|
1399
|
+
secure: true,
|
|
1400
|
+
type: "application/json" /* Json */,
|
|
1401
|
+
format: "json",
|
|
1402
|
+
...params
|
|
1403
|
+
}),
|
|
1404
|
+
updateCollectionShareLinkById: (collectionId, shareLinkId, data, params = {}) => this.request({
|
|
1405
|
+
path: `/collections/${collectionId}/share-links/${shareLinkId}`,
|
|
1406
|
+
method: "PATCH",
|
|
1407
|
+
body: data,
|
|
1408
|
+
secure: true,
|
|
1409
|
+
type: "application/json" /* Json */,
|
|
1410
|
+
format: "json",
|
|
1411
|
+
...params
|
|
1412
|
+
}),
|
|
1413
|
+
deleteCollectionShareLinkById: (collectionId, shareLinkId, params = {}) => this.request({
|
|
1414
|
+
path: `/collections/${collectionId}/share-links/${shareLinkId}`,
|
|
1415
|
+
method: "DELETE",
|
|
1416
|
+
secure: true,
|
|
1417
|
+
...params
|
|
1346
1418
|
})
|
|
1347
1419
|
};
|
|
1348
1420
|
this.integrations = {
|
|
@@ -1708,6 +1780,21 @@ var Api = class extends HttpClient {
|
|
|
1708
1780
|
format: "json",
|
|
1709
1781
|
...params
|
|
1710
1782
|
}),
|
|
1783
|
+
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
1784
|
+
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
1785
|
+
method: "PATCH",
|
|
1786
|
+
body: data,
|
|
1787
|
+
secure: true,
|
|
1788
|
+
type: "application/json" /* Json */,
|
|
1789
|
+
format: "json",
|
|
1790
|
+
...params
|
|
1791
|
+
}),
|
|
1792
|
+
deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
|
|
1793
|
+
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
1794
|
+
method: "DELETE",
|
|
1795
|
+
secure: true,
|
|
1796
|
+
...params
|
|
1797
|
+
}),
|
|
1711
1798
|
upgradeOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
1712
1799
|
path: `/orgs/${organizationId}/billing`,
|
|
1713
1800
|
method: "POST",
|
|
@@ -1944,21 +2031,6 @@ var Api = class extends HttpClient {
|
|
|
1944
2031
|
format: "json",
|
|
1945
2032
|
...params
|
|
1946
2033
|
}),
|
|
1947
|
-
deleteCapture: (organizationId, captureId, params = {}) => this.request({
|
|
1948
|
-
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1949
|
-
method: "DELETE",
|
|
1950
|
-
secure: true,
|
|
1951
|
-
...params
|
|
1952
|
-
}),
|
|
1953
|
-
updateCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1954
|
-
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1955
|
-
method: "PUT",
|
|
1956
|
-
body: data,
|
|
1957
|
-
secure: true,
|
|
1958
|
-
type: "application/json" /* Json */,
|
|
1959
|
-
format: "json",
|
|
1960
|
-
...params
|
|
1961
|
-
}),
|
|
1962
2034
|
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1963
2035
|
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1964
2036
|
method: "POST",
|
|
@@ -1994,10 +2066,9 @@ var Api = class extends HttpClient {
|
|
|
1994
2066
|
format: "json",
|
|
1995
2067
|
...params
|
|
1996
2068
|
}),
|
|
1997
|
-
getSnippet: (organizationId, snippetId,
|
|
2069
|
+
getSnippet: (organizationId, snippetId, params = {}) => this.request({
|
|
1998
2070
|
path: `/orgs/${organizationId}/snippets/${snippetId}`,
|
|
1999
2071
|
method: "GET",
|
|
2000
|
-
query,
|
|
2001
2072
|
secure: true,
|
|
2002
2073
|
format: "json",
|
|
2003
2074
|
...params
|
|
@@ -2213,6 +2284,7 @@ var GitBookAPI = class extends Api {
|
|
|
2213
2284
|
ContentType,
|
|
2214
2285
|
ContentVisibility,
|
|
2215
2286
|
CustomFieldType,
|
|
2287
|
+
CustomizationBackground,
|
|
2216
2288
|
CustomizationCorners,
|
|
2217
2289
|
CustomizationFont,
|
|
2218
2290
|
CustomizationHeaderPreset,
|
|
@@ -2240,6 +2312,7 @@ var GitBookAPI = class extends Api {
|
|
|
2240
2312
|
RevisionPageLayoutPreset,
|
|
2241
2313
|
RevisionPageType,
|
|
2242
2314
|
RevisionSemanticChangeType,
|
|
2315
|
+
SpaceBlockReason,
|
|
2243
2316
|
SpaceEditMode,
|
|
2244
2317
|
TeamMemberRole
|
|
2245
2318
|
});
|