@ray-js/api 1.7.25 → 1.7.27

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.
@@ -23,4 +23,8 @@ export declare const ai: {
23
23
  petsPictureQualityDetectForImage: typeof ty.ai.petsPictureQualityDetectForImage;
24
24
  petsDetectCreate: typeof ty.ai.petsDetectCreate;
25
25
  petsDetectDestory: typeof ty.ai.petsDetectDestory;
26
+ createForegroundVideoService: typeof ty.ai.createForegroundVideoService;
27
+ destroyForegroundVideoService: typeof ty.ai.destroyForegroundVideoService;
28
+ processForegroundMediaByTemplate: typeof ty.ai.processForegroundMediaByTemplate;
29
+ processPetForegroundMediaByTemplate: typeof ty.ai.processPetForegroundMediaByTemplate;
26
30
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../@types/AIKit.d.ts" />
2
2
 
3
- import { createFactory } from './utils';
3
+ import { createFactory } from '@ray-js/api/src/utils';
4
4
  const factory = createFactory('AIKit');
5
5
 
6
6
  // ray 1.6.29 集成
@@ -73,5 +73,17 @@ export const ai = {
73
73
  }),
74
74
  petsDetectDestory: factory('petsDetectDestory', {
75
75
  "namespace": "ai"
76
+ }),
77
+ createForegroundVideoService: factory('createForegroundVideoService', {
78
+ "namespace": "ai"
79
+ }),
80
+ destroyForegroundVideoService: factory('destroyForegroundVideoService', {
81
+ "namespace": "ai"
82
+ }),
83
+ processForegroundMediaByTemplate: factory('processForegroundMediaByTemplate', {
84
+ "namespace": "ai"
85
+ }),
86
+ processPetForegroundMediaByTemplate: factory('processPetForegroundMediaByTemplate', {
87
+ "namespace": "ai"
76
88
  })
77
89
  };
package/lib/all-kits.d.ts CHANGED
@@ -10,6 +10,6 @@ export * from './OutdoorKit-1.0.4';
10
10
  export * from './MediaKit-3.4.1';
11
11
  import * as device from './DeviceKit-4.13.1';
12
12
  export { device };
13
- export * from './AIKit-1.2.0';
13
+ export * from './AIKit-1.3.3';
14
14
  export * from './IPCKit-6.4.5';
15
15
  export * from './WearKit-1.1.6';
package/lib/all-kits.js CHANGED
@@ -10,6 +10,6 @@ export * from './OutdoorKit-1.0.4';
10
10
  export * from './MediaKit-3.4.1';
11
11
  import * as device from './DeviceKit-4.13.1';
12
12
  export { device };
13
- export * from './AIKit-1.2.0';
13
+ export * from './AIKit-1.3.3';
14
14
  export * from './IPCKit-6.4.5';
15
15
  export * from './WearKit-1.1.6';
@@ -6,6 +6,7 @@ export * from './device';
6
6
  export * from './linkage';
7
7
  export * from './highlights';
8
8
  export * from './deviceFile';
9
+ export * from './petAIPhotos';
9
10
  export * from './remoteGroup';
10
11
  export * from './outdoor';
11
12
  export * from './doorlock';
@@ -6,6 +6,7 @@ export * from './device';
6
6
  export * from './linkage';
7
7
  export * from './highlights';
8
8
  export * from './deviceFile';
9
+ export * from './petAIPhotos';
9
10
  export * from './remoteGroup';
10
11
 
11
12
  // 仅用于出行产品
@@ -1996,4 +1996,69 @@ export type GetMovePointDetails = {
1996
1996
  mpId: number;
1997
1997
  };
1998
1998
  export type GetMovePointDetailsRet = Point;
1999
+ export type AiFilterResult = {
2000
+ templates: any;
2001
+ type: string;
2002
+ style: string;
2003
+ }[];
2004
+ type PetType = 'cat' | 'dog';
2005
+ export type PetAdd = {
2006
+ petType: PetType;
2007
+ breedCode: string;
2008
+ sex: number;
2009
+ activeness: number;
2010
+ name: string;
2011
+ weight: number;
2012
+ birth: number;
2013
+ ownerId?: string;
2014
+ avatar?: string;
2015
+ timeZone: string;
2016
+ tuyaAppId: string;
2017
+ foodId?: number;
2018
+ rfid?: string;
2019
+ devIds?: string[];
2020
+ idPhotos?: IdPhotos[];
2021
+ features?: Feature[];
2022
+ dataType: 'ai_pet_center' | string;
2023
+ };
2024
+ type IdPhotos = Pick<Images, 'angle' | 'objectKey'> & {
2025
+ display: string;
2026
+ };
2027
+ type Feature = {
2028
+ category: string;
2029
+ details: string[];
2030
+ };
2031
+ type Images = {
2032
+ imageDisplayUrl: string;
2033
+ objectKey: string;
2034
+ angle: string;
2035
+ desc: string;
2036
+ };
2037
+ export type IFetchPetEatingRecordParams = {
2038
+ ownerId: string;
2039
+ uuid: string;
2040
+ petId?: number;
2041
+ startTime?: number;
2042
+ endTime?: number;
2043
+ pageNo: number;
2044
+ pageSize: number;
2045
+ };
2046
+ export type IEatingRecord = {
2047
+ recordNo: string;
2048
+ devId: string;
2049
+ deviceName: string;
2050
+ ownerId: string;
2051
+ roomId: string;
2052
+ roomName: string;
2053
+ recordTime: number;
2054
+ isEncrypted: number;
2055
+ videoCoverDisplay: string;
2056
+ videoDisplay: string;
2057
+ videoDuration: number;
2058
+ petAction: string;
2059
+ pets: {
2060
+ petId: number;
2061
+ petName: string;
2062
+ }[];
2063
+ };
1999
2064
  export {};
@@ -66,4 +66,6 @@ export let BusinessType = /*#__PURE__*/function (BusinessType) {
66
66
  return BusinessType;
67
67
  }({});
68
68
 
69
- // 预制检测事件
69
+ // 预制检测事件
70
+
71
+ // 宠物进食记录
@@ -0,0 +1,6 @@
1
+ import { AiFilterResult } from './interface';
2
+ /**
3
+ * 获取 AI 素材数据
4
+ */
5
+ declare const getAiFilterTemplateData: () => Promise<AiFilterResult>;
6
+ export { getAiFilterTemplateData };
@@ -0,0 +1,10 @@
1
+ import { requestFunc } from './highlights';
2
+ /**
3
+ * 获取 AI 素材数据
4
+ */
5
+ const getAiFilterTemplateData = () => {
6
+ return requestFunc(`m.tc.image.style.templates.get`, {
7
+ type: 'petAppAI'
8
+ }, '3.0');
9
+ };
10
+ export { getAiFilterTemplateData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.25",
3
+ "version": "1.7.27",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,16 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.25",
33
- "@ray-js/router": "1.7.25",
34
- "@ray-js/wechat": "^0.3.13",
32
+ "@ray-js/framework": "1.7.27",
33
+ "@ray-js/router": "1.7.27",
35
34
  "base64-browser": "^1.0.1",
36
35
  "query-string": "^7.1.3"
37
36
  },
37
+ "peerDependencies": {
38
+ "@ray-js/wechat": "^0.3.13"
39
+ },
38
40
  "devDependencies": {
39
- "@ray-js/cli": "1.7.25",
41
+ "@ray-js/cli": "1.7.27",
40
42
  "art-template": "^4.13.4",
41
43
  "fs-extra": "^10.1.0",
42
44
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +48,5 @@
46
48
  "access": "public",
47
49
  "registry": "https://registry.npmjs.org"
48
50
  },
49
- "gitHead": "ef8e38dc9f86bf83ea09461707952970c082c110"
51
+ "gitHead": "fbba848d7602d09deafd30c0df782f0ac45a2ff9"
50
52
  }