@gitbook/api 0.7.0 → 0.9.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 +172 -66
- package/dist/index.cjs +51 -13
- package/dist/index.js +49 -12
- package/package.json +1 -1
- package/spec/openapi.json +504 -105
- package/spec/openapi.yaml +335 -91
package/dist/client.d.ts
CHANGED
|
@@ -264,6 +264,28 @@ export interface User {
|
|
|
264
264
|
email?: string;
|
|
265
265
|
/** URL of the user's profile picture */
|
|
266
266
|
photoURL?: string;
|
|
267
|
+
/** URLs associated with the object */
|
|
268
|
+
urls: {
|
|
269
|
+
location?: string;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
export interface UserPreferences {
|
|
273
|
+
/** Type of Object, always equals to "user-preferences" */
|
|
274
|
+
object: 'user-preferences';
|
|
275
|
+
/** Preferred theme for the application */
|
|
276
|
+
theme: UserPreferencesTheme;
|
|
277
|
+
/** URLs associated with the object */
|
|
278
|
+
urls: {
|
|
279
|
+
location?: string;
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Preferred theme for the application
|
|
284
|
+
*/
|
|
285
|
+
export declare enum UserPreferencesTheme {
|
|
286
|
+
Light = "light",
|
|
287
|
+
Dark = "dark",
|
|
288
|
+
Default = "default"
|
|
267
289
|
}
|
|
268
290
|
/**
|
|
269
291
|
* The API token details, excluding the token itself.
|
|
@@ -759,18 +781,16 @@ export declare enum TeamMemberRole {
|
|
|
759
781
|
Admin = "admin",
|
|
760
782
|
Participant = "participant"
|
|
761
783
|
}
|
|
762
|
-
export interface
|
|
763
|
-
/**
|
|
764
|
-
object: 'recording';
|
|
765
|
-
/** Unique identifier for the recording */
|
|
784
|
+
export interface Capture {
|
|
785
|
+
/** Unique identifier for the capture */
|
|
766
786
|
id: string;
|
|
767
|
-
/** Optional title describing the
|
|
768
|
-
title:
|
|
769
|
-
context:
|
|
770
|
-
/** ID in the original source of the
|
|
787
|
+
/** Optional title describing the capture */
|
|
788
|
+
title: CaptureTitle;
|
|
789
|
+
context: CaptureContext;
|
|
790
|
+
/** ID in the original source of the capture. */
|
|
771
791
|
externalId?: string;
|
|
772
792
|
/**
|
|
773
|
-
* URL of the source from which the
|
|
793
|
+
* URL of the source from which the capture originated
|
|
774
794
|
* @format uri
|
|
775
795
|
*/
|
|
776
796
|
externalURL?: string;
|
|
@@ -782,31 +802,23 @@ export interface Recording {
|
|
|
782
802
|
events: {
|
|
783
803
|
'terminal.command'?: number;
|
|
784
804
|
speech?: number;
|
|
805
|
+
'thread.message'?: number;
|
|
785
806
|
};
|
|
786
807
|
contributors: (Integration | User)[];
|
|
787
|
-
/** Output document for the
|
|
788
|
-
output?:
|
|
808
|
+
/** Output document for the capture. Is not set when capture is not finished. */
|
|
809
|
+
output?: Document;
|
|
789
810
|
/** URLs associated with the object */
|
|
790
811
|
urls: {
|
|
791
812
|
location: string;
|
|
792
813
|
};
|
|
793
814
|
}
|
|
794
815
|
/**
|
|
795
|
-
* Optional title describing the
|
|
816
|
+
* Optional title describing the capture
|
|
796
817
|
*/
|
|
797
|
-
export declare type
|
|
798
|
-
export
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
* @format uri
|
|
802
|
-
*/
|
|
803
|
-
url: string;
|
|
804
|
-
space: Space;
|
|
805
|
-
page: RevisionPageDocument;
|
|
806
|
-
}
|
|
807
|
-
export declare type RecordingEvent = RecordingTerminalCommandEvent | RecordingSpeechEvent;
|
|
808
|
-
export declare type RecordingContext = 'meeting' | 'conversation' | 'walkthrough';
|
|
809
|
-
export interface BaseRecordingEvent {
|
|
818
|
+
export declare type CaptureTitle = string;
|
|
819
|
+
export declare type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
|
|
820
|
+
export declare type CaptureContext = 'meeting' | 'thread' | 'walkthrough';
|
|
821
|
+
export interface BaseCaptureEvent {
|
|
810
822
|
/** The type of event */
|
|
811
823
|
type: string;
|
|
812
824
|
/**
|
|
@@ -816,23 +828,43 @@ export interface BaseRecordingEvent {
|
|
|
816
828
|
timestamp: string;
|
|
817
829
|
/** Optionally, provide the source of the event. GitBook may use this to improve the generated content. */
|
|
818
830
|
source?: string;
|
|
819
|
-
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the
|
|
831
|
+
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
|
|
820
832
|
actor?: {
|
|
821
833
|
name: string;
|
|
822
834
|
};
|
|
823
835
|
}
|
|
824
|
-
export declare type
|
|
836
|
+
export declare type CaptureSpeechEvent = BaseCaptureEvent & {
|
|
825
837
|
type: 'speech';
|
|
826
838
|
} & ({
|
|
827
839
|
audio: string;
|
|
828
840
|
} | {
|
|
829
841
|
transcript: string;
|
|
830
842
|
});
|
|
831
|
-
export declare type
|
|
843
|
+
export declare type CaptureTerminalCommandEvent = BaseCaptureEvent & {
|
|
832
844
|
type: 'terminal.command';
|
|
833
845
|
command: string;
|
|
834
846
|
stdout: string;
|
|
835
847
|
};
|
|
848
|
+
export declare type CaptureThreadMessageEvent = BaseCaptureEvent & {
|
|
849
|
+
type: 'thread.message';
|
|
850
|
+
isFirst?: boolean;
|
|
851
|
+
text: string;
|
|
852
|
+
};
|
|
853
|
+
export declare type CaptureFileAddedEvent = BaseCaptureEvent & {
|
|
854
|
+
type: 'file.added';
|
|
855
|
+
filename: string;
|
|
856
|
+
fileSnapshot: string;
|
|
857
|
+
};
|
|
858
|
+
export declare type CaptureFileChangedEvent = BaseCaptureEvent & {
|
|
859
|
+
type: 'file.changed';
|
|
860
|
+
filename: string;
|
|
861
|
+
fileDiff: string;
|
|
862
|
+
};
|
|
863
|
+
export declare type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
864
|
+
type: 'file.removed';
|
|
865
|
+
filename: string;
|
|
866
|
+
fileSnapshot: string;
|
|
867
|
+
};
|
|
836
868
|
export interface ChangeRequest {
|
|
837
869
|
/** Type of Object, always equals to "change-request" */
|
|
838
870
|
object: 'change-request';
|
|
@@ -1157,7 +1189,7 @@ export declare type IntegrationSummary = string;
|
|
|
1157
1189
|
export declare type IntegrationScopes = IntegrationScope[];
|
|
1158
1190
|
export declare enum IntegrationScope {
|
|
1159
1191
|
EntitiesWrite = "entities:write",
|
|
1160
|
-
|
|
1192
|
+
CaptureWrite = "capture:write",
|
|
1161
1193
|
SpaceViewsRead = "space:views:read",
|
|
1162
1194
|
SpaceContentRead = "space:content:read",
|
|
1163
1195
|
SpaceContentWrite = "space:content:write",
|
|
@@ -1238,6 +1270,7 @@ export declare enum IntegrationCategory {
|
|
|
1238
1270
|
Collaboration = "collaboration",
|
|
1239
1271
|
Marketing = "marketing",
|
|
1240
1272
|
Content = "content",
|
|
1273
|
+
Gitsync = "gitsync",
|
|
1241
1274
|
Other = "other"
|
|
1242
1275
|
}
|
|
1243
1276
|
export interface IntegrationConfigurations {
|
|
@@ -1342,6 +1375,8 @@ export interface IntegrationEnvironment {
|
|
|
1342
1375
|
spaceInstallation?: IntegrationSpaceInstallation;
|
|
1343
1376
|
/** Secrets stored on the integration and passed at runtime. */
|
|
1344
1377
|
secrets: IntegrationSecrets;
|
|
1378
|
+
/** Secret that can be used to verify the authenticity of incoming HTTP requests to the integration. */
|
|
1379
|
+
signingSecret?: string;
|
|
1345
1380
|
/** URL of the HTTP API */
|
|
1346
1381
|
apiEndpoint: string;
|
|
1347
1382
|
apiTokens: {
|
|
@@ -1487,7 +1522,7 @@ export declare type EntityPropertySchema = {
|
|
|
1487
1522
|
/**
|
|
1488
1523
|
* Any event that can be received from GitBook.
|
|
1489
1524
|
*/
|
|
1490
|
-
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | UIRenderEvent;
|
|
1525
|
+
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SpaceViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | UIRenderEvent;
|
|
1491
1526
|
/**
|
|
1492
1527
|
* Common properties for all events.
|
|
1493
1528
|
*/
|
|
@@ -1531,6 +1566,15 @@ export declare type SpaceInstallationSetupEvent = SpaceEvent & {
|
|
|
1531
1566
|
configuration?: object;
|
|
1532
1567
|
};
|
|
1533
1568
|
};
|
|
1569
|
+
/**
|
|
1570
|
+
* Event received when integration has been uninstalled from a space.
|
|
1571
|
+
*/
|
|
1572
|
+
export declare type SpaceInstallationDeletedEvent = SpaceEvent & {
|
|
1573
|
+
type: 'space_installation_deleted';
|
|
1574
|
+
previous: {
|
|
1575
|
+
configuration?: object;
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1534
1578
|
/**
|
|
1535
1579
|
* Event received when a page has been visited.
|
|
1536
1580
|
*/
|
|
@@ -2016,7 +2060,8 @@ export declare enum ContentKitIcon {
|
|
|
2016
2060
|
Warning = "warning",
|
|
2017
2061
|
Link = "link",
|
|
2018
2062
|
LinkExternal = "link-external",
|
|
2019
|
-
Eye = "eye"
|
|
2063
|
+
Eye = "eye",
|
|
2064
|
+
Lock = "lock"
|
|
2020
2065
|
}
|
|
2021
2066
|
/**
|
|
2022
2067
|
* Overlay modal.
|
|
@@ -2120,7 +2165,7 @@ export interface ContentKitInput {
|
|
|
2120
2165
|
/** Text label displayed next to the input. */
|
|
2121
2166
|
label: string;
|
|
2122
2167
|
hint?: string | ContentKitInlineElement;
|
|
2123
|
-
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton;
|
|
2168
|
+
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton | ContentKitCodeBlock;
|
|
2124
2169
|
}
|
|
2125
2170
|
/**
|
|
2126
2171
|
* An individual option in a select element
|
|
@@ -2227,7 +2272,7 @@ export interface ContentKitURL {
|
|
|
2227
2272
|
/**
|
|
2228
2273
|
* Channel to subscribe to for API updates.
|
|
2229
2274
|
*/
|
|
2230
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceRelationsChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | OrganizationEnvironmentsChannel | UserAPITokensChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpaceRelationsChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel |
|
|
2275
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceRelationsChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | OrganizationEnvironmentsChannel | UserAPITokensChannel | UserPreferencesChannel | UserProfileChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpaceRelationsChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | {
|
|
2231
2276
|
channel: 'space-comments';
|
|
2232
2277
|
space: string;
|
|
2233
2278
|
changeRequest?: string;
|
|
@@ -2284,6 +2329,14 @@ export interface UserAPITokensChannel {
|
|
|
2284
2329
|
channel: 'user-api-tokens';
|
|
2285
2330
|
user: string;
|
|
2286
2331
|
}
|
|
2332
|
+
export interface UserPreferencesChannel {
|
|
2333
|
+
channel: 'user-preferences';
|
|
2334
|
+
user: string;
|
|
2335
|
+
}
|
|
2336
|
+
export interface UserProfileChannel {
|
|
2337
|
+
channel: 'user-profile';
|
|
2338
|
+
user: string;
|
|
2339
|
+
}
|
|
2287
2340
|
export interface ChangeRequestReviewsChannel {
|
|
2288
2341
|
channel: 'space-change-request-reviews';
|
|
2289
2342
|
space: string;
|
|
@@ -2355,8 +2408,8 @@ export interface OrganizationEnvironmentsChannel {
|
|
|
2355
2408
|
channel: 'organization-environments';
|
|
2356
2409
|
organization: string;
|
|
2357
2410
|
}
|
|
2358
|
-
export interface
|
|
2359
|
-
channel: 'organization-
|
|
2411
|
+
export interface OrganizationCapturesChannel {
|
|
2412
|
+
channel: 'organization-captures';
|
|
2360
2413
|
organization: string;
|
|
2361
2414
|
}
|
|
2362
2415
|
/**
|
|
@@ -2368,6 +2421,8 @@ export interface CustomField {
|
|
|
2368
2421
|
title: CustomFieldTitle;
|
|
2369
2422
|
description: CustomFieldDescription;
|
|
2370
2423
|
type: CustomFieldType;
|
|
2424
|
+
placeholder: CustomFieldPlaceholder;
|
|
2425
|
+
options?: CustomFieldOptions;
|
|
2371
2426
|
createdAt: Date;
|
|
2372
2427
|
updatedAt: Date;
|
|
2373
2428
|
/** URLs associated with the object */
|
|
@@ -2376,7 +2431,7 @@ export interface CustomField {
|
|
|
2376
2431
|
};
|
|
2377
2432
|
}
|
|
2378
2433
|
/**
|
|
2379
|
-
* @pattern ^[a-
|
|
2434
|
+
* @pattern ^[a-z_\-0-9]+$
|
|
2380
2435
|
*/
|
|
2381
2436
|
export declare type CustomFieldName = string;
|
|
2382
2437
|
export declare type CustomFieldTitle = string;
|
|
@@ -2385,7 +2440,9 @@ export declare enum CustomFieldType {
|
|
|
2385
2440
|
Text = "text",
|
|
2386
2441
|
Number = "number",
|
|
2387
2442
|
Boolean = "boolean",
|
|
2388
|
-
Tags = "tags"
|
|
2443
|
+
Tags = "tags",
|
|
2444
|
+
SelectMulti = "select:multi",
|
|
2445
|
+
SelectSingle = "select:single"
|
|
2389
2446
|
}
|
|
2390
2447
|
export declare type CustomFieldValue = string | number | boolean | string[];
|
|
2391
2448
|
export declare type CustomFieldValues = {
|
|
@@ -2397,6 +2454,8 @@ export interface UpdateCustomFieldValues {
|
|
|
2397
2454
|
value: CustomFieldValue;
|
|
2398
2455
|
}>;
|
|
2399
2456
|
}
|
|
2457
|
+
export declare type CustomFieldOptions = string[];
|
|
2458
|
+
export declare type CustomFieldPlaceholder = string;
|
|
2400
2459
|
/**
|
|
2401
2460
|
* An environment
|
|
2402
2461
|
*/
|
|
@@ -2585,6 +2644,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2585
2644
|
* @secure
|
|
2586
2645
|
*/
|
|
2587
2646
|
getAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<User, Error>>;
|
|
2647
|
+
/**
|
|
2648
|
+
* @description Returns the preferences for the user associated with the authentication provided in the request's authorization header.
|
|
2649
|
+
*
|
|
2650
|
+
* @tags users
|
|
2651
|
+
* @name GetPreferencesForAuthenticatedUser
|
|
2652
|
+
* @summary Get the preferences for the currently authenticated user
|
|
2653
|
+
* @request GET:/user/preferences
|
|
2654
|
+
* @secure
|
|
2655
|
+
*/
|
|
2656
|
+
getPreferencesForAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
|
|
2657
|
+
/**
|
|
2658
|
+
* No description
|
|
2659
|
+
*
|
|
2660
|
+
* @tags users
|
|
2661
|
+
* @name UpdatePreferencesForAuthenticatedUser
|
|
2662
|
+
* @summary Update the preferences for the currently authenticated user
|
|
2663
|
+
* @request PATCH:/user/preferences
|
|
2664
|
+
* @secure
|
|
2665
|
+
*/
|
|
2666
|
+
updatePreferencesForAuthenticatedUser: (data: {
|
|
2667
|
+
theme: UserPreferencesTheme;
|
|
2668
|
+
}, params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
|
|
2588
2669
|
/**
|
|
2589
2670
|
* @description Lists spaces that the authenticated user explicitly own.
|
|
2590
2671
|
*
|
|
@@ -3749,6 +3830,24 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3749
3830
|
* @secure
|
|
3750
3831
|
*/
|
|
3751
3832
|
renderIntegrationUiWithPost: (integrationName: string, data: RequestRenderIntegrationUI, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, Error>>;
|
|
3833
|
+
/**
|
|
3834
|
+
* No description
|
|
3835
|
+
*
|
|
3836
|
+
* @tags integrations
|
|
3837
|
+
* @name QueueIntegrationTask
|
|
3838
|
+
* @summary Queue a task for an integration to be executed later
|
|
3839
|
+
* @request POST:/integrations/{integrationName}/tasks
|
|
3840
|
+
* @secure
|
|
3841
|
+
*/
|
|
3842
|
+
queueIntegrationTask: (integrationName: string, data: {
|
|
3843
|
+
task: object;
|
|
3844
|
+
schedule?: number;
|
|
3845
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, Error | {
|
|
3846
|
+
error: {
|
|
3847
|
+
code: 404;
|
|
3848
|
+
message: string;
|
|
3849
|
+
};
|
|
3850
|
+
}>>;
|
|
3752
3851
|
/**
|
|
3753
3852
|
* No description
|
|
3754
3853
|
*
|
|
@@ -4327,6 +4426,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4327
4426
|
type: CustomFieldType;
|
|
4328
4427
|
title?: CustomFieldTitle;
|
|
4329
4428
|
description?: CustomFieldDescription;
|
|
4429
|
+
placeholder?: CustomFieldPlaceholder;
|
|
4430
|
+
options?: CustomFieldOptions;
|
|
4330
4431
|
}, params?: RequestParams) => Promise<HttpResponse<CustomField, Error>>;
|
|
4331
4432
|
/**
|
|
4332
4433
|
* No description
|
|
@@ -4355,6 +4456,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4355
4456
|
updateOrganizationCustomField: (organizationId: string, fieldName: string, data: {
|
|
4356
4457
|
title?: CustomFieldTitle;
|
|
4357
4458
|
description?: CustomFieldDescription;
|
|
4459
|
+
placeholder?: CustomFieldPlaceholder;
|
|
4460
|
+
options?: CustomFieldOptions;
|
|
4358
4461
|
}, params?: RequestParams) => Promise<HttpResponse<CustomField, Error>>;
|
|
4359
4462
|
/**
|
|
4360
4463
|
* No description
|
|
@@ -4513,7 +4616,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4513
4616
|
*/
|
|
4514
4617
|
upsertSchemaEntities: (organizationId: string, entityType: EntityType, data: {
|
|
4515
4618
|
delete?: boolean | EntityId[];
|
|
4516
|
-
entities
|
|
4619
|
+
entities?: UpsertEntity[];
|
|
4517
4620
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4518
4621
|
/**
|
|
4519
4622
|
* No description
|
|
@@ -4526,70 +4629,73 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4526
4629
|
*/
|
|
4527
4630
|
getEntity: (organizationId: string, entityType: EntityType, entityId: EntityId, params?: RequestParams) => Promise<HttpResponse<Entity, Error>>;
|
|
4528
4631
|
/**
|
|
4529
|
-
* @description List
|
|
4632
|
+
* @description List captures in an organization.
|
|
4530
4633
|
*
|
|
4531
4634
|
* @tags organizations
|
|
4532
|
-
* @name
|
|
4533
|
-
* @summary List
|
|
4534
|
-
* @request GET:/orgs/{organizationId}/
|
|
4635
|
+
* @name ListCaptures
|
|
4636
|
+
* @summary List captures
|
|
4637
|
+
* @request GET:/orgs/{organizationId}/captures
|
|
4535
4638
|
* @secure
|
|
4536
4639
|
*/
|
|
4537
|
-
|
|
4640
|
+
listCaptures: (organizationId: string, query?: {
|
|
4641
|
+
format?: 'document' | 'markdown';
|
|
4538
4642
|
page?: string;
|
|
4539
4643
|
limit?: number;
|
|
4540
4644
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4541
|
-
items:
|
|
4645
|
+
items: Capture[];
|
|
4542
4646
|
}, Error>>;
|
|
4543
4647
|
/**
|
|
4544
4648
|
* No description
|
|
4545
4649
|
*
|
|
4546
4650
|
* @tags organizations
|
|
4547
|
-
* @name
|
|
4548
|
-
* @summary Start a
|
|
4549
|
-
* @request POST:/orgs/{organizationId}/
|
|
4651
|
+
* @name StartCapture
|
|
4652
|
+
* @summary Start a capture
|
|
4653
|
+
* @request POST:/orgs/{organizationId}/captures
|
|
4550
4654
|
* @secure
|
|
4551
4655
|
*/
|
|
4552
|
-
|
|
4553
|
-
title?:
|
|
4554
|
-
context:
|
|
4656
|
+
startCapture: (organizationId: string, data: {
|
|
4657
|
+
title?: CaptureTitle;
|
|
4658
|
+
context: CaptureContext;
|
|
4555
4659
|
externalId?: string;
|
|
4556
4660
|
externalURL?: string;
|
|
4557
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
4661
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4558
4662
|
/**
|
|
4559
4663
|
* No description
|
|
4560
4664
|
*
|
|
4561
4665
|
* @tags organizations
|
|
4562
|
-
* @name
|
|
4563
|
-
* @summary Get a
|
|
4564
|
-
* @request GET:/orgs/{organizationId}/
|
|
4666
|
+
* @name GetCapture
|
|
4667
|
+
* @summary Get a capture by its ID
|
|
4668
|
+
* @request GET:/orgs/{organizationId}/captures/{captureId}
|
|
4565
4669
|
* @secure
|
|
4566
4670
|
*/
|
|
4567
|
-
|
|
4671
|
+
getCapture: (organizationId: string, captureId: string, query?: {
|
|
4672
|
+
format?: 'document' | 'markdown';
|
|
4673
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4568
4674
|
/**
|
|
4569
4675
|
* No description
|
|
4570
4676
|
*
|
|
4571
4677
|
* @tags organizations
|
|
4572
|
-
* @name
|
|
4573
|
-
* @summary Add events to a running
|
|
4574
|
-
* @request POST:/orgs/{organizationId}/
|
|
4678
|
+
* @name AddEventsToCapture
|
|
4679
|
+
* @summary Add events to a running capture
|
|
4680
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/events
|
|
4575
4681
|
* @secure
|
|
4576
4682
|
*/
|
|
4577
|
-
|
|
4578
|
-
events:
|
|
4683
|
+
addEventsToCapture: (organizationId: string, captureId: string, data: {
|
|
4684
|
+
events: CaptureEvent[];
|
|
4579
4685
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4580
4686
|
/**
|
|
4581
4687
|
* No description
|
|
4582
4688
|
*
|
|
4583
4689
|
* @tags organizations
|
|
4584
|
-
* @name
|
|
4585
|
-
* @summary Stop a
|
|
4586
|
-
* @request POST:/orgs/{organizationId}/
|
|
4690
|
+
* @name StopCapture
|
|
4691
|
+
* @summary Stop a capture
|
|
4692
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/stop
|
|
4587
4693
|
* @secure
|
|
4588
4694
|
*/
|
|
4589
|
-
|
|
4590
|
-
|
|
4695
|
+
stopCapture: (organizationId: string, captureId: string, data: object, query?: {
|
|
4696
|
+
format?: 'document' | 'markdown';
|
|
4591
4697
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4592
|
-
|
|
4698
|
+
capture: Capture;
|
|
4593
4699
|
followupQuestions?: string[];
|
|
4594
4700
|
}, Error>>;
|
|
4595
4701
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -51,11 +51,18 @@ __export(src_exports, {
|
|
|
51
51
|
PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
|
|
52
52
|
SpaceRelationType: () => SpaceRelationType,
|
|
53
53
|
SpaceType: () => SpaceType,
|
|
54
|
-
TeamMemberRole: () => TeamMemberRole
|
|
54
|
+
TeamMemberRole: () => TeamMemberRole,
|
|
55
|
+
UserPreferencesTheme: () => UserPreferencesTheme
|
|
55
56
|
});
|
|
56
57
|
module.exports = __toCommonJS(src_exports);
|
|
57
58
|
|
|
58
59
|
// src/client.ts
|
|
60
|
+
var UserPreferencesTheme = /* @__PURE__ */ ((UserPreferencesTheme2) => {
|
|
61
|
+
UserPreferencesTheme2["Light"] = "light";
|
|
62
|
+
UserPreferencesTheme2["Dark"] = "dark";
|
|
63
|
+
UserPreferencesTheme2["Default"] = "default";
|
|
64
|
+
return UserPreferencesTheme2;
|
|
65
|
+
})(UserPreferencesTheme || {});
|
|
59
66
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
60
67
|
ContentVisibility2["Public"] = "public";
|
|
61
68
|
ContentVisibility2["Unlisted"] = "unlisted";
|
|
@@ -163,7 +170,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
|
|
|
163
170
|
})(AnalyticsTrafficInterval || {});
|
|
164
171
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
165
172
|
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
166
|
-
IntegrationScope2["
|
|
173
|
+
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
167
174
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
168
175
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
169
176
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
@@ -184,6 +191,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
184
191
|
IntegrationCategory2["Collaboration"] = "collaboration";
|
|
185
192
|
IntegrationCategory2["Marketing"] = "marketing";
|
|
186
193
|
IntegrationCategory2["Content"] = "content";
|
|
194
|
+
IntegrationCategory2["Gitsync"] = "gitsync";
|
|
187
195
|
IntegrationCategory2["Other"] = "other";
|
|
188
196
|
return IntegrationCategory2;
|
|
189
197
|
})(IntegrationCategory || {});
|
|
@@ -267,6 +275,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
|
|
|
267
275
|
ContentKitIcon2["Link"] = "link";
|
|
268
276
|
ContentKitIcon2["LinkExternal"] = "link-external";
|
|
269
277
|
ContentKitIcon2["Eye"] = "eye";
|
|
278
|
+
ContentKitIcon2["Lock"] = "lock";
|
|
270
279
|
return ContentKitIcon2;
|
|
271
280
|
})(ContentKitIcon || {});
|
|
272
281
|
var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
@@ -274,6 +283,8 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
|
274
283
|
CustomFieldType2["Number"] = "number";
|
|
275
284
|
CustomFieldType2["Boolean"] = "boolean";
|
|
276
285
|
CustomFieldType2["Tags"] = "tags";
|
|
286
|
+
CustomFieldType2["SelectMulti"] = "select:multi";
|
|
287
|
+
CustomFieldType2["SelectSingle"] = "select:single";
|
|
277
288
|
return CustomFieldType2;
|
|
278
289
|
})(CustomFieldType || {});
|
|
279
290
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
@@ -471,6 +482,22 @@ var Api = class extends HttpClient {
|
|
|
471
482
|
format: "json",
|
|
472
483
|
...params
|
|
473
484
|
}),
|
|
485
|
+
getPreferencesForAuthenticatedUser: (params = {}) => this.request({
|
|
486
|
+
path: `/user/preferences`,
|
|
487
|
+
method: "GET",
|
|
488
|
+
secure: true,
|
|
489
|
+
format: "json",
|
|
490
|
+
...params
|
|
491
|
+
}),
|
|
492
|
+
updatePreferencesForAuthenticatedUser: (data, params = {}) => this.request({
|
|
493
|
+
path: `/user/preferences`,
|
|
494
|
+
method: "PATCH",
|
|
495
|
+
body: data,
|
|
496
|
+
secure: true,
|
|
497
|
+
type: "application/json" /* Json */,
|
|
498
|
+
format: "json",
|
|
499
|
+
...params
|
|
500
|
+
}),
|
|
474
501
|
listSpacesForAuthenticatedUser: (query, params = {}) => this.request({
|
|
475
502
|
path: `/user/spaces`,
|
|
476
503
|
method: "GET",
|
|
@@ -1203,6 +1230,14 @@ var Api = class extends HttpClient {
|
|
|
1203
1230
|
format: "json",
|
|
1204
1231
|
...params
|
|
1205
1232
|
}),
|
|
1233
|
+
queueIntegrationTask: (integrationName, data, params = {}) => this.request({
|
|
1234
|
+
path: `/integrations/${integrationName}/tasks`,
|
|
1235
|
+
method: "POST",
|
|
1236
|
+
body: data,
|
|
1237
|
+
secure: true,
|
|
1238
|
+
type: "application/json" /* Json */,
|
|
1239
|
+
...params
|
|
1240
|
+
}),
|
|
1206
1241
|
getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
|
|
1207
1242
|
path: `/integrations/${integrationName}/installations/${installationId}`,
|
|
1208
1243
|
method: "GET",
|
|
@@ -1669,16 +1704,16 @@ var Api = class extends HttpClient {
|
|
|
1669
1704
|
format: "json",
|
|
1670
1705
|
...params
|
|
1671
1706
|
}),
|
|
1672
|
-
|
|
1673
|
-
path: `/orgs/${organizationId}/
|
|
1707
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1708
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1674
1709
|
method: "GET",
|
|
1675
1710
|
query,
|
|
1676
1711
|
secure: true,
|
|
1677
1712
|
format: "json",
|
|
1678
1713
|
...params
|
|
1679
1714
|
}),
|
|
1680
|
-
|
|
1681
|
-
path: `/orgs/${organizationId}/
|
|
1715
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1716
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1682
1717
|
method: "POST",
|
|
1683
1718
|
body: data,
|
|
1684
1719
|
secure: true,
|
|
@@ -1686,24 +1721,26 @@ var Api = class extends HttpClient {
|
|
|
1686
1721
|
format: "json",
|
|
1687
1722
|
...params
|
|
1688
1723
|
}),
|
|
1689
|
-
|
|
1690
|
-
path: `/orgs/${organizationId}/
|
|
1724
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1725
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1691
1726
|
method: "GET",
|
|
1727
|
+
query,
|
|
1692
1728
|
secure: true,
|
|
1693
1729
|
format: "json",
|
|
1694
1730
|
...params
|
|
1695
1731
|
}),
|
|
1696
|
-
|
|
1697
|
-
path: `/orgs/${organizationId}/
|
|
1732
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1733
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1698
1734
|
method: "POST",
|
|
1699
1735
|
body: data,
|
|
1700
1736
|
secure: true,
|
|
1701
1737
|
type: "application/json" /* Json */,
|
|
1702
1738
|
...params
|
|
1703
1739
|
}),
|
|
1704
|
-
|
|
1705
|
-
path: `/orgs/${organizationId}/
|
|
1740
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1741
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1706
1742
|
method: "POST",
|
|
1743
|
+
query,
|
|
1707
1744
|
body: data,
|
|
1708
1745
|
secure: true,
|
|
1709
1746
|
type: "application/json" /* Json */,
|
|
@@ -1825,5 +1862,6 @@ var GitBookAPI = class extends Api {
|
|
|
1825
1862
|
PurgeCDNCacheContextType,
|
|
1826
1863
|
SpaceRelationType,
|
|
1827
1864
|
SpaceType,
|
|
1828
|
-
TeamMemberRole
|
|
1865
|
+
TeamMemberRole,
|
|
1866
|
+
UserPreferencesTheme
|
|
1829
1867
|
});
|