@youversion/platform-core 0.5.1 → 0.5.6

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @youversion/platform-core@0.5.1 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/core
2
+ > @youversion/platform-core@0.5.6 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/core
3
3
  > tsup src/index.ts --format cjs,esm --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,10 +9,10 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  CJS dist/index.cjs 39.59 KB
12
- CJS ⚡️ Build success in 39ms
12
+ CJS ⚡️ Build success in 37ms
13
13
  ESM dist/index.js 37.59 KB
14
- ESM ⚡️ Build success in 39ms
14
+ ESM ⚡️ Build success in 38ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 2237ms
17
- DTS dist/index.d.cts 34.08 KB
18
- DTS dist/index.d.ts 34.08 KB
16
+ DTS ⚡️ Build success in 1846ms
17
+ DTS dist/index.d.cts 34.21 KB
18
+ DTS dist/index.d.ts 34.21 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @youversion/platform-core
2
2
 
3
+ ## 0.5.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 27b32f8: Publish with NPM Token
8
+
9
+ ## 0.5.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 752e0d5: fix(ci): remove registry-url for NPM Trusted Publishing
14
+ - 752e0d5: Use npm during the release process to support OIDC.
15
+
16
+ ## 0.5.4
17
+
18
+ ### Patch Changes
19
+
20
+ - 1acb93a: fix(ci): remove registry-url for NPM Trusted Publishing
21
+ - 1acb93a: Use npm during the release process to support OIDC.
22
+
23
+ ## 0.5.3
24
+
25
+ ### Patch Changes
26
+
27
+ - 7fd89a0: fix(ci): remove registry-url for NPM Trusted Publishing
28
+
29
+ ## 0.5.2
30
+
31
+ ### Patch Changes
32
+
33
+ - 2d11ab6: Publishing workflow now uses NPM Trusted Publishing instead of token publishing.
34
+
3
35
  ## 0.5.1
4
36
 
5
37
  ### Patch Changes
package/README.md CHANGED
@@ -1,29 +1,10 @@
1
- ![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue)
2
- ![Node.js >= 20.0.0](https://img.shields.io/badge/Node.js-%3E%3D%2020.0.0-339933?logo=node.js&logoColor=white)
3
- ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)
1
+ ![License](https://img.shields.io/badge/license-Apache%202.0-blue)
4
2
 
5
3
  # @youversion/platform-core
6
4
 
7
5
  A type-safe TypeScript SDK for accessing the YouVersion Platform APIs. Get Bible content and build Bible-based applications.
8
6
 
9
- ## Overview
10
-
11
- `@youversion/platform-core` provides comprehensive API clients for the YouVersion Bible Platform. Access Bible versions, books, chapters, verses, language information, and Verse of the Day. Built with TypeScript for type safety and works in Node.js and browser environments.
12
-
13
- > **📚 Full Documentation:** [developers.youversion.com/sdks/react](https://developers.youversion.com/sdks/react)
14
-
15
- ## Installation
16
-
17
- ```bash
18
- pnpm add @youversion/platform-core
19
- ```
20
-
21
- ### Prerequisites
22
-
23
- - Node.js >= 20.0.0
24
- - YouVersion Platform App Key ([Get from platform.youversion.com](https://platform.youversion.com/))
25
-
26
- ## When to Use This Package
7
+ ## When to use this package
27
8
 
28
9
  Use `@youversion/platform-core` when you need:
29
10
  - ✅ Direct access to YouVersion Platform APIs
@@ -35,12 +16,15 @@ Use `@youversion/platform-core` when you need:
35
16
  - ❌ Building React components → Use [@youversion/platform-react-hooks](../hooks/README.md) for hooks with state management
36
17
  - ❌ Need ready-made UI → Use [@youversion/platform-react-ui](../ui/README.md) for production-ready components
37
18
 
38
- ## Related Packages
19
+ ## Install
20
+
21
+ ```bash
22
+ pnpm add @youversion/platform-core
23
+ ```
39
24
 
40
- - **[@youversion/platform-react-hooks](../hooks/README.md)** - React hooks wrapping this core SDK
41
- - **[@youversion/platform-react-ui](../ui/README.md)** - Pre-built React components
25
+ Get your App Key at [platform.youversion.com](https://platform.youversion.com/)
42
26
 
43
- ## Quick Start
27
+ ## Usage
44
28
 
45
29
  ```ts
46
30
  import { ApiClient, BibleClient } from '@youversion/platform-core'
@@ -61,49 +45,6 @@ const passage = await bibleClient.getPassage(111, 'JHN.3.16')
61
45
  console.log(passage.content) // "For God so loved the world..."
62
46
  ```
63
47
 
64
- ## Features
65
-
66
- - Retrieve Bible versions, books, chapters, verses, and passages
67
- - Get formatted passages with optional headings and notes
68
- - Access the complete Bible index structure
69
- - Query available languages by country
70
- - Get Verse of the Day
71
-
72
- ## Configuration
73
-
74
- ```ts
75
- const apiClient = new ApiClient({
76
- appKey: import.meta.env.YVP_APP_KEY, // Required
77
- timeout: 10000, // Optional (default: 10000ms)
78
- })
79
- ```
80
-
81
- ## Troubleshooting
82
-
83
- ### "Invalid appKey" Error
84
-
85
- **Solution:** Verify your App Key from [platform.youversion.com](https://platform.youversion.com/). Check for typos or extra whitespace.
86
-
87
- ### "Version not found" Error (404)
88
-
89
- **Solution:** Verify the version ID exists:
90
-
91
- ```ts
92
- const versions = await bibleClient.getVersions('en*')
93
- const validIds = versions.data.map(v => v.id)
94
- console.log('Valid version IDs:', validIds)
95
- ```
96
-
97
- ## Development
98
-
99
- See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development instructions.
100
-
101
- ## License
102
-
103
- See [LICENSE](../../LICENSE)
104
-
105
- ## Support
48
+ ---
106
49
 
107
- - GitHub Issues: [Create an issue](https://github.com/youversion/platform-sdk-react/issues)
108
- - Platform Docs: [platform.youversion.com](https://platform.youversion.com/)
109
- - Monorepo: [YouVersion Platform SDK](../../README.md)
50
+ **API Reference:** [developers.youversion.com/sdks/typescript](https://developers.youversion.com/sdks/typescript)
package/dist/index.d.cts CHANGED
@@ -3,13 +3,14 @@ import { z } from 'zod';
3
3
  declare const BibleVersionSchema: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
5
  abbreviation: z.ZodString;
6
- copyright_long: z.ZodString;
7
- copyright_short: z.ZodString;
6
+ copyright_long: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ copyright_short: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  info: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  publisher_url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
10
10
  language_tag: z.ZodString;
11
11
  local_abbreviation: z.ZodString;
12
12
  local_title: z.ZodString;
13
+ organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
14
  title: z.ZodString;
14
15
  books: z.ZodArray<z.ZodUnion<readonly [...z.ZodLiteral<"GEN" | "EXO" | "LEV" | "NUM" | "DEU" | "JOS" | "JDG" | "RUT" | "1SA" | "2SA" | "1KI" | "2KI" | "1CH" | "2CH" | "EZR" | "NEH" | "EST" | "JOB" | "PSA" | "PRO" | "ECC" | "SNG" | "ISA" | "JER" | "LAM" | "EZK" | "DAN" | "HOS" | "JOL" | "AMO" | "OBA" | "JON" | "MIC" | "NAM" | "HAB" | "ZEP" | "HAG" | "ZEC" | "MAL" | "MAT" | "MRK" | "LUK" | "JHN" | "ACT" | "ROM" | "1CO" | "2CO" | "GAL" | "EPH" | "PHP" | "COL" | "1TH" | "2TH" | "1TI" | "2TI" | "TIT" | "PHM" | "HEB" | "JAS" | "1PE" | "2PE" | "1JN" | "2JN" | "3JN" | "JUD" | "REV" | "TOB" | "JDT" | "ESG" | "WIS" | "SIR" | "BAR" | "LJE" | "S3Y" | "SUS" | "BEL" | "1MA" | "2MA" | "3MA" | "4MA" | "1ES" | "2ES" | "MAN" | "PS2" | "ODA" | "PSS" | "3ES" | "EZA" | "5EZ" | "6EZ" | "DAG" | "PS3" | "2BA" | "LBA" | "JUB" | "ENO" | "1MQ" | "2MQ" | "3MQ" | "REP" | "4BA" | "LAO" | "LKA">[], z.ZodType<string & {}, unknown, z.core.$ZodTypeInternals<string & {}, unknown>>]>>;
15
16
  youversion_deep_link: z.ZodURL;
package/dist/index.d.ts CHANGED
@@ -3,13 +3,14 @@ import { z } from 'zod';
3
3
  declare const BibleVersionSchema: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
5
  abbreviation: z.ZodString;
6
- copyright_long: z.ZodString;
7
- copyright_short: z.ZodString;
6
+ copyright_long: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ copyright_short: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  info: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  publisher_url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
10
10
  language_tag: z.ZodString;
11
11
  local_abbreviation: z.ZodString;
12
12
  local_title: z.ZodString;
13
+ organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
14
  title: z.ZodString;
14
15
  books: z.ZodArray<z.ZodUnion<readonly [...z.ZodLiteral<"GEN" | "EXO" | "LEV" | "NUM" | "DEU" | "JOS" | "JDG" | "RUT" | "1SA" | "2SA" | "1KI" | "2KI" | "1CH" | "2CH" | "EZR" | "NEH" | "EST" | "JOB" | "PSA" | "PRO" | "ECC" | "SNG" | "ISA" | "JER" | "LAM" | "EZK" | "DAN" | "HOS" | "JOL" | "AMO" | "OBA" | "JON" | "MIC" | "NAM" | "HAB" | "ZEP" | "HAG" | "ZEC" | "MAL" | "MAT" | "MRK" | "LUK" | "JHN" | "ACT" | "ROM" | "1CO" | "2CO" | "GAL" | "EPH" | "PHP" | "COL" | "1TH" | "2TH" | "1TI" | "2TI" | "TIT" | "PHM" | "HEB" | "JAS" | "1PE" | "2PE" | "1JN" | "2JN" | "3JN" | "JUD" | "REV" | "TOB" | "JDT" | "ESG" | "WIS" | "SIR" | "BAR" | "LJE" | "S3Y" | "SUS" | "BEL" | "1MA" | "2MA" | "3MA" | "4MA" | "1ES" | "2ES" | "MAN" | "PS2" | "ODA" | "PSS" | "3ES" | "EZA" | "5EZ" | "6EZ" | "DAG" | "PS3" | "2BA" | "LBA" | "JUB" | "ENO" | "1MQ" | "2MQ" | "3MQ" | "REP" | "4BA" | "LAO" | "LKA">[], z.ZodType<string & {}, unknown, z.core.$ZodTypeInternals<string & {}, unknown>>]>>;
15
16
  youversion_deep_link: z.ZodURL;
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@youversion/platform-core",
3
- "version": "0.5.1",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
- "access": "public"
6
+ "access": "public",
7
+ "provenance": true
7
8
  },
8
9
  "repository": {
9
10
  "type": "git",
@@ -21,10 +22,10 @@
21
22
  }
22
23
  },
23
24
  "devDependencies": {
24
- "@vitest/coverage-v8": "^4.0.4",
25
+ "@vitest/coverage-v8": "4.0.4",
25
26
  "dotenv-cli": "7.4.2",
26
27
  "eslint": "9.38.0",
27
- "jsdom": "^24.0.0",
28
+ "jsdom": "24.0.0",
28
29
  "msw": "2.11.6",
29
30
  "typescript": "5.9.3",
30
31
  "vitest": "4.0.4",