blixify-server 0.1.40 → 0.1.41

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 +1 @@
1
- {"version":3,"file":"QueryModel.d.ts","sourceRoot":"","sources":["../../src/model/QueryModel.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,QAAQ,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;IACtD,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,WAAY,cAAc,OAAO,GAAG,YAmC/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,WACjB,cAAc,QAChB,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,OACxC,GAAG,OACH,GAAG,YAkDT,CAAC"}
1
+ {"version":3,"file":"QueryModel.d.ts","sourceRoot":"","sources":["../../src/model/QueryModel.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,QAAQ,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;IACtD,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,WAAY,cAAc,OAAO,GAAG,YAmC/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,WACjB,cAAc,QAChB,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,OACxC,GAAG,OACH,GAAG,YAyDT,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkOpsConfig=exports.checkBaseConfig=void 0;const checkBaseConfig=(e,r)=>{let s=!0;return 0<e.baseConfig.length&&e.baseConfig.map(e=>{switch(e.type){case"domain":r.headers.referer||(s=!1);break;case"android":r.headers["x-android-package"]||(s=!1);break;case"androidSHA":r.headers["x-android-cert"]||(s=!1);break;case"ios":r.headers["x-ios-bundle-identifier"]||(s=!1);break;case"api":r.body.bm_apiToken||(s=!1);break;case"auth":r.body.bm_userId||(s=!1);break;case"role":r.body.bm_userRole!==e.value&&(s=!1)}}),s},checkOpsConfig=(exports.checkBaseConfig=checkBaseConfig,(e,r,s,a)=>{let o=!1,i;return 0<(i="read"===r?e.opsConfig.read:"create"===r?e.opsConfig.create:"update"===r?e.opsConfig.update:e.opsConfig.delete).length?i.map(e=>{switch(e.type){case"auth":s.body.bm_userId&&(o=!0);break;case"doc":s.body.bm_userId&&JSON.stringify(s.body.bm_userId)===JSON.stringify(a[e.value])&&(o=!0);break;case"org":s.body.bm_userOrg&&JSON.stringify(s.body.bm_userOrg)===JSON.stringify(a[e.value])&&(o=!0);break;case"role":s.body.bm_userRole&&s.body.bm_userRole===e.value&&(o=!0)}}):o=!0,o});exports.checkOpsConfig=checkOpsConfig;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkOpsConfig=exports.checkBaseConfig=void 0;const checkBaseConfig=(e,r)=>{let a=!0;return 0<e.baseConfig.length&&e.baseConfig.map(e=>{switch(e.type){case"domain":r.headers.referer||(a=!1);break;case"android":r.headers["x-android-package"]||(a=!1);break;case"androidSHA":r.headers["x-android-cert"]||(a=!1);break;case"ios":r.headers["x-ios-bundle-identifier"]||(a=!1);break;case"api":r.body.bm_apiToken||(a=!1);break;case"auth":r.body.bm_userId||(a=!1);break;case"role":r.body.bm_userRole!==e.value&&(a=!1)}}),a},checkOpsConfig=(exports.checkBaseConfig=checkBaseConfig,(e,r,a,s)=>{let o=!1,i;return 0<(i="read"===r?e.opsConfig.read:"create"===r?e.opsConfig.create:"update"===r?e.opsConfig.update:e.opsConfig.delete).length?i.map(e=>{switch(e.type){case"auth":a.body.bm_userId&&(o=!0);break;case"doc":if(a.body.bm_userId){const r=JSON.stringify(a.body.bm_userId);Array.isArray(e.value)?e.value.map(e=>{r===JSON.stringify(s[e])&&(o=!0)}):r===JSON.stringify(s[e.value])&&(o=!0)}break;case"org":a.body.bm_userOrg&&!Array.isArray(e.value)&&JSON.stringify(a.body.bm_userOrg)===JSON.stringify(s[e.value])&&(o=!0);break;case"role":a.body.bm_userRole&&a.body.bm_userRole===e.value&&(o=!0)}}):o=!0,o});exports.checkOpsConfig=checkOpsConfig;
@@ -6,10 +6,11 @@
6
6
  * api - bm_apiToken is true
7
7
  * doc - class.value equals to userId
8
8
  *
9
+ * value - string[] is only used for doc
9
10
  */
10
11
  interface Config {
11
12
  type: "auth" | "org" | "role" | "api" | "doc" | "domain" | "ios" | "android" | "androidSHA";
12
- value: string;
13
+ value: string | string[];
13
14
  }
14
15
  /**
15
16
  * @baseConfig - AND Condition
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityConfig.d.ts","sourceRoot":"","sources":["../../src/model/SecurityConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,UAAU,MAAM;IACd,IAAI,EACA,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,KAAK,GACL,QAAQ,GACR,KAAK,GACL,SAAS,GACT,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH"}
1
+ {"version":3,"file":"SecurityConfig.d.ts","sourceRoot":"","sources":["../../src/model/SecurityConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,UAAU,MAAM;IACd,IAAI,EACA,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,KAAK,GACL,QAAQ,GACR,KAAK,GACL,SAAS,GACT,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blixify-server",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "license": "MIT",
5
5
  "main": "dist/apis/index.js",
6
6
  "private": false,