@ray-js/ray-ipc-utils 1.1.0-beta-2 → 1.1.0-beta-3

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/lib/index.d.ts CHANGED
@@ -37,6 +37,15 @@ declare const IpcUtils: {
37
37
  } | undefined, isGeneral?: false | undefined) => Promise<import("./kit/interface").IRes>;
38
38
  goToGeneralHelpMini: () => Promise<import("./kit/interface").IRes>;
39
39
  goToIpcHelpMini: (errCode: number, deviceId: string, helpNum: number, helpFeedBack: boolean, brandColor?: string) => Promise<import("./kit/interface").IRes>;
40
+ getIsSupprtedCloudStorageSync: (deviceId: string) => Promise<{
41
+ code: number;
42
+ data: boolean;
43
+ msg?: undefined;
44
+ } | {
45
+ code: number;
46
+ data: boolean;
47
+ msg: string | boolean | import("./kit/interface").IApiError | undefined;
48
+ }>;
40
49
  requestWifiSignal: <T_14>(deviceId: string, dps?: {}) => Promise<import("./kit/interface").IRes>;
41
50
  wakeUpDevice: <T_15>(deviceId: string, dps?: {}) => Promise<import("./kit/interface").IRes>;
42
51
  useTrafficViewTip: () => boolean;
@@ -122,3 +122,17 @@ export declare const goToGeneralHelpMini: () => Promise<IRes>;
122
122
  * @param {string} brandColor 品牌色
123
123
  */
124
124
  export declare const goToIpcHelpMini: (errCode: number, deviceId: string, helpNum: number, helpFeedBack: boolean, brandColor?: string) => Promise<IRes>;
125
+ /**
126
+ *
127
+ * @param deviceId 设备id
128
+ * @returns true/false
129
+ */
130
+ export declare const getIsSupprtedCloudStorageSync: (deviceId: string) => Promise<{
131
+ code: number;
132
+ data: boolean;
133
+ msg?: undefined;
134
+ } | {
135
+ code: number;
136
+ data: boolean;
137
+ msg: string | boolean | import("../interface").IApiError | undefined;
138
+ }>;
@@ -713,4 +713,37 @@ export const goToIpcHelpMini = async function (errCode, deviceId, helpNum, helpF
713
713
  msg: String(err)
714
714
  };
715
715
  }
716
+ };
717
+
718
+ /**
719
+ *
720
+ * @param deviceId 设备id
721
+ * @returns true/false
722
+ */
723
+ export const getIsSupprtedCloudStorageSync = async deviceId => {
724
+ const res = await getDevInfo(deviceId);
725
+ const {
726
+ code,
727
+ msg
728
+ } = res;
729
+ if (code !== -1) {
730
+ const {
731
+ attribute
732
+ } = res.data;
733
+ if (attribute & 1 << 13 || attribute & 1 << 15) {
734
+ return {
735
+ code: 0,
736
+ data: true
737
+ };
738
+ }
739
+ return {
740
+ code: 0,
741
+ data: false
742
+ };
743
+ }
744
+ return {
745
+ code: -1,
746
+ data: false,
747
+ msg: msg
748
+ };
716
749
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-utils",
3
- "version": "1.1.0-beta-2",
3
+ "version": "1.1.0-beta-3",
4
4
  "description": "IPC 工具库",
5
5
  "main": "lib/index",
6
6
  "files": [