@gitbook/api 0.107.0 → 0.108.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
@@ -1572,6 +1572,11 @@ export declare enum BillingProduct {
1572
1572
  TeamDec2021 = "team_dec_2021",
1573
1573
  BusinessDec2021 = "business_dec_2021"
1574
1574
  }
1575
+ /** Interval for a billing subscription */
1576
+ export declare enum BillingInterval {
1577
+ Monthly = "monthly",
1578
+ Yearly = "yearly"
1579
+ }
1575
1580
  /** - notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do. */
1576
1581
  export declare enum BillingTrialStatus {
1577
1582
  Notapplicable = "notapplicable",
@@ -1609,6 +1614,15 @@ export interface Organization {
1609
1614
  inviteLinks: boolean;
1610
1615
  /** Name of the product */
1611
1616
  plan: BillingProduct;
1617
+ billing: {
1618
+ /** Interval for a billing subscription */
1619
+ interval: BillingInterval;
1620
+ endDate?: Timestamp;
1621
+ /** If true, we were unable to collect the last payment */
1622
+ hasPaymentFailed: boolean;
1623
+ /** If true, the billing is set to cancel at the end of its current period */
1624
+ isScheduledToCancel: boolean;
1625
+ };
1612
1626
  /** URLs associated with the object */
1613
1627
  urls: {
1614
1628
  /**
@@ -3580,7 +3594,7 @@ export interface Site {
3580
3594
  createdAt: string;
3581
3595
  adaptiveContent?: SiteAdaptiveContent;
3582
3596
  ads?: SiteAds;
3583
- /** A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified. */
3597
+ /** A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified. */
3584
3598
  features: SiteFeature[];
3585
3599
  /** URLs associated with the object */
3586
3600
  urls: {
@@ -3868,11 +3882,6 @@ export interface CreateInviteToCollection {
3868
3882
  export type CreateOrganizationInvite = CreateInviteToOrganization | CreateInviteToSpace | CreateInviteToCollection;
3869
3883
  /** An invite link created in an organization */
3870
3884
  export type OrganizationInviteLink = InviteLinkToOrganization | InviteLinkToSpace | InviteLinkToCollection;
3871
- /** Interval for a billing subscription */
3872
- export declare enum BillingInterval {
3873
- Monthly = "monthly",
3874
- Yearly = "yearly"
3875
- }
3876
3885
  export interface UpgradeOrganizationBilling {
3877
3886
  /** Name of the product */
3878
3887
  product: BillingProduct;
@@ -4626,6 +4635,13 @@ export interface SiteCustomizationSettings {
4626
4635
  socialPreview: {
4627
4636
  url?: URL;
4628
4637
  };
4638
+ insights: {
4639
+ /**
4640
+ * Whether GitBook identifies the visitor on the site using a cookie.
4641
+ * @default true
4642
+ */
4643
+ trackingCookie: boolean;
4644
+ };
4629
4645
  }
4630
4646
  export interface SiteIntegrationScript {
4631
4647
  /** Script URL to load. */
package/dist/index.cjs CHANGED
@@ -268,7 +268,7 @@ module.exports = __toCommonJS(src_exports);
268
268
 
269
269
  // package.json
270
270
  var name = "@gitbook/api";
271
- var version = "0.107.0";
271
+ var version = "0.108.0";
272
272
 
273
273
  // src/client.ts
274
274
  var import_event_iterator = __toESM(require_node(), 1);
@@ -506,6 +506,11 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
506
506
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
507
507
  return BillingProduct2;
508
508
  })(BillingProduct || {});
509
+ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
510
+ BillingInterval2["Monthly"] = "monthly";
511
+ BillingInterval2["Yearly"] = "yearly";
512
+ return BillingInterval2;
513
+ })(BillingInterval || {});
509
514
  var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
510
515
  BillingTrialStatus2["Notapplicable"] = "notapplicable";
511
516
  BillingTrialStatus2["None"] = "none";
@@ -706,11 +711,6 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
706
711
  TeamMemberRole2["Member"] = "member";
707
712
  return TeamMemberRole2;
708
713
  })(TeamMemberRole || {});
709
- var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
710
- BillingInterval2["Monthly"] = "monthly";
711
- BillingInterval2["Yearly"] = "yearly";
712
- return BillingInterval2;
713
- })(BillingInterval || {});
714
714
  var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
715
715
  StorageUploadKind2["CustomizationFont"] = "customization_font";
716
716
  return StorageUploadKind2;
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.107.0";
175
+ var version = "0.108.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -410,6 +410,11 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
410
410
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
411
411
  return BillingProduct2;
412
412
  })(BillingProduct || {});
413
+ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
414
+ BillingInterval2["Monthly"] = "monthly";
415
+ BillingInterval2["Yearly"] = "yearly";
416
+ return BillingInterval2;
417
+ })(BillingInterval || {});
413
418
  var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
414
419
  BillingTrialStatus2["Notapplicable"] = "notapplicable";
415
420
  BillingTrialStatus2["None"] = "none";
@@ -610,11 +615,6 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
610
615
  TeamMemberRole2["Member"] = "member";
611
616
  return TeamMemberRole2;
612
617
  })(TeamMemberRole || {});
613
- var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
614
- BillingInterval2["Monthly"] = "monthly";
615
- BillingInterval2["Yearly"] = "yearly";
616
- return BillingInterval2;
617
- })(BillingInterval || {});
618
618
  var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
619
619
  StorageUploadKind2["CustomizationFont"] = "customization_font";
620
620
  return StorageUploadKind2;
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.107.0",
7
+ "version": "0.108.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -22214,6 +22214,14 @@
22214
22214
  "business_dec_2021"
22215
22215
  ]
22216
22216
  },
22217
+ "BillingInterval": {
22218
+ "type": "string",
22219
+ "description": "Interval for a billing subscription",
22220
+ "enum": [
22221
+ "monthly",
22222
+ "yearly"
22223
+ ]
22224
+ },
22217
22225
  "BillingTrialStatus": {
22218
22226
  "type": "string",
22219
22227
  "description": "- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n",
@@ -22287,6 +22295,30 @@
22287
22295
  "plan": {
22288
22296
  "$ref": "#/components/schemas/BillingProduct"
22289
22297
  },
22298
+ "billing": {
22299
+ "type": "object",
22300
+ "properties": {
22301
+ "interval": {
22302
+ "$ref": "#/components/schemas/BillingInterval"
22303
+ },
22304
+ "endDate": {
22305
+ "$ref": "#/components/schemas/Timestamp"
22306
+ },
22307
+ "hasPaymentFailed": {
22308
+ "description": "If true, we were unable to collect the last payment",
22309
+ "type": "boolean"
22310
+ },
22311
+ "isScheduledToCancel": {
22312
+ "description": "If true, the billing is set to cancel at the end of its current period",
22313
+ "type": "boolean"
22314
+ }
22315
+ },
22316
+ "required": [
22317
+ "interval",
22318
+ "hasPaymentFailed",
22319
+ "isScheduledToCancel"
22320
+ ]
22321
+ },
22290
22322
  "urls": {
22291
22323
  "type": "object",
22292
22324
  "description": "URLs associated with the object",
@@ -22393,6 +22425,7 @@
22393
22425
  "object",
22394
22426
  "id",
22395
22427
  "plan",
22428
+ "billing",
22396
22429
  "title",
22397
22430
  "createdAt",
22398
22431
  "inviteLinks",
@@ -28353,7 +28386,7 @@
28353
28386
  "$ref": "#/components/schemas/SiteAds"
28354
28387
  },
28355
28388
  "features": {
28356
- "description": "A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n",
28389
+ "description": "A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n",
28357
28390
  "type": "array",
28358
28391
  "items": {
28359
28392
  "$ref": "#/components/schemas/SiteFeature"
@@ -29137,14 +29170,6 @@
29137
29170
  }
29138
29171
  ]
29139
29172
  },
29140
- "BillingInterval": {
29141
- "type": "string",
29142
- "description": "Interval for a billing subscription",
29143
- "enum": [
29144
- "monthly",
29145
- "yearly"
29146
- ]
29147
- },
29148
29173
  "UpgradeOrganizationBilling": {
29149
29174
  "type": "object",
29150
29175
  "properties": {
@@ -31080,6 +31105,19 @@
31080
31105
  "$ref": "#/components/schemas/URL"
31081
31106
  }
31082
31107
  }
31108
+ },
31109
+ "insights": {
31110
+ "type": "object",
31111
+ "properties": {
31112
+ "trackingCookie": {
31113
+ "type": "boolean",
31114
+ "description": "Whether GitBook identifies the visitor on the site using a cookie.",
31115
+ "default": true
31116
+ }
31117
+ },
31118
+ "required": [
31119
+ "trackingCookie"
31120
+ ]
31083
31121
  }
31084
31122
  },
31085
31123
  "required": [
@@ -31097,7 +31135,8 @@
31097
31135
  "pagination",
31098
31136
  "git",
31099
31137
  "privacyPolicy",
31100
- "socialPreview"
31138
+ "socialPreview",
31139
+ "insights"
31101
31140
  ]
31102
31141
  },
31103
31142
  "SiteIntegrationScript": {
package/spec/openapi.yaml CHANGED
@@ -13007,6 +13007,12 @@ components:
13007
13007
  - team_oct_2019_free
13008
13008
  - team_dec_2021
13009
13009
  - business_dec_2021
13010
+ BillingInterval:
13011
+ type: string
13012
+ description: Interval for a billing subscription
13013
+ enum:
13014
+ - monthly
13015
+ - yearly
13010
13016
  BillingTrialStatus:
13011
13017
  type: string
13012
13018
  description: |
@@ -13061,6 +13067,23 @@ components:
13061
13067
  type: boolean
13062
13068
  plan:
13063
13069
  $ref: "#/components/schemas/BillingProduct"
13070
+ billing:
13071
+ type: object
13072
+ properties:
13073
+ interval:
13074
+ $ref: "#/components/schemas/BillingInterval"
13075
+ endDate:
13076
+ $ref: "#/components/schemas/Timestamp"
13077
+ hasPaymentFailed:
13078
+ description: If true, we were unable to collect the last payment
13079
+ type: boolean
13080
+ isScheduledToCancel:
13081
+ description: If true, the billing is set to cancel at the end of its current period
13082
+ type: boolean
13083
+ required:
13084
+ - interval
13085
+ - hasPaymentFailed
13086
+ - isScheduledToCancel
13064
13087
  urls:
13065
13088
  type: object
13066
13089
  description: URLs associated with the object
@@ -13137,6 +13160,7 @@ components:
13137
13160
  - object
13138
13161
  - id
13139
13162
  - plan
13163
+ - billing
13140
13164
  - title
13141
13165
  - createdAt
13142
13166
  - inviteLinks
@@ -17065,7 +17089,7 @@ components:
17065
17089
  $ref: "#/components/schemas/SiteAds"
17066
17090
  features:
17067
17091
  description: |
17068
- A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.
17092
+ A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.
17069
17093
  type: array
17070
17094
  items:
17071
17095
  $ref: "#/components/schemas/SiteFeature"
@@ -17600,12 +17624,6 @@ components:
17600
17624
  - $ref: "#/components/schemas/InviteLinkToOrganization"
17601
17625
  - $ref: "#/components/schemas/InviteLinkToSpace"
17602
17626
  - $ref: "#/components/schemas/InviteLinkToCollection"
17603
- BillingInterval:
17604
- type: string
17605
- description: Interval for a billing subscription
17606
- enum:
17607
- - monthly
17608
- - yearly
17609
17627
  UpgradeOrganizationBilling:
17610
17628
  type: object
17611
17629
  properties:
@@ -18973,6 +18991,15 @@ components:
18973
18991
  properties:
18974
18992
  url:
18975
18993
  $ref: "#/components/schemas/URL"
18994
+ insights:
18995
+ type: object
18996
+ properties:
18997
+ trackingCookie:
18998
+ type: boolean
18999
+ description: Whether GitBook identifies the visitor on the site using a cookie.
19000
+ default: true
19001
+ required:
19002
+ - trackingCookie
18976
19003
  required:
18977
19004
  - styling
18978
19005
  - internationalization
@@ -18989,6 +19016,7 @@ components:
18989
19016
  - git
18990
19017
  - privacyPolicy
18991
19018
  - socialPreview
19019
+ - insights
18992
19020
  SiteIntegrationScript:
18993
19021
  type: object
18994
19022
  properties: