@gitbook/api 0.93.0 → 0.94.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 CHANGED
@@ -148,8 +148,13 @@ export interface ContentRefReusableContent {
148
148
  kind: 'reusable-content';
149
149
  reusableContent: string;
150
150
  }
151
+ export interface ContentRefOpenAPI {
152
+ kind: 'openapi';
153
+ /** Slug of the OpenAPI specification */
154
+ spec: string;
155
+ }
151
156
  /** A relative reference to content in GitBook. */
152
- export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent;
157
+ export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent | ContentRefOpenAPI;
153
158
  export interface DocumentInlineLink {
154
159
  object: 'inline';
155
160
  type: 'link';
@@ -529,9 +534,6 @@ export type ContentKitDefaultAction = {
529
534
  } | {
530
535
  action: '@ui.modal.close';
531
536
  returnValue: PlainObject;
532
- } | {
533
- action: '@ui.complete';
534
- returnValue: PlainObject;
535
537
  } | {
536
538
  action: '@ui.url.open';
537
539
  url: string;
@@ -604,7 +606,7 @@ export interface DocumentBlockOpenAPI {
604
606
  type: 'swagger';
605
607
  key?: string;
606
608
  data: OpenAPIOperationPointer & {
607
- ref: ContentRefFile | ContentRefURL;
609
+ ref: ContentRefFile | ContentRefURL | ContentRefOpenAPI;
608
610
  /** If true, the block is opened by default. */
609
611
  expanded?: boolean;
610
612
  fullWidth?: boolean;
@@ -1612,6 +1614,14 @@ export interface Organization {
1612
1614
  };
1613
1615
  /** If true, the organization is on the new trial which includes sites and the Pro plan. */
1614
1616
  internal_isOnNewTrial?: boolean;
1617
+ internal_billingMigration?: {
1618
+ /** When we will upgrade the organization onto new pricing, if they haven't already. */
1619
+ deadline?: Timestamp;
1620
+ /** A discount the organization may have received thanks to migrating early. */
1621
+ discountPercent?: number;
1622
+ /** The expiration date of the discount, after wich regular pricing resumes. */
1623
+ discountEndDate?: Timestamp;
1624
+ };
1615
1625
  /** The set of permissions for the organization */
1616
1626
  permissions: {
1617
1627
  /** Can the user manage the title, members, etc. */
@@ -1725,8 +1735,57 @@ export interface ContentLocationReusableContent {
1725
1735
  versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
1726
1736
  reusableContent: RevisionReusableContent;
1727
1737
  }
1738
+ /**
1739
+ * Slug used as reference
1740
+ * @minLength 1
1741
+ * @maxLength 100
1742
+ */
1743
+ export type OpenAPISpecSlug = string;
1744
+ /** Processing state */
1745
+ export declare enum OpenAPISpecProcessingState {
1746
+ Pending = "pending",
1747
+ Progress = "progress",
1748
+ Complete = "complete"
1749
+ }
1750
+ /** OpenAPI processing error code */
1751
+ export declare enum OpenAPISpecProcessingErrorCode {
1752
+ FETCH_TIMEOUT = "FETCH_TIMEOUT",
1753
+ FETCH_ERROR = "FETCH_ERROR",
1754
+ PARSE_ERROR = "PARSE_ERROR"
1755
+ }
1756
+ export interface OpenAPISpec {
1757
+ /** The object type, which is always "openapi-spec" */
1758
+ object: 'openapi-spec';
1759
+ /** Unique identifier */
1760
+ id: string;
1761
+ /** Date of creation */
1762
+ createdAt: Timestamp;
1763
+ /** Date of the last update */
1764
+ updatedAt: Timestamp;
1765
+ /** Slug used as reference */
1766
+ slug: OpenAPISpecSlug;
1767
+ sourceURL?: URL;
1768
+ /** Processing state */
1769
+ processingState: OpenAPISpecProcessingState;
1770
+ /** Date of the last processing */
1771
+ lastProcessedAt?: Timestamp;
1772
+ /** OpenAPI processing error code */
1773
+ lastProcessErrorCode?: OpenAPISpecProcessingErrorCode;
1774
+ /** URLs associated with the object */
1775
+ urls: {
1776
+ /** URL of the OpenAPI specification in the API */
1777
+ location: URL;
1778
+ /** URL of the OpenAPI specification in the application */
1779
+ app: URL;
1780
+ };
1781
+ }
1782
+ export interface ContentLocationOpenAPI {
1783
+ kind: 'openapi';
1784
+ organization: Organization;
1785
+ openAPISpec: OpenAPISpec;
1786
+ }
1728
1787
  /** An absolute reference to content in GitBook. */
1729
- export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent;
1788
+ export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent | ContentLocationOpenAPI;
1730
1789
  /**
1731
1790
  * Text to display to represent the reference. Possible values include:
1732
1791
  * - `ok` - No problems detected for this content reference.
@@ -2287,6 +2346,10 @@ export interface CustomizationThemedURL {
2287
2346
  light: URL;
2288
2347
  dark: URL;
2289
2348
  }
2349
+ /**
2350
+ * The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.
2351
+ * @deprecated
2352
+ */
2290
2353
  export declare enum CustomizationHeaderPreset {
2291
2354
  Default = "default",
2292
2355
  Bold = "bold",
@@ -2338,6 +2401,7 @@ export interface CustomizationSettings {
2338
2401
  emoji: Emoji;
2339
2402
  } | object;
2340
2403
  header: {
2404
+ /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
2341
2405
  preset: CustomizationHeaderPreset;
2342
2406
  logo?: CustomizationThemedURL;
2343
2407
  backgroundColor?: CustomizationThemedColor;
@@ -2428,7 +2492,9 @@ export declare enum IntegrationScope {
2428
2492
  SiteViewsRead = "site:views:read",
2429
2493
  SiteScriptInject = "site:script:inject",
2430
2494
  SiteScriptCookies = "site:script:cookies",
2431
- SiteVisitorAuth = "site:visitor:auth"
2495
+ SiteVisitorAuth = "site:visitor:auth",
2496
+ OpenapiRead = "openapi:read",
2497
+ OpenapiWrite = "openapi:write"
2432
2498
  }
2433
2499
  /** Permissions that should be granted to the integration */
2434
2500
  export type IntegrationScopes = IntegrationScope[];
@@ -2469,7 +2535,7 @@ export interface IntegrationContentSource {
2469
2535
  /** URL of the icon to represent this source. */
2470
2536
  icon?: string;
2471
2537
  /** ContentKit component for configuration */
2472
- configuration?: IntegrationConfigurationComponent;
2538
+ configuration: IntegrationConfigurationComponent;
2473
2539
  }
2474
2540
  /** Schema for a configuration */
2475
2541
  export interface IntegrationConfigurationSchema {
@@ -3935,6 +4001,13 @@ export interface BillingInvoicePreview {
3935
4001
  periodStart: Timestamp;
3936
4002
  periodEnd: Timestamp;
3937
4003
  }[];
4004
+ /** Discount applied to the subscription. */
4005
+ discount?: {
4006
+ /** The combined description of all discounts applied to the subscription. */
4007
+ description: string;
4008
+ /** The total amount of all discounts applied to the subscription. */
4009
+ amount: number;
4010
+ };
3938
4011
  }
3939
4012
  export type BillingUpgrade = {
3940
4013
  result: 'checkout';
@@ -3973,6 +4046,12 @@ export interface MigrateOrganizationParameters {
3973
4046
  })[];
3974
4047
  };
3975
4048
  }
4049
+ export interface BillingDiscount {
4050
+ /** How many months the discount will last */
4051
+ duration: number;
4052
+ /** Percent that will be deducted from the subtotal of the invoice */
4053
+ percentOff: number;
4054
+ }
3976
4055
  /** These are all the features we check to determine the new pricing site type. */
3977
4056
  export declare enum SiteToMigrateFeature {
3978
4057
  Sections = "sections",
@@ -4225,7 +4304,7 @@ export interface SiteCustomizationSettings {
4225
4304
  * - `bold`: High-impact theme with prominent colors and strong contrasts.
4226
4305
  * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
4227
4306
  */
4228
- theme?: CustomizationTheme;
4307
+ theme: CustomizationTheme;
4229
4308
  primaryColor: CustomizationThemedColor;
4230
4309
  tint?: CustomizationTint;
4231
4310
  corners: CustomizationCorners;
@@ -4261,6 +4340,7 @@ export interface SiteCustomizationSettings {
4261
4340
  emoji: Emoji;
4262
4341
  } | object;
4263
4342
  header: {
4343
+ /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
4264
4344
  preset: CustomizationHeaderPreset;
4265
4345
  logo?: CustomizationThemedURL;
4266
4346
  backgroundColor?: CustomizationThemedColor;
@@ -5209,14 +5289,6 @@ export interface Index {
5209
5289
  collections: Record<string, UserCollectionsPermissions>;
5210
5290
  spaces: Record<string, UserSpacesPermissions>;
5211
5291
  }
5212
- /** Reason for a space to be blocked */
5213
- export declare enum SpaceBlockReason {
5214
- DMCA = "DMCA",
5215
- THREAT_TYPE_UNSPECIFIED = "THREAT_TYPE_UNSPECIFIED",
5216
- MALWARE = "MALWARE",
5217
- SOCIAL_ENGINEERING = "SOCIAL_ENGINEERING",
5218
- UNWANTED_SOFTWARE = "UNWANTED_SOFTWARE"
5219
- }
5220
5292
  export type BackOfficeSite = Site & {
5221
5293
  /** ID of the organization owning this site */
5222
5294
  organization: string;
@@ -5255,42 +5327,6 @@ export type PublishedSiteContentLookup = {
5255
5327
  target: 'application' | 'content' | 'external';
5256
5328
  redirect: URL;
5257
5329
  } | PublishedSiteContent;
5258
- /**
5259
- * Slug used as reference
5260
- * @minLength 1
5261
- * @maxLength 100
5262
- */
5263
- export type OpenAPISpecSlug = string;
5264
- /** Processing state */
5265
- export declare enum OpenAPISpecProcessingState {
5266
- Pending = "pending",
5267
- Progress = "progress",
5268
- Complete = "complete"
5269
- }
5270
- export interface OpenAPISpec {
5271
- /** The object type, which is always "openapi-spec" */
5272
- object: 'openapi-spec';
5273
- /** Unique identifier */
5274
- id: string;
5275
- /** Date of creation */
5276
- createdAt: Timestamp;
5277
- /** Date of the last update */
5278
- updatedAt: Timestamp;
5279
- /** Slug used as reference */
5280
- slug: OpenAPISpecSlug;
5281
- sourceURL?: URL;
5282
- /** Processing state */
5283
- processingState: OpenAPISpecProcessingState;
5284
- /** Date of the last processing */
5285
- lastProcessedAt?: Timestamp;
5286
- /** URLs associated with the object */
5287
- urls: {
5288
- /** URL of the OpenAPI specification in the API */
5289
- location: URL;
5290
- /** URL of the OpenAPI specification in the application */
5291
- app: URL;
5292
- };
5293
- }
5294
5330
  export interface OpenAPISpecVersion {
5295
5331
  /** The object type, which is always "openapi-spec-version" */
5296
5332
  object: 'openapi-spec-version';
@@ -5298,10 +5334,8 @@ export interface OpenAPISpecVersion {
5298
5334
  id: string;
5299
5335
  /** Date of creation */
5300
5336
  createdAt?: Timestamp;
5301
- /** URL poiting to the source of the specification */
5302
- sourceURL: URL;
5303
- /** URL pointing to the processed specification */
5304
- contentURL: URL;
5337
+ /** URL where the specification is accessible. */
5338
+ url: URL;
5305
5339
  /** URLs associated with the object */
5306
5340
  urls: {
5307
5341
  /** URL of the OpenAPI specification version in the API */
@@ -5310,7 +5344,7 @@ export interface OpenAPISpecVersion {
5310
5344
  app: URL;
5311
5345
  };
5312
5346
  }
5313
- /** Content of OpenAPI specification */
5347
+ /** Filesystem representing the OpenAPI spec files and content. */
5314
5348
  export type OpenAPISpecContent = object;
5315
5349
  /**
5316
5350
  * @minLength 64
@@ -5857,13 +5891,13 @@ export interface GitSyncOperationChannel {
5857
5891
  channel: 'space-gitsync-operation';
5858
5892
  space: string;
5859
5893
  }
5860
- /** Subscription channel for changes in OpenAPI specification versions. */
5861
- export interface OpenAPISpecVersionsChannel {
5862
- channel: 'openapi-spec-versions';
5894
+ /** Subscription channel for changes in OpenAPI specification. */
5895
+ export interface OpenAPISpecChannel {
5896
+ channel: 'openapi-spec';
5863
5897
  openAPISpec: string;
5864
5898
  }
5865
5899
  /** Channel to subscribe to for realtime updates. */
5866
- export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecVersionsChannel;
5900
+ export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel;
5867
5901
  export interface GitSyncOperationChannelData {
5868
5902
  channel: 'space-gitsync-operation';
5869
5903
  data: GitSyncOperation;
@@ -9434,6 +9468,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9434
9468
  ultimateSites: number;
9435
9469
  };
9436
9470
  invoice?: BillingInvoicePreview;
9471
+ discount?: BillingDiscount;
9437
9472
  }, Error>>;
9438
9473
  /**
9439
9474
  * No description
@@ -10794,6 +10829,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10794
10829
  /** Title to use for the published site variant. If not defined, the title will not be changed. If set to null, the title will be unset and will fallback to the content title. */
10795
10830
  title?: SiteTitle | null;
10796
10831
  styling?: {
10832
+ /** The site theme. Set to null to reset the override. */
10833
+ theme?: CustomizationTheme | null;
10797
10834
  /** The primary color used for links and UI text. Set to null to reset the override. */
10798
10835
  primaryColor?: CustomizationThemedColor | null;
10799
10836
  /** The tint will color the site’s UI beyond links and buttons, such as header, sidebar and background. By default, the tint colour is the same as your Primary colour, but you can set a custom one too. */
package/dist/index.cjs CHANGED
@@ -232,6 +232,7 @@ __export(src_exports, {
232
232
  IntegrationTarget: () => IntegrationTarget,
233
233
  IntegrationVisibility: () => IntegrationVisibility,
234
234
  MemberRole: () => MemberRole,
235
+ OpenAPISpecProcessingErrorCode: () => OpenAPISpecProcessingErrorCode,
235
236
  OpenAPISpecProcessingState: () => OpenAPISpecProcessingState,
236
237
  OrganizationBlockReason: () => OrganizationBlockReason,
237
238
  OrganizationCommunityType: () => OrganizationCommunityType,
@@ -258,7 +259,6 @@ __export(src_exports, {
258
259
  SiteToMigrateFeature: () => SiteToMigrateFeature,
259
260
  SiteType: () => SiteType,
260
261
  SiteVisibility: () => SiteVisibility,
261
- SpaceBlockReason: () => SpaceBlockReason,
262
262
  SpaceEditMode: () => SpaceEditMode,
263
263
  TeamMemberRole: () => TeamMemberRole
264
264
  });
@@ -266,7 +266,7 @@ module.exports = __toCommonJS(src_exports);
266
266
 
267
267
  // package.json
268
268
  var name = "@gitbook/api";
269
- var version = "0.93.0";
269
+ var version = "0.94.0";
270
270
 
271
271
  // src/client.ts
272
272
  var import_event_iterator = __toESM(require_node(), 1);
@@ -481,6 +481,18 @@ var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
481
481
  OrganizationBlockReason2["Security"] = "security";
482
482
  return OrganizationBlockReason2;
483
483
  })(OrganizationBlockReason || {});
484
+ var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2) => {
485
+ OpenAPISpecProcessingState2["Pending"] = "pending";
486
+ OpenAPISpecProcessingState2["Progress"] = "progress";
487
+ OpenAPISpecProcessingState2["Complete"] = "complete";
488
+ return OpenAPISpecProcessingState2;
489
+ })(OpenAPISpecProcessingState || {});
490
+ var OpenAPISpecProcessingErrorCode = /* @__PURE__ */ ((OpenAPISpecProcessingErrorCode2) => {
491
+ OpenAPISpecProcessingErrorCode2["FETCH_TIMEOUT"] = "FETCH_TIMEOUT";
492
+ OpenAPISpecProcessingErrorCode2["FETCH_ERROR"] = "FETCH_ERROR";
493
+ OpenAPISpecProcessingErrorCode2["PARSE_ERROR"] = "PARSE_ERROR";
494
+ return OpenAPISpecProcessingErrorCode2;
495
+ })(OpenAPISpecProcessingErrorCode || {});
484
496
  var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
485
497
  ContentReferenceStatus2["Ok"] = "ok";
486
498
  ContentReferenceStatus2["Broken"] = "broken";
@@ -616,6 +628,8 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
616
628
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
617
629
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
618
630
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
631
+ IntegrationScope2["OpenapiRead"] = "openapi:read";
632
+ IntegrationScope2["OpenapiWrite"] = "openapi:write";
619
633
  return IntegrationScope2;
620
634
  })(IntegrationScope || {});
621
635
  var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
@@ -899,20 +913,6 @@ var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostname
899
913
  CloudflareHostnameTLSValidationMethod2["Email"] = "email";
900
914
  return CloudflareHostnameTLSValidationMethod2;
901
915
  })(CloudflareHostnameTLSValidationMethod || {});
902
- var SpaceBlockReason = /* @__PURE__ */ ((SpaceBlockReason2) => {
903
- SpaceBlockReason2["DMCA"] = "DMCA";
904
- SpaceBlockReason2["THREAT_TYPE_UNSPECIFIED"] = "THREAT_TYPE_UNSPECIFIED";
905
- SpaceBlockReason2["MALWARE"] = "MALWARE";
906
- SpaceBlockReason2["SOCIAL_ENGINEERING"] = "SOCIAL_ENGINEERING";
907
- SpaceBlockReason2["UNWANTED_SOFTWARE"] = "UNWANTED_SOFTWARE";
908
- return SpaceBlockReason2;
909
- })(SpaceBlockReason || {});
910
- var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2) => {
911
- OpenAPISpecProcessingState2["Pending"] = "pending";
912
- OpenAPISpecProcessingState2["Progress"] = "progress";
913
- OpenAPISpecProcessingState2["Complete"] = "complete";
914
- return OpenAPISpecProcessingState2;
915
- })(OpenAPISpecProcessingState || {});
916
916
  var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
917
917
  RevisionSemanticChangeType2["PageCreated"] = "page_created";
918
918
  RevisionSemanticChangeType2["PageEdited"] = "page_edited";
@@ -3783,6 +3783,7 @@ var GitBookAPI = class extends Api {
3783
3783
  IntegrationTarget,
3784
3784
  IntegrationVisibility,
3785
3785
  MemberRole,
3786
+ OpenAPISpecProcessingErrorCode,
3786
3787
  OpenAPISpecProcessingState,
3787
3788
  OrganizationBlockReason,
3788
3789
  OrganizationCommunityType,
@@ -3809,7 +3810,6 @@ var GitBookAPI = class extends Api {
3809
3810
  SiteToMigrateFeature,
3810
3811
  SiteType,
3811
3812
  SiteVisibility,
3812
- SpaceBlockReason,
3813
3813
  SpaceEditMode,
3814
3814
  TeamMemberRole
3815
3815
  });
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.93.0";
175
+ var version = "0.94.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -387,6 +387,18 @@ var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
387
387
  OrganizationBlockReason2["Security"] = "security";
388
388
  return OrganizationBlockReason2;
389
389
  })(OrganizationBlockReason || {});
390
+ var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2) => {
391
+ OpenAPISpecProcessingState2["Pending"] = "pending";
392
+ OpenAPISpecProcessingState2["Progress"] = "progress";
393
+ OpenAPISpecProcessingState2["Complete"] = "complete";
394
+ return OpenAPISpecProcessingState2;
395
+ })(OpenAPISpecProcessingState || {});
396
+ var OpenAPISpecProcessingErrorCode = /* @__PURE__ */ ((OpenAPISpecProcessingErrorCode2) => {
397
+ OpenAPISpecProcessingErrorCode2["FETCH_TIMEOUT"] = "FETCH_TIMEOUT";
398
+ OpenAPISpecProcessingErrorCode2["FETCH_ERROR"] = "FETCH_ERROR";
399
+ OpenAPISpecProcessingErrorCode2["PARSE_ERROR"] = "PARSE_ERROR";
400
+ return OpenAPISpecProcessingErrorCode2;
401
+ })(OpenAPISpecProcessingErrorCode || {});
390
402
  var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
391
403
  ContentReferenceStatus2["Ok"] = "ok";
392
404
  ContentReferenceStatus2["Broken"] = "broken";
@@ -522,6 +534,8 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
522
534
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
523
535
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
524
536
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
537
+ IntegrationScope2["OpenapiRead"] = "openapi:read";
538
+ IntegrationScope2["OpenapiWrite"] = "openapi:write";
525
539
  return IntegrationScope2;
526
540
  })(IntegrationScope || {});
527
541
  var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
@@ -805,20 +819,6 @@ var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostname
805
819
  CloudflareHostnameTLSValidationMethod2["Email"] = "email";
806
820
  return CloudflareHostnameTLSValidationMethod2;
807
821
  })(CloudflareHostnameTLSValidationMethod || {});
808
- var SpaceBlockReason = /* @__PURE__ */ ((SpaceBlockReason2) => {
809
- SpaceBlockReason2["DMCA"] = "DMCA";
810
- SpaceBlockReason2["THREAT_TYPE_UNSPECIFIED"] = "THREAT_TYPE_UNSPECIFIED";
811
- SpaceBlockReason2["MALWARE"] = "MALWARE";
812
- SpaceBlockReason2["SOCIAL_ENGINEERING"] = "SOCIAL_ENGINEERING";
813
- SpaceBlockReason2["UNWANTED_SOFTWARE"] = "UNWANTED_SOFTWARE";
814
- return SpaceBlockReason2;
815
- })(SpaceBlockReason || {});
816
- var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2) => {
817
- OpenAPISpecProcessingState2["Pending"] = "pending";
818
- OpenAPISpecProcessingState2["Progress"] = "progress";
819
- OpenAPISpecProcessingState2["Complete"] = "complete";
820
- return OpenAPISpecProcessingState2;
821
- })(OpenAPISpecProcessingState || {});
822
822
  var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
823
823
  RevisionSemanticChangeType2["PageCreated"] = "page_created";
824
824
  RevisionSemanticChangeType2["PageEdited"] = "page_edited";
@@ -3688,6 +3688,7 @@ export {
3688
3688
  IntegrationTarget,
3689
3689
  IntegrationVisibility,
3690
3690
  MemberRole,
3691
+ OpenAPISpecProcessingErrorCode,
3691
3692
  OpenAPISpecProcessingState,
3692
3693
  OrganizationBlockReason,
3693
3694
  OrganizationCommunityType,
@@ -3714,7 +3715,6 @@ export {
3714
3715
  SiteToMigrateFeature,
3715
3716
  SiteType,
3716
3717
  SiteVisibility,
3717
- SpaceBlockReason,
3718
3718
  SpaceEditMode,
3719
3719
  TeamMemberRole
3720
3720
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.93.0",
7
+ "version": "0.94.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -9728,6 +9728,9 @@
9728
9728
  },
9729
9729
  "invoice": {
9730
9730
  "$ref": "#/components/schemas/BillingInvoicePreview"
9731
+ },
9732
+ "discount": {
9733
+ "$ref": "#/components/schemas/BillingDiscount"
9731
9734
  }
9732
9735
  },
9733
9736
  "required": [
@@ -14119,6 +14122,21 @@
14119
14122
  "styling": {
14120
14123
  "type": "object",
14121
14124
  "properties": {
14125
+ "theme": {
14126
+ "description": "The site theme. Set to null to reset the override.",
14127
+ "oneOf": [
14128
+ {
14129
+ "$ref": "#/components/schemas/CustomizationTheme"
14130
+ },
14131
+ {
14132
+ "type": "string",
14133
+ "nullable": true,
14134
+ "enum": [
14135
+ null
14136
+ ]
14137
+ }
14138
+ ]
14139
+ },
14122
14140
  "primaryColor": {
14123
14141
  "description": "The primary color used for links and UI text. Set to null to reset the override.",
14124
14142
  "oneOf": [
@@ -17931,6 +17949,25 @@
17931
17949
  "reusableContent"
17932
17950
  ]
17933
17951
  },
17952
+ "ContentRefOpenAPI": {
17953
+ "type": "object",
17954
+ "properties": {
17955
+ "kind": {
17956
+ "type": "string",
17957
+ "enum": [
17958
+ "openapi"
17959
+ ]
17960
+ },
17961
+ "spec": {
17962
+ "type": "string",
17963
+ "description": "Slug of the OpenAPI specification"
17964
+ }
17965
+ },
17966
+ "required": [
17967
+ "kind",
17968
+ "spec"
17969
+ ]
17970
+ },
17934
17971
  "ContentRef": {
17935
17972
  "description": "A relative reference to content in GitBook.",
17936
17973
  "oneOf": [
@@ -17957,6 +17994,9 @@
17957
17994
  },
17958
17995
  {
17959
17996
  "$ref": "#/components/schemas/ContentRefReusableContent"
17997
+ },
17998
+ {
17999
+ "$ref": "#/components/schemas/ContentRefOpenAPI"
17960
18000
  }
17961
18001
  ]
17962
18002
  },
@@ -19962,25 +20002,6 @@
19962
20002
  "returnValue"
19963
20003
  ]
19964
20004
  },
19965
- {
19966
- "type": "object",
19967
- "description": "Action to complete the current flow the user is in.",
19968
- "properties": {
19969
- "action": {
19970
- "type": "string",
19971
- "enum": [
19972
- "@ui.complete"
19973
- ]
19974
- },
19975
- "returnValue": {
19976
- "$ref": "#/components/schemas/PlainObject"
19977
- }
19978
- },
19979
- "required": [
19980
- "action",
19981
- "returnValue"
19982
- ]
19983
- },
19984
20005
  {
19985
20006
  "type": "object",
19986
20007
  "description": "Action to open an url.",
@@ -20309,6 +20330,9 @@
20309
20330
  },
20310
20331
  {
20311
20332
  "$ref": "#/components/schemas/ContentRefURL"
20333
+ },
20334
+ {
20335
+ "$ref": "#/components/schemas/ContentRefOpenAPI"
20312
20336
  }
20313
20337
  ]
20314
20338
  },
@@ -23014,6 +23038,23 @@
23014
23038
  "type": "boolean",
23015
23039
  "description": "If true, the organization is on the new trial which includes sites and the Pro plan."
23016
23040
  },
23041
+ "internal_billingMigration": {
23042
+ "type": "object",
23043
+ "properties": {
23044
+ "deadline": {
23045
+ "description": "When we will upgrade the organization onto new pricing, if they haven't already.",
23046
+ "$ref": "#/components/schemas/Timestamp"
23047
+ },
23048
+ "discountPercent": {
23049
+ "description": "A discount the organization may have received thanks to migrating early.",
23050
+ "type": "number"
23051
+ },
23052
+ "discountEndDate": {
23053
+ "description": "The expiration date of the discount, after wich regular pricing resumes.",
23054
+ "$ref": "#/components/schemas/Timestamp"
23055
+ }
23056
+ }
23057
+ },
23017
23058
  "permissions": {
23018
23059
  "type": "object",
23019
23060
  "description": "The set of permissions for the organization",
@@ -23409,6 +23450,117 @@
23409
23450
  "reusableContent"
23410
23451
  ]
23411
23452
  },
23453
+ "OpenAPISpecSlug": {
23454
+ "description": "Slug used as reference",
23455
+ "type": "string",
23456
+ "minLength": 1,
23457
+ "maxLength": 100
23458
+ },
23459
+ "OpenAPISpecProcessingState": {
23460
+ "description": "Processing state",
23461
+ "enum": [
23462
+ "pending",
23463
+ "progress",
23464
+ "complete"
23465
+ ]
23466
+ },
23467
+ "OpenAPISpecProcessingErrorCode": {
23468
+ "description": "OpenAPI processing error code",
23469
+ "enum": [
23470
+ "FETCH_TIMEOUT",
23471
+ "FETCH_ERROR",
23472
+ "PARSE_ERROR"
23473
+ ]
23474
+ },
23475
+ "OpenAPISpec": {
23476
+ "type": "object",
23477
+ "properties": {
23478
+ "object": {
23479
+ "description": "The object type, which is always \"openapi-spec\"",
23480
+ "type": "string",
23481
+ "enum": [
23482
+ "openapi-spec"
23483
+ ]
23484
+ },
23485
+ "id": {
23486
+ "description": "Unique identifier",
23487
+ "type": "string"
23488
+ },
23489
+ "createdAt": {
23490
+ "description": "Date of creation",
23491
+ "$ref": "#/components/schemas/Timestamp"
23492
+ },
23493
+ "updatedAt": {
23494
+ "description": "Date of the last update",
23495
+ "$ref": "#/components/schemas/Timestamp"
23496
+ },
23497
+ "slug": {
23498
+ "$ref": "#/components/schemas/OpenAPISpecSlug"
23499
+ },
23500
+ "sourceURL": {
23501
+ "$ref": "#/components/schemas/URL"
23502
+ },
23503
+ "processingState": {
23504
+ "$ref": "#/components/schemas/OpenAPISpecProcessingState"
23505
+ },
23506
+ "lastProcessedAt": {
23507
+ "description": "Date of the last processing",
23508
+ "$ref": "#/components/schemas/Timestamp"
23509
+ },
23510
+ "lastProcessErrorCode": {
23511
+ "$ref": "#/components/schemas/OpenAPISpecProcessingErrorCode"
23512
+ },
23513
+ "urls": {
23514
+ "type": "object",
23515
+ "description": "URLs associated with the object",
23516
+ "properties": {
23517
+ "location": {
23518
+ "description": "URL of the OpenAPI specification in the API",
23519
+ "$ref": "#/components/schemas/URL"
23520
+ },
23521
+ "app": {
23522
+ "description": "URL of the OpenAPI specification in the application",
23523
+ "$ref": "#/components/schemas/URL"
23524
+ }
23525
+ },
23526
+ "required": [
23527
+ "app",
23528
+ "location"
23529
+ ]
23530
+ }
23531
+ },
23532
+ "required": [
23533
+ "object",
23534
+ "id",
23535
+ "createdAt",
23536
+ "updatedAt",
23537
+ "slug",
23538
+ "processingState",
23539
+ "urls"
23540
+ ]
23541
+ },
23542
+ "ContentLocationOpenAPI": {
23543
+ "type": "object",
23544
+ "properties": {
23545
+ "kind": {
23546
+ "type": "string",
23547
+ "enum": [
23548
+ "openapi"
23549
+ ]
23550
+ },
23551
+ "organization": {
23552
+ "$ref": "#/components/schemas/Organization"
23553
+ },
23554
+ "openAPISpec": {
23555
+ "$ref": "#/components/schemas/OpenAPISpec"
23556
+ }
23557
+ },
23558
+ "required": [
23559
+ "kind",
23560
+ "organization",
23561
+ "openAPISpec"
23562
+ ]
23563
+ },
23412
23564
  "ContentLocation": {
23413
23565
  "description": "An absolute reference to content in GitBook.",
23414
23566
  "oneOf": [
@@ -23432,6 +23584,9 @@
23432
23584
  },
23433
23585
  {
23434
23586
  "$ref": "#/components/schemas/ContentLocationReusableContent"
23587
+ },
23588
+ {
23589
+ "$ref": "#/components/schemas/ContentLocationOpenAPI"
23435
23590
  }
23436
23591
  ],
23437
23592
  "discriminator": {
@@ -25102,6 +25257,8 @@
25102
25257
  },
25103
25258
  "CustomizationHeaderPreset": {
25104
25259
  "type": "string",
25260
+ "deprecated": true,
25261
+ "description": "The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.",
25105
25262
  "enum": [
25106
25263
  "default",
25107
25264
  "bold",
@@ -25492,7 +25649,9 @@
25492
25649
  "site:views:read",
25493
25650
  "site:script:inject",
25494
25651
  "site:script:cookies",
25495
- "site:visitor:auth"
25652
+ "site:visitor:auth",
25653
+ "openapi:read",
25654
+ "openapi:write"
25496
25655
  ]
25497
25656
  },
25498
25657
  "IntegrationScopes": {
@@ -25571,7 +25730,8 @@
25571
25730
  },
25572
25731
  "required": [
25573
25732
  "id",
25574
- "title"
25733
+ "title",
25734
+ "configuration"
25575
25735
  ]
25576
25736
  },
25577
25737
  "IntegrationConfigurationSchema": {
@@ -30104,6 +30264,24 @@
30104
30264
  "periodEnd"
30105
30265
  ]
30106
30266
  }
30267
+ },
30268
+ "discount": {
30269
+ "type": "object",
30270
+ "description": "Discount applied to the subscription.",
30271
+ "properties": {
30272
+ "description": {
30273
+ "description": "The combined description of all discounts applied to the subscription.",
30274
+ "type": "string"
30275
+ },
30276
+ "amount": {
30277
+ "description": "The total amount of all discounts applied to the subscription.",
30278
+ "type": "number"
30279
+ }
30280
+ },
30281
+ "required": [
30282
+ "amount",
30283
+ "description"
30284
+ ]
30107
30285
  }
30108
30286
  },
30109
30287
  "required": [
@@ -30282,6 +30460,23 @@
30282
30460
  "changes"
30283
30461
  ]
30284
30462
  },
30463
+ "BillingDiscount": {
30464
+ "type": "object",
30465
+ "properties": {
30466
+ "duration": {
30467
+ "description": "How many months the discount will last",
30468
+ "type": "number"
30469
+ },
30470
+ "percentOff": {
30471
+ "description": "Percent that will be deducted from the subtotal of the invoice",
30472
+ "type": "number"
30473
+ }
30474
+ },
30475
+ "required": [
30476
+ "duration",
30477
+ "percentOff"
30478
+ ]
30479
+ },
30285
30480
  "SiteToMigrateFeature": {
30286
30481
  "type": "string",
30287
30482
  "description": "These are all the features we check to determine the new pricing site type.",
@@ -30882,6 +31077,7 @@
30882
31077
  }
30883
31078
  },
30884
31079
  "required": [
31080
+ "theme",
30885
31081
  "primaryColor",
30886
31082
  "corners",
30887
31083
  "font",
@@ -34610,17 +34806,6 @@
34610
34806
  "spaces"
34611
34807
  ]
34612
34808
  },
34613
- "SpaceBlockReason": {
34614
- "type": "string",
34615
- "description": "Reason for a space to be blocked",
34616
- "enum": [
34617
- "DMCA",
34618
- "THREAT_TYPE_UNSPECIFIED",
34619
- "MALWARE",
34620
- "SOCIAL_ENGINEERING",
34621
- "UNWANTED_SOFTWARE"
34622
- ]
34623
- },
34624
34809
  "BackOfficeSite": {
34625
34810
  "allOf": [
34626
34811
  {
@@ -34737,84 +34922,6 @@
34737
34922
  }
34738
34923
  ]
34739
34924
  },
34740
- "OpenAPISpecSlug": {
34741
- "description": "Slug used as reference",
34742
- "type": "string",
34743
- "minLength": 1,
34744
- "maxLength": 100
34745
- },
34746
- "OpenAPISpecProcessingState": {
34747
- "description": "Processing state",
34748
- "enum": [
34749
- "pending",
34750
- "progress",
34751
- "complete"
34752
- ]
34753
- },
34754
- "OpenAPISpec": {
34755
- "type": "object",
34756
- "properties": {
34757
- "object": {
34758
- "description": "The object type, which is always \"openapi-spec\"",
34759
- "type": "string",
34760
- "enum": [
34761
- "openapi-spec"
34762
- ]
34763
- },
34764
- "id": {
34765
- "description": "Unique identifier",
34766
- "type": "string"
34767
- },
34768
- "createdAt": {
34769
- "description": "Date of creation",
34770
- "$ref": "#/components/schemas/Timestamp"
34771
- },
34772
- "updatedAt": {
34773
- "description": "Date of the last update",
34774
- "$ref": "#/components/schemas/Timestamp"
34775
- },
34776
- "slug": {
34777
- "$ref": "#/components/schemas/OpenAPISpecSlug"
34778
- },
34779
- "sourceURL": {
34780
- "$ref": "#/components/schemas/URL"
34781
- },
34782
- "processingState": {
34783
- "$ref": "#/components/schemas/OpenAPISpecProcessingState"
34784
- },
34785
- "lastProcessedAt": {
34786
- "description": "Date of the last processing",
34787
- "$ref": "#/components/schemas/Timestamp"
34788
- },
34789
- "urls": {
34790
- "type": "object",
34791
- "description": "URLs associated with the object",
34792
- "properties": {
34793
- "location": {
34794
- "description": "URL of the OpenAPI specification in the API",
34795
- "$ref": "#/components/schemas/URL"
34796
- },
34797
- "app": {
34798
- "description": "URL of the OpenAPI specification in the application",
34799
- "$ref": "#/components/schemas/URL"
34800
- }
34801
- },
34802
- "required": [
34803
- "app",
34804
- "location"
34805
- ]
34806
- }
34807
- },
34808
- "required": [
34809
- "object",
34810
- "id",
34811
- "createdAt",
34812
- "updatedAt",
34813
- "slug",
34814
- "processingState",
34815
- "urls"
34816
- ]
34817
- },
34818
34925
  "OpenAPISpecVersion": {
34819
34926
  "type": "object",
34820
34927
  "properties": {
@@ -34833,12 +34940,8 @@
34833
34940
  "description": "Date of creation",
34834
34941
  "$ref": "#/components/schemas/Timestamp"
34835
34942
  },
34836
- "sourceURL": {
34837
- "description": "URL poiting to the source of the specification",
34838
- "$ref": "#/components/schemas/URL"
34839
- },
34840
- "contentURL": {
34841
- "description": "URL pointing to the processed specification",
34943
+ "url": {
34944
+ "description": "URL where the specification is accessible.",
34842
34945
  "$ref": "#/components/schemas/URL"
34843
34946
  },
34844
34947
  "urls": {
@@ -34863,14 +34966,12 @@
34863
34966
  "required": [
34864
34967
  "object",
34865
34968
  "id",
34866
- "sourceURL",
34867
- "contentURL",
34868
- "contentHash",
34969
+ "url",
34869
34970
  "urls"
34870
34971
  ]
34871
34972
  },
34872
34973
  "OpenAPISpecContent": {
34873
- "description": "Content of OpenAPI specification",
34974
+ "description": "Filesystem representing the OpenAPI spec files and content.",
34874
34975
  "type": "object"
34875
34976
  },
34876
34977
  "SHA256": {
@@ -36877,14 +36978,14 @@
36877
36978
  "space"
36878
36979
  ]
36879
36980
  },
36880
- "OpenAPISpecVersionsChannel": {
36981
+ "OpenAPISpecChannel": {
36881
36982
  "type": "object",
36882
- "description": "Subscription channel for changes in OpenAPI specification versions.",
36983
+ "description": "Subscription channel for changes in OpenAPI specification.",
36883
36984
  "properties": {
36884
36985
  "channel": {
36885
36986
  "type": "string",
36886
36987
  "enum": [
36887
- "openapi-spec-versions"
36988
+ "openapi-spec"
36888
36989
  ]
36889
36990
  },
36890
36991
  "openAPISpec": {
@@ -37080,7 +37181,7 @@
37080
37181
  "$ref": "#/components/schemas/GitSyncOperationChannel"
37081
37182
  },
37082
37183
  {
37083
- "$ref": "#/components/schemas/OpenAPISpecVersionsChannel"
37184
+ "$ref": "#/components/schemas/OpenAPISpecChannel"
37084
37185
  }
37085
37186
  ],
37086
37187
  "discriminator": {
package/spec/openapi.yaml CHANGED
@@ -5418,6 +5418,8 @@ paths:
5418
5418
  - ultimateSites
5419
5419
  invoice:
5420
5420
  $ref: "#/components/schemas/BillingInvoicePreview"
5421
+ discount:
5422
+ $ref: "#/components/schemas/BillingDiscount"
5421
5423
  required:
5422
5424
  - totals
5423
5425
  default:
@@ -7886,6 +7888,14 @@ paths:
7886
7888
  styling:
7887
7889
  type: object
7888
7890
  properties:
7891
+ theme:
7892
+ description: The site theme. Set to null to reset the override.
7893
+ oneOf:
7894
+ - $ref: "#/components/schemas/CustomizationTheme"
7895
+ - type: string
7896
+ nullable: true
7897
+ enum:
7898
+ - null
7889
7899
  primaryColor:
7890
7900
  description: The primary color used for links and UI text. Set to null to reset the override.
7891
7901
  oneOf:
@@ -10212,6 +10222,19 @@ components:
10212
10222
  required:
10213
10223
  - kind
10214
10224
  - reusableContent
10225
+ ContentRefOpenAPI:
10226
+ type: object
10227
+ properties:
10228
+ kind:
10229
+ type: string
10230
+ enum:
10231
+ - openapi
10232
+ spec:
10233
+ type: string
10234
+ description: Slug of the OpenAPI specification
10235
+ required:
10236
+ - kind
10237
+ - spec
10215
10238
  ContentRef:
10216
10239
  description: A relative reference to content in GitBook.
10217
10240
  oneOf:
@@ -10223,6 +10246,7 @@ components:
10223
10246
  - $ref: "#/components/schemas/ContentRefCollection"
10224
10247
  - $ref: "#/components/schemas/ContentRefSpace"
10225
10248
  - $ref: "#/components/schemas/ContentRefReusableContent"
10249
+ - $ref: "#/components/schemas/ContentRefOpenAPI"
10226
10250
  DocumentInlineLink:
10227
10251
  type: object
10228
10252
  properties:
@@ -11478,18 +11502,6 @@ components:
11478
11502
  required:
11479
11503
  - action
11480
11504
  - returnValue
11481
- - type: object
11482
- description: Action to complete the current flow the user is in.
11483
- properties:
11484
- action:
11485
- type: string
11486
- enum:
11487
- - "@ui.complete"
11488
- returnValue:
11489
- $ref: "#/components/schemas/PlainObject"
11490
- required:
11491
- - action
11492
- - returnValue
11493
11505
  - type: object
11494
11506
  description: Action to open an url.
11495
11507
  properties:
@@ -11699,6 +11711,7 @@ components:
11699
11711
  oneOf:
11700
11712
  - $ref: "#/components/schemas/ContentRefFile"
11701
11713
  - $ref: "#/components/schemas/ContentRefURL"
11714
+ - $ref: "#/components/schemas/ContentRefOpenAPI"
11702
11715
  expanded:
11703
11716
  type: boolean
11704
11717
  description: If true, the block is opened by default.
@@ -13548,6 +13561,18 @@ components:
13548
13561
  internal_isOnNewTrial:
13549
13562
  type: boolean
13550
13563
  description: If true, the organization is on the new trial which includes sites and the Pro plan.
13564
+ internal_billingMigration:
13565
+ type: object
13566
+ properties:
13567
+ deadline:
13568
+ description: When we will upgrade the organization onto new pricing, if they haven't already.
13569
+ $ref: "#/components/schemas/Timestamp"
13570
+ discountPercent:
13571
+ description: A discount the organization may have received thanks to migrating early.
13572
+ type: number
13573
+ discountEndDate:
13574
+ description: The expiration date of the discount, after wich regular pricing resumes.
13575
+ $ref: "#/components/schemas/Timestamp"
13551
13576
  permissions:
13552
13577
  type: object
13553
13578
  description: The set of permissions for the organization
@@ -13814,6 +13839,87 @@ components:
13814
13839
  - organization
13815
13840
  - space
13816
13841
  - reusableContent
13842
+ OpenAPISpecSlug:
13843
+ description: Slug used as reference
13844
+ type: string
13845
+ minLength: 1
13846
+ maxLength: 100
13847
+ OpenAPISpecProcessingState:
13848
+ description: Processing state
13849
+ enum:
13850
+ - pending
13851
+ - progress
13852
+ - complete
13853
+ OpenAPISpecProcessingErrorCode:
13854
+ description: OpenAPI processing error code
13855
+ enum:
13856
+ - FETCH_TIMEOUT
13857
+ - FETCH_ERROR
13858
+ - PARSE_ERROR
13859
+ OpenAPISpec:
13860
+ type: object
13861
+ properties:
13862
+ object:
13863
+ description: The object type, which is always "openapi-spec"
13864
+ type: string
13865
+ enum:
13866
+ - openapi-spec
13867
+ id:
13868
+ description: Unique identifier
13869
+ type: string
13870
+ createdAt:
13871
+ description: Date of creation
13872
+ $ref: "#/components/schemas/Timestamp"
13873
+ updatedAt:
13874
+ description: Date of the last update
13875
+ $ref: "#/components/schemas/Timestamp"
13876
+ slug:
13877
+ $ref: "#/components/schemas/OpenAPISpecSlug"
13878
+ sourceURL:
13879
+ $ref: "#/components/schemas/URL"
13880
+ processingState:
13881
+ $ref: "#/components/schemas/OpenAPISpecProcessingState"
13882
+ lastProcessedAt:
13883
+ description: Date of the last processing
13884
+ $ref: "#/components/schemas/Timestamp"
13885
+ lastProcessErrorCode:
13886
+ $ref: "#/components/schemas/OpenAPISpecProcessingErrorCode"
13887
+ urls:
13888
+ type: object
13889
+ description: URLs associated with the object
13890
+ properties:
13891
+ location:
13892
+ description: URL of the OpenAPI specification in the API
13893
+ $ref: "#/components/schemas/URL"
13894
+ app:
13895
+ description: URL of the OpenAPI specification in the application
13896
+ $ref: "#/components/schemas/URL"
13897
+ required:
13898
+ - app
13899
+ - location
13900
+ required:
13901
+ - object
13902
+ - id
13903
+ - createdAt
13904
+ - updatedAt
13905
+ - slug
13906
+ - processingState
13907
+ - urls
13908
+ ContentLocationOpenAPI:
13909
+ type: object
13910
+ properties:
13911
+ kind:
13912
+ type: string
13913
+ enum:
13914
+ - openapi
13915
+ organization:
13916
+ $ref: "#/components/schemas/Organization"
13917
+ openAPISpec:
13918
+ $ref: "#/components/schemas/OpenAPISpec"
13919
+ required:
13920
+ - kind
13921
+ - organization
13922
+ - openAPISpec
13817
13923
  ContentLocation:
13818
13924
  description: An absolute reference to content in GitBook.
13819
13925
  oneOf:
@@ -13824,6 +13930,7 @@ components:
13824
13930
  - $ref: "#/components/schemas/ContentLocationCollection"
13825
13931
  - $ref: "#/components/schemas/ContentLocationSpace"
13826
13932
  - $ref: "#/components/schemas/ContentLocationReusableContent"
13933
+ - $ref: "#/components/schemas/ContentLocationOpenAPI"
13827
13934
  discriminator:
13828
13935
  propertyName: kind
13829
13936
  ContentReferenceStatus:
@@ -14956,6 +15063,8 @@ components:
14956
15063
  - dark
14957
15064
  CustomizationHeaderPreset:
14958
15065
  type: string
15066
+ deprecated: true
15067
+ description: The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.
14959
15068
  enum:
14960
15069
  - default
14961
15070
  - bold
@@ -15228,6 +15337,8 @@ components:
15228
15337
  - site:script:inject
15229
15338
  - site:script:cookies
15230
15339
  - site:visitor:auth
15340
+ - openapi:read
15341
+ - openapi:write
15231
15342
  IntegrationScopes:
15232
15343
  type: array
15233
15344
  description: Permissions that should be granted to the integration
@@ -15287,6 +15398,7 @@ components:
15287
15398
  required:
15288
15399
  - id
15289
15400
  - title
15401
+ - configuration
15290
15402
  IntegrationConfigurationSchema:
15291
15403
  type: object
15292
15404
  description: Schema for a configuration
@@ -18242,6 +18354,19 @@ components:
18242
18354
  - description
18243
18355
  - periodStart
18244
18356
  - periodEnd
18357
+ discount:
18358
+ type: object
18359
+ description: Discount applied to the subscription.
18360
+ properties:
18361
+ description:
18362
+ description: The combined description of all discounts applied to the subscription.
18363
+ type: string
18364
+ amount:
18365
+ description: The total amount of all discounts applied to the subscription.
18366
+ type: number
18367
+ required:
18368
+ - amount
18369
+ - description
18245
18370
  required:
18246
18371
  - amount
18247
18372
  - amountDueToday
@@ -18356,6 +18481,18 @@ components:
18356
18481
  - product
18357
18482
  - interval
18358
18483
  - changes
18484
+ BillingDiscount:
18485
+ type: object
18486
+ properties:
18487
+ duration:
18488
+ description: How many months the discount will last
18489
+ type: number
18490
+ percentOff:
18491
+ description: Percent that will be deducted from the subtotal of the invoice
18492
+ type: number
18493
+ required:
18494
+ - duration
18495
+ - percentOff
18359
18496
  SiteToMigrateFeature:
18360
18497
  type: string
18361
18498
  description: These are all the features we check to determine the new pricing site type.
@@ -18796,6 +18933,7 @@ components:
18796
18933
  - background
18797
18934
  - list
18798
18935
  required:
18936
+ - theme
18799
18937
  - primaryColor
18800
18938
  - corners
18801
18939
  - font
@@ -21202,15 +21340,6 @@ components:
21202
21340
  - organizations
21203
21341
  - collections
21204
21342
  - spaces
21205
- SpaceBlockReason:
21206
- type: string
21207
- description: Reason for a space to be blocked
21208
- enum:
21209
- - DMCA
21210
- - THREAT_TYPE_UNSPECIFIED
21211
- - MALWARE
21212
- - SOCIAL_ENGINEERING
21213
- - UNWANTED_SOFTWARE
21214
21343
  BackOfficeSite:
21215
21344
  allOf:
21216
21345
  - $ref: "#/components/schemas/Site"
@@ -21291,64 +21420,6 @@ components:
21291
21420
  - target
21292
21421
  - redirect
21293
21422
  - $ref: "#/components/schemas/PublishedSiteContent"
21294
- OpenAPISpecSlug:
21295
- description: Slug used as reference
21296
- type: string
21297
- minLength: 1
21298
- maxLength: 100
21299
- OpenAPISpecProcessingState:
21300
- description: Processing state
21301
- enum:
21302
- - pending
21303
- - progress
21304
- - complete
21305
- OpenAPISpec:
21306
- type: object
21307
- properties:
21308
- object:
21309
- description: The object type, which is always "openapi-spec"
21310
- type: string
21311
- enum:
21312
- - openapi-spec
21313
- id:
21314
- description: Unique identifier
21315
- type: string
21316
- createdAt:
21317
- description: Date of creation
21318
- $ref: "#/components/schemas/Timestamp"
21319
- updatedAt:
21320
- description: Date of the last update
21321
- $ref: "#/components/schemas/Timestamp"
21322
- slug:
21323
- $ref: "#/components/schemas/OpenAPISpecSlug"
21324
- sourceURL:
21325
- $ref: "#/components/schemas/URL"
21326
- processingState:
21327
- $ref: "#/components/schemas/OpenAPISpecProcessingState"
21328
- lastProcessedAt:
21329
- description: Date of the last processing
21330
- $ref: "#/components/schemas/Timestamp"
21331
- urls:
21332
- type: object
21333
- description: URLs associated with the object
21334
- properties:
21335
- location:
21336
- description: URL of the OpenAPI specification in the API
21337
- $ref: "#/components/schemas/URL"
21338
- app:
21339
- description: URL of the OpenAPI specification in the application
21340
- $ref: "#/components/schemas/URL"
21341
- required:
21342
- - app
21343
- - location
21344
- required:
21345
- - object
21346
- - id
21347
- - createdAt
21348
- - updatedAt
21349
- - slug
21350
- - processingState
21351
- - urls
21352
21423
  OpenAPISpecVersion:
21353
21424
  type: object
21354
21425
  properties:
@@ -21363,11 +21434,8 @@ components:
21363
21434
  createdAt:
21364
21435
  description: Date of creation
21365
21436
  $ref: "#/components/schemas/Timestamp"
21366
- sourceURL:
21367
- description: URL poiting to the source of the specification
21368
- $ref: "#/components/schemas/URL"
21369
- contentURL:
21370
- description: URL pointing to the processed specification
21437
+ url:
21438
+ description: URL where the specification is accessible.
21371
21439
  $ref: "#/components/schemas/URL"
21372
21440
  urls:
21373
21441
  type: object
@@ -21385,12 +21453,10 @@ components:
21385
21453
  required:
21386
21454
  - object
21387
21455
  - id
21388
- - sourceURL
21389
- - contentURL
21390
- - contentHash
21456
+ - url
21391
21457
  - urls
21392
21458
  OpenAPISpecContent:
21393
- description: Content of OpenAPI specification
21459
+ description: Filesystem representing the OpenAPI spec files and content.
21394
21460
  type: object
21395
21461
  SHA256:
21396
21462
  type: string
@@ -22702,14 +22768,14 @@ components:
22702
22768
  required:
22703
22769
  - channel
22704
22770
  - space
22705
- OpenAPISpecVersionsChannel:
22771
+ OpenAPISpecChannel:
22706
22772
  type: object
22707
- description: Subscription channel for changes in OpenAPI specification versions.
22773
+ description: Subscription channel for changes in OpenAPI specification.
22708
22774
  properties:
22709
22775
  channel:
22710
22776
  type: string
22711
22777
  enum:
22712
- - openapi-spec-versions
22778
+ - openapi-spec
22713
22779
  openAPISpec:
22714
22780
  type: string
22715
22781
  required:
@@ -22778,7 +22844,7 @@ components:
22778
22844
  - $ref: "#/components/schemas/CustomHostnameChannel"
22779
22845
  - $ref: "#/components/schemas/GitSyncSettingsChannel"
22780
22846
  - $ref: "#/components/schemas/GitSyncOperationChannel"
22781
- - $ref: "#/components/schemas/OpenAPISpecVersionsChannel"
22847
+ - $ref: "#/components/schemas/OpenAPISpecChannel"
22782
22848
  discriminator:
22783
22849
  propertyName: channel
22784
22850
  GitSyncOperationChannelData: