zmp-sdk 2.23.0-0 → 2.23.0-rc.1

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/CHANGELOG.json CHANGED
@@ -1,16 +1,119 @@
1
1
  [
2
2
  {
3
- "isoDate": "2022-08-03",
4
- "niceDate": "3 August 2022",
5
- "diff": "v2.22.0..",
6
- "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/compare/v2.22.0...v2.22.0",
3
+ "isoDate": "2022-08-18",
4
+ "niceDate": "18 August 2022",
5
+ "diff": "v2.22.2..",
6
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/compare/v2.22.2...v2.22.2",
7
7
  "major": false,
8
8
  "minor": false,
9
9
  "tag": null,
10
- "title": "v2.22.0",
11
- "date": "2022-08-03T08:07:35.287Z",
10
+ "title": "v2.22.2",
11
+ "date": "2022-08-18T05:18:30.804Z",
12
12
  "summary": null,
13
- "commits": [],
13
+ "commits": [
14
+ {
15
+ "hash": "cd947e07dfce4d6981c4a3de17e876d890bb068b",
16
+ "shorthash": "cd947e0",
17
+ "author": "Kidataek",
18
+ "email": "tuankiet.hcmc@gmail.com",
19
+ "date": "2022-08-18T05:11:52.000Z",
20
+ "niceDate": "18 August 2022",
21
+ "subject": "chore: update changelog",
22
+ "message": "chore: update changelog",
23
+ "fixes": null,
24
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/commit/cd947e07dfce4d6981c4a3de17e876d890bb068b",
25
+ "breaking": false,
26
+ "files": 1,
27
+ "insertions": 91,
28
+ "deletions": 6,
29
+ "merge": null
30
+ }
31
+ ],
32
+ "merges": [],
33
+ "fixes": []
34
+ },
35
+ {
36
+ "isoDate": "2022-08-18",
37
+ "niceDate": "18 August 2022",
38
+ "diff": "v2.22.1..v2.22.2",
39
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/compare/v2.22.1...v2.22.2",
40
+ "major": false,
41
+ "minor": false,
42
+ "tag": "v2.22.2",
43
+ "date": "2022-08-18",
44
+ "title": "v2.22.2",
45
+ "version": "v2.22.2",
46
+ "summary": null,
47
+ "commits": [
48
+ {
49
+ "hash": "19b2357f0acda7817abcceed8ba99143f765289e",
50
+ "shorthash": "19b2357",
51
+ "author": "Kidataek",
52
+ "email": "tuankiet.hcmc@gmail.com",
53
+ "date": "2022-08-18T05:09:08.000Z",
54
+ "niceDate": "18 August 2022",
55
+ "subject": "fix: change version android zalo app that support share multi image",
56
+ "message": "fix: change version android zalo app that support share multi image",
57
+ "fixes": null,
58
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/commit/19b2357f0acda7817abcceed8ba99143f765289e",
59
+ "breaking": false,
60
+ "files": 1,
61
+ "insertions": 1,
62
+ "deletions": 1,
63
+ "merge": null
64
+ }
65
+ ],
66
+ "merges": [],
67
+ "fixes": []
68
+ },
69
+ {
70
+ "isoDate": "2022-08-09",
71
+ "niceDate": "9 August 2022",
72
+ "diff": "v2.22.0..v2.22.1",
73
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/compare/v2.22.0...v2.22.1",
74
+ "major": false,
75
+ "minor": false,
76
+ "tag": "v2.22.1",
77
+ "date": "2022-08-09",
78
+ "title": "v2.22.1",
79
+ "version": "v2.22.1",
80
+ "summary": null,
81
+ "commits": [
82
+ {
83
+ "hash": "5de163b3dcfa13fdbaf532fea6c12d321ef00fb6",
84
+ "shorthash": "5de163b",
85
+ "author": "Kidataek",
86
+ "email": "tuankiet.hcmc@gmail.com",
87
+ "date": "2022-08-03T08:09:27.000Z",
88
+ "niceDate": "3 August 2022",
89
+ "subject": "fix: fix issue changelog",
90
+ "message": "fix: fix issue changelog",
91
+ "fixes": null,
92
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/commit/5de163b3dcfa13fdbaf532fea6c12d321ef00fb6",
93
+ "breaking": false,
94
+ "files": 6,
95
+ "insertions": 14625,
96
+ "deletions": 7,
97
+ "merge": null
98
+ },
99
+ {
100
+ "hash": "7cb204bf36f9a8d86f1f11d65d70d7f6c7ca571d",
101
+ "shorthash": "7cb204b",
102
+ "author": "Kidataek",
103
+ "email": "tuankiet.hcmc@gmail.com",
104
+ "date": "2022-08-09T06:51:57.000Z",
105
+ "niceDate": "9 August 2022",
106
+ "subject": "fix: access token invalid when calling login multi time",
107
+ "message": "fix: access token invalid when calling login multi time",
108
+ "fixes": null,
109
+ "href": "https://zalogit2.zing.vn/ZaloMiniPrograms/zmp-sdk/commit/7cb204bf36f9a8d86f1f11d65d70d7f6c7ca571d",
110
+ "breaking": false,
111
+ "files": 1,
112
+ "insertions": 5,
113
+ "deletions": 0,
114
+ "merge": null
115
+ }
116
+ ],
14
117
  "merges": [],
15
118
  "fixes": []
16
119
  },
@@ -3743,7 +3743,7 @@
3743
3743
  }
3744
3744
  }
3745
3745
 
3746
- var version = "2.23.0-0";
3746
+ var version = "2.23.0-rc.1";
3747
3747
 
3748
3748
  class Basics {
3749
3749
  /**
@@ -4911,7 +4911,7 @@
4911
4911
  execute: execute
4912
4912
  };
4913
4913
 
4914
- var _ZaloJSBridge_instances, _ZaloJSBridge_cookies, _ZaloJSBridge_actionRuntimeInfo, _ZaloJSBridge_jsCall;
4914
+ var _ZaloJSBridge_instances, _ZaloJSBridge_jumpRunning, _ZaloJSBridge_cookies, _ZaloJSBridge_actionRuntimeInfo, _ZaloJSBridge_jsCall;
4915
4915
  class ZaloJSBridge extends eventemitter3 {
4916
4916
  constructor() {
4917
4917
  super();
@@ -4924,6 +4924,7 @@
4924
4924
  this._userAgent = getUserAgent();
4925
4925
  this._device = checkPlatform();
4926
4926
  this.isJumped = false;
4927
+ _ZaloJSBridge_jumpRunning.set(this, void 0);
4927
4928
  _ZaloJSBridge_cookies.set(this, []);
4928
4929
  _ZaloJSBridge_actionRuntimeInfo.set(this, void 0);
4929
4930
  this.getCookie = (name) => __awaiter(this, void 0, void 0, function* () {
@@ -4937,45 +4938,6 @@
4937
4938
  const cookie = (_a = __classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f")) === null || _a === void 0 ? void 0 : _a.find((cookie) => cookie.name === name);
4938
4939
  return cookie;
4939
4940
  };
4940
- this.jump = () => {
4941
- return new Promise((resolve, reject) => {
4942
- if (this.isJumped) {
4943
- resolve(__classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f"));
4944
- }
4945
- else {
4946
- this.debug('******** call jump ********');
4947
- this.callNative(ACTION.JUMP_LOGIN, {})
4948
- .then((data) => {
4949
- const cookies = (data && data.cookiesOAuthLogins) || [];
4950
- const actionPermission = (data && data.actionPermission) || [];
4951
- Object.entries(actionPermission).forEach((item) => {
4952
- const key = item[0];
4953
- const value = item[1] || { perm: 0, decode: 0 };
4954
- if (!__classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key]) {
4955
- __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key] = {
4956
- permission: false,
4957
- support: false
4958
- };
4959
- }
4960
- __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key].permission = value.perm === 1;
4961
- });
4962
- const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
4963
- if (jsToken) {
4964
- this.jsAccessTk = jsToken.value;
4965
- window.ZJSBridge.setJSToken &&
4966
- window.ZJSBridge.setJSToken(jsToken.value);
4967
- }
4968
- __classPrivateFieldSet(this, _ZaloJSBridge_cookies, cookies, "f");
4969
- this.isJumped = true;
4970
- resolve(cookies);
4971
- })
4972
- .catch((error) => {
4973
- this.isJumped = false;
4974
- reject(error);
4975
- });
4976
- }
4977
- });
4978
- };
4979
4941
  this._jsCallFuncCallbacks = {};
4980
4942
  __classPrivateFieldSet(this, _ZaloJSBridge_actionRuntimeInfo, {}, "f");
4981
4943
  this.events.on(Events.AppPaused, () => {
@@ -5003,6 +4965,7 @@
5003
4965
  }
5004
4966
  }, 5000);
5005
4967
  }
4968
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, 0, "f");
5006
4969
  }
5007
4970
  static getInstance() {
5008
4971
  if (!ZaloJSBridge.instance) {
@@ -5016,6 +4979,68 @@
5016
4979
  set jsAccessTk(value) {
5017
4980
  this._jsAccessTk = value;
5018
4981
  }
4982
+ jump() {
4983
+ return __awaiter(this, void 0, void 0, function* () {
4984
+ const _this = this;
4985
+ function waiting() {
4986
+ return __awaiter(this, void 0, void 0, function* () {
4987
+ return yield new Promise((resolve) => {
4988
+ const interval = setInterval(() => {
4989
+ if (__classPrivateFieldGet(_this, _ZaloJSBridge_jumpRunning, "f") <= 1 || _this.isJumped) {
4990
+ resolve('done');
4991
+ clearInterval(interval);
4992
+ }
4993
+ }, 200);
4994
+ });
4995
+ });
4996
+ }
4997
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") + 1, "f");
4998
+ if (__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") > 1) {
4999
+ yield waiting();
5000
+ }
5001
+ return new Promise((resolve, reject) => {
5002
+ if (this.isJumped) {
5003
+ resolve(__classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f"));
5004
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") - 1, "f");
5005
+ }
5006
+ else {
5007
+ this.debug('******** call jump ********');
5008
+ this.callNative(ACTION.JUMP_LOGIN, {})
5009
+ .then((data) => {
5010
+ const cookies = (data && data.cookiesOAuthLogins) || [];
5011
+ const actionPermission = (data && data.actionPermission) || [];
5012
+ Object.entries(actionPermission).forEach((item) => {
5013
+ const key = item[0];
5014
+ const value = item[1] || { perm: 0, decode: 0 };
5015
+ if (!__classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key]) {
5016
+ __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key] = {
5017
+ permission: false,
5018
+ support: false
5019
+ };
5020
+ }
5021
+ __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key].permission = value.perm === 1;
5022
+ });
5023
+ const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
5024
+ if (jsToken) {
5025
+ this.jsAccessTk = jsToken.value;
5026
+ window.ZJSBridge.setJSToken &&
5027
+ window.ZJSBridge.setJSToken(jsToken.value);
5028
+ }
5029
+ __classPrivateFieldSet(this, _ZaloJSBridge_cookies, cookies, "f");
5030
+ this.isJumped = true;
5031
+ resolve(cookies);
5032
+ })
5033
+ .catch((error) => {
5034
+ this.isJumped = false;
5035
+ reject(error);
5036
+ })
5037
+ .finally(() => {
5038
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") - 1, "f");
5039
+ });
5040
+ }
5041
+ });
5042
+ });
5043
+ }
5019
5044
  sendLogData(data) {
5020
5045
  try {
5021
5046
  const logData = data.map((item) => {
@@ -5195,7 +5220,7 @@
5195
5220
  }));
5196
5221
  }
5197
5222
  }
5198
- _ZaloJSBridge_cookies = new WeakMap(), _ZaloJSBridge_actionRuntimeInfo = new WeakMap(), _ZaloJSBridge_instances = new WeakSet(), _ZaloJSBridge_jsCall = function _ZaloJSBridge_jsCall(action, options, callback, isMultiCallback = false, nRetry = 3, haveTimeout = true) {
5223
+ _ZaloJSBridge_jumpRunning = new WeakMap(), _ZaloJSBridge_cookies = new WeakMap(), _ZaloJSBridge_actionRuntimeInfo = new WeakMap(), _ZaloJSBridge_instances = new WeakSet(), _ZaloJSBridge_jsCall = function _ZaloJSBridge_jsCall(action, options, callback, isMultiCallback = false, nRetry = 3, haveTimeout = true) {
5199
5224
  try {
5200
5225
  const actionName = action.name;
5201
5226
  const key = generateUniqueString(actionName);
@@ -5808,10 +5833,10 @@
5808
5833
  static requestCameraPermission(object) {
5809
5834
  return __awaiter(this, void 0, void 0, function* () {
5810
5835
  return yield this.getJSBridge().callNative(ACTION.REQUEST_PERMISSION_CAMERA, {}, {
5811
- successCallback: () => {
5836
+ successCallback: (data) => {
5812
5837
  return Promise.resolve({
5813
- userAllow: true,
5814
- message: 'User Allow'
5838
+ userAllow: (data === null || data === void 0 ? void 0 : data['error_code']) >= 0,
5839
+ message: data === null || data === void 0 ? void 0 : data['error_message']
5815
5840
  });
5816
5841
  }
5817
5842
  });
package/dist/index.es.js CHANGED
@@ -3740,7 +3740,7 @@ class ZMPEEmitter extends eventemitter3 {
3740
3740
  }
3741
3741
  }
3742
3742
 
3743
- var version$1 = "2.23.0-0";
3743
+ var version$1 = "2.23.0-rc.1";
3744
3744
 
3745
3745
  class Basics {
3746
3746
  /**
@@ -4908,7 +4908,7 @@ var CORSRequest = {
4908
4908
  execute: execute
4909
4909
  };
4910
4910
 
4911
- var _ZaloJSBridge_instances, _ZaloJSBridge_cookies, _ZaloJSBridge_actionRuntimeInfo, _ZaloJSBridge_jsCall;
4911
+ var _ZaloJSBridge_instances, _ZaloJSBridge_jumpRunning, _ZaloJSBridge_cookies, _ZaloJSBridge_actionRuntimeInfo, _ZaloJSBridge_jsCall;
4912
4912
  class ZaloJSBridge extends eventemitter3 {
4913
4913
  constructor() {
4914
4914
  super();
@@ -4921,6 +4921,7 @@ class ZaloJSBridge extends eventemitter3 {
4921
4921
  this._userAgent = getUserAgent();
4922
4922
  this._device = checkPlatform();
4923
4923
  this.isJumped = false;
4924
+ _ZaloJSBridge_jumpRunning.set(this, void 0);
4924
4925
  _ZaloJSBridge_cookies.set(this, []);
4925
4926
  _ZaloJSBridge_actionRuntimeInfo.set(this, void 0);
4926
4927
  this.getCookie = (name) => __awaiter(this, void 0, void 0, function* () {
@@ -4934,45 +4935,6 @@ class ZaloJSBridge extends eventemitter3 {
4934
4935
  const cookie = (_a = __classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f")) === null || _a === void 0 ? void 0 : _a.find((cookie) => cookie.name === name);
4935
4936
  return cookie;
4936
4937
  };
4937
- this.jump = () => {
4938
- return new Promise((resolve, reject) => {
4939
- if (this.isJumped) {
4940
- resolve(__classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f"));
4941
- }
4942
- else {
4943
- this.debug('******** call jump ********');
4944
- this.callNative(ACTION.JUMP_LOGIN, {})
4945
- .then((data) => {
4946
- const cookies = (data && data.cookiesOAuthLogins) || [];
4947
- const actionPermission = (data && data.actionPermission) || [];
4948
- Object.entries(actionPermission).forEach((item) => {
4949
- const key = item[0];
4950
- const value = item[1] || { perm: 0, decode: 0 };
4951
- if (!__classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key]) {
4952
- __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key] = {
4953
- permission: false,
4954
- support: false
4955
- };
4956
- }
4957
- __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key].permission = value.perm === 1;
4958
- });
4959
- const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
4960
- if (jsToken) {
4961
- this.jsAccessTk = jsToken.value;
4962
- window.ZJSBridge.setJSToken &&
4963
- window.ZJSBridge.setJSToken(jsToken.value);
4964
- }
4965
- __classPrivateFieldSet(this, _ZaloJSBridge_cookies, cookies, "f");
4966
- this.isJumped = true;
4967
- resolve(cookies);
4968
- })
4969
- .catch((error) => {
4970
- this.isJumped = false;
4971
- reject(error);
4972
- });
4973
- }
4974
- });
4975
- };
4976
4938
  this._jsCallFuncCallbacks = {};
4977
4939
  __classPrivateFieldSet(this, _ZaloJSBridge_actionRuntimeInfo, {}, "f");
4978
4940
  this.events.on(Events.AppPaused, () => {
@@ -5000,6 +4962,7 @@ class ZaloJSBridge extends eventemitter3 {
5000
4962
  }
5001
4963
  }, 5000);
5002
4964
  }
4965
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, 0, "f");
5003
4966
  }
5004
4967
  static getInstance() {
5005
4968
  if (!ZaloJSBridge.instance) {
@@ -5013,6 +4976,68 @@ class ZaloJSBridge extends eventemitter3 {
5013
4976
  set jsAccessTk(value) {
5014
4977
  this._jsAccessTk = value;
5015
4978
  }
4979
+ jump() {
4980
+ return __awaiter(this, void 0, void 0, function* () {
4981
+ const _this = this;
4982
+ function waiting() {
4983
+ return __awaiter(this, void 0, void 0, function* () {
4984
+ return yield new Promise((resolve) => {
4985
+ const interval = setInterval(() => {
4986
+ if (__classPrivateFieldGet(_this, _ZaloJSBridge_jumpRunning, "f") <= 1 || _this.isJumped) {
4987
+ resolve('done');
4988
+ clearInterval(interval);
4989
+ }
4990
+ }, 200);
4991
+ });
4992
+ });
4993
+ }
4994
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") + 1, "f");
4995
+ if (__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") > 1) {
4996
+ yield waiting();
4997
+ }
4998
+ return new Promise((resolve, reject) => {
4999
+ if (this.isJumped) {
5000
+ resolve(__classPrivateFieldGet(this, _ZaloJSBridge_cookies, "f"));
5001
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") - 1, "f");
5002
+ }
5003
+ else {
5004
+ this.debug('******** call jump ********');
5005
+ this.callNative(ACTION.JUMP_LOGIN, {})
5006
+ .then((data) => {
5007
+ const cookies = (data && data.cookiesOAuthLogins) || [];
5008
+ const actionPermission = (data && data.actionPermission) || [];
5009
+ Object.entries(actionPermission).forEach((item) => {
5010
+ const key = item[0];
5011
+ const value = item[1] || { perm: 0, decode: 0 };
5012
+ if (!__classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key]) {
5013
+ __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key] = {
5014
+ permission: false,
5015
+ support: false
5016
+ };
5017
+ }
5018
+ __classPrivateFieldGet(this, _ZaloJSBridge_actionRuntimeInfo, "f")[key].permission = value.perm === 1;
5019
+ });
5020
+ const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
5021
+ if (jsToken) {
5022
+ this.jsAccessTk = jsToken.value;
5023
+ window.ZJSBridge.setJSToken &&
5024
+ window.ZJSBridge.setJSToken(jsToken.value);
5025
+ }
5026
+ __classPrivateFieldSet(this, _ZaloJSBridge_cookies, cookies, "f");
5027
+ this.isJumped = true;
5028
+ resolve(cookies);
5029
+ })
5030
+ .catch((error) => {
5031
+ this.isJumped = false;
5032
+ reject(error);
5033
+ })
5034
+ .finally(() => {
5035
+ __classPrivateFieldSet(this, _ZaloJSBridge_jumpRunning, +__classPrivateFieldGet(this, _ZaloJSBridge_jumpRunning, "f") - 1, "f");
5036
+ });
5037
+ }
5038
+ });
5039
+ });
5040
+ }
5016
5041
  sendLogData(data) {
5017
5042
  try {
5018
5043
  const logData = data.map((item) => {
@@ -5192,7 +5217,7 @@ class ZaloJSBridge extends eventemitter3 {
5192
5217
  }));
5193
5218
  }
5194
5219
  }
5195
- _ZaloJSBridge_cookies = new WeakMap(), _ZaloJSBridge_actionRuntimeInfo = new WeakMap(), _ZaloJSBridge_instances = new WeakSet(), _ZaloJSBridge_jsCall = function _ZaloJSBridge_jsCall(action, options, callback, isMultiCallback = false, nRetry = 3, haveTimeout = true) {
5220
+ _ZaloJSBridge_jumpRunning = new WeakMap(), _ZaloJSBridge_cookies = new WeakMap(), _ZaloJSBridge_actionRuntimeInfo = new WeakMap(), _ZaloJSBridge_instances = new WeakSet(), _ZaloJSBridge_jsCall = function _ZaloJSBridge_jsCall(action, options, callback, isMultiCallback = false, nRetry = 3, haveTimeout = true) {
5196
5221
  try {
5197
5222
  const actionName = action.name;
5198
5223
  const key = generateUniqueString(actionName);
@@ -5805,10 +5830,10 @@ class Media {
5805
5830
  static requestCameraPermission(object) {
5806
5831
  return __awaiter(this, void 0, void 0, function* () {
5807
5832
  return yield this.getJSBridge().callNative(ACTION.REQUEST_PERMISSION_CAMERA, {}, {
5808
- successCallback: () => {
5833
+ successCallback: (data) => {
5809
5834
  return Promise.resolve({
5810
- userAllow: true,
5811
- message: 'User Allow'
5835
+ userAllow: (data === null || data === void 0 ? void 0 : data['error_code']) >= 0,
5836
+ message: data === null || data === void 0 ? void 0 : data['error_message']
5812
5837
  });
5813
5838
  }
5814
5839
  });