@gitbook/api 0.8.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 +109 -65
- package/dist/index.cjs +39 -13
- package/dist/index.js +37 -12
- package/package.json +1 -1
- package/spec/openapi.json +251 -111
- package/spec/openapi.yaml +186 -99
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;
|
|
@@ -785,29 +805,20 @@ export interface Recording {
|
|
|
785
805
|
'thread.message'?: number;
|
|
786
806
|
};
|
|
787
807
|
contributors: (Integration | User)[];
|
|
788
|
-
/** Output document for the
|
|
789
|
-
output?:
|
|
808
|
+
/** Output document for the capture. Is not set when capture is not finished. */
|
|
809
|
+
output?: Document;
|
|
790
810
|
/** URLs associated with the object */
|
|
791
811
|
urls: {
|
|
792
812
|
location: string;
|
|
793
813
|
};
|
|
794
814
|
}
|
|
795
815
|
/**
|
|
796
|
-
* Optional title describing the
|
|
816
|
+
* Optional title describing the capture
|
|
797
817
|
*/
|
|
798
|
-
export declare type
|
|
799
|
-
export
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
* @format uri
|
|
803
|
-
*/
|
|
804
|
-
url: string;
|
|
805
|
-
space: Space;
|
|
806
|
-
page: RevisionPageDocument;
|
|
807
|
-
}
|
|
808
|
-
export declare type RecordingEvent = RecordingTerminalCommandEvent | RecordingSpeechEvent | RecordingThreadMessageEvent | RecordingFileAddedEvent | RecordingFileChangedEvent | RecordingFileRemovedEvent;
|
|
809
|
-
export declare type RecordingContext = 'meeting' | 'thread' | 'walkthrough';
|
|
810
|
-
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 {
|
|
811
822
|
/** The type of event */
|
|
812
823
|
type: string;
|
|
813
824
|
/**
|
|
@@ -817,39 +828,39 @@ export interface BaseRecordingEvent {
|
|
|
817
828
|
timestamp: string;
|
|
818
829
|
/** Optionally, provide the source of the event. GitBook may use this to improve the generated content. */
|
|
819
830
|
source?: string;
|
|
820
|
-
/** 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. */
|
|
821
832
|
actor?: {
|
|
822
833
|
name: string;
|
|
823
834
|
};
|
|
824
835
|
}
|
|
825
|
-
export declare type
|
|
836
|
+
export declare type CaptureSpeechEvent = BaseCaptureEvent & {
|
|
826
837
|
type: 'speech';
|
|
827
838
|
} & ({
|
|
828
839
|
audio: string;
|
|
829
840
|
} | {
|
|
830
841
|
transcript: string;
|
|
831
842
|
});
|
|
832
|
-
export declare type
|
|
843
|
+
export declare type CaptureTerminalCommandEvent = BaseCaptureEvent & {
|
|
833
844
|
type: 'terminal.command';
|
|
834
845
|
command: string;
|
|
835
846
|
stdout: string;
|
|
836
847
|
};
|
|
837
|
-
export declare type
|
|
848
|
+
export declare type CaptureThreadMessageEvent = BaseCaptureEvent & {
|
|
838
849
|
type: 'thread.message';
|
|
839
850
|
isFirst?: boolean;
|
|
840
851
|
text: string;
|
|
841
852
|
};
|
|
842
|
-
export declare type
|
|
853
|
+
export declare type CaptureFileAddedEvent = BaseCaptureEvent & {
|
|
843
854
|
type: 'file.added';
|
|
844
855
|
filename: string;
|
|
845
856
|
fileSnapshot: string;
|
|
846
857
|
};
|
|
847
|
-
export declare type
|
|
858
|
+
export declare type CaptureFileChangedEvent = BaseCaptureEvent & {
|
|
848
859
|
type: 'file.changed';
|
|
849
860
|
filename: string;
|
|
850
861
|
fileDiff: string;
|
|
851
862
|
};
|
|
852
|
-
export declare type
|
|
863
|
+
export declare type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
853
864
|
type: 'file.removed';
|
|
854
865
|
filename: string;
|
|
855
866
|
fileSnapshot: string;
|
|
@@ -1178,7 +1189,7 @@ export declare type IntegrationSummary = string;
|
|
|
1178
1189
|
export declare type IntegrationScopes = IntegrationScope[];
|
|
1179
1190
|
export declare enum IntegrationScope {
|
|
1180
1191
|
EntitiesWrite = "entities:write",
|
|
1181
|
-
|
|
1192
|
+
CaptureWrite = "capture:write",
|
|
1182
1193
|
SpaceViewsRead = "space:views:read",
|
|
1183
1194
|
SpaceContentRead = "space:content:read",
|
|
1184
1195
|
SpaceContentWrite = "space:content:write",
|
|
@@ -2154,7 +2165,7 @@ export interface ContentKitInput {
|
|
|
2154
2165
|
/** Text label displayed next to the input. */
|
|
2155
2166
|
label: string;
|
|
2156
2167
|
hint?: string | ContentKitInlineElement;
|
|
2157
|
-
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton;
|
|
2168
|
+
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton | ContentKitCodeBlock;
|
|
2158
2169
|
}
|
|
2159
2170
|
/**
|
|
2160
2171
|
* An individual option in a select element
|
|
@@ -2261,7 +2272,7 @@ export interface ContentKitURL {
|
|
|
2261
2272
|
/**
|
|
2262
2273
|
* Channel to subscribe to for API updates.
|
|
2263
2274
|
*/
|
|
2264
|
-
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 | {
|
|
2265
2276
|
channel: 'space-comments';
|
|
2266
2277
|
space: string;
|
|
2267
2278
|
changeRequest?: string;
|
|
@@ -2318,6 +2329,14 @@ export interface UserAPITokensChannel {
|
|
|
2318
2329
|
channel: 'user-api-tokens';
|
|
2319
2330
|
user: string;
|
|
2320
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
|
+
}
|
|
2321
2340
|
export interface ChangeRequestReviewsChannel {
|
|
2322
2341
|
channel: 'space-change-request-reviews';
|
|
2323
2342
|
space: string;
|
|
@@ -2389,8 +2408,8 @@ export interface OrganizationEnvironmentsChannel {
|
|
|
2389
2408
|
channel: 'organization-environments';
|
|
2390
2409
|
organization: string;
|
|
2391
2410
|
}
|
|
2392
|
-
export interface
|
|
2393
|
-
channel: 'organization-
|
|
2411
|
+
export interface OrganizationCapturesChannel {
|
|
2412
|
+
channel: 'organization-captures';
|
|
2394
2413
|
organization: string;
|
|
2395
2414
|
}
|
|
2396
2415
|
/**
|
|
@@ -2625,6 +2644,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2625
2644
|
* @secure
|
|
2626
2645
|
*/
|
|
2627
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>>;
|
|
2628
2669
|
/**
|
|
2629
2670
|
* @description Lists spaces that the authenticated user explicitly own.
|
|
2630
2671
|
*
|
|
@@ -4588,70 +4629,73 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4588
4629
|
*/
|
|
4589
4630
|
getEntity: (organizationId: string, entityType: EntityType, entityId: EntityId, params?: RequestParams) => Promise<HttpResponse<Entity, Error>>;
|
|
4590
4631
|
/**
|
|
4591
|
-
* @description List
|
|
4632
|
+
* @description List captures in an organization.
|
|
4592
4633
|
*
|
|
4593
4634
|
* @tags organizations
|
|
4594
|
-
* @name
|
|
4595
|
-
* @summary List
|
|
4596
|
-
* @request GET:/orgs/{organizationId}/
|
|
4635
|
+
* @name ListCaptures
|
|
4636
|
+
* @summary List captures
|
|
4637
|
+
* @request GET:/orgs/{organizationId}/captures
|
|
4597
4638
|
* @secure
|
|
4598
4639
|
*/
|
|
4599
|
-
|
|
4640
|
+
listCaptures: (organizationId: string, query?: {
|
|
4641
|
+
format?: 'document' | 'markdown';
|
|
4600
4642
|
page?: string;
|
|
4601
4643
|
limit?: number;
|
|
4602
4644
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4603
|
-
items:
|
|
4645
|
+
items: Capture[];
|
|
4604
4646
|
}, Error>>;
|
|
4605
4647
|
/**
|
|
4606
4648
|
* No description
|
|
4607
4649
|
*
|
|
4608
4650
|
* @tags organizations
|
|
4609
|
-
* @name
|
|
4610
|
-
* @summary Start a
|
|
4611
|
-
* @request POST:/orgs/{organizationId}/
|
|
4651
|
+
* @name StartCapture
|
|
4652
|
+
* @summary Start a capture
|
|
4653
|
+
* @request POST:/orgs/{organizationId}/captures
|
|
4612
4654
|
* @secure
|
|
4613
4655
|
*/
|
|
4614
|
-
|
|
4615
|
-
title?:
|
|
4616
|
-
context:
|
|
4656
|
+
startCapture: (organizationId: string, data: {
|
|
4657
|
+
title?: CaptureTitle;
|
|
4658
|
+
context: CaptureContext;
|
|
4617
4659
|
externalId?: string;
|
|
4618
4660
|
externalURL?: string;
|
|
4619
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
4661
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4620
4662
|
/**
|
|
4621
4663
|
* No description
|
|
4622
4664
|
*
|
|
4623
4665
|
* @tags organizations
|
|
4624
|
-
* @name
|
|
4625
|
-
* @summary Get a
|
|
4626
|
-
* @request GET:/orgs/{organizationId}/
|
|
4666
|
+
* @name GetCapture
|
|
4667
|
+
* @summary Get a capture by its ID
|
|
4668
|
+
* @request GET:/orgs/{organizationId}/captures/{captureId}
|
|
4627
4669
|
* @secure
|
|
4628
4670
|
*/
|
|
4629
|
-
|
|
4671
|
+
getCapture: (organizationId: string, captureId: string, query?: {
|
|
4672
|
+
format?: 'document' | 'markdown';
|
|
4673
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4630
4674
|
/**
|
|
4631
4675
|
* No description
|
|
4632
4676
|
*
|
|
4633
4677
|
* @tags organizations
|
|
4634
|
-
* @name
|
|
4635
|
-
* @summary Add events to a running
|
|
4636
|
-
* @request POST:/orgs/{organizationId}/
|
|
4678
|
+
* @name AddEventsToCapture
|
|
4679
|
+
* @summary Add events to a running capture
|
|
4680
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/events
|
|
4637
4681
|
* @secure
|
|
4638
4682
|
*/
|
|
4639
|
-
|
|
4640
|
-
events:
|
|
4683
|
+
addEventsToCapture: (organizationId: string, captureId: string, data: {
|
|
4684
|
+
events: CaptureEvent[];
|
|
4641
4685
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4642
4686
|
/**
|
|
4643
4687
|
* No description
|
|
4644
4688
|
*
|
|
4645
4689
|
* @tags organizations
|
|
4646
|
-
* @name
|
|
4647
|
-
* @summary Stop a
|
|
4648
|
-
* @request POST:/orgs/{organizationId}/
|
|
4690
|
+
* @name StopCapture
|
|
4691
|
+
* @summary Stop a capture
|
|
4692
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/stop
|
|
4649
4693
|
* @secure
|
|
4650
4694
|
*/
|
|
4651
|
-
|
|
4652
|
-
|
|
4695
|
+
stopCapture: (organizationId: string, captureId: string, data: object, query?: {
|
|
4696
|
+
format?: 'document' | 'markdown';
|
|
4653
4697
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4654
|
-
|
|
4698
|
+
capture: Capture;
|
|
4655
4699
|
followupQuestions?: string[];
|
|
4656
4700
|
}, Error>>;
|
|
4657
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";
|
|
@@ -475,6 +482,22 @@ var Api = class extends HttpClient {
|
|
|
475
482
|
format: "json",
|
|
476
483
|
...params
|
|
477
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
|
+
}),
|
|
478
501
|
listSpacesForAuthenticatedUser: (query, params = {}) => this.request({
|
|
479
502
|
path: `/user/spaces`,
|
|
480
503
|
method: "GET",
|
|
@@ -1681,16 +1704,16 @@ var Api = class extends HttpClient {
|
|
|
1681
1704
|
format: "json",
|
|
1682
1705
|
...params
|
|
1683
1706
|
}),
|
|
1684
|
-
|
|
1685
|
-
path: `/orgs/${organizationId}/
|
|
1707
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1708
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1686
1709
|
method: "GET",
|
|
1687
1710
|
query,
|
|
1688
1711
|
secure: true,
|
|
1689
1712
|
format: "json",
|
|
1690
1713
|
...params
|
|
1691
1714
|
}),
|
|
1692
|
-
|
|
1693
|
-
path: `/orgs/${organizationId}/
|
|
1715
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1716
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1694
1717
|
method: "POST",
|
|
1695
1718
|
body: data,
|
|
1696
1719
|
secure: true,
|
|
@@ -1698,24 +1721,26 @@ var Api = class extends HttpClient {
|
|
|
1698
1721
|
format: "json",
|
|
1699
1722
|
...params
|
|
1700
1723
|
}),
|
|
1701
|
-
|
|
1702
|
-
path: `/orgs/${organizationId}/
|
|
1724
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1725
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1703
1726
|
method: "GET",
|
|
1727
|
+
query,
|
|
1704
1728
|
secure: true,
|
|
1705
1729
|
format: "json",
|
|
1706
1730
|
...params
|
|
1707
1731
|
}),
|
|
1708
|
-
|
|
1709
|
-
path: `/orgs/${organizationId}/
|
|
1732
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1733
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1710
1734
|
method: "POST",
|
|
1711
1735
|
body: data,
|
|
1712
1736
|
secure: true,
|
|
1713
1737
|
type: "application/json" /* Json */,
|
|
1714
1738
|
...params
|
|
1715
1739
|
}),
|
|
1716
|
-
|
|
1717
|
-
path: `/orgs/${organizationId}/
|
|
1740
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1741
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1718
1742
|
method: "POST",
|
|
1743
|
+
query,
|
|
1719
1744
|
body: data,
|
|
1720
1745
|
secure: true,
|
|
1721
1746
|
type: "application/json" /* Json */,
|
|
@@ -1837,5 +1862,6 @@ var GitBookAPI = class extends Api {
|
|
|
1837
1862
|
PurgeCDNCacheContextType,
|
|
1838
1863
|
SpaceRelationType,
|
|
1839
1864
|
SpaceType,
|
|
1840
|
-
TeamMemberRole
|
|
1865
|
+
TeamMemberRole,
|
|
1866
|
+
UserPreferencesTheme
|
|
1841
1867
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// src/client.ts
|
|
2
|
+
var UserPreferencesTheme = /* @__PURE__ */ ((UserPreferencesTheme2) => {
|
|
3
|
+
UserPreferencesTheme2["Light"] = "light";
|
|
4
|
+
UserPreferencesTheme2["Dark"] = "dark";
|
|
5
|
+
UserPreferencesTheme2["Default"] = "default";
|
|
6
|
+
return UserPreferencesTheme2;
|
|
7
|
+
})(UserPreferencesTheme || {});
|
|
2
8
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
3
9
|
ContentVisibility2["Public"] = "public";
|
|
4
10
|
ContentVisibility2["Unlisted"] = "unlisted";
|
|
@@ -106,7 +112,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
|
|
|
106
112
|
})(AnalyticsTrafficInterval || {});
|
|
107
113
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
108
114
|
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
109
|
-
IntegrationScope2["
|
|
115
|
+
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
110
116
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
111
117
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
112
118
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
@@ -418,6 +424,22 @@ var Api = class extends HttpClient {
|
|
|
418
424
|
format: "json",
|
|
419
425
|
...params
|
|
420
426
|
}),
|
|
427
|
+
getPreferencesForAuthenticatedUser: (params = {}) => this.request({
|
|
428
|
+
path: `/user/preferences`,
|
|
429
|
+
method: "GET",
|
|
430
|
+
secure: true,
|
|
431
|
+
format: "json",
|
|
432
|
+
...params
|
|
433
|
+
}),
|
|
434
|
+
updatePreferencesForAuthenticatedUser: (data, params = {}) => this.request({
|
|
435
|
+
path: `/user/preferences`,
|
|
436
|
+
method: "PATCH",
|
|
437
|
+
body: data,
|
|
438
|
+
secure: true,
|
|
439
|
+
type: "application/json" /* Json */,
|
|
440
|
+
format: "json",
|
|
441
|
+
...params
|
|
442
|
+
}),
|
|
421
443
|
listSpacesForAuthenticatedUser: (query, params = {}) => this.request({
|
|
422
444
|
path: `/user/spaces`,
|
|
423
445
|
method: "GET",
|
|
@@ -1624,16 +1646,16 @@ var Api = class extends HttpClient {
|
|
|
1624
1646
|
format: "json",
|
|
1625
1647
|
...params
|
|
1626
1648
|
}),
|
|
1627
|
-
|
|
1628
|
-
path: `/orgs/${organizationId}/
|
|
1649
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1650
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1629
1651
|
method: "GET",
|
|
1630
1652
|
query,
|
|
1631
1653
|
secure: true,
|
|
1632
1654
|
format: "json",
|
|
1633
1655
|
...params
|
|
1634
1656
|
}),
|
|
1635
|
-
|
|
1636
|
-
path: `/orgs/${organizationId}/
|
|
1657
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1658
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1637
1659
|
method: "POST",
|
|
1638
1660
|
body: data,
|
|
1639
1661
|
secure: true,
|
|
@@ -1641,24 +1663,26 @@ var Api = class extends HttpClient {
|
|
|
1641
1663
|
format: "json",
|
|
1642
1664
|
...params
|
|
1643
1665
|
}),
|
|
1644
|
-
|
|
1645
|
-
path: `/orgs/${organizationId}/
|
|
1666
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1667
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1646
1668
|
method: "GET",
|
|
1669
|
+
query,
|
|
1647
1670
|
secure: true,
|
|
1648
1671
|
format: "json",
|
|
1649
1672
|
...params
|
|
1650
1673
|
}),
|
|
1651
|
-
|
|
1652
|
-
path: `/orgs/${organizationId}/
|
|
1674
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1675
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1653
1676
|
method: "POST",
|
|
1654
1677
|
body: data,
|
|
1655
1678
|
secure: true,
|
|
1656
1679
|
type: "application/json" /* Json */,
|
|
1657
1680
|
...params
|
|
1658
1681
|
}),
|
|
1659
|
-
|
|
1660
|
-
path: `/orgs/${organizationId}/
|
|
1682
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1683
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1661
1684
|
method: "POST",
|
|
1685
|
+
query,
|
|
1662
1686
|
body: data,
|
|
1663
1687
|
secure: true,
|
|
1664
1688
|
type: "application/json" /* Json */,
|
|
@@ -1779,5 +1803,6 @@ export {
|
|
|
1779
1803
|
PurgeCDNCacheContextType,
|
|
1780
1804
|
SpaceRelationType,
|
|
1781
1805
|
SpaceType,
|
|
1782
|
-
TeamMemberRole
|
|
1806
|
+
TeamMemberRole,
|
|
1807
|
+
UserPreferencesTheme
|
|
1783
1808
|
};
|