@youversion/platform-react-ui 1.1.0 → 1.2.1

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/index.cjs CHANGED
@@ -12808,7 +12808,9 @@ var BibleClient = class {
12808
12808
  * Fetches all books for a given Bible version.
12809
12809
  * @param versionId The version ID.
12810
12810
  * @param canon Optional canon filter ("old_testament", 'new_testament', 'deuterocanon').
12811
- * @returns An array of BibleBook objects.
12811
+ * @returns An array of BibleBook objects. Each book may include an optional `intro` field
12812
+ * containing metadata (id, passage_id, title) for the book's introduction when
12813
+ * available in the Bible version.
12812
12814
  */
12813
12815
  async getBooks(versionId, canon) {
12814
12816
  this.versionIdSchema.parse(versionId);
@@ -12820,7 +12822,9 @@ var BibleClient = class {
12820
12822
  * Fetches a specific book by USFM code for a given version.
12821
12823
  * @param versionId The version ID.
12822
12824
  * @param book The Book Identifier code of the book.
12823
- * @returns The requested BibleBook object.
12825
+ * @returns The requested BibleBook object, which may include an optional `intro` field
12826
+ * containing metadata (id, passage_id, title) for the book's introduction when
12827
+ * available. Use the `passage_id` with `getPassage()` to fetch intro content.
12824
12828
  */
12825
12829
  async getBook(versionId, book) {
12826
12830
  this.versionIdSchema.parse(versionId);
@@ -12978,13 +12982,15 @@ var LanguagesClient = class {
12978
12982
  }
12979
12983
  /**
12980
12984
  * Fetches a collection of languages supported in the Platform.
12981
- * @param options Query parameters for pagination and filtering (country is required).
12985
+ * @param options Query parameters for pagination and filtering.
12982
12986
  * @returns A collection of Language objects.
12983
12987
  */
12984
- async getLanguages(options) {
12988
+ async getLanguages(options = {}) {
12985
12989
  const params = {};
12986
- const country = this.countrySchema.parse(options.country);
12987
- params.country = country;
12990
+ if (options.country !== void 0) {
12991
+ const country = this.countrySchema.parse(options.country);
12992
+ params.country = country;
12993
+ }
12988
12994
  if (options.page_size !== void 0) {
12989
12995
  const pageSizeSchema = external_exports.number().int().positive();
12990
12996
  pageSizeSchema.parse(options.page_size);
package/dist/index.js CHANGED
@@ -12763,7 +12763,9 @@ var BibleClient = class {
12763
12763
  * Fetches all books for a given Bible version.
12764
12764
  * @param versionId The version ID.
12765
12765
  * @param canon Optional canon filter ("old_testament", 'new_testament', 'deuterocanon').
12766
- * @returns An array of BibleBook objects.
12766
+ * @returns An array of BibleBook objects. Each book may include an optional `intro` field
12767
+ * containing metadata (id, passage_id, title) for the book's introduction when
12768
+ * available in the Bible version.
12767
12769
  */
12768
12770
  async getBooks(versionId, canon) {
12769
12771
  this.versionIdSchema.parse(versionId);
@@ -12775,7 +12777,9 @@ var BibleClient = class {
12775
12777
  * Fetches a specific book by USFM code for a given version.
12776
12778
  * @param versionId The version ID.
12777
12779
  * @param book The Book Identifier code of the book.
12778
- * @returns The requested BibleBook object.
12780
+ * @returns The requested BibleBook object, which may include an optional `intro` field
12781
+ * containing metadata (id, passage_id, title) for the book's introduction when
12782
+ * available. Use the `passage_id` with `getPassage()` to fetch intro content.
12779
12783
  */
12780
12784
  async getBook(versionId, book) {
12781
12785
  this.versionIdSchema.parse(versionId);
@@ -12933,13 +12937,15 @@ var LanguagesClient = class {
12933
12937
  }
12934
12938
  /**
12935
12939
  * Fetches a collection of languages supported in the Platform.
12936
- * @param options Query parameters for pagination and filtering (country is required).
12940
+ * @param options Query parameters for pagination and filtering.
12937
12941
  * @returns A collection of Language objects.
12938
12942
  */
12939
- async getLanguages(options) {
12943
+ async getLanguages(options = {}) {
12940
12944
  const params = {};
12941
- const country = this.countrySchema.parse(options.country);
12942
- params.country = country;
12945
+ if (options.country !== void 0) {
12946
+ const country = this.countrySchema.parse(options.country);
12947
+ params.country = country;
12948
+ }
12943
12949
  if (options.page_size !== void 0) {
12944
12950
  const pageSizeSchema = external_exports.number().int().positive();
12945
12951
  pageSizeSchema.parse(options.page_size);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-react-ui",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "React SDK for YouVersion Platform",
5
5
  "license": "TBD",
6
6
  "type": "module",
@@ -39,8 +39,8 @@
39
39
  "lucide-react": "0.546.0",
40
40
  "tailwind-merge": "3.3.1",
41
41
  "tw-animate-css": "1.4.0",
42
- "@youversion/platform-core": "1.1.0",
43
- "@youversion/platform-react-hooks": "1.1.0"
42
+ "@youversion/platform-core": "1.2.1",
43
+ "@youversion/platform-react-hooks": "1.2.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=19.1.0 <20.0.0",