@tryvital/vital-core-react-native 4.0.1 → 4.2.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.
@@ -131,7 +131,7 @@ repositories {
131
131
  }
132
132
 
133
133
  def kotlin_version = getExtOrDefault('kotlinVersion')
134
- def vital_sdk_version = '3.0.0'
134
+ def vital_sdk_version = '3.1.0'
135
135
 
136
136
  dependencies {
137
137
  ksp "com.squareup.moshi:moshi-kotlin-codegen:1.13.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-core-react-native",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "VitalCore", "~> 1.0.0"
20
+ s.dependency "VitalCore", "~> 1.2.1"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
-
5
- root = true
6
-
7
- [*]
8
-
9
- indent_style = space
10
- indent_size = 2
11
-
12
- end_of_line = lf
13
- charset = utf-8
14
- trim_trailing_whitespace = true
15
- insert_final_newline = true
package/.gitattributes DELETED
@@ -1,3 +0,0 @@
1
- *.pbxproj -text
2
- # specific for windows script files
3
- *.bat text eol=crlf
package/.gitignore DELETED
@@ -1,70 +0,0 @@
1
- # OSX
2
- #
3
- .DS_Store
4
-
5
- # XDE
6
- .expo/
7
-
8
- # VSCode
9
- .vscode/
10
- jsconfig.json
11
-
12
- # Xcode
13
- #
14
- build/
15
- *.pbxuser
16
- !default.pbxuser
17
- *.mode1v3
18
- !default.mode1v3
19
- *.mode2v3
20
- !default.mode2v3
21
- *.perspectivev3
22
- !default.perspectivev3
23
- xcuserdata
24
- *.xccheckout
25
- *.moved-aside
26
- DerivedData
27
- *.hmap
28
- *.ipa
29
- *.xcuserstate
30
- project.xcworkspace
31
-
32
- # Android/IJ
33
- #
34
- .classpath
35
- .cxx
36
- .gradle
37
- .idea
38
- .project
39
- .settings
40
- local.properties
41
- android.iml
42
-
43
- # Cocoapods
44
- #
45
- example/ios/Pods
46
-
47
- # Ruby
48
- example/vendor/
49
-
50
- # node.js
51
- #
52
- node_modules/
53
- npm-debug.log
54
- yarn-debug.log
55
- yarn-error.log
56
-
57
- # BUCK
58
- buck-out/
59
- \.buckd/
60
- android/app/libs
61
- android/keystores/debug.keystore
62
-
63
- # Expo
64
- .expo/
65
-
66
- # Turborepo
67
- .turbo/
68
-
69
- # generated by bob
70
- lib/
package/.watchmanconfig DELETED
@@ -1 +0,0 @@
1
- {}
package/.yarnrc DELETED
@@ -1,3 +0,0 @@
1
- # Override Yarn command so we can automatically setup the repo on running `yarn`
2
-
3
- yarn-path "scripts/bootstrap.js"
@@ -1,2 +0,0 @@
1
- .gradle/
2
- build/
package/app.plugin.js DELETED
@@ -1,3 +0,0 @@
1
- const withVitalCore = config => config
2
-
3
- module.exports = withVitalCore
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: ['module:metro-react-native-babel-preset'],
3
- };
@@ -1,70 +0,0 @@
1
- import VitalCore
2
-
3
- struct RNTimeSeriesData: Decodable {
4
- enum TypeKey: String, Decodable {
5
- case glucose
6
- case bloodPressure = "blood_pressure"
7
- }
8
-
9
- enum CodingKeys: String, CodingKey {
10
- case type
11
- case samples
12
- }
13
-
14
- let data: TimeSeriesData
15
-
16
- init(from decoder: Decoder) throws {
17
- let container = try decoder.container(keyedBy: CodingKeys.self)
18
- let type = try container.decode(TypeKey.self, forKey: .type)
19
-
20
- switch type {
21
- case .bloodPressure:
22
- let samples = try container.decode([RNBloodPressureSample].self, forKey: .samples)
23
- data = .bloodPressure(samples.map(\.vitalCoreSample))
24
-
25
- case .glucose:
26
- let samples = try container.decode([RNQuantitySample].self, forKey: .samples)
27
- data = .glucose(samples.map(\.vitalCoreSample))
28
- }
29
- }
30
- }
31
-
32
- struct RNQuantitySample: Decodable {
33
- let id: String?
34
- let value: Double
35
- // JS Date is stringified via `Date.toISOString()` - ISO8601
36
- let startDate: Date
37
- let endDate: Date
38
- let sourceBundle: String?
39
- let productType: String?
40
- let type: String?
41
- let unit: String
42
-
43
- var vitalCoreSample: LocalQuantitySample {
44
- LocalQuantitySample(
45
- id: id,
46
- value: value,
47
- startDate: startDate,
48
- endDate: endDate,
49
- sourceBundle: sourceBundle,
50
- productType: productType,
51
- type: type.flatMap(SourceType.init(rawValue:)),
52
- unit: unit,
53
- metadata: nil
54
- )
55
- }
56
- }
57
-
58
- struct RNBloodPressureSample: Decodable {
59
- let systolic: RNQuantitySample
60
- let diastolic: RNQuantitySample
61
- let pulse: RNQuantitySample?
62
-
63
- var vitalCoreSample: LocalBloodPressureSample {
64
- LocalBloodPressureSample(
65
- systolic: systolic.vitalCoreSample,
66
- diastolic: diastolic.vitalCoreSample,
67
- pulse: pulse?.vitalCoreSample
68
- )
69
- }
70
- }
@@ -1,29 +0,0 @@
1
- const os = require('os');
2
- const path = require('path');
3
- const child_process = require('child_process');
4
-
5
- const root = path.resolve(__dirname, '..');
6
- const args = process.argv.slice(2);
7
- const options = {
8
- cwd: process.cwd(),
9
- env: process.env,
10
- stdio: 'inherit',
11
- encoding: 'utf-8',
12
- };
13
-
14
- if (os.type() === 'Windows_NT') {
15
- options.shell = true;
16
- }
17
-
18
- let result;
19
-
20
- if (process.cwd() !== root || args.length) {
21
- // We're not in the root of the project, or additional arguments were passed
22
- // In this case, forward the command to `yarn`
23
- result = child_process.spawnSync('yarn', args, options);
24
- } else {
25
- // If `yarn` is run without arguments, perform bootstrap
26
- result = child_process.spawnSync('yarn', ['bootstrap'], options);
27
- }
28
-
29
- process.exitCode = result.status;
@@ -1,5 +0,0 @@
1
-
2
- {
3
- "extends": "./tsconfig",
4
- "exclude": ["example"]
5
- }
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": "./",
4
- "paths": {
5
- "vital-core-react-native": ["./src/*", "./src/models/*"]
6
- },
7
- "outDir": "./lib",
8
- "allowUnreachableCode": false,
9
- "allowUnusedLabels": false,
10
- "esModuleInterop": true,
11
- "importsNotUsedAsValues": "error",
12
- "forceConsistentCasingInFileNames": true,
13
- "jsx": "react",
14
- "lib": ["esnext"],
15
- "module": "esnext",
16
- "moduleResolution": "node",
17
- "noFallthroughCasesInSwitch": true,
18
- "noImplicitReturns": true,
19
- "noImplicitUseStrict": false,
20
- "noStrictGenericChecks": false,
21
- "noUncheckedIndexedAccess": true,
22
- "noUnusedLocals": true,
23
- "noUnusedParameters": true,
24
- "resolveJsonModule": true,
25
- "skipLibCheck": true,
26
- "strict": true,
27
- "target": "esnext"
28
- }
29
- }