@gitbook/api 0.20.1 → 0.22.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 +208 -82
- package/dist/index.cjs +74 -23
- package/dist/index.js +73 -23
- package/package.json +1 -1
- package/spec/openapi.json +647 -275
- package/spec/openapi.yaml +376 -178
package/dist/client.d.ts
CHANGED
|
@@ -1011,6 +1011,7 @@ export interface Space {
|
|
|
1011
1011
|
organization: string;
|
|
1012
1012
|
/** ID of the parent collection. */
|
|
1013
1013
|
parent?: string;
|
|
1014
|
+
gitSync?: GitSyncState;
|
|
1014
1015
|
}
|
|
1015
1016
|
export interface RevisionBase {
|
|
1016
1017
|
/** Type of Object, always equals to "revision" */
|
|
@@ -1077,6 +1078,10 @@ export declare type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
1077
1078
|
/** @deprecated */
|
|
1078
1079
|
kind: 'sheet';
|
|
1079
1080
|
type: 'document';
|
|
1081
|
+
urls: {
|
|
1082
|
+
/** Location of the page in the app */
|
|
1083
|
+
app: URL;
|
|
1084
|
+
};
|
|
1080
1085
|
/** Page's slug in its direct parent */
|
|
1081
1086
|
slug: string;
|
|
1082
1087
|
/** Complete path to access the page in the revision. */
|
|
@@ -1430,26 +1435,6 @@ export interface OrganizationTransferResponse {
|
|
|
1430
1435
|
/** The new hostname if the source organization needed to change hostname. */
|
|
1431
1436
|
newSourceHostname?: string;
|
|
1432
1437
|
}
|
|
1433
|
-
export interface OrganizationDirectorySyncGroup {
|
|
1434
|
-
/** The unique identifier of this group in WorkOS. Not the unique ID from GitBook. */
|
|
1435
|
-
id: string;
|
|
1436
|
-
/** The identity provider's unique ID for this group, should be used to generate the team's unique ID when syncing the groups. */
|
|
1437
|
-
idp_id: string;
|
|
1438
|
-
/** The unique ID of the directory this group is owned by in WorkOS. Is not a unique ID from our database. */
|
|
1439
|
-
directory_id: string;
|
|
1440
|
-
/** The name of the group from the identity provider, it should always be set according to the WorkOS documentation. */
|
|
1441
|
-
name: string;
|
|
1442
|
-
/** The unique ID of the GitBook team already synced to this group, if applicable. */
|
|
1443
|
-
teamKey?: string;
|
|
1444
|
-
}
|
|
1445
|
-
export declare type OrganizationDirectorySyncGroupTeamStatus = {
|
|
1446
|
-
success: true;
|
|
1447
|
-
group_id: string;
|
|
1448
|
-
team_id: string;
|
|
1449
|
-
} | {
|
|
1450
|
-
success: false;
|
|
1451
|
-
error: string;
|
|
1452
|
-
};
|
|
1453
1438
|
export interface OrganizationTarget {
|
|
1454
1439
|
organization: string;
|
|
1455
1440
|
}
|
|
@@ -1635,6 +1620,8 @@ export declare type Snippet = Document & {
|
|
|
1635
1620
|
* @format date-time
|
|
1636
1621
|
*/
|
|
1637
1622
|
editedAt?: string;
|
|
1623
|
+
/** Whether the snippet is archived. Archived snippets don't appear in search results or in the app. */
|
|
1624
|
+
archived: boolean;
|
|
1638
1625
|
/**
|
|
1639
1626
|
* Title describing the snippet.
|
|
1640
1627
|
* @maxLength 100
|
|
@@ -1994,12 +1981,10 @@ export interface Collection {
|
|
|
1994
1981
|
object: 'collection';
|
|
1995
1982
|
/** Unique identifier for the collection */
|
|
1996
1983
|
id: string;
|
|
1997
|
-
/**
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
*/
|
|
2002
|
-
title: string;
|
|
1984
|
+
/** Title of the collection */
|
|
1985
|
+
title: CollectionTitle;
|
|
1986
|
+
/** Description of the collection */
|
|
1987
|
+
description?: CollectionDescription;
|
|
2003
1988
|
/** Path in the published URL */
|
|
2004
1989
|
path?: string;
|
|
2005
1990
|
/**
|
|
@@ -2036,6 +2021,18 @@ export interface Collection {
|
|
|
2036
2021
|
app: string;
|
|
2037
2022
|
};
|
|
2038
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Title of the collection
|
|
2026
|
+
* @minLength 0
|
|
2027
|
+
* @maxLength 50
|
|
2028
|
+
*/
|
|
2029
|
+
export declare type CollectionTitle = string;
|
|
2030
|
+
/**
|
|
2031
|
+
* Description of the collection
|
|
2032
|
+
* @minLength 0
|
|
2033
|
+
* @maxLength 100
|
|
2034
|
+
*/
|
|
2035
|
+
export declare type CollectionDescription = string;
|
|
2039
2036
|
export interface Integration {
|
|
2040
2037
|
object: 'integration';
|
|
2041
2038
|
/** Unique named identifier for the integration */
|
|
@@ -2401,6 +2398,14 @@ export declare type SpaceIntegrationBlocks = {
|
|
|
2401
2398
|
name: string;
|
|
2402
2399
|
blocks: IntegrationBlock[];
|
|
2403
2400
|
}[];
|
|
2401
|
+
export interface SpaceIntegrationScript {
|
|
2402
|
+
/** Script URL to load. */
|
|
2403
|
+
script: URL;
|
|
2404
|
+
/** Content Security Policy to secure the loading of this script. */
|
|
2405
|
+
contentSecurityPolicy?: string;
|
|
2406
|
+
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
2407
|
+
cookies: boolean;
|
|
2408
|
+
}
|
|
2404
2409
|
/** Entity to create or update in an integration's installation. */
|
|
2405
2410
|
export interface UpsertEntity {
|
|
2406
2411
|
/** Unique ID of the entity in the context of the integration's entity type */
|
|
@@ -3227,7 +3232,7 @@ export interface ContentKitURL {
|
|
|
3227
3232
|
query?: Record<string, string | ContentKitDynamicBinding>;
|
|
3228
3233
|
}
|
|
3229
3234
|
/** Channel to subscribe to for API updates. */
|
|
3230
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | {
|
|
3235
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | {
|
|
3231
3236
|
channel: 'organization';
|
|
3232
3237
|
organization: string;
|
|
3233
3238
|
} | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
@@ -3298,6 +3303,10 @@ export interface UserProfileChannel {
|
|
|
3298
3303
|
channel: 'user-profile';
|
|
3299
3304
|
user: string;
|
|
3300
3305
|
}
|
|
3306
|
+
export interface CollectionChannel {
|
|
3307
|
+
channel: 'collection';
|
|
3308
|
+
collection: string;
|
|
3309
|
+
}
|
|
3301
3310
|
export interface CollectionPublishingCustomizationChannel {
|
|
3302
3311
|
channel: 'collection-publishing-customization';
|
|
3303
3312
|
collection: string;
|
|
@@ -3589,6 +3598,28 @@ export interface CustomizationThemedColor {
|
|
|
3589
3598
|
light: Color;
|
|
3590
3599
|
dark: Color;
|
|
3591
3600
|
}
|
|
3601
|
+
export interface PageFeedback {
|
|
3602
|
+
/** Type of Object, always equal to "page-feedback" */
|
|
3603
|
+
object: 'page-feedback';
|
|
3604
|
+
visitorId: string;
|
|
3605
|
+
rating: PageFeedbackRating;
|
|
3606
|
+
createdAt: Date;
|
|
3607
|
+
/** ID of the revision when the rating was created */
|
|
3608
|
+
revision: string;
|
|
3609
|
+
/** URLs associated with the object */
|
|
3610
|
+
urls: {
|
|
3611
|
+
/**
|
|
3612
|
+
* URL of the page feedback in the API
|
|
3613
|
+
* @format uri
|
|
3614
|
+
*/
|
|
3615
|
+
location: string;
|
|
3616
|
+
};
|
|
3617
|
+
}
|
|
3618
|
+
export declare enum PageFeedbackRating {
|
|
3619
|
+
Bad = "bad",
|
|
3620
|
+
Ok = "ok",
|
|
3621
|
+
Good = "good"
|
|
3622
|
+
}
|
|
3592
3623
|
export declare type QueryParamsType = Record<string | number, any>;
|
|
3593
3624
|
export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
3594
3625
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -3717,8 +3748,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3717
3748
|
* No description
|
|
3718
3749
|
*
|
|
3719
3750
|
* @name GetRecommendedQuestions
|
|
3720
|
-
* @summary Get a list of questions recommended by AI for a list of content.
|
|
3751
|
+
* @summary Get a list of questions recommended by AI for a list of content. Deprecated, use getRecommendedQuestionsInOrganization instead.
|
|
3721
3752
|
* @request POST:/search/questions
|
|
3753
|
+
* @deprecated
|
|
3722
3754
|
* @secure
|
|
3723
3755
|
*/
|
|
3724
3756
|
getRecommendedQuestions: (data: {
|
|
@@ -3785,6 +3817,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3785
3817
|
*/
|
|
3786
3818
|
visibility?: ContentVisibility;
|
|
3787
3819
|
}, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3820
|
+
/**
|
|
3821
|
+
* No description
|
|
3822
|
+
*
|
|
3823
|
+
* @tags spaces
|
|
3824
|
+
* @name DeleteSpaceById
|
|
3825
|
+
* @summary Soft-deletes a space. Soft-deleted spaces will be permanently removed after 7 days.
|
|
3826
|
+
* @request DELETE:/spaces/{spaceId}
|
|
3827
|
+
* @secure
|
|
3828
|
+
*/
|
|
3829
|
+
deleteSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
3788
3830
|
/**
|
|
3789
3831
|
* No description
|
|
3790
3832
|
*
|
|
@@ -3805,6 +3847,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3805
3847
|
* @secure
|
|
3806
3848
|
*/
|
|
3807
3849
|
duplicateSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3850
|
+
/**
|
|
3851
|
+
* No description
|
|
3852
|
+
*
|
|
3853
|
+
* @tags spaces
|
|
3854
|
+
* @name RestoreSpace
|
|
3855
|
+
* @summary Restore a recently soft-deleted space.
|
|
3856
|
+
* @request POST:/spaces/{spaceId}/restore
|
|
3857
|
+
* @secure
|
|
3858
|
+
*/
|
|
3859
|
+
restoreSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3808
3860
|
/**
|
|
3809
3861
|
* No description
|
|
3810
3862
|
*
|
|
@@ -4201,6 +4253,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4201
4253
|
page?: string;
|
|
4202
4254
|
/** The number of results per page */
|
|
4203
4255
|
limit?: number;
|
|
4256
|
+
/**
|
|
4257
|
+
* An order for the items in the list
|
|
4258
|
+
* @default "desc"
|
|
4259
|
+
*/
|
|
4260
|
+
order?: 'asc' | 'desc';
|
|
4204
4261
|
/** Output format for the content. */
|
|
4205
4262
|
format?: 'document' | 'markdown';
|
|
4206
4263
|
/**
|
|
@@ -4208,6 +4265,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4208
4265
|
* @default "all"
|
|
4209
4266
|
*/
|
|
4210
4267
|
status?: 'all' | 'open' | 'resolved';
|
|
4268
|
+
/** The target page of the comment */
|
|
4269
|
+
targetPage?: string;
|
|
4211
4270
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4212
4271
|
items: Comment[];
|
|
4213
4272
|
}, Error>>;
|
|
@@ -4531,6 +4590,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4531
4590
|
page?: string;
|
|
4532
4591
|
/** The number of results per page */
|
|
4533
4592
|
limit?: number;
|
|
4593
|
+
/**
|
|
4594
|
+
* An order for the items in the list
|
|
4595
|
+
* @default "desc"
|
|
4596
|
+
*/
|
|
4597
|
+
order?: 'asc' | 'desc';
|
|
4534
4598
|
/**
|
|
4535
4599
|
* When provided, only comments with the given status are returned. Defaults to "all".
|
|
4536
4600
|
* @default "all"
|
|
@@ -4538,6 +4602,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4538
4602
|
status?: 'all' | 'open' | 'resolved';
|
|
4539
4603
|
/** Output format for the content. */
|
|
4540
4604
|
format?: 'document' | 'markdown';
|
|
4605
|
+
/** The target page of the comment */
|
|
4606
|
+
targetPage?: string;
|
|
4541
4607
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4542
4608
|
items: Comment[];
|
|
4543
4609
|
}, Error>>;
|
|
@@ -4745,6 +4811,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4745
4811
|
message: string;
|
|
4746
4812
|
};
|
|
4747
4813
|
}>>;
|
|
4814
|
+
/**
|
|
4815
|
+
* No description
|
|
4816
|
+
*
|
|
4817
|
+
* @tags spaces
|
|
4818
|
+
* @name ListSpaceIntegrationScripts
|
|
4819
|
+
* @summary List the scripts to embed in published content for a space.
|
|
4820
|
+
* @request GET:/spaces/{spaceId}/integration-scripts
|
|
4821
|
+
* @secure
|
|
4822
|
+
*/
|
|
4823
|
+
listSpaceIntegrationScripts: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<SpaceIntegrationScript[], Error | {
|
|
4824
|
+
error: {
|
|
4825
|
+
/** @format int32 */
|
|
4826
|
+
code: 400;
|
|
4827
|
+
message: string;
|
|
4828
|
+
};
|
|
4829
|
+
}>>;
|
|
4748
4830
|
/**
|
|
4749
4831
|
* No description
|
|
4750
4832
|
*
|
|
@@ -4765,6 +4847,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4765
4847
|
* @secure
|
|
4766
4848
|
*/
|
|
4767
4849
|
updateSpaceCustomFields: (spaceId: string, data: UpdateCustomFieldValues, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4850
|
+
/**
|
|
4851
|
+
* No description
|
|
4852
|
+
*
|
|
4853
|
+
* @tags spaces
|
|
4854
|
+
* @name GetPageFeedback
|
|
4855
|
+
* @summary Get a page feedback by a visitor.
|
|
4856
|
+
* @request GET:/spaces/{spaceId}/pages/{pageId}/feedbacks/{visitorId}
|
|
4857
|
+
* @secure
|
|
4858
|
+
*/
|
|
4859
|
+
getPageFeedback: (spaceId: string, pageId: string, visitorId: string, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
|
|
4860
|
+
/**
|
|
4861
|
+
* No description
|
|
4862
|
+
*
|
|
4863
|
+
* @tags spaces
|
|
4864
|
+
* @name CreatePageFeedback
|
|
4865
|
+
* @summary Create a page feedback by a visitor.
|
|
4866
|
+
* @request PUT:/spaces/{spaceId}/pages/{pageId}/feedbacks/{visitorId}
|
|
4867
|
+
* @secure
|
|
4868
|
+
*/
|
|
4869
|
+
createPageFeedback: (spaceId: string, pageId: string, visitorId: string, data: {
|
|
4870
|
+
rating: PageFeedbackRating;
|
|
4871
|
+
}, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
|
|
4768
4872
|
};
|
|
4769
4873
|
collections: {
|
|
4770
4874
|
/**
|
|
@@ -4797,7 +4901,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4797
4901
|
* * `private`: Authorized members can access the content.
|
|
4798
4902
|
*/
|
|
4799
4903
|
visibility?: ContentVisibility;
|
|
4904
|
+
/** Title of the collection */
|
|
4905
|
+
title?: CollectionTitle;
|
|
4906
|
+
/** Description of the collection */
|
|
4907
|
+
description?: CollectionDescription;
|
|
4800
4908
|
}, params?: RequestParams) => Promise<HttpResponse<Collection, Error>>;
|
|
4909
|
+
/**
|
|
4910
|
+
* No description
|
|
4911
|
+
*
|
|
4912
|
+
* @tags collections
|
|
4913
|
+
* @name DeleteCollectionById
|
|
4914
|
+
* @summary Deletes a collection
|
|
4915
|
+
* @request DELETE:/collections/{collectionId}
|
|
4916
|
+
* @secure
|
|
4917
|
+
*/
|
|
4918
|
+
deleteCollectionById: (collectionId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4801
4919
|
/**
|
|
4802
4920
|
* No description
|
|
4803
4921
|
*
|
|
@@ -5716,6 +5834,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5716
5834
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5717
5835
|
items: {
|
|
5718
5836
|
space: Space;
|
|
5837
|
+
/** @deprecated */
|
|
5719
5838
|
gitSync?: GitSyncState;
|
|
5720
5839
|
}[];
|
|
5721
5840
|
}, Error>>;
|
|
@@ -5756,60 +5875,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5756
5875
|
/** ID of a parent collection */
|
|
5757
5876
|
parent?: string;
|
|
5758
5877
|
}, params?: RequestParams) => Promise<HttpResponse<Collection, Error>>;
|
|
5759
|
-
/**
|
|
5760
|
-
* No description
|
|
5761
|
-
*
|
|
5762
|
-
* @tags organizations, dsync
|
|
5763
|
-
* @name SetupDirectorySync
|
|
5764
|
-
* @summary Set up Directory Sync in an organization.
|
|
5765
|
-
* @request POST:/orgs/{organizationId}/dsync
|
|
5766
|
-
* @secure
|
|
5767
|
-
*/
|
|
5768
|
-
setupDirectorySync: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
5769
|
-
/** The URL to navigate to to continue Directory Sync setup. */
|
|
5770
|
-
setupUrl: string;
|
|
5771
|
-
}, Error>>;
|
|
5772
|
-
/**
|
|
5773
|
-
* No description
|
|
5774
|
-
*
|
|
5775
|
-
* @tags organizations, dsync
|
|
5776
|
-
* @name ListDirectorySyncGroups
|
|
5777
|
-
* @summary Lists the groups exposed to the synced Directory on an organization.
|
|
5778
|
-
* @request GET:/orgs/{organizationId}/dsync/groups
|
|
5779
|
-
* @secure
|
|
5780
|
-
*/
|
|
5781
|
-
listDirectorySyncGroups: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
5782
|
-
groups: OrganizationDirectorySyncGroup[];
|
|
5783
|
-
}, Error>>;
|
|
5784
|
-
/**
|
|
5785
|
-
* @description Each pair will lead the team being synced to the group (unless it is already synced to another) and the members of the group will then be synced to the team. Each sync is independent, the endpoint will still succeed if some of the syncs fail. Check the response to know more about the success or failure of the entire sync.
|
|
5786
|
-
*
|
|
5787
|
-
* @tags organizations, dsync
|
|
5788
|
-
* @name SyncDirectorySyncGroupsToTeams
|
|
5789
|
-
* @summary Syncs a list of group/team unique identifiers pairs together.
|
|
5790
|
-
* @request POST:/orgs/{organizationId}/dsync/teams
|
|
5791
|
-
* @secure
|
|
5792
|
-
*/
|
|
5793
|
-
syncDirectorySyncGroupsToTeams: (organizationId: string, data: {
|
|
5794
|
-
/**
|
|
5795
|
-
* A list of groups to teams pairs to sync.
|
|
5796
|
-
* The group_id is required and the team_id is optional.
|
|
5797
|
-
* If the latter is omitted, a new team will be created from the group's data.
|
|
5798
|
-
*/
|
|
5799
|
-
to_sync: {
|
|
5800
|
-
/** The unique identifier of the group for the given identity provider. */
|
|
5801
|
-
group_id: string;
|
|
5802
|
-
/** The unique identifier of the team for the given identity provider. */
|
|
5803
|
-
team_id?: string;
|
|
5804
|
-
}[];
|
|
5805
|
-
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
5806
|
-
/**
|
|
5807
|
-
* The list of synced pairs, mapped to the original pairs given to the sync parameters.
|
|
5808
|
-
* Either the group_id and team_id will be defined, or the error will be defined to describe why it failed.
|
|
5809
|
-
* Use the success parameter to know if the pair sync was sucessful or not.
|
|
5810
|
-
*/
|
|
5811
|
-
synced: OrganizationDirectorySyncGroupTeamStatus[];
|
|
5812
|
-
}, Error>>;
|
|
5813
5878
|
/**
|
|
5814
5879
|
* No description
|
|
5815
5880
|
*
|
|
@@ -6224,6 +6289,58 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6224
6289
|
* @secure
|
|
6225
6290
|
*/
|
|
6226
6291
|
updateSnippet: (organizationId: string, snippetId: string, data: UpdateSnippetSchema, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
6292
|
+
/**
|
|
6293
|
+
* No description
|
|
6294
|
+
*
|
|
6295
|
+
* @tags organizations
|
|
6296
|
+
* @name MoveSnippet
|
|
6297
|
+
* @summary Move a snippet into a destination. The snippet will be archived in the process.
|
|
6298
|
+
* @request POST:/orgs/{organizationId}/snippets/{snippetId}/move
|
|
6299
|
+
* @secure
|
|
6300
|
+
*/
|
|
6301
|
+
moveSnippet: (organizationId: string, snippetId: string, data: {
|
|
6302
|
+
/** Intended destination for the page */
|
|
6303
|
+
target: {
|
|
6304
|
+
/** The id of the target space */
|
|
6305
|
+
space: string;
|
|
6306
|
+
position?: {
|
|
6307
|
+
/** The parent of the page in the target space. If undefined, the page will be inserted at the root of the space. */
|
|
6308
|
+
parent?: string;
|
|
6309
|
+
/** The index of the page in the parent. If undefined, the page will be inserted at the end of the parent's current children. */
|
|
6310
|
+
index?: number;
|
|
6311
|
+
};
|
|
6312
|
+
};
|
|
6313
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
6314
|
+
page: RevisionPageDocument;
|
|
6315
|
+
changeRequest?: ChangeRequest;
|
|
6316
|
+
}, Error>>;
|
|
6317
|
+
/**
|
|
6318
|
+
* No description
|
|
6319
|
+
*
|
|
6320
|
+
* @tags organizations
|
|
6321
|
+
* @name GetSnippetSuggestedLocations
|
|
6322
|
+
* @summary Return possible snippet locations in an organization based on the current user.
|
|
6323
|
+
* @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
|
|
6324
|
+
* @secure
|
|
6325
|
+
*/
|
|
6326
|
+
getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
|
|
6327
|
+
/** Identifier of the page results to fetch. */
|
|
6328
|
+
page?: string;
|
|
6329
|
+
/** The number of results per page */
|
|
6330
|
+
limit?: number;
|
|
6331
|
+
/** If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces. */
|
|
6332
|
+
spaceId?: string;
|
|
6333
|
+
/** If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level. */
|
|
6334
|
+
pageId?: string;
|
|
6335
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
6336
|
+
items: {
|
|
6337
|
+
/** If defined and true, this location was suggested by GitBook AI. */
|
|
6338
|
+
aiPowered?: boolean;
|
|
6339
|
+
space: Space;
|
|
6340
|
+
/** The parent page of the suggested location. */
|
|
6341
|
+
parentPage?: RevisionPageDocument | RevisionPageGroup;
|
|
6342
|
+
}[];
|
|
6343
|
+
}, Error>>;
|
|
6227
6344
|
/**
|
|
6228
6345
|
* No description
|
|
6229
6346
|
*
|
|
@@ -6236,6 +6353,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6236
6353
|
/** Answer from AI for a question asked on a content. */
|
|
6237
6354
|
answer?: SearchAIAnswer;
|
|
6238
6355
|
}, Error>>;
|
|
6356
|
+
/**
|
|
6357
|
+
* No description
|
|
6358
|
+
*
|
|
6359
|
+
* @name GetRecommendedQuestionsInOrganization
|
|
6360
|
+
* @summary Get a list of questions recommended to be asked in an organization.
|
|
6361
|
+
* @request GET:/orgs/{organizationId}/ask/questions
|
|
6362
|
+
* @secure
|
|
6363
|
+
*/
|
|
6364
|
+
getRecommendedQuestionsInOrganization: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<SearchAIRecommendedQuestions, Error>>;
|
|
6239
6365
|
/**
|
|
6240
6366
|
* No description
|
|
6241
6367
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -57,6 +57,7 @@ __export(src_exports, {
|
|
|
57
57
|
OrganizationCommunityType: () => OrganizationCommunityType,
|
|
58
58
|
OrganizationType: () => OrganizationType,
|
|
59
59
|
OrganizationUseCase: () => OrganizationUseCase,
|
|
60
|
+
PageFeedbackRating: () => PageFeedbackRating,
|
|
60
61
|
PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
|
|
61
62
|
RevisionPageLayoutOptionsCoverSize: () => RevisionPageLayoutOptionsCoverSize,
|
|
62
63
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
@@ -363,6 +364,12 @@ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
|
|
|
363
364
|
CustomizationCorners2["Rounded"] = "rounded";
|
|
364
365
|
return CustomizationCorners2;
|
|
365
366
|
})(CustomizationCorners || {});
|
|
367
|
+
var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
368
|
+
PageFeedbackRating2["Bad"] = "bad";
|
|
369
|
+
PageFeedbackRating2["Ok"] = "ok";
|
|
370
|
+
PageFeedbackRating2["Good"] = "good";
|
|
371
|
+
return PageFeedbackRating2;
|
|
372
|
+
})(PageFeedbackRating || {});
|
|
366
373
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
367
374
|
ContentType2["Json"] = "application/json";
|
|
368
375
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -584,6 +591,12 @@ var Api = class extends HttpClient {
|
|
|
584
591
|
format: "json",
|
|
585
592
|
...params
|
|
586
593
|
}),
|
|
594
|
+
deleteSpaceById: (spaceId, params = {}) => this.request({
|
|
595
|
+
path: `/spaces/${spaceId}`,
|
|
596
|
+
method: "DELETE",
|
|
597
|
+
secure: true,
|
|
598
|
+
...params
|
|
599
|
+
}),
|
|
587
600
|
generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
|
|
588
601
|
path: `/spaces/${spaceId}/hive/token`,
|
|
589
602
|
method: "POST",
|
|
@@ -598,6 +611,13 @@ var Api = class extends HttpClient {
|
|
|
598
611
|
format: "json",
|
|
599
612
|
...params
|
|
600
613
|
}),
|
|
614
|
+
restoreSpace: (spaceId, params = {}) => this.request({
|
|
615
|
+
path: `/spaces/${spaceId}/restore`,
|
|
616
|
+
method: "POST",
|
|
617
|
+
secure: true,
|
|
618
|
+
format: "json",
|
|
619
|
+
...params
|
|
620
|
+
}),
|
|
601
621
|
searchSpaceContent: (spaceId, query, params = {}) => this.request({
|
|
602
622
|
path: `/spaces/${spaceId}/search`,
|
|
603
623
|
method: "GET",
|
|
@@ -1157,6 +1177,13 @@ var Api = class extends HttpClient {
|
|
|
1157
1177
|
format: "json",
|
|
1158
1178
|
...params
|
|
1159
1179
|
}),
|
|
1180
|
+
listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
|
|
1181
|
+
path: `/spaces/${spaceId}/integration-scripts`,
|
|
1182
|
+
method: "GET",
|
|
1183
|
+
secure: true,
|
|
1184
|
+
format: "json",
|
|
1185
|
+
...params
|
|
1186
|
+
}),
|
|
1160
1187
|
getSpaceCustomFields: (spaceId, params = {}) => this.request({
|
|
1161
1188
|
path: `/spaces/${spaceId}/custom-fields`,
|
|
1162
1189
|
method: "GET",
|
|
@@ -1171,6 +1198,22 @@ var Api = class extends HttpClient {
|
|
|
1171
1198
|
secure: true,
|
|
1172
1199
|
type: "application/json" /* Json */,
|
|
1173
1200
|
...params
|
|
1201
|
+
}),
|
|
1202
|
+
getPageFeedback: (spaceId, pageId, visitorId, params = {}) => this.request({
|
|
1203
|
+
path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
|
|
1204
|
+
method: "GET",
|
|
1205
|
+
secure: true,
|
|
1206
|
+
format: "json",
|
|
1207
|
+
...params
|
|
1208
|
+
}),
|
|
1209
|
+
createPageFeedback: (spaceId, pageId, visitorId, data, params = {}) => this.request({
|
|
1210
|
+
path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
|
|
1211
|
+
method: "PUT",
|
|
1212
|
+
body: data,
|
|
1213
|
+
secure: true,
|
|
1214
|
+
type: "application/json" /* Json */,
|
|
1215
|
+
format: "json",
|
|
1216
|
+
...params
|
|
1174
1217
|
})
|
|
1175
1218
|
};
|
|
1176
1219
|
this.collections = {
|
|
@@ -1190,6 +1233,12 @@ var Api = class extends HttpClient {
|
|
|
1190
1233
|
format: "json",
|
|
1191
1234
|
...params
|
|
1192
1235
|
}),
|
|
1236
|
+
deleteCollectionById: (collectionId, params = {}) => this.request({
|
|
1237
|
+
path: `/collections/${collectionId}`,
|
|
1238
|
+
method: "DELETE",
|
|
1239
|
+
secure: true,
|
|
1240
|
+
...params
|
|
1241
|
+
}),
|
|
1193
1242
|
listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
|
|
1194
1243
|
path: `/collections/${collectionId}/spaces`,
|
|
1195
1244
|
method: "GET",
|
|
@@ -1675,29 +1724,6 @@ var Api = class extends HttpClient {
|
|
|
1675
1724
|
format: "json",
|
|
1676
1725
|
...params
|
|
1677
1726
|
}),
|
|
1678
|
-
setupDirectorySync: (organizationId, params = {}) => this.request({
|
|
1679
|
-
path: `/orgs/${organizationId}/dsync`,
|
|
1680
|
-
method: "POST",
|
|
1681
|
-
secure: true,
|
|
1682
|
-
format: "json",
|
|
1683
|
-
...params
|
|
1684
|
-
}),
|
|
1685
|
-
listDirectorySyncGroups: (organizationId, params = {}) => this.request({
|
|
1686
|
-
path: `/orgs/${organizationId}/dsync/groups`,
|
|
1687
|
-
method: "GET",
|
|
1688
|
-
secure: true,
|
|
1689
|
-
format: "json",
|
|
1690
|
-
...params
|
|
1691
|
-
}),
|
|
1692
|
-
syncDirectorySyncGroupsToTeams: (organizationId, data, params = {}) => this.request({
|
|
1693
|
-
path: `/orgs/${organizationId}/dsync/teams`,
|
|
1694
|
-
method: "POST",
|
|
1695
|
-
body: data,
|
|
1696
|
-
secure: true,
|
|
1697
|
-
type: "application/json" /* Json */,
|
|
1698
|
-
format: "json",
|
|
1699
|
-
...params
|
|
1700
|
-
}),
|
|
1701
1727
|
listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
|
|
1702
1728
|
path: `/orgs/${organizationId}/custom-fields`,
|
|
1703
1729
|
method: "GET",
|
|
@@ -1925,6 +1951,23 @@ var Api = class extends HttpClient {
|
|
|
1925
1951
|
format: "json",
|
|
1926
1952
|
...params
|
|
1927
1953
|
}),
|
|
1954
|
+
moveSnippet: (organizationId, snippetId, data, params = {}) => this.request({
|
|
1955
|
+
path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
|
|
1956
|
+
method: "POST",
|
|
1957
|
+
body: data,
|
|
1958
|
+
secure: true,
|
|
1959
|
+
type: "application/json" /* Json */,
|
|
1960
|
+
format: "json",
|
|
1961
|
+
...params
|
|
1962
|
+
}),
|
|
1963
|
+
getSnippetSuggestedLocations: (organizationId, snippetId, query, params = {}) => this.request({
|
|
1964
|
+
path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
|
|
1965
|
+
method: "GET",
|
|
1966
|
+
query,
|
|
1967
|
+
secure: true,
|
|
1968
|
+
format: "json",
|
|
1969
|
+
...params
|
|
1970
|
+
}),
|
|
1928
1971
|
askInOrganization: (organizationId, data, params = {}) => this.request({
|
|
1929
1972
|
path: `/orgs/${organizationId}/ask`,
|
|
1930
1973
|
method: "POST",
|
|
@@ -1934,6 +1977,13 @@ var Api = class extends HttpClient {
|
|
|
1934
1977
|
format: "json",
|
|
1935
1978
|
...params
|
|
1936
1979
|
}),
|
|
1980
|
+
getRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.request({
|
|
1981
|
+
path: `/orgs/${organizationId}/ask/questions`,
|
|
1982
|
+
method: "GET",
|
|
1983
|
+
secure: true,
|
|
1984
|
+
format: "json",
|
|
1985
|
+
...params
|
|
1986
|
+
}),
|
|
1937
1987
|
listContentAuditRelations: (organizationId, query, params = {}) => this.request({
|
|
1938
1988
|
path: `/orgs/${organizationId}/insights/audit-relations`,
|
|
1939
1989
|
method: "GET",
|
|
@@ -2109,6 +2159,7 @@ var GitBookAPI = class extends Api {
|
|
|
2109
2159
|
OrganizationCommunityType,
|
|
2110
2160
|
OrganizationType,
|
|
2111
2161
|
OrganizationUseCase,
|
|
2162
|
+
PageFeedbackRating,
|
|
2112
2163
|
PurgeCDNCacheContextType,
|
|
2113
2164
|
RevisionPageLayoutOptionsCoverSize,
|
|
2114
2165
|
RevisionPageLayoutPreset,
|