@ray-js/api 1.7.3 → 1.7.4

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,7 +1,7 @@
1
1
  /**
2
2
  * HealthKit
3
3
  *
4
- * @version 5.18.4
4
+ * @version 6.5.0
5
5
  */
6
6
  declare namespace ty.health {
7
7
  /**
@@ -1068,6 +1068,111 @@ declare namespace ty.health {
1068
1068
  value: Object[]
1069
1069
  }
1070
1070
 
1071
+ /**
1072
+ *@description 获取体脂秤算法数据*/
1073
+ export function queryBodyFatScaleAlgorithm(params: {
1074
+ /** 性别(1-男、2-女) */
1075
+ sex: number
1076
+ /** 体重(单位kg) */
1077
+ weight: number
1078
+ /** 阻抗 */
1079
+ imp: number
1080
+ /** 身高(单位cm) */
1081
+ height: number
1082
+ /** 生日(13位、毫秒) */
1083
+ birthday: number
1084
+ /** 测量时间(13位、毫秒) */
1085
+ time: number
1086
+ success?: (params: {
1087
+ /** bmi */
1088
+ bmi: string
1089
+ /** 体脂率 */
1090
+ fat: string
1091
+ /** 水份率 */
1092
+ water: string
1093
+ /** 肌肉量 */
1094
+ muscle: string
1095
+ /** 蛋白率 */
1096
+ protein: string
1097
+ /** 骨量 */
1098
+ bones: string
1099
+ /** 基础代谢率 */
1100
+ metabolism: string
1101
+ /** 身体年龄 */
1102
+ bodyAge: string
1103
+ /** 身体得分 */
1104
+ bodyScore: string
1105
+ /** 内脂肪等级 */
1106
+ visceralFat: string
1107
+ /** 体型 */
1108
+ bodyType: string
1109
+ /** 去脂指数 */
1110
+ ffm: string
1111
+ /** 脂肪量 */
1112
+ fatMass: string
1113
+ /** 体脂指数 */
1114
+ bodyFatIndex: string
1115
+ /** 肥胖等级 */
1116
+ fatLevel: string
1117
+ /** 标准体重 */
1118
+ standardWeight: string
1119
+ /** 体重控制 */
1120
+ weightControl: string
1121
+ /** 肌肉率 */
1122
+ muscleRatio: string
1123
+ }) => void
1124
+ fail?: (params: {
1125
+ errorMsg: string
1126
+ errorCode: string | number
1127
+ innerError: {
1128
+ errorCode: string | number
1129
+ errorMsg: string
1130
+ }
1131
+ }) => void
1132
+ complete?: () => void
1133
+ }): void
1134
+
1135
+ /**
1136
+ *@description 获取体脂秤算法数据*/
1137
+ export function queryBodyFatScaleAlgorithmSync(request?: BodyScaleParam): {
1138
+ /** bmi */
1139
+ bmi: string
1140
+ /** 体脂率 */
1141
+ fat: string
1142
+ /** 水份率 */
1143
+ water: string
1144
+ /** 肌肉量 */
1145
+ muscle: string
1146
+ /** 蛋白率 */
1147
+ protein: string
1148
+ /** 骨量 */
1149
+ bones: string
1150
+ /** 基础代谢率 */
1151
+ metabolism: string
1152
+ /** 身体年龄 */
1153
+ bodyAge: string
1154
+ /** 身体得分 */
1155
+ bodyScore: string
1156
+ /** 内脂肪等级 */
1157
+ visceralFat: string
1158
+ /** 体型 */
1159
+ bodyType: string
1160
+ /** 去脂指数 */
1161
+ ffm: string
1162
+ /** 脂肪量 */
1163
+ fatMass: string
1164
+ /** 体脂指数 */
1165
+ bodyFatIndex: string
1166
+ /** 肥胖等级 */
1167
+ fatLevel: string
1168
+ /** 标准体重 */
1169
+ standardWeight: string
1170
+ /** 体重控制 */
1171
+ weightControl: string
1172
+ /** 肌肉率 */
1173
+ muscleRatio: string
1174
+ }
1175
+
1071
1176
  export type RecordParams = {
1072
1177
  /** RecordData数据列表的json array字符串 */
1073
1178
  request: string
@@ -1118,4 +1223,19 @@ declare namespace ty.health {
1118
1223
  }
1119
1224
 
1120
1225
  export type Object = {}
1226
+
1227
+ export type BodyScaleParam = {
1228
+ /** 性别(1-男、2-女) */
1229
+ sex: number
1230
+ /** 体重(单位kg) */
1231
+ weight: number
1232
+ /** 阻抗 */
1233
+ imp: number
1234
+ /** 身高(单位cm) */
1235
+ height: number
1236
+ /** 生日(13位、毫秒) */
1237
+ birthday: number
1238
+ /** 测量时间(13位、毫秒) */
1239
+ time: number
1240
+ }
1121
1241
  }
@@ -39,4 +39,6 @@ export declare const health: {
39
39
  saveCategoryNoTimeWithDataSync: typeof ty.health.saveCategoryNoTimeWithDataSync;
40
40
  readCategoryDataWithType: typeof ty.health.readCategoryDataWithType;
41
41
  readCategoryDataWithTypeSync: typeof ty.health.readCategoryDataWithTypeSync;
42
+ queryBodyFatScaleAlgorithm: typeof ty.health.queryBodyFatScaleAlgorithm;
43
+ queryBodyFatScaleAlgorithmSync: typeof ty.health.queryBodyFatScaleAlgorithmSync;
42
44
  };
@@ -2,8 +2,6 @@
2
2
 
3
3
  import { createFactory } from './utils';
4
4
  const factory = createFactory('HealthKit');
5
-
6
- // ray 1.6.17 集成
7
5
  export const health = {
8
6
  getHealthConnectStatus: factory('getHealthConnectStatus', {
9
7
  namespace: 'health'
@@ -124,5 +122,11 @@ export const health = {
124
122
  }),
125
123
  readCategoryDataWithTypeSync: factory('readCategoryDataWithTypeSync', {
126
124
  namespace: 'health'
125
+ }),
126
+ queryBodyFatScaleAlgorithm: factory('queryBodyFatScaleAlgorithm', {
127
+ namespace: 'health'
128
+ }),
129
+ queryBodyFatScaleAlgorithmSync: factory('queryBodyFatScaleAlgorithmSync', {
130
+ namespace: 'health'
127
131
  })
128
132
  };
package/lib/index.d.ts CHANGED
@@ -41,6 +41,8 @@ export declare const health: {
41
41
  saveCategoryNoTimeWithDataSync: typeof ty.health.saveCategoryNoTimeWithDataSync;
42
42
  readCategoryDataWithType: typeof ty.health.readCategoryDataWithType;
43
43
  readCategoryDataWithTypeSync: typeof ty.health.readCategoryDataWithTypeSync;
44
+ queryBodyFatScaleAlgorithm: typeof ty.health.queryBodyFatScaleAlgorithm;
45
+ queryBodyFatScaleAlgorithmSync: typeof ty.health.queryBodyFatScaleAlgorithmSync;
44
46
  addPanelUser: typeof ty.health.addPanelUser;
45
47
  updatePanelUser: typeof ty.health.updatePanelUser;
46
48
  deletePanelUser: typeof ty.health.deletePanelUser;
package/lib/index.js CHANGED
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import { factory } from './utils';
5
5
  export * from './constants';
6
6
  export * from './all-kits';
7
- import { health as healthKit } from './HealthKit-5.18.4';
7
+ import { health as healthKit } from './HealthKit-6.5.0';
8
8
  import { healthCloudApi } from './cloud';
9
9
  export const health = _objectSpread(_objectSpread({}, healthCloudApi), healthKit);
10
10
  export * from './lifecycles';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.3",
33
- "@ray-js/router": "1.7.3",
32
+ "@ray-js/framework": "1.7.4",
33
+ "@ray-js/router": "1.7.4",
34
34
  "@ray-js/wechat": "^0.3.8",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.7.3",
39
+ "@ray-js/cli": "1.7.4",
40
40
  "art-template": "^4.13.4",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "f03baa77da12d1174ea29411fa8bc5c94838c870"
49
+ "gitHead": "b959f1f1f4fb438fd0e13039d82ff238aad0e609"
50
50
  }