@gitbook/api 0.0.0 → 0.1.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 +2306 -138
- package/dist/index.d.ts +5 -0
- package/dist/index.js +793 -43
- package/package.json +12 -5
- package/spec/openapi.json +7930 -484
- package/spec/openapi.yaml +5001 -351
- package/spec/openapi.dereference.json +0 -2648
package/dist/client.d.ts
CHANGED
|
@@ -1,103 +1,730 @@
|
|
|
1
1
|
export interface Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
error: {
|
|
3
|
+
code: number;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface List {
|
|
8
|
+
next?: {
|
|
9
|
+
page: string;
|
|
10
|
+
};
|
|
11
|
+
/** Total count of objects in the list */
|
|
12
|
+
count?: number;
|
|
5
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @format uri
|
|
16
|
+
*/
|
|
17
|
+
export declare type URL = string;
|
|
18
|
+
/**
|
|
19
|
+
* @format date
|
|
20
|
+
*/
|
|
21
|
+
export declare type Date = string;
|
|
6
22
|
export interface RequestSpaceTrackPageView {
|
|
7
|
-
/** Unique identifier of the page */
|
|
23
|
+
/** Unique identifier of the page. */
|
|
8
24
|
pageId: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
25
|
+
/** Analytics info on the GitBook's content visitor. */
|
|
26
|
+
visitor: {
|
|
27
|
+
anonymousId: string;
|
|
28
|
+
cookies: Record<string, string>;
|
|
29
|
+
userAgent: string;
|
|
30
|
+
};
|
|
31
|
+
/** The GitBook content's URL visited (including URL params). */
|
|
32
|
+
url: string;
|
|
33
|
+
/** The URL of referrer that linked to the page. */
|
|
34
|
+
referrer: string;
|
|
11
35
|
}
|
|
12
36
|
export interface RequestPublishIntegration {
|
|
13
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Base64 content of the icon
|
|
39
|
+
* @format byte
|
|
40
|
+
*/
|
|
14
41
|
icon?: string;
|
|
15
42
|
title: any;
|
|
16
43
|
description: any;
|
|
17
44
|
summary?: any;
|
|
45
|
+
previewImages?: string[];
|
|
18
46
|
visibility?: IntegrationVisibility;
|
|
19
47
|
scopes: any;
|
|
20
48
|
categories?: any;
|
|
49
|
+
blocks?: any;
|
|
50
|
+
externalLinks?: any;
|
|
21
51
|
configurations?: IntegrationConfigurations;
|
|
22
52
|
/** Content of the script to use */
|
|
23
53
|
script: string;
|
|
54
|
+
/** The subdomain of the organization under which the integration should be published */
|
|
55
|
+
organization?: string;
|
|
24
56
|
/** Secrets stored on the integration and passed at runtime. */
|
|
25
57
|
secrets?: IntegrationSecrets;
|
|
58
|
+
/**
|
|
59
|
+
* Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
|
|
60
|
+
* headers when processing the script fetch event and the blocks fetch events.
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
contentSecurityPolicy?: IntegrationContentSecurityPolicy;
|
|
26
64
|
}
|
|
27
65
|
export interface RequestUpdateIntegrationInstallation {
|
|
28
|
-
|
|
29
|
-
|
|
66
|
+
externalIds?: any;
|
|
67
|
+
configuration?: any;
|
|
68
|
+
}
|
|
69
|
+
export interface RequestUpgradeOrganizationBilling {
|
|
70
|
+
/** Name of the product */
|
|
71
|
+
product: BillingProduct;
|
|
72
|
+
/** Interval for a billing subscription */
|
|
73
|
+
interval: BillingInterval;
|
|
74
|
+
/** Reason that triggered the billing upgrade */
|
|
75
|
+
reason?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
mode?: 'auto' | 'commit' | 'preview';
|
|
81
|
+
}
|
|
82
|
+
export interface RequestInviteUsersToOrganization {
|
|
83
|
+
emails: (string | {
|
|
84
|
+
email: string;
|
|
85
|
+
role: MemberRoleOrGuest;
|
|
86
|
+
})[];
|
|
87
|
+
/** Default role to set on newly invited members. */
|
|
88
|
+
role?: MemberRoleOrGuest;
|
|
89
|
+
/** If true, invites the user as an SSO user of the organization. Defaults to false. */
|
|
90
|
+
sso?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface RequestImportGitRepository {
|
|
93
|
+
/** URL of the Git repository to import. It can contain basic auth credentials. */
|
|
94
|
+
url: string;
|
|
95
|
+
/** Git ref to import in the format "refs/heads/main" */
|
|
96
|
+
ref: string;
|
|
97
|
+
/** Unique identifier to use to cache the Git repository across multiple operations. */
|
|
98
|
+
repoCacheID?: string;
|
|
99
|
+
/** URL to use as a prefix for external file references. */
|
|
100
|
+
repoTreeURL?: string;
|
|
101
|
+
/** URL to use as a prefix for the commit URL. */
|
|
102
|
+
repoCommitURL?: string;
|
|
103
|
+
/** Path to a root directory for the project in the repository. */
|
|
104
|
+
repoProjectDirectory?: string;
|
|
105
|
+
force?: boolean;
|
|
106
|
+
/** If true, the import will generate a revision without updating the space primary content. */
|
|
107
|
+
standalone?: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface RequestExportToGitRepository {
|
|
110
|
+
/** URL of the Git repository to export to. It can contain basic auth credentials. */
|
|
111
|
+
url: string;
|
|
112
|
+
/** Git ref to push the commit to in the format "refs/heads/main" */
|
|
113
|
+
ref: string;
|
|
114
|
+
/** Message for the commit generated by the export */
|
|
115
|
+
commitMessage: string;
|
|
116
|
+
/** Unique identifier to use to cache the Git repository across multiple operations. */
|
|
117
|
+
repoCacheID?: string;
|
|
118
|
+
/** URL to use as a prefix for external file references. */
|
|
119
|
+
repoTreeURL?: string;
|
|
120
|
+
/** URL to use as a prefix for the commit URL. */
|
|
121
|
+
repoCommitURL?: string;
|
|
122
|
+
/** Path to a root directory for the project in the repository. */
|
|
123
|
+
repoProjectDirectory?: string;
|
|
124
|
+
force?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface RequestImportContent {
|
|
127
|
+
/** URL of the content to import. */
|
|
128
|
+
url: string;
|
|
129
|
+
source: ImportContentSource;
|
|
130
|
+
}
|
|
131
|
+
export interface RequestCreateChangeRequest {
|
|
132
|
+
/** Subject of the change-request */
|
|
133
|
+
subject?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface RequestRenderIntegrationUI {
|
|
136
|
+
/** ID of the component to render in the integration. */
|
|
137
|
+
componentId: string;
|
|
138
|
+
/** ID of the space to render. */
|
|
139
|
+
spaceId: string;
|
|
140
|
+
/** Current properties of the UI. */
|
|
141
|
+
props: object;
|
|
142
|
+
/** Current local state of the UI. */
|
|
143
|
+
state?: object;
|
|
144
|
+
context: ContentKitContext;
|
|
145
|
+
/** Custom action to re-render the block. */
|
|
146
|
+
action?: ContentKitAction;
|
|
147
|
+
}
|
|
148
|
+
export interface ApiInformation {
|
|
149
|
+
/** Current release of GitBook */
|
|
150
|
+
version: string;
|
|
151
|
+
/** Date of the latest release in ISO format */
|
|
152
|
+
build: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The context to send when purging the CDN Cache
|
|
156
|
+
*/
|
|
157
|
+
export interface RequestPurgeCDNCacheContext {
|
|
158
|
+
/** The type of purge, e.g by tags or hosts */
|
|
159
|
+
type: PurgeCDNCacheContextType;
|
|
160
|
+
/** The list of tags or hosts to purge */
|
|
161
|
+
values: string[];
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The context to send when blocking/unblocking a user
|
|
165
|
+
*/
|
|
166
|
+
export interface RequestBlockUserContext {
|
|
167
|
+
block: boolean;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The context to send when triggering a content indexing.
|
|
171
|
+
*/
|
|
172
|
+
export interface TriggerContentIndexingContext {
|
|
173
|
+
/** The unique identifier of the Space to index. */
|
|
174
|
+
spaceId: string;
|
|
175
|
+
/** Whether to force a complete re-indexing of the Space. */
|
|
176
|
+
force: boolean;
|
|
30
177
|
}
|
|
31
178
|
export interface User {
|
|
179
|
+
/** Type of Object, always equals to "user" */
|
|
180
|
+
object: 'user';
|
|
181
|
+
/** Unique identifier for the user */
|
|
32
182
|
id: string;
|
|
183
|
+
/** Full name for the user */
|
|
33
184
|
displayName: string;
|
|
185
|
+
/** Email address of the user */
|
|
34
186
|
email?: string;
|
|
187
|
+
/** URL of the user's profile picture */
|
|
188
|
+
photoURL?: string;
|
|
189
|
+
}
|
|
190
|
+
export interface UserTarget {
|
|
191
|
+
user?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* * `public`: Anyone can access the content, and the content is indexed by search engines.
|
|
195
|
+
* `unlisted`: Anyone can access the content, and the content is not indexed by search engines
|
|
196
|
+
* `share-link`: Anyone with a secret token in the url can access the content.
|
|
197
|
+
* `visitor-auth`: Anyone authenticated through a JWT token can access the content.
|
|
198
|
+
* `in-collection`: Anyone who can access the parent collection can access the content.
|
|
199
|
+
Only available for spaces in a collection.
|
|
200
|
+
* `private`: Authorized members can access the content.
|
|
201
|
+
*/
|
|
202
|
+
export declare enum ContentVisibility {
|
|
203
|
+
Public = "public",
|
|
204
|
+
Unlisted = "unlisted",
|
|
205
|
+
ShareLink = "share-link",
|
|
206
|
+
VisitorAuth = "visitor-auth",
|
|
207
|
+
InCollection = "in-collection",
|
|
208
|
+
Private = "private"
|
|
209
|
+
}
|
|
210
|
+
export interface ImportContentResult {
|
|
211
|
+
/** ID of the newly created revision. */
|
|
212
|
+
revision: string;
|
|
213
|
+
/** How many resources were imported */
|
|
214
|
+
importedResources: number;
|
|
215
|
+
/** How many resources were processed */
|
|
216
|
+
totalResources: number;
|
|
35
217
|
}
|
|
36
218
|
export interface Space {
|
|
219
|
+
/** Type of Object, always equals to "space" */
|
|
220
|
+
object: 'space';
|
|
37
221
|
/** Unique identifier for the space */
|
|
38
222
|
id: string;
|
|
39
223
|
/** Title of the space */
|
|
40
224
|
title: string;
|
|
225
|
+
/**
|
|
226
|
+
* * `public`: Anyone can access the content, and the content is indexed by search engines.
|
|
227
|
+
* * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
|
|
228
|
+
* * `share-link`: Anyone with a secret token in the url can access the content.
|
|
229
|
+
* * `visitor-auth`: Anyone authenticated through a JWT token can access the content.
|
|
230
|
+
* * `in-collection`: Anyone who can access the parent collection can access the content.
|
|
231
|
+
* Only available for spaces in a collection.
|
|
232
|
+
* * `private`: Authorized members can access the content.
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
235
|
+
visibility: ContentVisibility;
|
|
236
|
+
createdAt: Date;
|
|
237
|
+
updatedAt: Date;
|
|
238
|
+
/** URLs associated with the object */
|
|
239
|
+
urls: {
|
|
240
|
+
app: string;
|
|
241
|
+
published?: string;
|
|
242
|
+
public?: string;
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
export interface Revision {
|
|
246
|
+
/** Type of Object, always equals to "revision" */
|
|
247
|
+
object: 'revision';
|
|
248
|
+
/** Unique identifier for the revision */
|
|
249
|
+
id: string;
|
|
250
|
+
/** IDs of the parent revisions */
|
|
251
|
+
parents: string[];
|
|
252
|
+
pages: RevisionPage[];
|
|
253
|
+
files: RevisionFile[];
|
|
254
|
+
/** Metadata about a potential associated git commit. */
|
|
255
|
+
git?: {
|
|
256
|
+
oid: string;
|
|
257
|
+
message: string;
|
|
258
|
+
createdByGitBook: boolean;
|
|
259
|
+
url?: string;
|
|
260
|
+
};
|
|
261
|
+
urls: {
|
|
262
|
+
app: string;
|
|
263
|
+
published?: string;
|
|
264
|
+
public?: string;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
export declare type RevisionPage = RevisionPageSheet | RevisionPageGroup | RevisionPageLink;
|
|
268
|
+
export interface RevisionPageBase {
|
|
269
|
+
/** Unique identifier for the page in the revision */
|
|
270
|
+
id: string;
|
|
271
|
+
/** Title of the page */
|
|
272
|
+
title: string;
|
|
273
|
+
}
|
|
274
|
+
export declare type RevisionPageSheet = RevisionPageBase & {
|
|
275
|
+
kind: 'sheet';
|
|
276
|
+
slug: string;
|
|
277
|
+
path: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
pages: (RevisionPageSheet | RevisionPageLink)[];
|
|
280
|
+
} & ({
|
|
281
|
+
markdown: string;
|
|
282
|
+
} | {
|
|
283
|
+
document: PageDocument;
|
|
284
|
+
} | object);
|
|
285
|
+
export declare type RevisionPageGroup = RevisionPageBase & {
|
|
286
|
+
kind: 'group';
|
|
287
|
+
slug: string;
|
|
288
|
+
path: string;
|
|
289
|
+
pages: (RevisionPageSheet | RevisionPageLink)[];
|
|
290
|
+
};
|
|
291
|
+
export declare type RevisionPageLink = RevisionPageBase & {
|
|
292
|
+
kind: 'link';
|
|
293
|
+
href?: string;
|
|
294
|
+
};
|
|
295
|
+
export interface RevisionFile {
|
|
296
|
+
id: string;
|
|
297
|
+
name: string;
|
|
298
|
+
contentType: string;
|
|
299
|
+
downloadURL: string;
|
|
300
|
+
}
|
|
301
|
+
export interface PageDocument {
|
|
302
|
+
nodes: object[];
|
|
303
|
+
}
|
|
304
|
+
export declare enum ImportContentSource {
|
|
305
|
+
Website = "website",
|
|
306
|
+
Docx = "docx",
|
|
307
|
+
Markdown = "markdown",
|
|
308
|
+
Html = "html",
|
|
309
|
+
Zip = "zip",
|
|
310
|
+
Confluence = "confluence",
|
|
311
|
+
GithubWiki = "github-wiki",
|
|
312
|
+
DropboxPaper = "dropbox-paper",
|
|
313
|
+
Notion = "notion",
|
|
314
|
+
Quip = "quip",
|
|
315
|
+
GoogleDocs = "google-docs",
|
|
316
|
+
OpenApi = "open-api"
|
|
317
|
+
}
|
|
318
|
+
export interface Organization {
|
|
319
|
+
/** Type of Object, always equals to "organization" */
|
|
320
|
+
object: 'organization';
|
|
321
|
+
/** Unique identifier for the organization */
|
|
322
|
+
id: string;
|
|
323
|
+
/** Name of the organization */
|
|
324
|
+
title: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* "The role of a member in an organization.
|
|
328
|
+
"admin": Can administrate the content: create, delete spaces, ...
|
|
329
|
+
"create": Can create content.
|
|
330
|
+
"review": Can review content.
|
|
331
|
+
"edit": Can edit the content (live or change requests).
|
|
332
|
+
"comment": Can access the content and its discussions.
|
|
333
|
+
"read": Can access the content, but cannot update it in any way.
|
|
334
|
+
*/
|
|
335
|
+
export declare enum MemberRole {
|
|
336
|
+
Admin = "admin",
|
|
337
|
+
Create = "create",
|
|
338
|
+
Edit = "edit",
|
|
339
|
+
Review = "review",
|
|
340
|
+
Comment = "comment",
|
|
341
|
+
Read = "read"
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* The role of a member in an organization, null for guests
|
|
345
|
+
*/
|
|
346
|
+
export declare type MemberRoleOrGuest = MemberRole | null;
|
|
347
|
+
export interface OrganizationTransferResponse {
|
|
348
|
+
/** The unique id of the collection created in the target organization containing the content of the source organization. */
|
|
349
|
+
collection: string;
|
|
350
|
+
/** The new hostname if the source organization needed to change hostname. */
|
|
351
|
+
newSourceHostname?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface OrganizationDirectorySyncGroup {
|
|
354
|
+
/** The unique identifier of this group in WorkOS. Not the unique ID from GitBook. */
|
|
355
|
+
id: string;
|
|
356
|
+
/** The identity provider's unique ID for this group, should be used to generate the team's unique ID when syncing the groups. */
|
|
357
|
+
idp_id: string;
|
|
358
|
+
/** The unique ID of the directory this group is owned by in WorkOS. Is not a unique ID from our database. */
|
|
359
|
+
directory_id: string;
|
|
360
|
+
/** The name of the group from the identity provider, it should always be set according to the WorkOS documentation. */
|
|
361
|
+
name: string;
|
|
362
|
+
/** The unique ID of the GitBook team already synced to this group, if applicable. */
|
|
363
|
+
teamKey?: string;
|
|
364
|
+
}
|
|
365
|
+
export declare type OrganizationDirectorySyncGroupTeamStatus = {
|
|
366
|
+
success: true;
|
|
367
|
+
group_id: string;
|
|
368
|
+
team_id: string;
|
|
369
|
+
} | {
|
|
370
|
+
success: false;
|
|
371
|
+
error: string;
|
|
372
|
+
} | ({
|
|
373
|
+
success: true;
|
|
374
|
+
group_id: string;
|
|
375
|
+
team_id: string;
|
|
376
|
+
} & {
|
|
377
|
+
success: false;
|
|
378
|
+
error: string;
|
|
379
|
+
});
|
|
380
|
+
export interface OrganizationTarget {
|
|
381
|
+
organization?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface OrganizationMember {
|
|
384
|
+
/** Type of Object, always equals to "member" */
|
|
385
|
+
object: 'member';
|
|
386
|
+
/** Unique identifier for the user. */
|
|
387
|
+
id: string;
|
|
388
|
+
/** The role of a member in an organization, null for guests */
|
|
389
|
+
role: MemberRoleOrGuest;
|
|
390
|
+
user: User;
|
|
391
|
+
/** Whatever the membership of this user is disabled and prevent them from accessing content. */
|
|
392
|
+
disabled: boolean;
|
|
393
|
+
/** Date at which the user joined the organization. */
|
|
394
|
+
joinedAt: Date;
|
|
395
|
+
}
|
|
396
|
+
export interface OrganizationTeam {
|
|
397
|
+
/** Type of Object, always equals to "team" */
|
|
398
|
+
object: 'team';
|
|
399
|
+
/** Unique identifier for the team. */
|
|
400
|
+
id: string;
|
|
401
|
+
/** Title of the team. */
|
|
402
|
+
title: string;
|
|
403
|
+
/** Count of members in this team. */
|
|
404
|
+
members: number;
|
|
405
|
+
/** Date at which the team was created. */
|
|
406
|
+
createdAt: Date;
|
|
407
|
+
}
|
|
408
|
+
export interface ChangeRequest {
|
|
409
|
+
/** Type of Object, always equals to "change-request" */
|
|
410
|
+
object: 'change-request';
|
|
411
|
+
/** Unique identifier for the change request */
|
|
412
|
+
id: string;
|
|
413
|
+
/** Incremental identifier of the change request */
|
|
414
|
+
number: number;
|
|
415
|
+
status: ChangeRequestStatus;
|
|
416
|
+
/** Subject of the change request */
|
|
417
|
+
subject: string;
|
|
418
|
+
createdBy: User;
|
|
419
|
+
createdAt: Date;
|
|
420
|
+
updatedAt: Date;
|
|
421
|
+
/** URLs associated with the object */
|
|
422
|
+
urls: {
|
|
423
|
+
app: string;
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
export declare enum ChangeRequestStatus {
|
|
427
|
+
Draft = "draft",
|
|
428
|
+
Open = "open",
|
|
429
|
+
Archived = "archived",
|
|
430
|
+
Merged = "merged"
|
|
431
|
+
}
|
|
432
|
+
export interface UserContentPermission {
|
|
433
|
+
/**
|
|
434
|
+
* "The role of a member in an organization.
|
|
435
|
+
* "admin": Can administrate the content: create, delete spaces, ...
|
|
436
|
+
* "create": Can create content.
|
|
437
|
+
* "review": Can review content.
|
|
438
|
+
* "edit": Can edit the content (live or change requests).
|
|
439
|
+
* "comment": Can access the content and its discussions.
|
|
440
|
+
* "read": Can access the content, but cannot update it in any way.
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
443
|
+
permission: MemberRole;
|
|
444
|
+
user: User;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Search result representing a space.
|
|
448
|
+
*/
|
|
449
|
+
export interface SearchSpaceResult {
|
|
450
|
+
id: string;
|
|
451
|
+
title: string;
|
|
452
|
+
pages: SearchPageResult[];
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Search result representing a page in a space.
|
|
456
|
+
*/
|
|
457
|
+
export interface SearchPageResult {
|
|
458
|
+
id: string;
|
|
459
|
+
title: string;
|
|
460
|
+
path: string;
|
|
461
|
+
sections?: SearchSectionResult[];
|
|
462
|
+
/** URLs associated with the object */
|
|
463
|
+
urls: {
|
|
464
|
+
app: string;
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Search result representing a section in a page.
|
|
469
|
+
*/
|
|
470
|
+
export interface SearchSectionResult {
|
|
471
|
+
id: string;
|
|
472
|
+
title: string;
|
|
473
|
+
path: string;
|
|
474
|
+
body: string;
|
|
475
|
+
/** URLs associated with the object */
|
|
476
|
+
urls: {
|
|
477
|
+
app: string;
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Answer from AI for a question asked on a content.
|
|
482
|
+
*/
|
|
483
|
+
export interface SearchAIAnswer {
|
|
484
|
+
text: string;
|
|
485
|
+
pages: {
|
|
486
|
+
page: string;
|
|
487
|
+
revision: string;
|
|
488
|
+
space: string;
|
|
489
|
+
sections: string[];
|
|
490
|
+
}[];
|
|
491
|
+
}
|
|
492
|
+
export declare enum AnalyticsSearchPeriod {
|
|
493
|
+
LastMonth = "last_month",
|
|
494
|
+
LastWeek = "last_week",
|
|
495
|
+
LastYear = "last_year"
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Analytics entry for a search query.
|
|
499
|
+
*/
|
|
500
|
+
export interface AnalyticsSearchQuery {
|
|
501
|
+
query: string;
|
|
502
|
+
/** Number of searches done by users. */
|
|
503
|
+
searches: number;
|
|
504
|
+
/** Number of objects matching this search. */
|
|
505
|
+
hits: number;
|
|
506
|
+
/** Number of pages matching this search. */
|
|
507
|
+
pageHits: number;
|
|
508
|
+
/** Number of sections matching this search. */
|
|
509
|
+
sectionHits: number;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Top search queries for a content.
|
|
513
|
+
*/
|
|
514
|
+
export interface AnalyticsTopSearches {
|
|
515
|
+
/** Number of searches done by users. */
|
|
516
|
+
searches: number;
|
|
517
|
+
/** Top queries searched for this content. */
|
|
518
|
+
queries: AnalyticsSearchQuery[];
|
|
519
|
+
}
|
|
520
|
+
export declare enum AnalyticsTrafficInterval {
|
|
521
|
+
Daily = "daily",
|
|
522
|
+
Weekly = "weekly",
|
|
523
|
+
Monthly = "monthly"
|
|
524
|
+
}
|
|
525
|
+
export interface AnalyticsTrafficPageViews {
|
|
526
|
+
/** Total number of page views over the period. */
|
|
527
|
+
count: number;
|
|
528
|
+
/** Page views per interval (day, week, month). */
|
|
529
|
+
views: {
|
|
530
|
+
timestamp: string;
|
|
531
|
+
count: number;
|
|
532
|
+
}[];
|
|
533
|
+
}
|
|
534
|
+
export interface AnalyticsContentPages {
|
|
535
|
+
pages: AnalyticsContentPage[];
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Page entry in the content analytics.
|
|
539
|
+
*/
|
|
540
|
+
export interface AnalyticsContentPage {
|
|
541
|
+
page: string;
|
|
542
|
+
title: string;
|
|
543
|
+
pageViews: number;
|
|
544
|
+
feedbacks?: {
|
|
545
|
+
score: number;
|
|
546
|
+
total: number;
|
|
547
|
+
rating: 'unknown' | 'bad' | 'ok' | 'good';
|
|
548
|
+
bad: number;
|
|
549
|
+
ok: number;
|
|
550
|
+
good: number;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
export interface Collection {
|
|
554
|
+
/** Type of Object, always equals to "collection" */
|
|
555
|
+
object: 'collection';
|
|
556
|
+
/** Unique identifier for the collection */
|
|
557
|
+
id: string;
|
|
558
|
+
/** Title of the collection */
|
|
559
|
+
title: string;
|
|
560
|
+
/** Path in the published URL */
|
|
561
|
+
path?: string;
|
|
562
|
+
/**
|
|
563
|
+
* * `public`: Anyone can access the content, and the content is indexed by search engines.
|
|
564
|
+
* * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
|
|
565
|
+
* * `share-link`: Anyone with a secret token in the url can access the content.
|
|
566
|
+
* * `visitor-auth`: Anyone authenticated through a JWT token can access the content.
|
|
567
|
+
* * `in-collection`: Anyone who can access the parent collection can access the content.
|
|
568
|
+
* Only available for spaces in a collection.
|
|
569
|
+
* * `private`: Authorized members can access the content.
|
|
570
|
+
*
|
|
571
|
+
*/
|
|
572
|
+
visibility: ContentVisibility;
|
|
573
|
+
publishingType?: 'variants';
|
|
574
|
+
/** ID of the primary space for this collection */
|
|
575
|
+
primarySpace?: string;
|
|
576
|
+
/** ID of the parent collection, if any */
|
|
577
|
+
collection?: string;
|
|
41
578
|
}
|
|
42
579
|
export interface Integration {
|
|
580
|
+
object: 'integration';
|
|
43
581
|
/** Unique named identifier for the integration */
|
|
44
582
|
name: string;
|
|
45
583
|
/** Title of the integration */
|
|
46
584
|
title: string;
|
|
47
|
-
/**
|
|
585
|
+
/** Description of the integration */
|
|
48
586
|
description?: string;
|
|
49
587
|
/** Long form markdown summary of the integration */
|
|
50
588
|
summary?: string;
|
|
51
|
-
/**
|
|
52
|
-
|
|
589
|
+
/** URLs of images to showcase the integration */
|
|
590
|
+
previewImages: string[];
|
|
53
591
|
visibility: IntegrationVisibility;
|
|
54
592
|
/** Permissions that should be granted to the integration */
|
|
55
593
|
scopes: IntegrationScope[];
|
|
56
594
|
/** Categories for which the integration is listed in the marketplace */
|
|
57
595
|
categories: IntegrationCategory[];
|
|
596
|
+
/** Custom blocks defined by this integration. */
|
|
597
|
+
blocks?: IntegrationBlock[];
|
|
58
598
|
configurations?: IntegrationConfigurations;
|
|
599
|
+
/** External urls configured by the developer of the integration */
|
|
600
|
+
externalLinks: {
|
|
601
|
+
url: URL;
|
|
602
|
+
label: string;
|
|
603
|
+
}[];
|
|
604
|
+
/** URLs associated with the object */
|
|
605
|
+
urls: {
|
|
606
|
+
icon?: string;
|
|
607
|
+
app: string;
|
|
608
|
+
assets: string;
|
|
609
|
+
publicEndpoint: string;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
|
|
613
|
+
* headers when processing the script fetch event and the blocks fetch events.
|
|
614
|
+
*
|
|
615
|
+
*/
|
|
616
|
+
contentSecurityPolicy?: IntegrationContentSecurityPolicy;
|
|
59
617
|
}
|
|
60
618
|
export declare enum IntegrationScope {
|
|
61
|
-
|
|
62
|
-
|
|
619
|
+
SpaceViewsRead = "space:views:read",
|
|
620
|
+
SpaceContentRead = "space:content:read",
|
|
621
|
+
SpaceContentWrite = "space:content:write",
|
|
622
|
+
SpaceMetadataRead = "space:metadata:read",
|
|
623
|
+
SpaceMetadataWrite = "space:metadata:write",
|
|
624
|
+
SpaceScriptInject = "space:script:inject",
|
|
625
|
+
SpaceScriptCookies = "space:script:cookies"
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Format the custom block as a codeblock
|
|
629
|
+
*/
|
|
630
|
+
export declare type IntegrationBlockMarkdown = {
|
|
631
|
+
codeblock: string;
|
|
632
|
+
body: string;
|
|
633
|
+
};
|
|
634
|
+
export interface IntegrationBlock {
|
|
635
|
+
/** Unique ID in the integration for the block. It also represents the UI component used. */
|
|
636
|
+
id: string;
|
|
637
|
+
/** Short descriptive title for the block. */
|
|
638
|
+
title: string;
|
|
639
|
+
/** Long descriptive text for the block. */
|
|
640
|
+
description?: string;
|
|
641
|
+
/** URL of the icon to represent this block. */
|
|
642
|
+
icon?: string;
|
|
643
|
+
/** URLs patterns to convert as this block. */
|
|
644
|
+
urlUnfurl?: string[];
|
|
645
|
+
/** Format the custom block as a codeblock */
|
|
646
|
+
markdown?: IntegrationBlockMarkdown;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Describe whether all spaces have been selected or there's a selection involved
|
|
650
|
+
*/
|
|
651
|
+
export declare enum IntegrationInstallationSpaceSelection {
|
|
652
|
+
All = "all",
|
|
653
|
+
Selected = "selected"
|
|
63
654
|
}
|
|
64
655
|
export declare enum IntegrationCategory {
|
|
65
656
|
Analytics = "analytics",
|
|
66
657
|
Collaboration = "collaboration",
|
|
658
|
+
Marketing = "marketing",
|
|
659
|
+
Content = "content",
|
|
67
660
|
Other = "other"
|
|
68
661
|
}
|
|
69
662
|
export interface IntegrationConfigurations {
|
|
663
|
+
/** Schema for a configuration */
|
|
664
|
+
account?: IntegrationConfiguration;
|
|
665
|
+
/** Schema for a configuration */
|
|
70
666
|
space?: IntegrationConfiguration;
|
|
71
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* Schema for a configuration
|
|
670
|
+
*/
|
|
72
671
|
export interface IntegrationConfiguration {
|
|
73
672
|
properties: Record<string, {
|
|
74
|
-
type?: string;
|
|
75
673
|
title?: string;
|
|
76
674
|
description?: string;
|
|
77
675
|
} & ({
|
|
78
|
-
type
|
|
676
|
+
type: 'string';
|
|
79
677
|
default?: string;
|
|
80
678
|
} | {
|
|
81
|
-
type
|
|
679
|
+
type: 'number';
|
|
82
680
|
default?: number;
|
|
83
681
|
} | {
|
|
84
|
-
type
|
|
682
|
+
type: 'boolean';
|
|
85
683
|
default?: boolean;
|
|
86
684
|
} | {
|
|
87
|
-
type
|
|
685
|
+
type: 'button';
|
|
88
686
|
callback_url: string;
|
|
89
687
|
button_text: string;
|
|
90
688
|
})>;
|
|
689
|
+
required?: string[];
|
|
91
690
|
}
|
|
92
691
|
export declare enum IntegrationVisibility {
|
|
93
692
|
Public = "public",
|
|
94
693
|
Private = "private"
|
|
95
694
|
}
|
|
695
|
+
/**
|
|
696
|
+
* Installation of an integration on an account
|
|
697
|
+
*/
|
|
96
698
|
export interface IntegrationInstallation {
|
|
97
699
|
id: string;
|
|
98
700
|
status: IntegrationInstallationStatus;
|
|
99
|
-
|
|
100
|
-
|
|
701
|
+
/** Describe whether all spaces have been selected or there's a selection involved */
|
|
702
|
+
space_selection: IntegrationInstallationSpaceSelection;
|
|
703
|
+
/** Configuration of the integration at the account level */
|
|
704
|
+
configuration: object;
|
|
705
|
+
/** URLs associated with the object */
|
|
706
|
+
urls: {
|
|
707
|
+
app: string;
|
|
708
|
+
publicEndpoint: string;
|
|
709
|
+
};
|
|
710
|
+
/** External IDs assigned by the integration. */
|
|
711
|
+
externalIds: string[];
|
|
712
|
+
/** Target of the integration installation */
|
|
713
|
+
target: IntegrationInstallationTarget;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Installation of an integration at a space level
|
|
717
|
+
*/
|
|
718
|
+
export interface IntegrationSpaceInstallation {
|
|
719
|
+
/** ID of the space the integration is installed on. */
|
|
720
|
+
space: string;
|
|
721
|
+
status: IntegrationInstallationStatus;
|
|
722
|
+
/** Configuration of the integration for this space */
|
|
723
|
+
configuration: object;
|
|
724
|
+
externalIds: any;
|
|
725
|
+
/** URLs associated with the object */
|
|
726
|
+
urls: {
|
|
727
|
+
publicEndpoint: string;
|
|
101
728
|
};
|
|
102
729
|
}
|
|
103
730
|
export declare enum IntegrationInstallationStatus {
|
|
@@ -116,16 +743,57 @@ export interface IntegrationEnvironment {
|
|
|
116
743
|
/** URL of the HTTP API */
|
|
117
744
|
apiEndpoint: string;
|
|
118
745
|
/** Authentication token to use with the HTTP API */
|
|
119
|
-
authToken
|
|
746
|
+
authToken?: string;
|
|
120
747
|
integration: Integration;
|
|
121
|
-
|
|
748
|
+
/** Installation of an integration on an account */
|
|
749
|
+
installation?: IntegrationInstallation;
|
|
750
|
+
/** Installation of an integration at a space level */
|
|
751
|
+
spaceInstallation?: IntegrationSpaceInstallation;
|
|
122
752
|
/** Secrets stored on the integration and passed at runtime. */
|
|
123
753
|
secrets: IntegrationSecrets;
|
|
124
754
|
}
|
|
755
|
+
export declare type IntegrationInstallationTarget = UserTarget | OrganizationTarget;
|
|
756
|
+
/**
|
|
757
|
+
* Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
|
|
758
|
+
headers when processing the script fetch event and the blocks fetch events.
|
|
759
|
+
*/
|
|
760
|
+
export declare type IntegrationContentSecurityPolicy = string | {
|
|
761
|
+
'base-uri'?: string;
|
|
762
|
+
'block-all-mixed-content'?: string;
|
|
763
|
+
'child-src'?: string;
|
|
764
|
+
'connect-src'?: string;
|
|
765
|
+
'default-src'?: string;
|
|
766
|
+
'font-src'?: string;
|
|
767
|
+
'form-action'?: string;
|
|
768
|
+
'frame-ancestors'?: string;
|
|
769
|
+
'frame-src'?: string;
|
|
770
|
+
'img-src'?: string;
|
|
771
|
+
'manifest-src'?: string;
|
|
772
|
+
'media-src'?: string;
|
|
773
|
+
'navigate-to'?: string;
|
|
774
|
+
'object-src'?: string;
|
|
775
|
+
'plugin-types'?: string;
|
|
776
|
+
'prefetch-src'?: string;
|
|
777
|
+
referrer?: string;
|
|
778
|
+
'report-to'?: string;
|
|
779
|
+
'report-uri'?: string;
|
|
780
|
+
'require-sri-for'?: string;
|
|
781
|
+
'require-trusted-types-for'?: string;
|
|
782
|
+
sandbox?: string;
|
|
783
|
+
'script-src'?: string;
|
|
784
|
+
'script-src-attr'?: string;
|
|
785
|
+
'script-src-elem'?: string;
|
|
786
|
+
'style-src'?: string;
|
|
787
|
+
'style-src-attr'?: string;
|
|
788
|
+
'style-src-elem'?: string;
|
|
789
|
+
'trusted-types'?: string;
|
|
790
|
+
'upgrade-insecure-requests'?: string;
|
|
791
|
+
'worker-src'?: string;
|
|
792
|
+
};
|
|
125
793
|
/**
|
|
126
794
|
* Any event that can be received from GitBook.
|
|
127
795
|
*/
|
|
128
|
-
export declare type Event = InstallationSetupEvent | SpaceViewEvent | SpaceContentUpdatedEvent | FetchEvent;
|
|
796
|
+
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | UIRenderEvent;
|
|
129
797
|
/**
|
|
130
798
|
* Common properties for all events.
|
|
131
799
|
*/
|
|
@@ -148,172 +816,1672 @@ export declare type SpaceEvent = InstallationEvent & {
|
|
|
148
816
|
spaceId: string;
|
|
149
817
|
};
|
|
150
818
|
/**
|
|
151
|
-
* Event received when integration has been installed.
|
|
819
|
+
* Event received when integration has been installed or updated.
|
|
820
|
+
*/
|
|
821
|
+
export declare type InstallationSetupEvent = InstallationEvent & {
|
|
822
|
+
type: 'installation_setup';
|
|
823
|
+
status: IntegrationInstallationStatus;
|
|
824
|
+
previous?: {
|
|
825
|
+
status: IntegrationInstallationStatus;
|
|
826
|
+
configuration?: object;
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
/**
|
|
830
|
+
* Event received when integration has been installed or updated on a space.
|
|
152
831
|
*/
|
|
153
|
-
export declare type
|
|
154
|
-
type:
|
|
832
|
+
export declare type SpaceInstallationSetupEvent = SpaceEvent & {
|
|
833
|
+
type: 'space_installation_setup';
|
|
155
834
|
status: IntegrationInstallationStatus;
|
|
835
|
+
previous?: {
|
|
836
|
+
status: IntegrationInstallationStatus;
|
|
837
|
+
configuration?: object;
|
|
838
|
+
};
|
|
156
839
|
};
|
|
157
840
|
/**
|
|
158
841
|
* Event received when a page has been visited.
|
|
159
842
|
*/
|
|
160
843
|
export declare type SpaceViewEvent = SpaceEvent & {
|
|
161
|
-
type:
|
|
844
|
+
type: 'space_view';
|
|
162
845
|
pageId?: string;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
846
|
+
visitor: {
|
|
847
|
+
anonymousId: string;
|
|
848
|
+
cookies: Record<string, string>;
|
|
849
|
+
userAgent: string;
|
|
850
|
+
ip: string;
|
|
851
|
+
};
|
|
852
|
+
url: string;
|
|
853
|
+
referrer: string;
|
|
166
854
|
};
|
|
167
855
|
/**
|
|
168
856
|
* Event when the primary content of a space has been updated.
|
|
169
857
|
*/
|
|
170
858
|
export declare type SpaceContentUpdatedEvent = SpaceEvent & {
|
|
171
|
-
type:
|
|
859
|
+
type: 'space_content_updated';
|
|
860
|
+
revisionId: string;
|
|
861
|
+
};
|
|
862
|
+
/**
|
|
863
|
+
* Event when the visibility of the space has been changed.
|
|
864
|
+
*/
|
|
865
|
+
export declare type SpaceVisibilityUpdatedEvent = SpaceEvent & {
|
|
866
|
+
type: 'space_visibility_updated';
|
|
867
|
+
previousVisibility: ContentVisibility;
|
|
868
|
+
visibility: ContentVisibility;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* Event when a GitSync operation has been completed.
|
|
872
|
+
*/
|
|
873
|
+
export declare type SpaceGitSyncCompletedEvent = SpaceEvent & {
|
|
874
|
+
type: 'space_gitsync_completed';
|
|
875
|
+
state: 'success' | 'failure';
|
|
172
876
|
revisionId: string;
|
|
877
|
+
commitId: string;
|
|
878
|
+
};
|
|
879
|
+
/**
|
|
880
|
+
* Event when a GitSync operation has been started.
|
|
881
|
+
*/
|
|
882
|
+
export declare type SpaceGitSyncStartedEvent = SpaceEvent & {
|
|
883
|
+
type: 'space_gitsync_started';
|
|
884
|
+
revisionId: string;
|
|
885
|
+
commitId: string;
|
|
173
886
|
};
|
|
174
887
|
export interface FetchRequest {
|
|
175
|
-
method:
|
|
888
|
+
method: 'post' | 'get' | 'put' | 'delete';
|
|
176
889
|
url: string;
|
|
177
|
-
body?: string;
|
|
178
|
-
headers: Record<string, string>;
|
|
179
|
-
}
|
|
180
|
-
export interface FetchResponse {
|
|
181
|
-
status: number;
|
|
182
|
-
body: string;
|
|
183
890
|
headers: Record<string, string>;
|
|
184
891
|
}
|
|
185
892
|
/**
|
|
186
893
|
* Event representing an incoming HTTP request.
|
|
187
894
|
*/
|
|
188
|
-
export declare type FetchEvent =
|
|
189
|
-
|
|
895
|
+
export declare type FetchEvent = BaseEvent & {
|
|
896
|
+
spaceId?: string;
|
|
897
|
+
installationId?: string;
|
|
898
|
+
auth?: {
|
|
899
|
+
userId: string;
|
|
900
|
+
};
|
|
901
|
+
type: 'fetch';
|
|
190
902
|
request: FetchRequest;
|
|
191
903
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
904
|
+
/**
|
|
905
|
+
* Common properties for all events related to fetching a published script from an installation
|
|
906
|
+
*/
|
|
907
|
+
export declare type FetchPublishedScriptEvent = SpaceEvent & {
|
|
908
|
+
type: 'fetch_published_script';
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* Event generated when rendering a UI
|
|
912
|
+
*/
|
|
913
|
+
export declare type UIRenderEvent = SpaceEvent & {
|
|
914
|
+
auth?: {
|
|
915
|
+
userId: string;
|
|
916
|
+
};
|
|
917
|
+
type: 'ui_render';
|
|
918
|
+
componentId: string;
|
|
919
|
+
props: object;
|
|
920
|
+
state?: object;
|
|
921
|
+
context: ContentKitContext;
|
|
922
|
+
action?: object;
|
|
923
|
+
};
|
|
924
|
+
/**
|
|
925
|
+
* Interval for a billing subscription
|
|
926
|
+
*/
|
|
927
|
+
export declare enum BillingInterval {
|
|
928
|
+
Monthly = "monthly",
|
|
929
|
+
Yearly = "yearly"
|
|
211
930
|
}
|
|
212
|
-
export
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
|
|
216
|
-
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
|
217
|
-
customFetch?: typeof fetch;
|
|
931
|
+
export interface BillingPortal {
|
|
932
|
+
/** URL to the billing portal for an organization */
|
|
933
|
+
url: string;
|
|
218
934
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
935
|
+
/**
|
|
936
|
+
* Name of the product
|
|
937
|
+
*/
|
|
938
|
+
export declare enum BillingProduct {
|
|
939
|
+
Free = "free",
|
|
940
|
+
Plus = "plus",
|
|
941
|
+
Pro = "pro",
|
|
942
|
+
Team = "team",
|
|
943
|
+
Business = "business",
|
|
944
|
+
Legacy = "legacy",
|
|
945
|
+
Startup = "startup",
|
|
946
|
+
Enterprise = "enterprise"
|
|
222
947
|
}
|
|
223
|
-
declare type
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
948
|
+
export declare type BillingUpgrade = {
|
|
949
|
+
result: 'checkout';
|
|
950
|
+
sessionId: string;
|
|
951
|
+
} | {
|
|
952
|
+
result: 'preview';
|
|
953
|
+
invoice: BillingInvoicePreview;
|
|
954
|
+
} | {
|
|
955
|
+
result: 'upgraded';
|
|
956
|
+
} | {
|
|
957
|
+
result: 'downgraded';
|
|
958
|
+
};
|
|
959
|
+
export interface BillingInvoicePreview {
|
|
960
|
+
/** Amount of the invoice */
|
|
961
|
+
amount: number;
|
|
962
|
+
/** Amount that will be immediately charged. */
|
|
963
|
+
amountDueToday: number;
|
|
964
|
+
/** Current balance, if any, being stored on the customer. If positive, the customer has credit to apply to their next invoice. */
|
|
965
|
+
customerBalance: number;
|
|
966
|
+
/** Current balance after potential upgrade. */
|
|
967
|
+
remainingCustomerBalance: number;
|
|
968
|
+
/** Details of the change happening on the subscription. */
|
|
969
|
+
lines: {
|
|
970
|
+
description: string;
|
|
971
|
+
amount: number;
|
|
972
|
+
periodStart: Date;
|
|
973
|
+
periodEnd: Date;
|
|
974
|
+
}[];
|
|
228
975
|
}
|
|
229
|
-
export declare
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
private customFetch;
|
|
235
|
-
private baseApiParams;
|
|
236
|
-
constructor(apiConfig?: ApiConfig<SecurityDataType>);
|
|
237
|
-
setSecurityData: (data: SecurityDataType | null) => void;
|
|
238
|
-
private encodeQueryParam;
|
|
239
|
-
private addQueryParam;
|
|
240
|
-
private addArrayQueryParam;
|
|
241
|
-
protected toQueryString(rawQuery?: QueryParamsType): string;
|
|
242
|
-
protected addQueryParams(rawQuery?: QueryParamsType): string;
|
|
243
|
-
private contentFormatters;
|
|
244
|
-
private mergeRequestParams;
|
|
245
|
-
private createAbortSignal;
|
|
246
|
-
abortRequest: (cancelToken: CancelToken) => void;
|
|
247
|
-
request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
|
|
976
|
+
export declare enum APIIntegrationScope {
|
|
977
|
+
IntegrationRead = "integration:read",
|
|
978
|
+
IntegrationUpdate = "integration:update",
|
|
979
|
+
IntegrationInstallationRead = "integration:installation:read",
|
|
980
|
+
IntegrationInstallationUpdate = "integration:installation:update"
|
|
248
981
|
}
|
|
982
|
+
export declare type APIScope = IntegrationScope | APIIntegrationScope | (IntegrationScope & APIIntegrationScope);
|
|
249
983
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @version 0.0.1-beta
|
|
252
|
-
* @termsOfService https://policies.gitbook.com
|
|
253
|
-
* @baseUrl {host}/v1
|
|
254
|
-
* @contact API Support <support@gitbook.com> (https://gitbook.com/support)
|
|
255
|
-
*
|
|
256
|
-
* The GitBook API
|
|
984
|
+
* The Cloudflare Hostname status
|
|
257
985
|
*/
|
|
258
|
-
export declare
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
986
|
+
export declare enum CloudflareHostnameStatus {
|
|
987
|
+
Pending = "pending",
|
|
988
|
+
Active = "active",
|
|
989
|
+
Blocked = "blocked",
|
|
990
|
+
Moved = "moved",
|
|
991
|
+
Deleted = "deleted"
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* The Cloudflare Hostname TLS certificate
|
|
995
|
+
*/
|
|
996
|
+
export interface CloudflareHostnameTLSCertificate {
|
|
997
|
+
issuer?: string;
|
|
998
|
+
expiresOn?: string;
|
|
999
|
+
issuedOn?: string;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* The Cloudflare Hostname TLS information
|
|
1003
|
+
*/
|
|
1004
|
+
export interface CloudflareHostnameTLSInfo {
|
|
1005
|
+
/** The Cloudflare Hostname TLS status */
|
|
1006
|
+
status: CloudflareHostnameTLSStatus;
|
|
1007
|
+
/** The Cloudflare Hostname TLS validation method */
|
|
1008
|
+
method: CloudflareHostnameTLSValidationMethod;
|
|
1009
|
+
certificateAuthority?: string;
|
|
1010
|
+
certificates: CloudflareHostnameTLSCertificate[];
|
|
1011
|
+
validationErrors: CloudflareHostnameTLSValidationError[];
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* The Cloudflare Hostname TLS status
|
|
1015
|
+
*/
|
|
1016
|
+
export declare enum CloudflareHostnameTLSStatus {
|
|
1017
|
+
Initializing = "initializing",
|
|
1018
|
+
PendingValidation = "pending_validation",
|
|
1019
|
+
PendingIssuance = "pending_issuance",
|
|
1020
|
+
PendingDeployment = "pending_deployment",
|
|
1021
|
+
Active = "active",
|
|
1022
|
+
PendingDeletion = "pending_deletion",
|
|
1023
|
+
PendingCleanup = "pending_cleanup",
|
|
1024
|
+
Deleted = "deleted"
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* The Cloudflare Hostname TLS validation error
|
|
1028
|
+
*/
|
|
1029
|
+
export interface CloudflareHostnameTLSValidationError {
|
|
1030
|
+
message: string;
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* The Cloudflare Hostname TLS validation method
|
|
1034
|
+
*/
|
|
1035
|
+
export declare enum CloudflareHostnameTLSValidationMethod {
|
|
1036
|
+
Http = "http",
|
|
1037
|
+
Txt = "txt",
|
|
1038
|
+
Email = "email"
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Cloudflare Custom Domain's information
|
|
1042
|
+
*/
|
|
1043
|
+
export interface CustomDomainInfo {
|
|
1044
|
+
hostname: string;
|
|
1045
|
+
/** The Cloudflare Hostname status */
|
|
1046
|
+
status: CloudflareHostnameStatus;
|
|
1047
|
+
createdAt: string;
|
|
1048
|
+
/** The Cloudflare Hostname TLS information */
|
|
1049
|
+
ssl?: CloudflareHostnameTLSInfo;
|
|
1050
|
+
verificationErrors: string[];
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* The User Firebase Auth Info.
|
|
1054
|
+
*/
|
|
1055
|
+
export interface FirebaseUserInfo {
|
|
1056
|
+
uid: string;
|
|
1057
|
+
displayName?: string;
|
|
1058
|
+
email?: string;
|
|
1059
|
+
phoneNumber?: string;
|
|
1060
|
+
photoUrl?: string;
|
|
1061
|
+
providerId?: string;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* The type of purge, e.g by tags or hosts
|
|
1065
|
+
*/
|
|
1066
|
+
export declare enum PurgeCDNCacheContextType {
|
|
1067
|
+
Tags = "tags",
|
|
1068
|
+
Hosts = "hosts"
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* The GitBook Staff User info.
|
|
1072
|
+
*/
|
|
1073
|
+
export interface StaffUserInfo {
|
|
1074
|
+
id: string;
|
|
1075
|
+
searchKey: string;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* The GitBook User info shown in the BackOffice.
|
|
1079
|
+
*/
|
|
1080
|
+
export interface UserBackOfficeInfo {
|
|
1081
|
+
id: string;
|
|
1082
|
+
/** The GitBook User risk evaluation. */
|
|
1083
|
+
riskEvaluation: UserRiskEvaluation;
|
|
1084
|
+
authProviders: FirebaseUserInfo[];
|
|
1085
|
+
createdAt: string;
|
|
1086
|
+
lastSignInAt: string;
|
|
1087
|
+
disabled: boolean;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* The info returned when impersonating a GitBook User.
|
|
1091
|
+
*/
|
|
1092
|
+
export declare type UserImpersonation = UserBackOfficeInfo & {
|
|
1093
|
+
impersonation: UserImpersonationInfo;
|
|
1094
|
+
};
|
|
1095
|
+
/**
|
|
1096
|
+
* The GitBook User impersonation info.
|
|
1097
|
+
*/
|
|
1098
|
+
export interface UserImpersonationInfo {
|
|
1099
|
+
authURL: string;
|
|
1100
|
+
impersonatorId: string;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* The GitBook User risk evaluation.
|
|
1104
|
+
*/
|
|
1105
|
+
export interface UserRiskEvaluation {
|
|
1106
|
+
/** True if the user was originally considered as risky */
|
|
1107
|
+
wasRisky: boolean;
|
|
1108
|
+
/** True if the user is currently considered as risky */
|
|
1109
|
+
isRisky: boolean;
|
|
1110
|
+
/** True if the user went through the verification process */
|
|
1111
|
+
isVerified: boolean;
|
|
1112
|
+
/** Risk score of the user */
|
|
1113
|
+
riskScore: number;
|
|
1114
|
+
/** Number of verification steps completed by the user */
|
|
1115
|
+
completedSteps: number;
|
|
1116
|
+
/** Total number of verification steps expected */
|
|
1117
|
+
expectedSteps: number;
|
|
1118
|
+
/** User completed the Google Account verification step */
|
|
1119
|
+
googleLogin: boolean;
|
|
1120
|
+
/** User completed the GitHub Account verification step */
|
|
1121
|
+
githubLogin: boolean;
|
|
1122
|
+
/** User completed the Email verification step */
|
|
1123
|
+
emailVerified: boolean;
|
|
1124
|
+
activeDaysRemaining: number;
|
|
1125
|
+
}
|
|
1126
|
+
export interface UnsplashImage {
|
|
1127
|
+
kind: 'unsplash_image';
|
|
1128
|
+
id: string;
|
|
1129
|
+
description: string;
|
|
1130
|
+
downloadLocation: string;
|
|
1131
|
+
urls: {
|
|
1132
|
+
full: string;
|
|
1133
|
+
small: string;
|
|
1134
|
+
};
|
|
1135
|
+
author: {
|
|
1136
|
+
name: string;
|
|
1137
|
+
url: string;
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
export interface APITemporaryToken {
|
|
1141
|
+
/** Temporary access token to authenticate with the API */
|
|
1142
|
+
token: string;
|
|
1143
|
+
}
|
|
1144
|
+
export declare type ContentKitContext = {
|
|
1145
|
+
type: 'document';
|
|
1146
|
+
editable: boolean;
|
|
1147
|
+
theme: 'dark' | 'light';
|
|
1148
|
+
};
|
|
1149
|
+
/**
|
|
1150
|
+
* Binding between a property and a state value.
|
|
1151
|
+
*/
|
|
1152
|
+
export interface ContentKitDynamicBinding {
|
|
1153
|
+
/** Key in the state */
|
|
1154
|
+
$state: string;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Higher level element to represent a custom block.
|
|
1158
|
+
*/
|
|
1159
|
+
export interface ContentKitBlock {
|
|
1160
|
+
type: 'block';
|
|
1161
|
+
children: ContentKitDescendantElement[];
|
|
1162
|
+
controls?: (ContentKitBlockControl | ContentKitBlockControl[])[];
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Control menu item displayed for the block.
|
|
1166
|
+
*/
|
|
1167
|
+
export interface ContentKitBlockControl {
|
|
1168
|
+
icon?: ContentKitIcon;
|
|
1169
|
+
label: string;
|
|
1170
|
+
/** Custom action to re-render the block. */
|
|
1171
|
+
onPress: ContentKitAction;
|
|
1172
|
+
/** A confirm object that defines an optional confirmation dialog after the input is clicked. */
|
|
1173
|
+
confirm?: ContentKitConfirm;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Pressable button triggering an action.
|
|
1177
|
+
*/
|
|
1178
|
+
export interface ContentKitButton {
|
|
1179
|
+
type: 'button';
|
|
1180
|
+
style?: 'primary' | 'secondary' | 'danger';
|
|
1181
|
+
/** Custom action to re-render the block. */
|
|
1182
|
+
onPress: ContentKitAction;
|
|
1183
|
+
icon?: ContentKitIcon;
|
|
1184
|
+
label?: string;
|
|
1185
|
+
tooltip?: string;
|
|
1186
|
+
/** A confirm object that defines an optional confirmation dialog after the input is clicked. */
|
|
1187
|
+
confirm?: ContentKitConfirm;
|
|
1188
|
+
disabled?: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Text input to prompt the user.
|
|
1192
|
+
*/
|
|
1193
|
+
export interface ContentKitTextInput {
|
|
1194
|
+
type: 'textinput';
|
|
1195
|
+
/** State binding. The value of the input will be stored as a property in the state named after this ID. */
|
|
1196
|
+
state: string;
|
|
1197
|
+
/** Text value to initialize the input with. */
|
|
1198
|
+
initialValue?: string;
|
|
1199
|
+
/** Text that appears in the form control when it has no value set */
|
|
1200
|
+
placeholder?: string;
|
|
1201
|
+
multiline?: boolean;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Low level text element.
|
|
1205
|
+
*/
|
|
1206
|
+
export interface ContentKitText {
|
|
1207
|
+
type: 'text';
|
|
1208
|
+
style?: 'bold' | 'italic' | 'code' | 'strikethrough';
|
|
1209
|
+
children: (string | ContentKitText)[];
|
|
1210
|
+
}
|
|
1211
|
+
export interface ContentKitBox {
|
|
1212
|
+
type?: 'box';
|
|
1213
|
+
/** specifies how much of the remaining space in the container should be assigned to the element */
|
|
1214
|
+
grow?: number;
|
|
1215
|
+
children?: ContentKitDescendantElement[];
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Horizontal stack of boxes.
|
|
1219
|
+
*/
|
|
1220
|
+
export interface ContentKitHStack {
|
|
1221
|
+
type: 'hstack';
|
|
1222
|
+
align?: 'start' | 'center' | 'end';
|
|
1223
|
+
children: ContentKitDescendantElement[];
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Vertical stack of boxes.
|
|
1227
|
+
*/
|
|
1228
|
+
export interface ContentKitVStack {
|
|
1229
|
+
type: 'vstack';
|
|
1230
|
+
align?: 'start' | 'center' | 'end';
|
|
1231
|
+
children: ContentKitDescendantElement[];
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Divider between 2 boxes in a stack.
|
|
1235
|
+
*/
|
|
1236
|
+
export interface ContentKitDivider {
|
|
1237
|
+
type: 'divider';
|
|
1238
|
+
size?: 'small' | 'medium' | 'large';
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Custom action to re-render the block.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare type ContentKitAction = {
|
|
1244
|
+
action: string;
|
|
1245
|
+
[key: string]: any;
|
|
1246
|
+
} | ContentKitDefaultAction | ({
|
|
1247
|
+
action: string;
|
|
1248
|
+
[key: string]: any;
|
|
1249
|
+
} & ContentKitDefaultAction);
|
|
1250
|
+
/**
|
|
1251
|
+
* Action to open an overlay modal defined by "componentId".
|
|
1252
|
+
*/
|
|
1253
|
+
export declare type ContentKitDefaultAction = {
|
|
1254
|
+
action: '@ui.modal.open';
|
|
1255
|
+
componentId: string;
|
|
1256
|
+
props: object;
|
|
1257
|
+
} | {
|
|
1258
|
+
action: '@ui.modal.close';
|
|
1259
|
+
returnValue: object;
|
|
1260
|
+
} | {
|
|
1261
|
+
action: '@ui.url.open';
|
|
1262
|
+
url: string;
|
|
1263
|
+
} | {
|
|
1264
|
+
action: '@link.unfurl';
|
|
1265
|
+
url: string;
|
|
1266
|
+
} | {
|
|
1267
|
+
action: '@editor.node.updateProps';
|
|
1268
|
+
props: object;
|
|
1269
|
+
};
|
|
1270
|
+
export declare enum ContentKitIcon {
|
|
1271
|
+
Close = "close",
|
|
1272
|
+
Edit = "edit",
|
|
1273
|
+
Github = "github",
|
|
1274
|
+
Maximize = "maximize",
|
|
1275
|
+
Email = "email",
|
|
1276
|
+
Settings = "settings",
|
|
1277
|
+
Search = "search",
|
|
1278
|
+
Delete = "delete",
|
|
1279
|
+
Star = "star",
|
|
1280
|
+
Warning = "warning",
|
|
1281
|
+
Link = "link",
|
|
1282
|
+
LinkExternal = "link-external"
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Overlay modal.
|
|
1286
|
+
*/
|
|
1287
|
+
export interface ContentKitModal {
|
|
1288
|
+
type: 'modal';
|
|
1289
|
+
title?: string;
|
|
1290
|
+
subtitle?: ContentKitInlineElement[];
|
|
1291
|
+
size?: 'medium' | 'xlarge' | 'fullscreen';
|
|
1292
|
+
/** Data passed back to the parent view when the modal is closed. These data are accessible in the "@ui.modal.close" */
|
|
1293
|
+
returnValue?: object;
|
|
1294
|
+
children: ContentKitDescendantElement[];
|
|
1295
|
+
/** Pressable button triggering an action. */
|
|
1296
|
+
submit?: ContentKitButton;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Frame for a webpage
|
|
1300
|
+
*/
|
|
1301
|
+
export interface ContentKitWebFrame {
|
|
1302
|
+
type: 'webframe';
|
|
1303
|
+
/** Ratio between width and height. Used to size the webframe. */
|
|
1304
|
+
aspectRatio?: number;
|
|
1305
|
+
/** Content to load in the frame. */
|
|
1306
|
+
source: {
|
|
1307
|
+
url: string;
|
|
1308
|
+
};
|
|
1309
|
+
/** Controls button shown as an overlay in a corner of the frame. */
|
|
1310
|
+
buttons?: ContentKitButton[];
|
|
1311
|
+
/** Data to communicated to the webframe's content. Each state update will cause the webframe to receive a message. */
|
|
1312
|
+
data?: Record<string, string | ContentKitDynamicBinding>;
|
|
1313
|
+
}
|
|
1314
|
+
/**
|
|
1315
|
+
* Code block with syntax highlighting
|
|
1316
|
+
*/
|
|
1317
|
+
export interface ContentKitCodeBlock {
|
|
1318
|
+
type: 'codeblock';
|
|
1319
|
+
/** Code content to display */
|
|
1320
|
+
content: ContentKitDynamicBinding | string;
|
|
1321
|
+
/** Syntax to use for highlighting (ex: javascript, python) */
|
|
1322
|
+
syntax?: string;
|
|
1323
|
+
/** Line number to start at. */
|
|
1324
|
+
lineNumbers?: boolean | number;
|
|
1325
|
+
/** Controls button shown as an overlay in a corner of the code block. */
|
|
1326
|
+
buttons?: ContentKitButton[];
|
|
1327
|
+
/** State binding when editable. The value of the input will be stored as a property in the state named after this ID. */
|
|
1328
|
+
state?: string;
|
|
1329
|
+
/** Custom action to re-render the block. */
|
|
1330
|
+
onContentChange?: ContentKitAction;
|
|
1331
|
+
/** Header displayed before the code lines */
|
|
1332
|
+
header?: ContentKitDescendantElement[];
|
|
1333
|
+
/** Footer displayed after the code lines */
|
|
1334
|
+
footer?: ContentKitDescendantElement[];
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Output of the integration when rendering an UI.
|
|
1338
|
+
*/
|
|
1339
|
+
export interface ContentKitRenderOutput {
|
|
1340
|
+
/** Element used as root */
|
|
1341
|
+
element: ContentKitRootElement;
|
|
1342
|
+
state: object;
|
|
1343
|
+
props: object;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Block with rich text formatting of a markdown content.
|
|
1347
|
+
*/
|
|
1348
|
+
export interface ContentKitMarkdown {
|
|
1349
|
+
type: 'markdown';
|
|
1350
|
+
/** Markdown content to display */
|
|
1351
|
+
content: ContentKitDynamicBinding | string;
|
|
1352
|
+
}
|
|
1353
|
+
export interface ContentKitCard {
|
|
1354
|
+
type: 'card';
|
|
1355
|
+
title?: string;
|
|
1356
|
+
hint?: string | ContentKitInlineElement[];
|
|
1357
|
+
icon?: ContentKitIcon | ContentKitImage;
|
|
1358
|
+
/** Custom action to re-render the block. */
|
|
1359
|
+
onPress?: ContentKitAction;
|
|
1360
|
+
children?: ContentKitDescendantElement[];
|
|
1361
|
+
/** Buttons displayed in the top right corner of the card. */
|
|
1362
|
+
buttons?: ContentKitButton[];
|
|
1363
|
+
}
|
|
1364
|
+
export interface ContentKitImage {
|
|
1365
|
+
type: 'image';
|
|
1366
|
+
source: {
|
|
1367
|
+
url: string;
|
|
1368
|
+
};
|
|
1369
|
+
aspectRatio: number;
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Field for an input.
|
|
1373
|
+
*/
|
|
1374
|
+
export interface ContentKitInput {
|
|
1375
|
+
type: 'input';
|
|
1376
|
+
/** Text label displayed next to the input. */
|
|
1377
|
+
label: string;
|
|
1378
|
+
hint?: string | ContentKitInlineElement;
|
|
1379
|
+
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* An individual option in a select element
|
|
1383
|
+
*/
|
|
1384
|
+
export interface ContentKitSelectOption {
|
|
1385
|
+
id: string;
|
|
1386
|
+
label: string;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Creates a drop down menu with a list of options for a user to choose.
|
|
1390
|
+
*/
|
|
1391
|
+
export interface ContentKitSelect {
|
|
1392
|
+
type: 'select';
|
|
1393
|
+
/** State binding. The value of the input will be stored as a property in the state named after this ID. */
|
|
1394
|
+
state: string;
|
|
1395
|
+
/** Value to initialize the select with. */
|
|
1396
|
+
initialValue?: string | string[];
|
|
1397
|
+
/** Text that appears in the form control when it has no value set */
|
|
1398
|
+
placeholder?: string;
|
|
1399
|
+
/** Should the select accept the selection of multiple options. If true, the state will be an array. */
|
|
1400
|
+
multiple?: boolean;
|
|
1401
|
+
/** Static list of options */
|
|
1402
|
+
options: ContentKitSelectOption[] | {
|
|
1403
|
+
url: string;
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Renders a boolean input.
|
|
1408
|
+
*/
|
|
1409
|
+
export interface ContentKitSwitch {
|
|
1410
|
+
type: 'switch';
|
|
1411
|
+
/** State binding. The value of the input will be stored as a property in the state named after this ID. */
|
|
1412
|
+
state: string;
|
|
1413
|
+
/** Value to initialize the switch with. */
|
|
1414
|
+
initialValue?: boolean;
|
|
1415
|
+
/** A confirm object that defines an optional confirmation dialog after the input is clicked. */
|
|
1416
|
+
confirm?: ContentKitConfirm;
|
|
1417
|
+
}
|
|
1418
|
+
export interface ContentKitCheckbox {
|
|
1419
|
+
type: 'checkbox';
|
|
1420
|
+
/** State binding. The value of the input will be stored as a property in the state named after this ID. */
|
|
1421
|
+
state: string;
|
|
1422
|
+
/** Value to store in a state array when the checkbox is selected. */
|
|
1423
|
+
value: string | number;
|
|
1424
|
+
/** A confirm object that defines an optional confirmation dialog after the input is clicked. */
|
|
1425
|
+
confirm?: ContentKitConfirm;
|
|
1426
|
+
}
|
|
1427
|
+
export interface ContentKitRadio {
|
|
1428
|
+
type: 'radio';
|
|
1429
|
+
/** State binding. The value of the input will be stored as a property in the state named after this ID. */
|
|
1430
|
+
state: string;
|
|
1431
|
+
/** Value to store in th state when the checkbox is selected. */
|
|
1432
|
+
value: string | number;
|
|
1433
|
+
/** A confirm object that defines an optional confirmation dialog after the input is clicked. */
|
|
1434
|
+
confirm?: ContentKitConfirm;
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* A confirm object that defines an optional confirmation dialog after the input is clicked.
|
|
1438
|
+
*/
|
|
1439
|
+
export interface ContentKitConfirm {
|
|
1440
|
+
/** A text value that defines the dialog's title. */
|
|
1441
|
+
title: string;
|
|
1442
|
+
/** A text value that defines the explanatory text that appears in the confirm dialog. */
|
|
1443
|
+
text: string;
|
|
1444
|
+
/** A text value to define the text of the button that confirms the action. */
|
|
1445
|
+
confirm: string;
|
|
1446
|
+
style?: 'primary' | 'danger';
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Element used as root
|
|
1450
|
+
*/
|
|
1451
|
+
export declare type ContentKitRootElement = ContentKitBlock | ContentKitModal;
|
|
1452
|
+
/**
|
|
1453
|
+
* Any element that can be used as children.
|
|
1454
|
+
*/
|
|
1455
|
+
export declare type ContentKitDescendantElement = ContentKitButton | ContentKitTextInput | ContentKitHStack | ContentKitVStack | ContentKitBox | ContentKitDivider | ContentKitWebFrame | ContentKitCodeBlock | ContentKitMarkdown | ContentKitCard | ContentKitImage | ContentKitInput | ContentKitSelect | ContentKitSwitch | ContentKitCheckbox | ContentKitRadio | ContentKitText;
|
|
1456
|
+
/**
|
|
1457
|
+
* Any element that is inline.
|
|
1458
|
+
*/
|
|
1459
|
+
export declare type ContentKitInlineElement = ContentKitText | ContentKitImage;
|
|
1460
|
+
export declare type QueryParamsType = Record<string | number, any>;
|
|
1461
|
+
export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
1462
|
+
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
1463
|
+
/** set parameter to `true` for call `securityWorker` for this request */
|
|
1464
|
+
secure?: boolean;
|
|
1465
|
+
/** request path */
|
|
1466
|
+
path: string;
|
|
1467
|
+
/** content type of request body */
|
|
1468
|
+
type?: ContentType;
|
|
1469
|
+
/** query params */
|
|
1470
|
+
query?: QueryParamsType;
|
|
1471
|
+
/** format of response (i.e. response.json() -> format: "json") */
|
|
1472
|
+
format?: ResponseFormat;
|
|
1473
|
+
/** request body */
|
|
1474
|
+
body?: unknown;
|
|
1475
|
+
/** base url */
|
|
1476
|
+
baseUrl?: string;
|
|
1477
|
+
/** request cancellation token */
|
|
1478
|
+
cancelToken?: CancelToken;
|
|
1479
|
+
}
|
|
1480
|
+
export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
|
|
1481
|
+
export interface ApiConfig<SecurityDataType = unknown> {
|
|
1482
|
+
baseUrl?: string;
|
|
1483
|
+
baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
|
|
1484
|
+
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
|
1485
|
+
customFetch?: typeof fetch;
|
|
1486
|
+
}
|
|
1487
|
+
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
|
|
1488
|
+
data: D;
|
|
1489
|
+
error: E;
|
|
1490
|
+
}
|
|
1491
|
+
declare type CancelToken = Symbol | string | number;
|
|
1492
|
+
export declare enum ContentType {
|
|
1493
|
+
Json = "application/json",
|
|
1494
|
+
FormData = "multipart/form-data",
|
|
1495
|
+
UrlEncoded = "application/x-www-form-urlencoded"
|
|
1496
|
+
}
|
|
1497
|
+
export declare class HttpClient<SecurityDataType = unknown> {
|
|
1498
|
+
baseUrl: string;
|
|
1499
|
+
private securityData;
|
|
1500
|
+
private securityWorker?;
|
|
1501
|
+
private abortControllers;
|
|
1502
|
+
private customFetch;
|
|
1503
|
+
private baseApiParams;
|
|
1504
|
+
constructor(apiConfig?: ApiConfig<SecurityDataType>);
|
|
1505
|
+
setSecurityData: (data: SecurityDataType | null) => void;
|
|
1506
|
+
private encodeQueryParam;
|
|
1507
|
+
private addQueryParam;
|
|
1508
|
+
private addArrayQueryParam;
|
|
1509
|
+
protected toQueryString(rawQuery?: QueryParamsType): string;
|
|
1510
|
+
protected addQueryParams(rawQuery?: QueryParamsType): string;
|
|
1511
|
+
private contentFormatters;
|
|
1512
|
+
private mergeRequestParams;
|
|
1513
|
+
private createAbortSignal;
|
|
1514
|
+
abortRequest: (cancelToken: CancelToken) => void;
|
|
1515
|
+
request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* @title GitBook API
|
|
1519
|
+
* @version 0.0.1-beta
|
|
1520
|
+
* @termsOfService https://policies.gitbook.com
|
|
1521
|
+
* @baseUrl {host}/v1
|
|
1522
|
+
* @contact API Support <support@gitbook.com> (https://gitbook.com/support)
|
|
1523
|
+
*
|
|
1524
|
+
* The GitBook API
|
|
1525
|
+
*/
|
|
1526
|
+
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
1527
|
+
/**
|
|
1528
|
+
* @description Access the release version and build date of the GitBook codebase
|
|
1529
|
+
*
|
|
1530
|
+
* @tags api
|
|
1531
|
+
* @name GetApiInformation
|
|
1532
|
+
* @summary Get information about the state of the GitBook API
|
|
1533
|
+
* @request GET:/
|
|
1534
|
+
* @secure
|
|
1535
|
+
*/
|
|
1536
|
+
getApiInformation: (params?: RequestParams) => Promise<HttpResponse<ApiInformation, Error>>;
|
|
1537
|
+
search: {
|
|
1538
|
+
/**
|
|
1539
|
+
* No description
|
|
1540
|
+
*
|
|
1541
|
+
* @tags search
|
|
1542
|
+
* @name SearchContent
|
|
1543
|
+
* @summary Search content across spaces that is accessible by the currently authenticated target
|
|
1544
|
+
* @request GET:/search
|
|
1545
|
+
* @secure
|
|
1546
|
+
*/
|
|
1547
|
+
searchContent: (query: {
|
|
1548
|
+
query: string;
|
|
1549
|
+
page?: string;
|
|
1550
|
+
limit?: number;
|
|
1551
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1552
|
+
items: SearchSpaceResult[];
|
|
1553
|
+
}, Error>>;
|
|
1554
|
+
/**
|
|
1555
|
+
* No description
|
|
1556
|
+
*
|
|
1557
|
+
* @name AskQuery
|
|
1558
|
+
* @summary Ask a question to an AI across spaces that is accessible by the currently authenticated target.
|
|
1559
|
+
* @request GET:/search/ask
|
|
1560
|
+
* @secure
|
|
1561
|
+
*/
|
|
1562
|
+
askQuery: (query: {
|
|
1563
|
+
query: string;
|
|
1564
|
+
mode?: 'fast' | 'precise';
|
|
1565
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
1566
|
+
answer?: SearchAIAnswer;
|
|
1567
|
+
}, Error>>;
|
|
1568
|
+
};
|
|
1569
|
+
user: {
|
|
1570
|
+
/**
|
|
1571
|
+
* @description Returns details about the user associated with the authentication provided in the request's authorization header.
|
|
1572
|
+
*
|
|
1573
|
+
* @tags users
|
|
1574
|
+
* @name GetAuthenticatedUser
|
|
1575
|
+
* @summary Get profile of authenticated user
|
|
1576
|
+
* @request GET:/user
|
|
1577
|
+
* @secure
|
|
1578
|
+
*/
|
|
1579
|
+
getAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<User, Error>>;
|
|
1580
|
+
/**
|
|
1581
|
+
* @description Lists spaces that the authenticated user explicitly own.
|
|
1582
|
+
*
|
|
1583
|
+
* @tags users
|
|
1584
|
+
* @name ListSpacesForAuthenticatedUser
|
|
1585
|
+
* @summary List spaces for the authenticated user
|
|
1586
|
+
* @request GET:/user/spaces
|
|
1587
|
+
* @secure
|
|
1588
|
+
*/
|
|
1589
|
+
listSpacesForAuthenticatedUser: (query?: {
|
|
1590
|
+
page?: string;
|
|
1591
|
+
limit?: number;
|
|
1592
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1593
|
+
items: Space[];
|
|
1594
|
+
}, Error>>;
|
|
1595
|
+
};
|
|
1596
|
+
users: {
|
|
1597
|
+
/**
|
|
1598
|
+
* @description Provides publicly available information about someone with a GitBook account.
|
|
1599
|
+
*
|
|
1600
|
+
* @tags users
|
|
1601
|
+
* @name GetUserById
|
|
1602
|
+
* @summary Get a user by its ID
|
|
1603
|
+
* @request GET:/users/{userId}
|
|
1604
|
+
* @secure
|
|
1605
|
+
*/
|
|
1606
|
+
getUserById: (userId: string, params?: RequestParams) => Promise<HttpResponse<User, Error>>;
|
|
1607
|
+
};
|
|
1608
|
+
spaces: {
|
|
1609
|
+
/**
|
|
1610
|
+
* No description
|
|
1611
|
+
*
|
|
1612
|
+
* @tags spaces
|
|
1613
|
+
* @name GetSpaceById
|
|
1614
|
+
* @summary Get the details about a space.
|
|
1615
|
+
* @request GET:/spaces/{spaceId}
|
|
1616
|
+
* @secure
|
|
1617
|
+
*/
|
|
1618
|
+
getSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
1619
|
+
/**
|
|
1620
|
+
* No description
|
|
1621
|
+
*
|
|
1622
|
+
* @name SearchSpaceContent
|
|
1623
|
+
* @summary Search content in a space
|
|
1624
|
+
* @request GET:/spaces/{spaceId}/search
|
|
1625
|
+
* @secure
|
|
1626
|
+
*/
|
|
1627
|
+
searchSpaceContent: (spaceId: string, query: {
|
|
1628
|
+
query: string;
|
|
1629
|
+
page?: string;
|
|
1630
|
+
limit?: number;
|
|
1631
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1632
|
+
items: SearchPageResult[];
|
|
1633
|
+
}, Error>>;
|
|
1634
|
+
/**
|
|
1635
|
+
* No description
|
|
1636
|
+
*
|
|
1637
|
+
* @name AskQueryInSpace
|
|
1638
|
+
* @summary Ask a question to an AI within the context of the space.
|
|
1639
|
+
* @request GET:/spaces/{spaceId}/search/ask
|
|
1640
|
+
* @secure
|
|
1641
|
+
*/
|
|
1642
|
+
askQueryInSpace: (spaceId: string, query: {
|
|
1643
|
+
query: string;
|
|
1644
|
+
mode?: 'fast' | 'precise';
|
|
1645
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
1646
|
+
answer?: SearchAIAnswer;
|
|
1647
|
+
}, Error>>;
|
|
1648
|
+
/**
|
|
1649
|
+
* No description
|
|
1650
|
+
*
|
|
1651
|
+
* @tags spaces
|
|
1652
|
+
* @name ImportGitRepository
|
|
1653
|
+
* @summary Import a Git repository
|
|
1654
|
+
* @request POST:/spaces/{spaceId}/git/import
|
|
1655
|
+
* @secure
|
|
1656
|
+
*/
|
|
1657
|
+
importGitRepository: (spaceId: string, data: RequestImportGitRepository, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
1658
|
+
/**
|
|
1659
|
+
* No description
|
|
1660
|
+
*
|
|
1661
|
+
* @tags spaces
|
|
1662
|
+
* @name ExportToGitRepository
|
|
1663
|
+
* @summary Export the space content to a Git repository.
|
|
1664
|
+
* @request POST:/spaces/{spaceId}/git/export
|
|
1665
|
+
* @secure
|
|
1666
|
+
*/
|
|
1667
|
+
exportToGitRepository: (spaceId: string, data: RequestExportToGitRepository, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
1668
|
+
/**
|
|
1669
|
+
* No description
|
|
1670
|
+
*
|
|
1671
|
+
* @tags analytics, spaces
|
|
1672
|
+
* @name GetContentAnalyticsForSpaceById
|
|
1673
|
+
* @summary Get content analytics for a given space.
|
|
1674
|
+
* @request GET:/spaces/{spaceId}/insights/content
|
|
1675
|
+
* @secure
|
|
1676
|
+
*/
|
|
1677
|
+
getContentAnalyticsForSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
|
|
1678
|
+
/**
|
|
1679
|
+
* No description
|
|
1680
|
+
*
|
|
1681
|
+
* @tags analytics, spaces
|
|
1682
|
+
* @name GetSearchAnalyticsForSpaceById
|
|
1683
|
+
* @summary Get an overview of the top search queries in a space.
|
|
1684
|
+
* @request GET:/spaces/{spaceId}/insights/search
|
|
1685
|
+
* @secure
|
|
1686
|
+
*/
|
|
1687
|
+
getSearchAnalyticsForSpaceById: (spaceId: string, query?: {
|
|
1688
|
+
period?: AnalyticsSearchPeriod;
|
|
1689
|
+
}, params?: RequestParams) => Promise<HttpResponse<AnalyticsTopSearches, Error>>;
|
|
1690
|
+
/**
|
|
1691
|
+
* @description Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
|
|
1692
|
+
*
|
|
1693
|
+
* @tags analytics, spaces
|
|
1694
|
+
* @name GetTrafficAnalyticsForSpaceById
|
|
1695
|
+
* @summary Get traffic page views for a given space
|
|
1696
|
+
* @request GET:/spaces/{spaceId}/insights/traffic
|
|
1697
|
+
* @secure
|
|
1698
|
+
*/
|
|
1699
|
+
getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
|
|
1700
|
+
interval?: AnalyticsTrafficInterval;
|
|
1701
|
+
}, params?: RequestParams) => Promise<HttpResponse<AnalyticsTrafficPageViews, Error>>;
|
|
1702
|
+
/**
|
|
1703
|
+
* @description Track a page view in a space.
|
|
1704
|
+
*
|
|
1705
|
+
* @tags analytics, spaces
|
|
1706
|
+
* @name TrackViewInSpaceById
|
|
1707
|
+
* @request POST:/spaces/{spaceId}/insights/track_view
|
|
1708
|
+
* @secure
|
|
1709
|
+
*/
|
|
1710
|
+
trackViewInSpaceById: (spaceId: string, data: RequestSpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
1711
|
+
/**
|
|
1712
|
+
* No description
|
|
1713
|
+
*
|
|
1714
|
+
* @name GetCurrentRevision
|
|
1715
|
+
* @summary Get the current primary content revision for a space
|
|
1716
|
+
* @request GET:/spaces/{spaceId}/content
|
|
1717
|
+
* @secure
|
|
1718
|
+
*/
|
|
1719
|
+
getCurrentRevision: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
1720
|
+
/**
|
|
1721
|
+
* No description
|
|
1722
|
+
*
|
|
1723
|
+
* @name ImportContent
|
|
1724
|
+
* @summary Import content in a space.
|
|
1725
|
+
* @request POST:/spaces/{spaceId}/content/import
|
|
1726
|
+
* @secure
|
|
1727
|
+
*/
|
|
1728
|
+
importContent: (spaceId: string, data: RequestImportContent, params?: RequestParams) => Promise<HttpResponse<ImportContentResult, Error>>;
|
|
1729
|
+
/**
|
|
1730
|
+
* No description
|
|
1731
|
+
*
|
|
1732
|
+
* @name ListFiles
|
|
1733
|
+
* @summary List all files for the latest primary revision content for a space
|
|
1734
|
+
* @request GET:/spaces/{spaceId}/content/files
|
|
1735
|
+
* @secure
|
|
1736
|
+
*/
|
|
1737
|
+
listFiles: (spaceId: string, query?: {
|
|
1738
|
+
page?: string;
|
|
1739
|
+
limit?: number;
|
|
1740
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1741
|
+
items: RevisionFile[];
|
|
1742
|
+
}, Error>>;
|
|
1743
|
+
/**
|
|
1744
|
+
* No description
|
|
1745
|
+
*
|
|
1746
|
+
* @name GetPageById
|
|
1747
|
+
* @summary Get a page by its ID in the primary content.
|
|
1748
|
+
* @request GET:/spaces/{spaceId}/content/page/{pageId}
|
|
1749
|
+
* @secure
|
|
1750
|
+
*/
|
|
1751
|
+
getPageById: (spaceId: string, pageId: string, query?: {
|
|
1752
|
+
format?: 'document' | 'markdown';
|
|
1753
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
1754
|
+
/**
|
|
1755
|
+
* No description
|
|
1756
|
+
*
|
|
1757
|
+
* @name ImportContentInPageById
|
|
1758
|
+
* @summary Import external content into a page by its ID.
|
|
1759
|
+
* @request POST:/spaces/{spaceId}/content/page/{pageId}/import
|
|
1760
|
+
* @secure
|
|
286
1761
|
*/
|
|
287
|
-
|
|
1762
|
+
importContentInPageById: (spaceId: string, pageId: string, data: RequestImportContent, params?: RequestParams) => Promise<HttpResponse<ImportContentResult, Error>>;
|
|
1763
|
+
/**
|
|
1764
|
+
* No description
|
|
1765
|
+
*
|
|
1766
|
+
* @name GetPageByPath
|
|
1767
|
+
* @summary Get a page by its path in the primary content.
|
|
1768
|
+
* @request GET:/spaces/{spaceId}/content/path/{pagePath}
|
|
1769
|
+
* @secure
|
|
1770
|
+
*/
|
|
1771
|
+
getPageByPath: (spaceId: string, pagePath: string, query?: {
|
|
1772
|
+
format?: 'document' | 'markdown';
|
|
1773
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageSheet | RevisionPageGroup, Error>>;
|
|
1774
|
+
/**
|
|
1775
|
+
* No description
|
|
1776
|
+
*
|
|
1777
|
+
* @tags spaces
|
|
1778
|
+
* @name CreateChangeRequest
|
|
1779
|
+
* @summary Create a new change request for a space.
|
|
1780
|
+
* @request POST:/spaces/{spaceId}/change-requests
|
|
1781
|
+
* @secure
|
|
1782
|
+
*/
|
|
1783
|
+
createChangeRequest: (spaceId: string, data: RequestCreateChangeRequest, params?: RequestParams) => Promise<HttpResponse<ChangeRequest & {
|
|
1784
|
+
changeRequest: string;
|
|
1785
|
+
}, Error>>;
|
|
1786
|
+
/**
|
|
1787
|
+
* No description
|
|
1788
|
+
*
|
|
1789
|
+
* @tags spaces
|
|
1790
|
+
* @name MergeChangeRequest
|
|
1791
|
+
* @summary Merge a change request in the primary content of a space.
|
|
1792
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/merge
|
|
1793
|
+
* @secure
|
|
1794
|
+
*/
|
|
1795
|
+
mergeChangeRequest: (spaceId: string, changeRequestId: string | number, params?: RequestParams) => Promise<HttpResponse<{
|
|
1796
|
+
revision: string;
|
|
1797
|
+
result: 'merge' | 'conflicts';
|
|
1798
|
+
}, Error>>;
|
|
1799
|
+
/**
|
|
1800
|
+
* No description
|
|
1801
|
+
*
|
|
1802
|
+
* @tags spaces
|
|
1803
|
+
* @name UpdateChangeRequest
|
|
1804
|
+
* @summary Update a change-request with changes from primary content.
|
|
1805
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/update
|
|
1806
|
+
* @secure
|
|
1807
|
+
*/
|
|
1808
|
+
updateChangeRequest: (spaceId: string, changeRequestId: string | number, params?: RequestParams) => Promise<HttpResponse<{
|
|
1809
|
+
revision: string;
|
|
1810
|
+
result: 'update' | 'conflicts';
|
|
1811
|
+
}, Error>>;
|
|
1812
|
+
/**
|
|
1813
|
+
* No description
|
|
1814
|
+
*
|
|
1815
|
+
* @name GetRevisionOfChangeRequestById
|
|
1816
|
+
* @summary Get the latest content revision for a change request.
|
|
1817
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content
|
|
1818
|
+
* @secure
|
|
1819
|
+
*/
|
|
1820
|
+
getRevisionOfChangeRequestById: (spaceId: string, changeRequestId: string | number, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
1821
|
+
/**
|
|
1822
|
+
* No description
|
|
1823
|
+
*
|
|
1824
|
+
* @name ImportContentInChangeRequest
|
|
1825
|
+
* @summary Import content in a change request.
|
|
1826
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/content/import
|
|
1827
|
+
* @secure
|
|
1828
|
+
*/
|
|
1829
|
+
importContentInChangeRequest: (spaceId: string, changeRequestId: string | number, data: RequestImportContent, params?: RequestParams) => Promise<HttpResponse<ImportContentResult, Error>>;
|
|
1830
|
+
/**
|
|
1831
|
+
* No description
|
|
1832
|
+
*
|
|
1833
|
+
* @name ListFilesInChangeRequestById
|
|
1834
|
+
* @summary List all files in the latest content of the change-request
|
|
1835
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/files
|
|
1836
|
+
* @secure
|
|
1837
|
+
*/
|
|
1838
|
+
listFilesInChangeRequestById: (spaceId: string, changeRequestId: string | number, query?: {
|
|
1839
|
+
page?: string;
|
|
1840
|
+
limit?: number;
|
|
1841
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1842
|
+
items: RevisionFile[];
|
|
1843
|
+
}, Error>>;
|
|
1844
|
+
/**
|
|
1845
|
+
* No description
|
|
1846
|
+
*
|
|
1847
|
+
* @name GetPageInChangeRequestById
|
|
1848
|
+
* @summary Get a page by its ID in a change request.
|
|
1849
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
|
|
1850
|
+
* @secure
|
|
1851
|
+
*/
|
|
1852
|
+
getPageInChangeRequestById: (spaceId: string, changeRequestId: string | number, pageId: string, query?: {
|
|
1853
|
+
format?: 'document' | 'markdown';
|
|
1854
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
1855
|
+
/**
|
|
1856
|
+
* No description
|
|
1857
|
+
*
|
|
1858
|
+
* @name ImportContentInChangeRequestPageById
|
|
1859
|
+
* @summary Import external content into a page of a change-request by its ID.
|
|
1860
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/import
|
|
1861
|
+
* @secure
|
|
1862
|
+
*/
|
|
1863
|
+
importContentInChangeRequestPageById: (spaceId: string, changeRequestId: string | number, pageId: string, data: RequestImportContent, params?: RequestParams) => Promise<HttpResponse<ImportContentResult, Error>>;
|
|
1864
|
+
/**
|
|
1865
|
+
* No description
|
|
1866
|
+
*
|
|
1867
|
+
* @name GetPageInChangeRequestByPath
|
|
1868
|
+
* @summary Get a page by its path in a change request.
|
|
1869
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath}
|
|
1870
|
+
* @secure
|
|
1871
|
+
*/
|
|
1872
|
+
getPageInChangeRequestByPath: (spaceId: string, changeRequestId: string | number, pagePath: string, query?: {
|
|
1873
|
+
format?: 'document' | 'markdown';
|
|
1874
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageSheet | RevisionPageGroup, Error>>;
|
|
1875
|
+
/**
|
|
1876
|
+
* No description
|
|
1877
|
+
*
|
|
1878
|
+
* @name GetRevisionById
|
|
1879
|
+
* @summary Get a specific revision in a space
|
|
1880
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}
|
|
1881
|
+
* @secure
|
|
1882
|
+
*/
|
|
1883
|
+
getRevisionById: (spaceId: string, revisionId: string, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
1884
|
+
/**
|
|
1885
|
+
* No description
|
|
1886
|
+
*
|
|
1887
|
+
* @name ListFilesInRevisionById
|
|
1888
|
+
* @summary List all files in a revision
|
|
1889
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/files
|
|
1890
|
+
* @secure
|
|
1891
|
+
*/
|
|
1892
|
+
listFilesInRevisionById: (spaceId: string, revisionId: string, query?: {
|
|
1893
|
+
page?: string;
|
|
1894
|
+
limit?: number;
|
|
1895
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1896
|
+
items: RevisionFile[];
|
|
1897
|
+
}, Error>>;
|
|
1898
|
+
/**
|
|
1899
|
+
* No description
|
|
1900
|
+
*
|
|
1901
|
+
* @name GetPageInRevisionById
|
|
1902
|
+
* @summary Get a page by its ID in a revision.
|
|
1903
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}
|
|
1904
|
+
* @secure
|
|
1905
|
+
*/
|
|
1906
|
+
getPageInRevisionById: (spaceId: string, revisionId: string, pageId: string, query?: {
|
|
1907
|
+
format?: 'document' | 'markdown';
|
|
1908
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
1909
|
+
/**
|
|
1910
|
+
* No description
|
|
1911
|
+
*
|
|
1912
|
+
* @name GetPageInRevisionByPath
|
|
1913
|
+
* @summary Get a page by its path in a revision.
|
|
1914
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/path/{pagePath}
|
|
1915
|
+
* @secure
|
|
1916
|
+
*/
|
|
1917
|
+
getPageInRevisionByPath: (spaceId: string, revisionId: string, pagePath: string, query?: {
|
|
1918
|
+
format?: 'document' | 'markdown';
|
|
1919
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageSheet | RevisionPageGroup, Error>>;
|
|
1920
|
+
/**
|
|
1921
|
+
* No description
|
|
1922
|
+
*
|
|
1923
|
+
* @tags permissions, spaces
|
|
1924
|
+
* @name ListPermissionsAggregateInSpace
|
|
1925
|
+
* @summary List permissions for all users in a space.
|
|
1926
|
+
* @request GET:/spaces/{spaceId}/permissions/aggregate
|
|
1927
|
+
* @secure
|
|
1928
|
+
*/
|
|
1929
|
+
listPermissionsAggregateInSpace: (spaceId: string, query?: {
|
|
1930
|
+
page?: string;
|
|
1931
|
+
limit?: number;
|
|
1932
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1933
|
+
items: UserContentPermission[];
|
|
1934
|
+
}, Error>>;
|
|
1935
|
+
};
|
|
1936
|
+
collections: {
|
|
1937
|
+
/**
|
|
1938
|
+
* No description
|
|
1939
|
+
*
|
|
1940
|
+
* @tags collections
|
|
1941
|
+
* @name GetCollectionById
|
|
1942
|
+
* @summary Get the details about a collection using its ID
|
|
1943
|
+
* @request GET:/collections/{collectionId}
|
|
1944
|
+
* @secure
|
|
1945
|
+
*/
|
|
1946
|
+
getCollectionById: (collectionId: string, params?: RequestParams) => Promise<HttpResponse<Collection, Error>>;
|
|
1947
|
+
/**
|
|
1948
|
+
* No description
|
|
1949
|
+
*
|
|
1950
|
+
* @tags collections
|
|
1951
|
+
* @name ListSpacesInCollectionById
|
|
1952
|
+
* @summary List all the spaces in a collection by its ID.
|
|
1953
|
+
* @request GET:/collections/{collectionId}/spaces
|
|
1954
|
+
* @secure
|
|
1955
|
+
*/
|
|
1956
|
+
listSpacesInCollectionById: (collectionId: string, query?: {
|
|
1957
|
+
page?: string;
|
|
1958
|
+
limit?: number;
|
|
1959
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1960
|
+
items: Space[];
|
|
1961
|
+
}, Error>>;
|
|
1962
|
+
/**
|
|
1963
|
+
* No description
|
|
1964
|
+
*
|
|
1965
|
+
* @tags permissions, spaces
|
|
1966
|
+
* @name ListPermissionsAggregateInCollection
|
|
1967
|
+
* @summary List permissions for all users in a collection.
|
|
1968
|
+
* @request GET:/collections/{collectionId}/permissions/aggregate
|
|
1969
|
+
* @secure
|
|
1970
|
+
*/
|
|
1971
|
+
listPermissionsAggregateInCollection: (collectionId: string, query?: {
|
|
1972
|
+
page?: string;
|
|
1973
|
+
limit?: number;
|
|
1974
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1975
|
+
items: UserContentPermission[];
|
|
1976
|
+
}, Error>>;
|
|
288
1977
|
};
|
|
289
1978
|
integrations: {
|
|
290
1979
|
/**
|
|
291
1980
|
* No description
|
|
292
1981
|
*
|
|
293
|
-
* @
|
|
1982
|
+
* @tags integrations
|
|
1983
|
+
* @name ListIntegrations
|
|
1984
|
+
* @summary List all public integrations
|
|
1985
|
+
* @request GET:/integrations
|
|
1986
|
+
* @secure
|
|
1987
|
+
*/
|
|
1988
|
+
listIntegrations: (query?: {
|
|
1989
|
+
page?: string;
|
|
1990
|
+
limit?: number;
|
|
1991
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
1992
|
+
items: Integration[];
|
|
1993
|
+
}, Error>>;
|
|
1994
|
+
/**
|
|
1995
|
+
* No description
|
|
1996
|
+
*
|
|
1997
|
+
* @tags integrations
|
|
1998
|
+
* @name GetIntegrationByName
|
|
1999
|
+
* @summary Get a specific integration by its name
|
|
2000
|
+
* @request GET:/integrations/{integrationName}
|
|
2001
|
+
* @secure
|
|
2002
|
+
*/
|
|
2003
|
+
getIntegrationByName: (integrationName: string, params?: RequestParams) => Promise<HttpResponse<Integration, Error | {
|
|
2004
|
+
error: {
|
|
2005
|
+
code: 404;
|
|
2006
|
+
message: string;
|
|
2007
|
+
};
|
|
2008
|
+
}>>;
|
|
2009
|
+
/**
|
|
2010
|
+
* No description
|
|
2011
|
+
*
|
|
2012
|
+
* @tags integrations
|
|
2013
|
+
* @name PublishIntegration
|
|
294
2014
|
* @summary Publish an integration
|
|
295
2015
|
* @request POST:/integrations/{integrationName}
|
|
296
2016
|
* @secure
|
|
297
2017
|
*/
|
|
298
|
-
|
|
2018
|
+
publishIntegration: (integrationName: string, data: RequestPublishIntegration, params?: RequestParams) => Promise<HttpResponse<Integration, Error | {
|
|
2019
|
+
error: {
|
|
2020
|
+
code: 404;
|
|
2021
|
+
message: string;
|
|
2022
|
+
};
|
|
2023
|
+
}>>;
|
|
2024
|
+
/**
|
|
2025
|
+
* No description
|
|
2026
|
+
*
|
|
2027
|
+
* @tags integrations
|
|
2028
|
+
* @name UnpublishIntegration
|
|
2029
|
+
* @summary Unpublish an integration
|
|
2030
|
+
* @request DELETE:/integrations/{integrationName}
|
|
2031
|
+
* @secure
|
|
2032
|
+
*/
|
|
2033
|
+
unpublishIntegration: (integrationName: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2034
|
+
/**
|
|
2035
|
+
* No description
|
|
2036
|
+
*
|
|
2037
|
+
* @tags integrations
|
|
2038
|
+
* @name ListIntegrationInstallations
|
|
2039
|
+
* @summary Fetch a list of installations of an integration
|
|
2040
|
+
* @request GET:/integrations/{integrationName}/installations
|
|
2041
|
+
* @secure
|
|
2042
|
+
*/
|
|
2043
|
+
listIntegrationInstallations: (integrationName: string, query?: {
|
|
2044
|
+
page?: string;
|
|
2045
|
+
limit?: number;
|
|
2046
|
+
externalId?: string;
|
|
2047
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2048
|
+
items: IntegrationInstallation[];
|
|
2049
|
+
}, Error>>;
|
|
2050
|
+
/**
|
|
2051
|
+
* No description
|
|
2052
|
+
*
|
|
2053
|
+
* @tags integrations
|
|
2054
|
+
* @name ListIntegrationSpaceInstallations
|
|
2055
|
+
* @summary Fetch a list of space installations of an integration
|
|
2056
|
+
* @request GET:/integrations/{integrationName}/spaces
|
|
2057
|
+
* @secure
|
|
2058
|
+
*/
|
|
2059
|
+
listIntegrationSpaceInstallations: (integrationName: string, query?: {
|
|
2060
|
+
page?: string;
|
|
2061
|
+
limit?: number;
|
|
2062
|
+
externalId?: string;
|
|
2063
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2064
|
+
items: IntegrationSpaceInstallation[];
|
|
2065
|
+
}, Error>>;
|
|
2066
|
+
/**
|
|
2067
|
+
* No description
|
|
2068
|
+
*
|
|
2069
|
+
* @name RenderIntegrationUiWithGet
|
|
2070
|
+
* @summary Render an integration UI in the context of an installation.
|
|
2071
|
+
* @request GET:/integrations/{integrationName}/render
|
|
2072
|
+
* @secure
|
|
2073
|
+
*/
|
|
2074
|
+
renderIntegrationUiWithGet: (integrationName: string, query: {
|
|
2075
|
+
request: string;
|
|
2076
|
+
}, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, Error>>;
|
|
299
2077
|
/**
|
|
300
2078
|
* No description
|
|
301
2079
|
*
|
|
302
|
-
* @name
|
|
303
|
-
* @summary
|
|
304
|
-
* @request
|
|
2080
|
+
* @name RenderIntegrationUiWithPost
|
|
2081
|
+
* @summary Render an integration UI in the context of an installation.
|
|
2082
|
+
* @request POST:/integrations/{integrationName}/render
|
|
305
2083
|
* @secure
|
|
306
2084
|
*/
|
|
307
|
-
|
|
2085
|
+
renderIntegrationUiWithPost: (integrationName: string, data: RequestRenderIntegrationUI, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, Error>>;
|
|
308
2086
|
/**
|
|
309
2087
|
* No description
|
|
310
2088
|
*
|
|
311
|
-
* @
|
|
312
|
-
* @
|
|
2089
|
+
* @tags integrations
|
|
2090
|
+
* @name UpdateIntegrationInstallation
|
|
2091
|
+
* @summary Update external IDs and configurations of an integration's installation
|
|
313
2092
|
* @request PATCH:/integrations/{integrationName}/installations/{installationId}
|
|
314
2093
|
* @secure
|
|
315
2094
|
*/
|
|
316
|
-
|
|
2095
|
+
updateIntegrationInstallation: (integrationName: string, installationId: string, data: RequestUpdateIntegrationInstallation, params?: RequestParams) => Promise<HttpResponse<IntegrationInstallation, Error>>;
|
|
2096
|
+
/**
|
|
2097
|
+
* @description Creates a temporary API token of an integration's installation that has access to the installation and it's scopes. You must be authenticated as the integration to obtain this token.
|
|
2098
|
+
*
|
|
2099
|
+
* @tags integrations
|
|
2100
|
+
* @name CreateIntegrationInstallationToken
|
|
2101
|
+
* @summary Create an integration installation API token
|
|
2102
|
+
* @request POST:/integrations/{integrationName}/installations/{installationId}/tokens
|
|
2103
|
+
* @secure
|
|
2104
|
+
*/
|
|
2105
|
+
createIntegrationInstallationToken: (integrationName: string, installationId: string, params?: RequestParams) => Promise<HttpResponse<APITemporaryToken, Error | {
|
|
2106
|
+
error: {
|
|
2107
|
+
code: 404;
|
|
2108
|
+
message: string;
|
|
2109
|
+
};
|
|
2110
|
+
}>>;
|
|
2111
|
+
/**
|
|
2112
|
+
* No description
|
|
2113
|
+
*
|
|
2114
|
+
* @name UpdateIntegrationSpaceInstallation
|
|
2115
|
+
* @summary Update external IDs and configurations of an integration's installation for a space
|
|
2116
|
+
* @request PATCH:/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}
|
|
2117
|
+
* @secure
|
|
2118
|
+
*/
|
|
2119
|
+
updateIntegrationSpaceInstallation: (integrationName: string, installationId: string, spaceId: string, data: RequestUpdateIntegrationInstallation, params?: RequestParams) => Promise<HttpResponse<IntegrationSpaceInstallation, Error>>;
|
|
2120
|
+
};
|
|
2121
|
+
orgs: {
|
|
2122
|
+
/**
|
|
2123
|
+
* No description
|
|
2124
|
+
*
|
|
2125
|
+
* @tags organizations
|
|
2126
|
+
* @name ListOrganizationsForAuthenticatedUser
|
|
2127
|
+
* @summary Get the list of organizations for the currently authenticated user
|
|
2128
|
+
* @request GET:/orgs
|
|
2129
|
+
* @secure
|
|
2130
|
+
*/
|
|
2131
|
+
listOrganizationsForAuthenticatedUser: (query?: {
|
|
2132
|
+
page?: string;
|
|
2133
|
+
limit?: number;
|
|
2134
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2135
|
+
items: Organization[];
|
|
2136
|
+
}, Error>>;
|
|
2137
|
+
/**
|
|
2138
|
+
* @description Lists members for the specified organization.
|
|
2139
|
+
*
|
|
2140
|
+
* @tags organizations
|
|
2141
|
+
* @name ListMembersInOrganizationById
|
|
2142
|
+
* @summary List organization members
|
|
2143
|
+
* @request GET:/orgs/{organizationId}/members
|
|
2144
|
+
* @secure
|
|
2145
|
+
*/
|
|
2146
|
+
listMembersInOrganizationById: (organizationId: string, query?: {
|
|
2147
|
+
page?: string;
|
|
2148
|
+
limit?: number;
|
|
2149
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2150
|
+
items: OrganizationMember[];
|
|
2151
|
+
}, Error>>;
|
|
2152
|
+
/**
|
|
2153
|
+
* @description Gets a specific member in an organization.
|
|
2154
|
+
*
|
|
2155
|
+
* @tags organizations
|
|
2156
|
+
* @name GetMemberInOrganizationById
|
|
2157
|
+
* @summary Get specified organization member
|
|
2158
|
+
* @request GET:/orgs/{organizationId}/members/{userId}
|
|
2159
|
+
* @secure
|
|
2160
|
+
*/
|
|
2161
|
+
getMemberInOrganizationById: (organizationId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationMember, Error>>;
|
|
2162
|
+
/**
|
|
2163
|
+
* @description Updates a specific member in an organization.
|
|
2164
|
+
*
|
|
2165
|
+
* @tags organizations
|
|
2166
|
+
* @name UpdateMemberInOrganizationById
|
|
2167
|
+
* @summary Update specified organization member
|
|
2168
|
+
* @request PATCH:/orgs/{organizationId}/members/{userId}
|
|
2169
|
+
* @secure
|
|
2170
|
+
*/
|
|
2171
|
+
updateMemberInOrganizationById: (organizationId: string, userId: string, data: {
|
|
2172
|
+
role?: MemberRoleOrGuest;
|
|
2173
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationMember, Error>>;
|
|
2174
|
+
/**
|
|
2175
|
+
* @description Deletes a specific member from an organization
|
|
2176
|
+
*
|
|
2177
|
+
* @tags organizations
|
|
2178
|
+
* @name RemoveMemberFromOrganizationById
|
|
2179
|
+
* @summary Delete a member from an organization
|
|
2180
|
+
* @request DELETE:/orgs/{organizationId}/members/{userId}
|
|
2181
|
+
* @secure
|
|
2182
|
+
*/
|
|
2183
|
+
removeMemberFromOrganizationById: (organizationId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2184
|
+
/**
|
|
2185
|
+
* No description
|
|
2186
|
+
*
|
|
2187
|
+
* @tags organizations
|
|
2188
|
+
* @name SetUserAsSsoMemberForOrganization
|
|
2189
|
+
* @summary Set a user as an SSO member of an organization
|
|
2190
|
+
* @request POST:/orgs/{organizationId}/members/{userId}/sso
|
|
2191
|
+
* @secure
|
|
2192
|
+
*/
|
|
2193
|
+
setUserAsSsoMemberForOrganization: (organizationId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2194
|
+
/**
|
|
2195
|
+
* @description Lists teams for the specified organization.
|
|
2196
|
+
*
|
|
2197
|
+
* @tags organizations
|
|
2198
|
+
* @name ListTeamsInOrganizationById
|
|
2199
|
+
* @summary List organization teams
|
|
2200
|
+
* @request GET:/orgs/{organizationId}/teams
|
|
2201
|
+
* @secure
|
|
2202
|
+
*/
|
|
2203
|
+
listTeamsInOrganizationById: (organizationId: string, query?: {
|
|
2204
|
+
page?: string;
|
|
2205
|
+
limit?: number;
|
|
2206
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2207
|
+
items: OrganizationTeam[];
|
|
2208
|
+
}, Error>>;
|
|
2209
|
+
/**
|
|
2210
|
+
* @description Creates a team in the specified organization.
|
|
2211
|
+
*
|
|
2212
|
+
* @tags organizations
|
|
2213
|
+
* @name CreateOrganizationTeam
|
|
2214
|
+
* @summary Create organization team
|
|
2215
|
+
* @request PUT:/orgs/{organizationId}/teams
|
|
2216
|
+
* @secure
|
|
2217
|
+
*/
|
|
2218
|
+
createOrganizationTeam: (organizationId: string, data: {
|
|
2219
|
+
title: string;
|
|
2220
|
+
members?: string[];
|
|
2221
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
2222
|
+
/**
|
|
2223
|
+
* @description Gets a specific team in an organization.
|
|
2224
|
+
*
|
|
2225
|
+
* @tags organizations
|
|
2226
|
+
* @name GetTeamInOrganizationById
|
|
2227
|
+
* @summary Get specified organization team
|
|
2228
|
+
* @request GET:/orgs/{organizationId}/teams/{teamId}
|
|
2229
|
+
* @secure
|
|
2230
|
+
*/
|
|
2231
|
+
getTeamInOrganizationById: (organizationId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
2232
|
+
/**
|
|
2233
|
+
* @description Updates a specific team in an organization.
|
|
2234
|
+
*
|
|
2235
|
+
* @tags organizations
|
|
2236
|
+
* @name UpdateTeamInOrganizationById
|
|
2237
|
+
* @summary Update specified organization team
|
|
2238
|
+
* @request PATCH:/orgs/{organizationId}/teams/{teamId}
|
|
2239
|
+
* @secure
|
|
2240
|
+
*/
|
|
2241
|
+
updateTeamInOrganizationById: (organizationId: string, teamId: string, data: {
|
|
2242
|
+
title?: string;
|
|
2243
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
2244
|
+
/**
|
|
2245
|
+
* @description Deletes a specific team in an organization
|
|
2246
|
+
*
|
|
2247
|
+
* @tags organizations
|
|
2248
|
+
* @name RemoveTeamFromOrganizationById
|
|
2249
|
+
* @summary Delete a team in an organization
|
|
2250
|
+
* @request DELETE:/orgs/{organizationId}/teams/{teamId}
|
|
2251
|
+
* @secure
|
|
2252
|
+
*/
|
|
2253
|
+
removeTeamFromOrganizationById: (organizationId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2254
|
+
/**
|
|
2255
|
+
* @description Updates members of an organization team, either adding or removing them. If a the same user is included as both an add and a remove, they will be removed from the team.
|
|
2256
|
+
*
|
|
2257
|
+
* @tags organizations
|
|
2258
|
+
* @name UpdateMembersInOrganizationTeam
|
|
2259
|
+
* @summary Updates members of an organization team
|
|
2260
|
+
* @request PUT:/orgs/{organizationId}/teams/{teamId}/members
|
|
2261
|
+
* @secure
|
|
2262
|
+
*/
|
|
2263
|
+
updateMembersInOrganizationTeam: (organizationId: string, teamId: string, data: {
|
|
2264
|
+
add?: string[];
|
|
2265
|
+
remove?: string[];
|
|
2266
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2267
|
+
/**
|
|
2268
|
+
* @description Lists members for the specified organization team.
|
|
2269
|
+
*
|
|
2270
|
+
* @tags organizations
|
|
2271
|
+
* @name ListTeamMembersInOrganizationById
|
|
2272
|
+
* @summary List team members
|
|
2273
|
+
* @request GET:/orgs/{organizationId}/teams/{teamId}/members
|
|
2274
|
+
* @secure
|
|
2275
|
+
*/
|
|
2276
|
+
listTeamMembersInOrganizationById: (organizationId: string, teamId: string, query?: {
|
|
2277
|
+
page?: string;
|
|
2278
|
+
limit?: number;
|
|
2279
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2280
|
+
items: OrganizationMember[];
|
|
2281
|
+
}, Error>>;
|
|
2282
|
+
/**
|
|
2283
|
+
* @description Adds member into the specified organization team.
|
|
2284
|
+
*
|
|
2285
|
+
* @tags organizations
|
|
2286
|
+
* @name AddMemberToOrganizationTeamById
|
|
2287
|
+
* @summary Add member to a team
|
|
2288
|
+
* @request PUT:/orgs/{organizationId}/teams/{teamId}/members/{userId}
|
|
2289
|
+
* @secure
|
|
2290
|
+
*/
|
|
2291
|
+
addMemberToOrganizationTeamById: (organizationId: string, teamId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2292
|
+
/**
|
|
2293
|
+
* @description Deletes member from the specified organization team.
|
|
2294
|
+
*
|
|
2295
|
+
* @tags organizations
|
|
2296
|
+
* @name DeleteMemberFromOrganizationTeamById
|
|
2297
|
+
* @summary Delete members from a team
|
|
2298
|
+
* @request DELETE:/orgs/{organizationId}/teams/{teamId}/members/{userId}
|
|
2299
|
+
* @secure
|
|
2300
|
+
*/
|
|
2301
|
+
deleteMemberFromOrganizationTeamById: (organizationId: string, teamId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
2302
|
+
/**
|
|
2303
|
+
* No description
|
|
2304
|
+
*
|
|
2305
|
+
* @tags organizations
|
|
2306
|
+
* @name InviteUsersToOrganization
|
|
2307
|
+
* @summary Invite users to a given organization based on a list of emails
|
|
2308
|
+
* @request POST:/orgs/{organizationId}/invites
|
|
2309
|
+
* @secure
|
|
2310
|
+
*/
|
|
2311
|
+
inviteUsersToOrganization: (organizationId: string, data: RequestInviteUsersToOrganization, params?: RequestParams) => Promise<HttpResponse<{
|
|
2312
|
+
users: string[];
|
|
2313
|
+
invited: number;
|
|
2314
|
+
failedSSOEmails?: string[];
|
|
2315
|
+
}, Error | {
|
|
2316
|
+
error: {
|
|
2317
|
+
code: 400;
|
|
2318
|
+
message: string;
|
|
2319
|
+
};
|
|
2320
|
+
}>>;
|
|
2321
|
+
/**
|
|
2322
|
+
* No description
|
|
2323
|
+
*
|
|
2324
|
+
* @tags organizations
|
|
2325
|
+
* @name JoinOrganizationWithInvite
|
|
2326
|
+
* @summary Use an invite to join an organization.
|
|
2327
|
+
* @request POST:/orgs/{organizationId}/invites/{inviteId}
|
|
2328
|
+
* @secure
|
|
2329
|
+
*/
|
|
2330
|
+
joinOrganizationWithInvite: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<object, Error>>;
|
|
2331
|
+
/**
|
|
2332
|
+
* No description
|
|
2333
|
+
*
|
|
2334
|
+
* @tags organizations
|
|
2335
|
+
* @name UpgradeOrganizationPlan
|
|
2336
|
+
* @summary Upgrade an organization's billing plan
|
|
2337
|
+
* @request POST:/orgs/{organizationId}/billing
|
|
2338
|
+
* @secure
|
|
2339
|
+
*/
|
|
2340
|
+
upgradeOrganizationPlan: (organizationId: string, data: RequestUpgradeOrganizationBilling, params?: RequestParams) => Promise<HttpResponse<BillingUpgrade, Error>>;
|
|
2341
|
+
/**
|
|
2342
|
+
* No description
|
|
2343
|
+
*
|
|
2344
|
+
* @tags organizations
|
|
2345
|
+
* @name GetOrganizationBillingPortal
|
|
2346
|
+
* @summary Get the billing portal for an organization
|
|
2347
|
+
* @request GET:/orgs/{organizationId}/billing
|
|
2348
|
+
* @secure
|
|
2349
|
+
*/
|
|
2350
|
+
getOrganizationBillingPortal: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<BillingPortal, Error>>;
|
|
2351
|
+
/**
|
|
2352
|
+
* No description
|
|
2353
|
+
*
|
|
2354
|
+
* @tags organizations
|
|
2355
|
+
* @name RequestOrganizationUpgrade
|
|
2356
|
+
* @summary Send a request to ask the organization's admin to upgrade it.
|
|
2357
|
+
* @request POST:/orgs/{organizationId}/request_upgrade
|
|
2358
|
+
* @secure
|
|
2359
|
+
*/
|
|
2360
|
+
requestOrganizationUpgrade: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<object, Error>>;
|
|
2361
|
+
/**
|
|
2362
|
+
* No description
|
|
2363
|
+
*
|
|
2364
|
+
* @tags organizations
|
|
2365
|
+
* @name TransferOrganization
|
|
2366
|
+
* @summary Transfer one organization (source) into another organization (target).
|
|
2367
|
+
* @request POST:/orgs/{organizationId}/transfer
|
|
2368
|
+
* @secure
|
|
2369
|
+
*/
|
|
2370
|
+
transferOrganization: (organizationId: string, data: {
|
|
2371
|
+
source: string;
|
|
2372
|
+
defaultOrgRole?: MemberRoleOrGuest | 'saml';
|
|
2373
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
2374
|
+
collection: string;
|
|
2375
|
+
newSourceHostname?: string;
|
|
2376
|
+
}, Error>>;
|
|
2377
|
+
/**
|
|
2378
|
+
* No description
|
|
2379
|
+
*
|
|
2380
|
+
* @tags organizations
|
|
2381
|
+
* @name SearchOrganizationContent
|
|
2382
|
+
* @summary Search content in an organization
|
|
2383
|
+
* @request GET:/orgs/{organizationId}/search
|
|
2384
|
+
* @secure
|
|
2385
|
+
*/
|
|
2386
|
+
searchOrganizationContent: (organizationId: string, query: {
|
|
2387
|
+
query: string;
|
|
2388
|
+
page?: string;
|
|
2389
|
+
limit?: number;
|
|
2390
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2391
|
+
items: SearchSpaceResult[];
|
|
2392
|
+
}, Error>>;
|
|
2393
|
+
/**
|
|
2394
|
+
* @description Lists spaces for the specified organization.
|
|
2395
|
+
*
|
|
2396
|
+
* @tags organizations
|
|
2397
|
+
* @name ListSpacesInOrganizationById
|
|
2398
|
+
* @summary List organization spaces
|
|
2399
|
+
* @request GET:/orgs/{organizationId}/spaces
|
|
2400
|
+
* @secure
|
|
2401
|
+
*/
|
|
2402
|
+
listSpacesInOrganizationById: (organizationId: string, query?: {
|
|
2403
|
+
page?: string;
|
|
2404
|
+
limit?: number;
|
|
2405
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2406
|
+
items: Space[];
|
|
2407
|
+
}, Error>>;
|
|
2408
|
+
/**
|
|
2409
|
+
* @description Lists collections for the specified organization.
|
|
2410
|
+
*
|
|
2411
|
+
* @tags organizations
|
|
2412
|
+
* @name ListCollectionsInOrganizationById
|
|
2413
|
+
* @summary List organization collections
|
|
2414
|
+
* @request GET:/orgs/{organizationId}/collections
|
|
2415
|
+
* @secure
|
|
2416
|
+
*/
|
|
2417
|
+
listCollectionsInOrganizationById: (organizationId: string, query?: {
|
|
2418
|
+
page?: string;
|
|
2419
|
+
limit?: number;
|
|
2420
|
+
nested?: boolean;
|
|
2421
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
2422
|
+
items: Collection[];
|
|
2423
|
+
}, Error>>;
|
|
2424
|
+
/**
|
|
2425
|
+
* No description
|
|
2426
|
+
*
|
|
2427
|
+
* @tags organizations, dsync
|
|
2428
|
+
* @name SetupDirectorySync
|
|
2429
|
+
* @summary Set up Directory Sync in an organization.
|
|
2430
|
+
* @request POST:/orgs/{organizationId}/dsync
|
|
2431
|
+
* @secure
|
|
2432
|
+
*/
|
|
2433
|
+
setupDirectorySync: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
2434
|
+
setupUrl: string;
|
|
2435
|
+
}, Error>>;
|
|
2436
|
+
/**
|
|
2437
|
+
* No description
|
|
2438
|
+
*
|
|
2439
|
+
* @tags organizations, dsync
|
|
2440
|
+
* @name ListDirectorySyncGroups
|
|
2441
|
+
* @summary Lists the groups exposed to the synced Directory on an organization.
|
|
2442
|
+
* @request GET:/orgs/{organizationId}/dsync/groups
|
|
2443
|
+
* @secure
|
|
2444
|
+
*/
|
|
2445
|
+
listDirectorySyncGroups: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
2446
|
+
groups: OrganizationDirectorySyncGroup[];
|
|
2447
|
+
}, Error>>;
|
|
2448
|
+
/**
|
|
2449
|
+
* @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.
|
|
2450
|
+
*
|
|
2451
|
+
* @tags organizations, dsync
|
|
2452
|
+
* @name SyncDirectorySyncGroupsToTeams
|
|
2453
|
+
* @summary Syncs a list of group/team unique identifiers pairs together.
|
|
2454
|
+
* @request POST:/orgs/{organizationId}/dsync/teams
|
|
2455
|
+
* @secure
|
|
2456
|
+
*/
|
|
2457
|
+
syncDirectorySyncGroupsToTeams: (organizationId: string, data: {
|
|
2458
|
+
to_sync: {
|
|
2459
|
+
group_id: string;
|
|
2460
|
+
team_id?: string;
|
|
2461
|
+
}[];
|
|
2462
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
2463
|
+
synced: OrganizationDirectorySyncGroupTeamStatus[];
|
|
2464
|
+
}, Error>>;
|
|
2465
|
+
};
|
|
2466
|
+
urls: {
|
|
2467
|
+
/**
|
|
2468
|
+
* No description
|
|
2469
|
+
*
|
|
2470
|
+
* @tags urls
|
|
2471
|
+
* @name GetContentByUrl
|
|
2472
|
+
* @summary Resolve a URL to a content (space, collection, page)
|
|
2473
|
+
* @request GET:/urls/content
|
|
2474
|
+
* @secure
|
|
2475
|
+
*/
|
|
2476
|
+
getContentByUrl: (query: {
|
|
2477
|
+
url: string;
|
|
2478
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
2479
|
+
collection: Collection;
|
|
2480
|
+
} | {
|
|
2481
|
+
space: Space;
|
|
2482
|
+
changeRequest?: ChangeRequest;
|
|
2483
|
+
page?: RevisionPageSheet | RevisionPageGroup;
|
|
2484
|
+
}, Error>>;
|
|
317
2485
|
};
|
|
318
2486
|
}
|
|
319
2487
|
export {};
|