@things-factory/operato-tools 6.1.19 → 6.1.21

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
- const a0_0x1fe844=a0_0x116c;(function(_0x5c6e0a,_0x30360e){const _0x4ad23d=a0_0x116c,_0x340e13=_0x5c6e0a();while(!![]){try{const _0x1e46a8=parseInt(_0x4ad23d(0xfc))/0x1*(-parseInt(_0x4ad23d(0xf1))/0x2)+parseInt(_0x4ad23d(0xfa))/0x3+parseInt(_0x4ad23d(0xf7))/0x4*(-parseInt(_0x4ad23d(0xf3))/0x5)+parseInt(_0x4ad23d(0x101))/0x6*(-parseInt(_0x4ad23d(0xf4))/0x7)+-parseInt(_0x4ad23d(0xfe))/0x8+-parseInt(_0x4ad23d(0xf6))/0x9+parseInt(_0x4ad23d(0xf9))/0xa;if(_0x1e46a8===_0x30360e)break;else _0x340e13['push'](_0x340e13['shift']());}catch(_0x401234){_0x340e13['push'](_0x340e13['shift']());}}}(a0_0x39cd,0x3f025));import a0_0x2ad9f6 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';function a0_0x116c(_0x2b3943,_0x6aed8){const _0x39cd49=a0_0x39cd();return a0_0x116c=function(_0x116c43,_0x113e69){_0x116c43=_0x116c43-0xf1;let _0x51416a=_0x39cd49[_0x116c43];return _0x51416a;},a0_0x116c(_0x2b3943,_0x6aed8);}const INITIAL_STATE={'operatoTools':a0_0x1fe844(0xf2),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION='UPDATE_OPERATO_TOOLS_PERMISSION';((async()=>{const _0x3e02a5=a0_0x1fe844;var _0x2a2d93=await client[_0x3e02a5(0xfd)]({'query':a0_0x2ad9f6`{studioPermission}`});let _0x1c86ef=!0x1;_0x2a2d93[_0x3e02a5(0xf5)]||(_0x1c86ef=_0x2a2d93[_0x3e02a5(0xfb)]['studioPermission']),store[_0x3e02a5(0x100)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x1c86ef}});})());const operatoTools=(_0x551223=INITIAL_STATE,_0x54afdb)=>{const _0x333abf=a0_0x1fe844;switch(_0x54afdb[_0x333abf(0xf8)]){case UPDATE_OPERATO_TOOLS:return{..._0x551223};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x54afdb[_0x333abf(0xff)]};default:return _0x551223;}};export default operatoTools;function a0_0x39cd(){const _0xa1014d=['errors','2658816PCEYxq','4YmpIxf','type','9706810WMVCIC','1287897HCrMna','data','1XLQzBo','query','1861280wuwQfU','state','dispatch','1579944GyLuvG','542008TAORJx','ABC','397415zCiERN','7ukLEZe'];a0_0x39cd=function(){return _0xa1014d;};return a0_0x39cd();}
1
+ function a0_0x4be6(){const _0x4649bb=['studioPermission','dispatch','query','8759MaAkbo','4463901pGDtSp','UPDATE_OPERATO_TOOLS_PERMISSION','state','96OBvLTk','2YlsRSw','47700ggrtAS','2743116lvewqv','9343030YofEKw','60XpUnXA','815328wKVgVs','69510tXnoZp'];a0_0x4be6=function(){return _0x4649bb;};return a0_0x4be6();}const a0_0x5a9153=a0_0x1717;function a0_0x1717(_0x4d4327,_0x5ac3ba){const _0x4be673=a0_0x4be6();return a0_0x1717=function(_0x171745,_0x421f25){_0x171745=_0x171745-0x90;let _0x2b9314=_0x4be673[_0x171745];return _0x2b9314;},a0_0x1717(_0x4d4327,_0x5ac3ba);}(function(_0x15e871,_0x5dd06c){const _0x212932=a0_0x1717,_0x54c87e=_0x15e871();while(!![]){try{const _0x31d5db=parseInt(_0x212932(0x96))/0x1*(-parseInt(_0x212932(0x9b))/0x2)+parseInt(_0x212932(0x91))/0x3+parseInt(_0x212932(0x9c))/0x4*(parseInt(_0x212932(0x90))/0x5)+parseInt(_0x212932(0x9d))/0x6+-parseInt(_0x212932(0x92))/0x7*(parseInt(_0x212932(0x9a))/0x8)+parseInt(_0x212932(0x97))/0x9+-parseInt(_0x212932(0x9e))/0xa;if(_0x31d5db===_0x5dd06c)break;else _0x54c87e['push'](_0x54c87e['shift']());}catch(_0x12430c){_0x54c87e['push'](_0x54c87e['shift']());}}}(a0_0x4be6,0x4aaa5));import a0_0x194691 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':'ABC','studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x5a9153(0x98);((async()=>{const _0x46576e=a0_0x5a9153;var _0x228b1f=await client[_0x46576e(0x95)]({'query':a0_0x194691`{studioPermission}`});let _0x1f38b1=!0x1;_0x228b1f['errors']||(_0x1f38b1=_0x228b1f['data'][_0x46576e(0x93)]),store[_0x46576e(0x94)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x1f38b1}});})());const operatoTools=(_0x28ee97=INITIAL_STATE,_0x4a27da)=>{const _0x5bd3df=a0_0x5a9153;switch(_0x4a27da['type']){case UPDATE_OPERATO_TOOLS:return{..._0x28ee97};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x4a27da[_0x5bd3df(0x99)]};default:return _0x28ee97;}};export default operatoTools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-tools",
3
- "version": "6.1.19",
3
+ "version": "6.1.21",
4
4
  "main": "server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -29,12 +29,12 @@
29
29
  "docker:run": "docker run -it -p 4000:3000 hatiolab/operato-tools:latest"
30
30
  },
31
31
  "dependencies": {
32
- "@things-factory/meta-ui": "^6.1.19",
32
+ "@things-factory/meta-ui": "^6.1.21",
33
33
  "@things-factory/operato-license-checker": "^3.1.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@things-factory/builder": "^6.1.18",
37
37
  "@things-factory/meta-ui": "^6.0.0-alpha.6"
38
38
  },
39
- "gitHead": "d56b51a132127d71b057c8c7c82b6d189cf84ac6"
39
+ "gitHead": "f7daba255a423d7a47f636a13e417750cbbaf232"
40
40
  }
@@ -1 +1 @@
1
- 'use strict';var a0_0x35b7ad=a0_0x4f38;(function(_0x4b7ce9,_0x2afa52){var _0x2d60c4=a0_0x4f38,_0x3c0388=_0x4b7ce9();while(!![]){try{var _0x3940ca=-parseInt(_0x2d60c4(0x1f8))/0x1*(parseInt(_0x2d60c4(0x1f6))/0x2)+parseInt(_0x2d60c4(0x204))/0x3+parseInt(_0x2d60c4(0x1fb))/0x4+parseInt(_0x2d60c4(0x1fe))/0x5+parseInt(_0x2d60c4(0x202))/0x6*(parseInt(_0x2d60c4(0x1f5))/0x7)+parseInt(_0x2d60c4(0x1f4))/0x8*(-parseInt(_0x2d60c4(0x1f7))/0x9)+-parseInt(_0x2d60c4(0x201))/0xa*(parseInt(_0x2d60c4(0x1f9))/0xb);if(_0x3940ca===_0x2afa52)break;else _0x3c0388['push'](_0x3c0388['shift']());}catch(_0x56ccc5){_0x3c0388['push'](_0x3c0388['shift']());}}}(a0_0x3297,0x53c9d));function a0_0x4f38(_0x4daae0,_0x2403f4){var _0x32976b=a0_0x3297();return a0_0x4f38=function(_0x4f38b8,_0x4a8176){_0x4f38b8=_0x4f38b8-0x1f4;var _0x53bc9b=_0x32976b[_0x4f38b8];return _0x53bc9b;},a0_0x4f38(_0x4daae0,_0x2403f4);}Object[a0_0x35b7ad(0x200)](exports,a0_0x35b7ad(0x1fc),{'value':!0x0}),exports['OVER_LIMIT']=exports[a0_0x35b7ad(0x1fa)]=void 0x0,exports[a0_0x35b7ad(0x1fa)]=a0_0x35b7ad(0x203),exports[a0_0x35b7ad(0x1ff)]=a0_0x35b7ad(0x1fd);function a0_0x3297(){var _0x4e89ae=['defineProperty','290CzgwUX','10734MQOWiF','error.invalid\x20license\x20key','569718urRXYH','4423848scePSY','1407pFYJdG','160042XDUezt','9bFjZKu','2ULvUlS','7491ekRWCa','INVALID_LICENSE','1757468NQfKVI','__esModule','error.page\x20count\x20over\x20license\x20limit','435535qtnEfv','OVER_LIMIT'];a0_0x3297=function(){return _0x4e89ae;};return a0_0x3297();}
1
+ 'use strict';var a0_0x18ed3e=a0_0x65f9;(function(_0x204680,_0x3c3278){var _0x4d2790=a0_0x65f9,_0x179ecf=_0x204680();while(!![]){try{var _0x2108d2=-parseInt(_0x4d2790(0x1e1))/0x1*(parseInt(_0x4d2790(0x1d8))/0x2)+-parseInt(_0x4d2790(0x1da))/0x3*(parseInt(_0x4d2790(0x1d5))/0x4)+-parseInt(_0x4d2790(0x1db))/0x5+-parseInt(_0x4d2790(0x1d7))/0x6+-parseInt(_0x4d2790(0x1df))/0x7+parseInt(_0x4d2790(0x1de))/0x8*(-parseInt(_0x4d2790(0x1dc))/0x9)+parseInt(_0x4d2790(0x1dd))/0xa;if(_0x2108d2===_0x3c3278)break;else _0x179ecf['push'](_0x179ecf['shift']());}catch(_0x48d428){_0x179ecf['push'](_0x179ecf['shift']());}}}(a0_0x5f2d,0xf2625));function a0_0x65f9(_0x905c7,_0x2c8db1){var _0x5f2d08=a0_0x5f2d();return a0_0x65f9=function(_0x65f921,_0x43a661){_0x65f921=_0x65f921-0x1d2;var _0x162781=_0x5f2d08[_0x65f921];return _0x162781;},a0_0x65f9(_0x905c7,_0x2c8db1);}function a0_0x5f2d(){var _0x505caf=['4ZfTOGP','INVALID_LICENSE','9712176fdBwAq','2jKHoeJ','error.invalid\x20license\x20key','3426108LKTmfl','8923620yPvZqA','33246BkGRZB','75624520iVOvTD','56qmkWvN','13572664SoBJkA','defineProperty','59381rqoqNF','OVER_LIMIT','__esModule','error.page\x20count\x20over\x20license\x20limit'];a0_0x5f2d=function(){return _0x505caf;};return a0_0x5f2d();}Object[a0_0x18ed3e(0x1e0)](exports,a0_0x18ed3e(0x1d3),{'value':!0x0}),exports[a0_0x18ed3e(0x1d2)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x18ed3e(0x1d6)]=a0_0x18ed3e(0x1d9),exports['OVER_LIMIT']=a0_0x18ed3e(0x1d4);
@@ -1 +1 @@
1
- 'use strict';const a0_0x4b4752=a0_0x811b;function a0_0x287e(){const _0x158f18=['name','LicenseError','__importStar','22365KJBFhE','../constants/error-code','defineProperty','__esModule','detail','license-error','7490712RRXFRS','15UKIoMM','681234NcxQdm','assign','tslib','390MfDGPb','70762EDtNdQ','372HcmQeO','6700379kbTfpi','3hlAEAD','4552448aszMwD','18ShjNHq','112915BJmaZD'];a0_0x287e=function(){return _0x158f18;};return a0_0x287e();}(function(_0x14f0a2,_0x319ebd){const _0xe338ad=a0_0x811b,_0x5cb9a8=_0x14f0a2();while(!![]){try{const _0x2d67a8=parseInt(_0xe338ad(0x1a2))/0x1*(parseInt(_0xe338ad(0x1a7))/0x2)+parseInt(_0xe338ad(0x1a5))/0x3*(parseInt(_0xe338ad(0x1a6))/0x4)+parseInt(_0xe338ad(0x19d))/0x5*(parseInt(_0xe338ad(0x19e))/0x6)+-parseInt(_0xe338ad(0x1a4))/0x7+-parseInt(_0xe338ad(0x19c))/0x8+parseInt(_0xe338ad(0x196))/0x9*(parseInt(_0xe338ad(0x1a1))/0xa)+-parseInt(_0xe338ad(0x192))/0xb*(-parseInt(_0xe338ad(0x1a3))/0xc);if(_0x2d67a8===_0x319ebd)break;else _0x5cb9a8['push'](_0x5cb9a8['shift']());}catch(_0x3cbcfd){_0x5cb9a8['push'](_0x5cb9a8['shift']());}}}(a0_0x287e,0x9b8fd));function a0_0x811b(_0x4e58e4,_0xc4790d){const _0x287e4a=a0_0x287e();return a0_0x811b=function(_0x811b69,_0x34a2af){_0x811b69=_0x811b69-0x192;let _0x3396ba=_0x287e4a[_0x811b69];return _0x3396ba;},a0_0x811b(_0x4e58e4,_0xc4790d);}Object[a0_0x4b4752(0x198)](exports,a0_0x4b4752(0x199),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x4b4752(0x1a0)),ERROR_CODES=tslib_1[a0_0x4b4752(0x195)](require(a0_0x4b4752(0x197)));class LicenseError extends Error{static get['ERROR_CODES'](){const _0xb84dd1=a0_0x4b4752;return Object[_0xb84dd1(0x19f)]({},ERROR_CODES);}constructor({errorCode:_0x340f5f,detail:_0x27889c}){const _0x3d7489=a0_0x4b4752;super(_0x340f5f),this[_0x3d7489(0x193)]=_0x3d7489(0x19b),this['errorCode']=_0x340f5f,this[_0x3d7489(0x19a)]=_0x27889c;}}exports[a0_0x4b4752(0x194)]=LicenseError;
1
+ 'use strict';const a0_0x50236d=a0_0x304c;function a0_0x304c(_0x48f09a,_0x10970b){const _0x290fb7=a0_0x290f();return a0_0x304c=function(_0x304cba,_0x286533){_0x304cba=_0x304cba-0x109;let _0x1b88de=_0x290fb7[_0x304cba];return _0x1b88de;},a0_0x304c(_0x48f09a,_0x10970b);}(function(_0x52bd5f,_0x2afc1a){const _0x486ef5=a0_0x304c,_0x28d611=_0x52bd5f();while(!![]){try{const _0x4aec8f=parseInt(_0x486ef5(0x10e))/0x1+-parseInt(_0x486ef5(0x11a))/0x2*(parseInt(_0x486ef5(0x10f))/0x3)+-parseInt(_0x486ef5(0x10b))/0x4+parseInt(_0x486ef5(0x118))/0x5*(-parseInt(_0x486ef5(0x11b))/0x6)+parseInt(_0x486ef5(0x110))/0x7+parseInt(_0x486ef5(0x109))/0x8*(parseInt(_0x486ef5(0x117))/0x9)+-parseInt(_0x486ef5(0x116))/0xa*(-parseInt(_0x486ef5(0x111))/0xb);if(_0x4aec8f===_0x2afc1a)break;else _0x28d611['push'](_0x28d611['shift']());}catch(_0xba853b){_0x28d611['push'](_0x28d611['shift']());}}}(a0_0x290f,0x61687));Object[a0_0x50236d(0x119)](exports,a0_0x50236d(0x10a),{'value':!0x0}),exports[a0_0x50236d(0x113)]=void 0x0;const tslib_1=require(a0_0x50236d(0x11c)),ERROR_CODES=tslib_1[a0_0x50236d(0x112)](require(a0_0x50236d(0x10c)));class LicenseError extends Error{static get[a0_0x50236d(0x115)](){const _0x47a2d3=a0_0x50236d;return Object[_0x47a2d3(0x114)]({},ERROR_CODES);}constructor({errorCode:_0x231951,detail:_0x45a49f}){const _0xaaad1d=a0_0x50236d;super(_0x231951),this[_0xaaad1d(0x10d)]='license-error',this[_0xaaad1d(0x11d)]=_0x231951,this['detail']=_0x45a49f;}}exports['LicenseError']=LicenseError;function a0_0x290f(){const _0x5764e4=['649eIvruz','__importStar','LicenseError','assign','ERROR_CODES','57670Hkfzst','9KZEdTm','553835TsqKLw','defineProperty','8DjlLjB','6SXgVYe','tslib','errorCode','1302056LEsPBj','__esModule','1043956nYkIVY','../constants/error-code','name','725182lpwlpa','554226kPlZRB','1970605iNdzjL'];a0_0x290f=function(){return _0x5764e4;};return a0_0x290f();}
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0x1273c9=a0_0xb218;function a0_0xb218(_0x46042f,_0x2d7b55){const _0x5ba800=a0_0x5ba8();return a0_0xb218=function(_0xb218a9,_0x15a3da){_0xb218a9=_0xb218a9-0xf7;let _0xea053b=_0x5ba800[_0xb218a9];return _0xea053b;},a0_0xb218(_0x46042f,_0x2d7b55);}(function(_0x37d015,_0x23570f){const _0x5371d2=a0_0xb218,_0x8b83b8=_0x37d015();while(!![]){try{const _0x15b801=-parseInt(_0x5371d2(0xfb))/0x1+parseInt(_0x5371d2(0xfc))/0x2*(-parseInt(_0x5371d2(0xf8))/0x3)+-parseInt(_0x5371d2(0xfa))/0x4+parseInt(_0x5371d2(0x100))/0x5+parseInt(_0x5371d2(0xf9))/0x6+-parseInt(_0x5371d2(0x101))/0x7+parseInt(_0x5371d2(0xfd))/0x8*(parseInt(_0x5371d2(0xf7))/0x9);if(_0x15b801===_0x23570f)break;else _0x8b83b8['push'](_0x8b83b8['shift']());}catch(_0x25b32f){_0x8b83b8['push'](_0x8b83b8['shift']());}}}(a0_0x5ba8,0x80002));const debug=require(a0_0x1273c9(0xff))(a0_0x1273c9(0x102));process['on']('bootstrap-module-global-public-route',(_0x5a2564,_0x3aa0b9)=>{}),process['on'](a0_0x1273c9(0xfe),(_0xba6500,_0x4ef9bf)=>{}),process['on']('bootstrap-module-domain-public-route',(_0x19d8aa,_0x389880)=>{}),process['on'](a0_0x1273c9(0x103),(_0x5de4fc,_0x360422)=>{});function a0_0x5ba8(){const _0x4a7952=['45Fisdnc','607953AJhhZf','504612mqrXqE','73516oBUTYp','636232jifhxV','2pFnwwb','2151368GlsBYQ','bootstrap-module-global-private-route','debug','1856320xyaAgR','2928933iNMrwl','things-factory:operato-tools:routes','bootstrap-module-domain-private-route'];a0_0x5ba8=function(){return _0x4a7952;};return a0_0x5ba8();}
1
+ const a0_0x1a5384=a0_0x330d;(function(_0x15a48e,_0x30a103){const _0x4ff5a2=a0_0x330d,_0x38f516=_0x15a48e();while(!![]){try{const _0x22f88b=parseInt(_0x4ff5a2(0x19c))/0x1+-parseInt(_0x4ff5a2(0x1a2))/0x2*(parseInt(_0x4ff5a2(0x19e))/0x3)+-parseInt(_0x4ff5a2(0x1a6))/0x4*(parseInt(_0x4ff5a2(0x19f))/0x5)+parseInt(_0x4ff5a2(0x1a8))/0x6*(parseInt(_0x4ff5a2(0x1a7))/0x7)+-parseInt(_0x4ff5a2(0x1a1))/0x8*(parseInt(_0x4ff5a2(0x1aa))/0x9)+-parseInt(_0x4ff5a2(0x1a0))/0xa+parseInt(_0x4ff5a2(0x1a3))/0xb;if(_0x22f88b===_0x30a103)break;else _0x38f516['push'](_0x38f516['shift']());}catch(_0x34a651){_0x38f516['push'](_0x38f516['shift']());}}}(a0_0x3f9e,0x36ec6));const debug=require(a0_0x1a5384(0x1ab))(a0_0x1a5384(0x1a9));function a0_0x330d(_0x205ceb,_0x42ea56){const _0x3f9ecc=a0_0x3f9e();return a0_0x330d=function(_0x330d25,_0x1f0b7e){_0x330d25=_0x330d25-0x19c;let _0x381e0e=_0x3f9ecc[_0x330d25];return _0x381e0e;},a0_0x330d(_0x205ceb,_0x42ea56);}function a0_0x3f9e(){const _0x4b0180=['4ezhewf','8385091alZGGH','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','136852jvwmEt','7YtCiEK','534120CTDzzb','things-factory:operato-tools:routes','9pdOPdm','debug','247003bUnwME','bootstrap-module-global-public-route','110172orhioz','5ISnbXH','3472480IIeyRM','3347432UKpnct'];a0_0x3f9e=function(){return _0x4b0180;};return a0_0x3f9e();}process['on'](a0_0x1a5384(0x19d),(_0x44d282,_0x3fde7d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x3fbe2e,_0x4954fc)=>{}),process['on'](a0_0x1a5384(0x1a5),(_0x3c3c49,_0x53796e)=>{}),process['on'](a0_0x1a5384(0x1a4),(_0x1b9d11,_0x49784f)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x5e1303=a0_0x4d0a;(function(_0x21f7e2,_0x551ce8){const _0x1e9a1b=a0_0x4d0a,_0x36e0d5=_0x21f7e2();while(!![]){try{const _0x4ea5be=parseInt(_0x1e9a1b(0x1da))/0x1+parseInt(_0x1e9a1b(0x1ff))/0x2*(-parseInt(_0x1e9a1b(0x1eb))/0x3)+-parseInt(_0x1e9a1b(0x1f3))/0x4*(parseInt(_0x1e9a1b(0x227))/0x5)+-parseInt(_0x1e9a1b(0x1d9))/0x6+parseInt(_0x1e9a1b(0x1f7))/0x7*(-parseInt(_0x1e9a1b(0x1ed))/0x8)+parseInt(_0x1e9a1b(0x22b))/0x9+parseInt(_0x1e9a1b(0x212))/0xa*(parseInt(_0x1e9a1b(0x214))/0xb);if(_0x4ea5be===_0x551ce8)break;else _0x36e0d5['push'](_0x36e0d5['shift']());}catch(_0x517cb7){_0x36e0d5['push'](_0x36e0d5['shift']());}}}(a0_0x1e00,0x2e129));function a0_0x4d0a(_0x2c7af2,_0x418484){const _0x1e00e1=a0_0x1e00();return a0_0x4d0a=function(_0x4d0a81,_0x564597){_0x4d0a81=_0x4d0a81-0x1d0;let _0x10812a=_0x1e00e1[_0x4d0a81];return _0x10812a;},a0_0x4d0a(_0x2c7af2,_0x418484);}Object[a0_0x5e1303(0x211)](exports,'__esModule',{'value':!0x0}),exports[a0_0x5e1303(0x20d)]=void 0x0;const tslib_1=require(a0_0x5e1303(0x1f4)),type_graphql_1=require(a0_0x5e1303(0x233)),resource_base_1=require(a0_0x5e1303(0x1ef)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5e1303(0x1e5)),{plural:plural}=require(a0_0x5e1303(0x232)),crypto_1=tslib_1[a0_0x5e1303(0x209)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x5e1303(0x1d0)](_0x2d2f2e,_0x1b731a,_0x1d60f4){const _0x348709=a0_0x5e1303,{domain:_0x94bef4,user:_0x30f80f,tx:_0x30be81}=_0x1d60f4[_0x348709(0x217)];await(0x0,tool_permission_1[_0x348709(0x1dd)])('',_0x1d60f4);const _0x3440fe=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x24a)])[_0x348709(0x249)]({'where':{'domain':{'id':_0x94bef4['id']},'id':_0x2d2f2e}}),_0x1a67f8=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x1f8)])[_0x348709(0x234)]({'where':{'domain':{'id':_0x94bef4['id']},'entity':{'id':_0x3440fe['id']}}});let {name:_0x8474a0=''}=_0x3440fe||{},_0x20c3c1=kebabCase(_0x8474a0),_0x4d9e14=modelTemplate[_0x348709(0x226)](/{{pascalCase name}}/g,startCase(camelCase(_0x8474a0))[_0x348709(0x226)](/ /g,''))[_0x348709(0x226)](/{{camelCase name}}/g,camelCase(_0x8474a0))[_0x348709(0x226)](/{{snakeCase name}}/g,snakeCase(_0x8474a0))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/{{name}}/g,_0x8474a0),_0x38ce05='';_0x348709(0x20b)==_0x3440fe[_0x348709(0x239)]?_0x38ce05='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20':_0x348709(0x213)==_0x3440fe[_0x348709(0x239)]&&(_0x38ce05=_0x348709(0x231)),_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{HistoryButton}}/g,_0x38ce05);let _0xdcb62d=this[_0x348709(0x1fb)](_0x1a67f8);_0x4d9e14=_0x4d9e14['replace'](/{{SortColumns}}/g,_0xdcb62d[_0x348709(0x207)](','));let _0x343d20=this[_0x348709(0x210)](_0x1a67f8);_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{SearchColumns}}/g,_0x343d20[_0x348709(0x207)](','));let _0xc4c978=this['createGridColumns'](_0x1a67f8);return _0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{GridColumns}}/g,_0xc4c978[_0x348709(0x207)](',')),_0x4d9e14=this['enc'](_0x4d9e14),await this[_0x348709(0x1e1)](_0x30be81,_0x94bef4,_0x30f80f,_0x1b731a,_0x20c3c1,_0x4d9e14),!0x0;}[a0_0x5e1303(0x1ec)](_0x3ac5cb){const _0x140ff0=a0_0x5e1303;return _0x3ac5cb[_0x140ff0(0x244)](_0x1b68d5=>'id'!=_0x1b68d5['name']&&_0x1b68d5[_0x140ff0(0x1fd)]>0x0)[_0x140ff0(0x204)](function(_0x51a251,_0x4bf1cc){const _0x47ed7c=_0x140ff0;return _0x51a251[_0x47ed7c(0x1fd)]-_0x4bf1cc[_0x47ed7c(0x1fd)];})[_0x140ff0(0x22f)](_0x379b9c=>{const _0x1a33f9=_0x140ff0;let {gridEditor:_0x1e9227='string',name:_0x53fc80,term:_0x424fc7,gridWidth:_0x92422f=0x0,gridAlign:_0x338de7=_0x1a33f9(0x203),nullable:_0x3d18ca=!0x1}=_0x379b9c;if(null==_0x1e9227&&(_0x1e9227=_0x1a33f9(0x238)),null==_0x338de7&&(_0x338de7='left'),_0x1a33f9(0x248)==_0x53fc80||'creator_id'==_0x53fc80)return _0x53fc80=_0x1a33f9(0x248)==_0x53fc80?_0x1a33f9(0x224):_0x1a33f9(0x225),_0x1a33f9(0x1d4)+_0x53fc80+_0x1a33f9(0x23c)+_0x53fc80+_0x1a33f9(0x20a);if(_0x1a33f9(0x1d6)==_0x53fc80||_0x1a33f9(0x1d7)==_0x53fc80)return _0x1a33f9(0x21c)+('updated_at'==_0x53fc80?'updatedAt':'createdAt')+'\x22,\x22header\x22:\x20\x22'+_0x53fc80+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x193db0=_0x1a33f9(0x1d2)!=_0x1e9227&&_0x1a33f9(0x1dc)!=_0x1e9227,_0x2e83fa='hidden'==_0x1e9227;0x1!=_0x2e83fa&&0x0!=_0x193db0||(_0x1e9227=_0x1a33f9(0x238));let _0x34fc16=_0x1a33f9(0x236)+_0x1e9227+_0x1a33f9(0x1d5)+camelCase(_0x53fc80)+_0x1a33f9(0x23c)+_0x424fc7+_0x1a33f9(0x23a)+_0x2e83fa+_0x1a33f9(0x246)+_0x193db0+_0x1a33f9(0x215)+!_0x3d18ca+_0x1a33f9(0x1fe)+_0x338de7+_0x1a33f9(0x1e7)+_0x92422f+_0x1a33f9(0x23d);return _0x1a33f9(0x21f)==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x1ea)+_0x379b9c['refName']+'\x22}'),_0x1a33f9(0x1e8)==_0x379b9c['refType']&&(_0x34fc16+=_0x1a33f9(0x22e)+_0x379b9c[_0x1a33f9(0x1f6)]+'\x22}'),'entity'==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x22d)+camelCase(plural(_0x379b9c[_0x1a33f9(0x1f6)]))+_0x1a33f9(0x218)),_0x34fc16+='}',_0x34fc16;});}['createSearchCols'](_0x1b26d0){const _0x384086=a0_0x5e1303;return _0x1b26d0['filter'](_0xfd4b17=>_0xfd4b17['searchRank']>0x0)[_0x384086(0x204)](function(_0x1aa4bc,_0x4b1580){const _0x29c9c8=_0x384086;return _0x1aa4bc[_0x29c9c8(0x200)]-_0x4b1580['searchRank'];})[_0x384086(0x22f)](_0x4b5e33=>{const _0x2f00b8=_0x384086;let _0x1402f4=_0x4b5e33[_0x2f00b8(0x241)];return'filter'==_0x1402f4?'\x22'+camelCase(_0x4b5e33['name'])+'\x22':(_0x1402f4||(_0x1402f4='eq'),_0x2f00b8(0x1e0)+camelCase(_0x4b5e33['name'])+_0x2f00b8(0x1e2)+_0x1402f4+'\x22}');});}[a0_0x5e1303(0x1fb)](_0x225fb0){const _0x408f59=a0_0x5e1303;return _0x225fb0[_0x408f59(0x244)](_0x2e0b47=>_0x2e0b47['sortRank']>0x0)[_0x408f59(0x204)](function(_0x43dc6b,_0x36c613){const _0x38c132=_0x408f59;return _0x43dc6b[_0x38c132(0x247)]-_0x36c613[_0x38c132(0x247)];})[_0x408f59(0x22f)](_0x4fcd30=>_0x408f59(0x228)+camelCase(_0x4fcd30[_0x408f59(0x223)])+_0x408f59(0x235)+_0x4fcd30[_0x408f59(0x23b)]+'}');}async[a0_0x5e1303(0x1e1)](_0x5e68d5,_0x28b6f6,_0x47af38,_0x31e897,_0x4048bf,_0x3b245a){const _0x362ddf=a0_0x5e1303;let _0x92077e=await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x249)]({'where':{'domain':{'id':_0x28b6f6['id']},'id':_0x31e897}}),_0x461b7c=(await _0x5e68d5['getRepository'](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x206)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x31e897+'\x27\x20or\x20id\x20=\x20\x27'+_0x31e897+'\x27'))[0x0]['rank']+0xa,_0x383ac6=new menu_base_1[(_0x362ddf(0x221))]();_0x383ac6[_0x362ddf(0x223)]=_0x4048bf,_0x383ac6['menuType']=_0x362ddf(0x219),_0x383ac6[_0x362ddf(0x1fc)]=_0x362ddf(0x1e4),_0x383ac6[_0x362ddf(0x21e)]=_0x461b7c,_0x383ac6['hiddenFlag']=!0x1,_0x383ac6['routing']=_0x4048bf,_0x383ac6[_0x362ddf(0x22c)]=_0x3b245a,_0x383ac6[_0x362ddf(0x20c)]=_0x362ddf(0x202),_0x383ac6['parent']=_0x92077e,await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x1e9)](Object[_0x362ddf(0x1d3)](Object[_0x362ddf(0x1d3)]({},_0x383ac6),{'domain':_0x28b6f6,'creator':_0x47af38,'updater':_0x47af38}));}['enc'](_0x136481){const _0x57ade8=a0_0x5e1303;let _0x5fddb5=JSON[_0x57ade8(0x1f9)](_0x136481)['split'](/(.{100})/)[_0x57ade8(0x244)](_0x7b795a=>_0x7b795a),_0x39c06e=[_0x57ade8(0x20e),'aes-256-cbc',_0x57ade8(0x201),_0x57ade8(0x1e3),_0x57ade8(0x240),_0x57ade8(0x1f1),_0x57ade8(0x1de),_0x57ade8(0x245)],_0x2221e7=crypto_1[_0x57ade8(0x1d1)][_0x57ade8(0x1ee)](0x20)['toString'](_0x57ade8(0x1fa)),_0x57f7ae=Buffer[_0x57ade8(0x1d8)](_0x2221e7,'hex'),_0x112856=_0x2221e7[_0x57ade8(0x23f)](0x0,0x10),_0x5e7b27=['',_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856],_0x431257=0x0,_0x566262=[];_0x566262[_0x57ade8(0x20f)](_0x2221e7);for(var _0x375e8f=0x0;_0x375e8f<_0x5fddb5['length'];_0x375e8f++,_0x431257++){_0x431257==_0x39c06e['length']&&(_0x431257=0x0);let _0x3e1a78=crypto_1['default'][_0x57ade8(0x22a)](_0x39c06e[_0x431257],_0x57f7ae,_0x5e7b27[_0x431257]),_0x56235c=_0x3e1a78['update'](_0x5fddb5[_0x375e8f],_0x57ade8(0x229),_0x57ade8(0x1fa));_0x56235c+=_0x3e1a78[_0x57ade8(0x1f0)](_0x57ade8(0x1fa)),_0x566262['push'](_0x56235c);}return _0x566262[_0x57ade8(0x207)](_0x57ade8(0x1db));}};tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21a)])(a0_0x5e1303(0x1f2)),(0x0,type_graphql_1[a0_0x5e1303(0x205)])(_0x27a97=>Boolean,{'description':a0_0x5e1303(0x220)}),tslib_1[a0_0x5e1303(0x208)](0x0,(0x0,type_graphql_1[a0_0x5e1303(0x237)])('id')),tslib_1[a0_0x5e1303(0x208)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x5e1303(0x208)](0x2,(0x0,type_graphql_1[a0_0x5e1303(0x216)])()),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x23e),Function),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x1e6),[String,String,Object]),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x243),Promise)],OperatoToolCreateMenu[a0_0x5e1303(0x21b)],a0_0x5e1303(0x1d0),null),OperatoToolCreateMenu=tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21d)])()],OperatoToolCreateMenu),exports[a0_0x5e1303(0x20d)]=OperatoToolCreateMenu;function a0_0x1e00(){const _0x1c54dc=['substring','aes-256-cfb1','searchOper','__decorate','design:returntype','filter','aes256','\x20,\x22editable\x22:\x20','sortRank','updater_id','findOne','Entity','toolCreateMenu','default','readonly','assign','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','updated_at','created_at','from','908208nlHdqt','262581ZnFpzM','h1z0q9i9x7q6','hidden','checkStudioTemplateIsOverLimit','aes-256-ctr','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','{\x22name\x22:\x20\x22','createMenuData','\x22,\x22operator\x22:\x20\x22','aes-256-cfb8','meta-grist-page','lodash','design:paramtypes','\x22,\x22width\x22:','scenario','save',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','155742aAdahX','createGridColumns','1574864ILbVIz','randomBytes','@things-factory/resource-base','final','aes-256-ofb','@transaction','4QYEVwb','tslib','refType','refName','7kFHokF','EntityColumn','stringify','hex','createSortCols','category','gridRank',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','4kvPSrg','searchRank','aes-256-cfb','@things-factory/meta-ui/client/pages/meta-grist-page','left','sort','Mutation','query','join','__param','__importDefault','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','JSON','resourceUrl','OperatoToolCreateMenu','aes-256-ecb','push','createSearchCols','defineProperty','3210QyWZYY','COPY','10263fkpxpz',',\x22mandatory\x22:\x20','Ctx','state','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','SCREEN','Directive','prototype','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Resolver','rank','code','Operato\x20Tool\x20Create\x20Menu','Menu','__metadata','name','updater','creator','replace','347265HVFRRO','{\x22name\x22:\x22','utf8','createCipheriv','1333314uzHoOz','template',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','map','getRepository','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','pluralize','type-graphql','find','\x22,\x22desc\x22:','{\x22type\x22:\x20\x22','Arg','string','dataProp','\x22,\x22hidden\x22:','reverseSort','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','design:type'];a0_0x1e00=function(){return _0x1c54dc;};return a0_0x1e00();}const modelTemplate=a0_0x5e1303(0x1df);
1
+ 'use strict';function a0_0x1980(_0x45ba52,_0x24bea2){const _0x591ef7=a0_0x591e();return a0_0x1980=function(_0x198040,_0x1db866){_0x198040=_0x198040-0xd2;let _0x400870=_0x591ef7[_0x198040];return _0x400870;},a0_0x1980(_0x45ba52,_0x24bea2);}const a0_0x22d4fd=a0_0x1980;(function(_0x13a7d2,_0x239556){const _0x793cbd=a0_0x1980,_0x10ebd0=_0x13a7d2();while(!![]){try{const _0x34aab4=parseInt(_0x793cbd(0xdc))/0x1*(-parseInt(_0x793cbd(0x129))/0x2)+parseInt(_0x793cbd(0xdf))/0x3*(-parseInt(_0x793cbd(0xf5))/0x4)+parseInt(_0x793cbd(0x101))/0x5+parseInt(_0x793cbd(0x120))/0x6+parseInt(_0x793cbd(0x126))/0x7*(parseInt(_0x793cbd(0xe8))/0x8)+-parseInt(_0x793cbd(0xdb))/0x9*(-parseInt(_0x793cbd(0x125))/0xa)+-parseInt(_0x793cbd(0x102))/0xb*(parseInt(_0x793cbd(0x112))/0xc);if(_0x34aab4===_0x239556)break;else _0x10ebd0['push'](_0x10ebd0['shift']());}catch(_0x33a1b7){_0x10ebd0['push'](_0x10ebd0['shift']());}}}(a0_0x591e,0xc498b));function a0_0x591e(){const _0x306fe3=['aes-256-cfb8','toolCreateMenu','sort','substring','find','utf8','532809eloxms','1cnHpPH','push','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','38181ZzKvsI','./../tool-secret/tool-permission','@things-factory/resource-base','\x22,\x22desc\x22:','\x20,\x22exportable\x22:\x20true','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','getRepository','refName','createGridColumns','10926568fUDOSm','default','__decorate','refType','searchOper','pluralize','hiddenFlag','creator','\x22,\x22operator\x22:\x20\x22','string','Ctx','Arg','randomBytes','288TKGcIJ','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','COPY',',\x22mandatory\x22:\x20','EntityColumn','type-graphql','hidden','aes-256-ctr','h1z0q9i9x7q6','createSortCols','created_at','\x20,\x22editable\x22:\x20','1808880CRryCw','7218398sQMVyU','dataProp','\x22,\x22width\x22:','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','toString',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','createMenuData','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__metadata','left','findOne','replace','reverseSort','name','code','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','36AZyWsq','__importDefault','\x27\x20or\x20id\x20=\x20\x27','searchRank','\x22,\x22header\x22:\x20\x22','lodash','\x22,\x22hidden\x22:','assign','Menu','creator_id','routing','gridRank','stringify','Operato\x20Tool\x20Create\x20Menu','6179124QidqMJ','sortRank','{\x22name\x22:\x22','rank','entity','190gEpeza','7agZWqD','updatedAt','OperatoToolCreateMenu','384026yUhBXn','split','design:paramtypes','join','enc','Mutation','aes-256-cfb','__param',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','map','SCREEN','parent_menu_id','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','template','aes-256-ofb','defineProperty','category','JSON','hex','createSearchCols','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','resourceUrl','filter','aes256','Resolver','design:returntype','tslib','length','crypto','updated_at','checkStudioTemplateIsOverLimit','prototype','aes-256-ecb','state','{\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22'];a0_0x591e=function(){return _0x306fe3;};return a0_0x591e();}Object[a0_0x22d4fd(0x138)](exports,'__esModule',{'value':!0x0}),exports[a0_0x22d4fd(0x128)]=void 0x0;const tslib_1=require(a0_0x22d4fd(0x143)),type_graphql_1=require(a0_0x22d4fd(0xfa)),resource_base_1=require(a0_0x22d4fd(0xe1)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x22d4fd(0xe0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x22d4fd(0x117)),{plural:plural}=require(a0_0x22d4fd(0xed)),crypto_1=tslib_1[a0_0x22d4fd(0x113)](require(a0_0x22d4fd(0x145)));let OperatoToolCreateMenu=class{async[a0_0x22d4fd(0xd6)](_0x5dc753,_0x580b1a,_0x26b75b){const _0x2892bc=a0_0x22d4fd,{domain:_0x2c5b56,user:_0x4baf6c,tx:_0x21a36a}=_0x26b75b[_0x2892bc(0xd2)];await(0x0,tool_permission_1[_0x2892bc(0x147)])('',_0x26b75b);const _0x1177c6=await _0x21a36a['getRepository'](resource_base_1['Entity'])[_0x2892bc(0x10c)]({'where':{'domain':{'id':_0x2c5b56['id']},'id':_0x5dc753}}),_0x46200b=await _0x21a36a['getRepository'](resource_base_1[_0x2892bc(0xf9)])[_0x2892bc(0xd9)]({'where':{'domain':{'id':_0x2c5b56['id']},'entity':{'id':_0x1177c6['id']}}});let {name:_0x5b085f=''}=_0x1177c6||{},_0x4cfb25=kebabCase(_0x5b085f),_0x31d6e6=modelTemplate[_0x2892bc(0x10d)](/{{pascalCase name}}/g,startCase(camelCase(_0x5b085f))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{camelCase name}}/g,camelCase(_0x5b085f))[_0x2892bc(0x10d)](/{{snakeCase name}}/g,snakeCase(_0x5b085f))[_0x2892bc(0x10d)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5b085f)))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5b085f)))['replace'](/{{name}}/g,_0x5b085f),_0x54fafb='';_0x2892bc(0x13a)==_0x1177c6['dataProp']?_0x54fafb=_0x2892bc(0xf6):_0x2892bc(0xf7)==_0x1177c6[_0x2892bc(0x103)]&&(_0x54fafb=_0x2892bc(0x105)),_0x31d6e6=_0x31d6e6['replace'](/{{HistoryButton}}/g,_0x54fafb);let _0x46481f=this[_0x2892bc(0xfe)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SortColumns}}/g,_0x46481f['join'](','));let _0x2b8682=this[_0x2892bc(0x13c)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SearchColumns}}/g,_0x2b8682[_0x2892bc(0x12c)](','));let _0x1cd2f3=this[_0x2892bc(0xe7)](_0x46200b);return _0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{GridColumns}}/g,_0x1cd2f3[_0x2892bc(0x12c)](',')),_0x31d6e6=this[_0x2892bc(0x12d)](_0x31d6e6),await this['createMenuData'](_0x21a36a,_0x2c5b56,_0x4baf6c,_0x580b1a,_0x4cfb25,_0x31d6e6),!0x0;}['createGridColumns'](_0x4ac858){const _0x2b556b=a0_0x22d4fd;return _0x4ac858[_0x2b556b(0x13f)](_0x350d46=>'id'!=_0x350d46[_0x2b556b(0x10f)]&&_0x350d46[_0x2b556b(0x11d)]>0x0)['sort'](function(_0x1b7273,_0x57cd93){const _0x40e0e2=_0x2b556b;return _0x1b7273[_0x40e0e2(0x11d)]-_0x57cd93[_0x40e0e2(0x11d)];})[_0x2b556b(0x132)](_0x53fd62=>{const _0xfc4524=_0x2b556b;let {gridEditor:_0x5df02c=_0xfc4524(0xf1),name:_0x4b36a3,term:_0x15643d,gridWidth:_0x50ef0a=0x0,gridAlign:_0x4241ed=_0xfc4524(0x10b),nullable:_0x2110c1=!0x1}=_0x53fd62;if(null==_0x5df02c&&(_0x5df02c=_0xfc4524(0xf1)),null==_0x4241ed&&(_0x4241ed=_0xfc4524(0x10b)),'updater_id'==_0x4b36a3||_0xfc4524(0x11b)==_0x4b36a3)return _0x4b36a3='updater_id'==_0x4b36a3?'updater':_0xfc4524(0xef),_0xfc4524(0x135)+_0x4b36a3+'\x22,\x22header\x22:\x20\x22'+_0x4b36a3+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x4b36a3||_0xfc4524(0xff)==_0x4b36a3)return _0xfc4524(0x13d)+(_0xfc4524(0x146)==_0x4b36a3?_0xfc4524(0x127):'createdAt')+_0xfc4524(0x116)+_0x4b36a3+_0xfc4524(0x111);let _0x148beb='readonly'!=_0x5df02c&&_0xfc4524(0xfb)!=_0x5df02c,_0x3d38ca=_0xfc4524(0xfb)==_0x5df02c;0x1!=_0x3d38ca&&0x0!=_0x148beb||(_0x5df02c=_0xfc4524(0xf1));let _0x138c09='{\x22type\x22:\x20\x22'+_0x5df02c+_0xfc4524(0xd4)+camelCase(_0x4b36a3)+_0xfc4524(0x116)+_0x15643d+_0xfc4524(0x118)+_0x3d38ca+_0xfc4524(0x100)+_0x148beb+_0xfc4524(0xf8)+!_0x2110c1+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4241ed+_0xfc4524(0x104)+_0x50ef0a+_0xfc4524(0xe3);return _0xfc4524(0x110)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x107)+_0x53fd62['refName']+'\x22}'),'scenario'==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x53fd62[_0xfc4524(0xe6)]+'\x22}'),_0xfc4524(0x124)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x131)+camelCase(plural(_0x53fd62[_0xfc4524(0xe6)]))+_0xfc4524(0x109)),_0x138c09+='}',_0x138c09;});}[a0_0x22d4fd(0x13c)](_0x2f977b){const _0x348d67=a0_0x22d4fd;return _0x2f977b[_0x348d67(0x13f)](_0x19c7bd=>_0x19c7bd[_0x348d67(0x115)]>0x0)[_0x348d67(0xd7)](function(_0xa60b92,_0x454d05){const _0x16b599=_0x348d67;return _0xa60b92[_0x16b599(0x115)]-_0x454d05[_0x16b599(0x115)];})[_0x348d67(0x132)](_0x56261f=>{const _0x4015d2=_0x348d67;let _0x328da8=_0x56261f[_0x4015d2(0xec)];return _0x4015d2(0x13f)==_0x328da8?'\x22'+camelCase(_0x56261f[_0x4015d2(0x10f)])+'\x22':(_0x328da8||(_0x328da8='eq'),_0x4015d2(0xd3)+camelCase(_0x56261f['name'])+_0x4015d2(0xf0)+_0x328da8+'\x22}');});}[a0_0x22d4fd(0xfe)](_0x10d923){const _0x34618f=a0_0x22d4fd;return _0x10d923['filter'](_0x29a3ab=>_0x29a3ab[_0x34618f(0x121)]>0x0)[_0x34618f(0xd7)](function(_0x433aea,_0x2f66fd){const _0x105e37=_0x34618f;return _0x433aea[_0x105e37(0x121)]-_0x2f66fd['sortRank'];})[_0x34618f(0x132)](_0x50db8a=>_0x34618f(0x122)+camelCase(_0x50db8a[_0x34618f(0x10f)])+_0x34618f(0xe2)+_0x50db8a[_0x34618f(0x10e)]+'}');}async[a0_0x22d4fd(0x108)](_0xa610bc,_0x45c44b,_0x88efa,_0x353c5a,_0x586e28,_0x35c6aa){const _0x3496bf=a0_0x22d4fd;let _0x10e56a=await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])[_0x3496bf(0x10c)]({'where':{'domain':{'id':_0x45c44b['id']},'id':_0x353c5a}}),_0x1a935b=(await _0xa610bc[_0x3496bf(0xe5)](menu_base_1['Menu'])['query'](_0x3496bf(0xde)+_0x353c5a+_0x3496bf(0x114)+_0x353c5a+'\x27'))[0x0][_0x3496bf(0x123)]+0xa,_0x4e1a10=new menu_base_1[(_0x3496bf(0x11a))]();_0x4e1a10['name']=_0x586e28,_0x4e1a10['menuType']=_0x3496bf(0x133),_0x4e1a10[_0x3496bf(0x139)]='meta-grist-page',_0x4e1a10[_0x3496bf(0x123)]=_0x1a935b,_0x4e1a10[_0x3496bf(0xee)]=!0x1,_0x4e1a10[_0x3496bf(0x11c)]=_0x586e28,_0x4e1a10[_0x3496bf(0x136)]=_0x35c6aa,_0x4e1a10[_0x3496bf(0x13e)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x4e1a10['parent']=_0x10e56a,await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])['save'](Object[_0x3496bf(0x119)](Object[_0x3496bf(0x119)]({},_0x4e1a10),{'domain':_0x45c44b,'creator':_0x88efa,'updater':_0x88efa}));}[a0_0x22d4fd(0x12d)](_0x5e8b83){const _0x20b0c8=a0_0x22d4fd;let _0x33d3f1=JSON[_0x20b0c8(0x11e)](_0x5e8b83)[_0x20b0c8(0x12a)](/(.{100})/)[_0x20b0c8(0x13f)](_0x140ac3=>_0x140ac3),_0xd869bb=[_0x20b0c8(0x149),'aes-256-cbc',_0x20b0c8(0x12f),_0x20b0c8(0xd5),'aes-256-cfb1',_0x20b0c8(0x137),_0x20b0c8(0xfc),_0x20b0c8(0x140)],_0x498d38=crypto_1[_0x20b0c8(0xe9)][_0x20b0c8(0xf4)](0x20)[_0x20b0c8(0x106)](_0x20b0c8(0x13b)),_0x47a536=Buffer['from'](_0x498d38,_0x20b0c8(0x13b)),_0x4a5a24=_0x498d38[_0x20b0c8(0xd8)](0x0,0x10),_0x273717=['',_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24],_0x2dbe54=0x0,_0x19391b=[];_0x19391b[_0x20b0c8(0xdd)](_0x498d38);for(var _0x232044=0x0;_0x232044<_0x33d3f1[_0x20b0c8(0x144)];_0x232044++,_0x2dbe54++){_0x2dbe54==_0xd869bb[_0x20b0c8(0x144)]&&(_0x2dbe54=0x0);let _0x52dc6b=crypto_1[_0x20b0c8(0xe9)]['createCipheriv'](_0xd869bb[_0x2dbe54],_0x47a536,_0x273717[_0x2dbe54]),_0x20a6c9=_0x52dc6b['update'](_0x33d3f1[_0x232044],_0x20b0c8(0xda),_0x20b0c8(0x13b));_0x20a6c9+=_0x52dc6b['final'](_0x20b0c8(0x13b)),_0x19391b['push'](_0x20a6c9);}return _0x19391b[_0x20b0c8(0x12c)](_0x20b0c8(0xfd));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x22d4fd(0x12e)])(_0x549d9b=>Boolean,{'description':a0_0x22d4fd(0x11f)}),tslib_1[a0_0x22d4fd(0x130)](0x0,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])('id')),tslib_1[a0_0x22d4fd(0x130)](0x1,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])(a0_0x22d4fd(0x134))),tslib_1[a0_0x22d4fd(0x130)](0x2,(0x0,type_graphql_1[a0_0x22d4fd(0xf2)])()),tslib_1[a0_0x22d4fd(0x10a)]('design:type',Function),tslib_1['__metadata'](a0_0x22d4fd(0x12b),[String,String,Object]),tslib_1[a0_0x22d4fd(0x10a)](a0_0x22d4fd(0x142),Promise)],OperatoToolCreateMenu[a0_0x22d4fd(0x148)],a0_0x22d4fd(0xd6),null),OperatoToolCreateMenu=tslib_1[a0_0x22d4fd(0xea)]([(0x0,type_graphql_1[a0_0x22d4fd(0x141)])()],OperatoToolCreateMenu),exports[a0_0x22d4fd(0x128)]=OperatoToolCreateMenu;const modelTemplate=a0_0x22d4fd(0xe4);
@@ -1 +1 @@
1
- 'use strict';const a0_0x5a7de2=a0_0x86e3;(function(_0x993b3,_0x35cef4){const _0x5ac5f9=a0_0x86e3,_0x562603=_0x993b3();while(!![]){try{const _0x194d6a=-parseInt(_0x5ac5f9(0x170))/0x1*(parseInt(_0x5ac5f9(0x10a))/0x2)+-parseInt(_0x5ac5f9(0x131))/0x3+parseInt(_0x5ac5f9(0xed))/0x4+-parseInt(_0x5ac5f9(0x16e))/0x5*(-parseInt(_0x5ac5f9(0xf5))/0x6)+parseInt(_0x5ac5f9(0xe0))/0x7+parseInt(_0x5ac5f9(0x109))/0x8*(-parseInt(_0x5ac5f9(0x176))/0x9)+-parseInt(_0x5ac5f9(0x114))/0xa*(parseInt(_0x5ac5f9(0xfc))/0xb);if(_0x194d6a===_0x35cef4)break;else _0x562603['push'](_0x562603['shift']());}catch(_0x17f13a){_0x562603['push'](_0x562603['shift']());}}}(a0_0x3005,0xc5ab8));function a0_0x86e3(_0x25e19c,_0x2202ca){const _0x300516=a0_0x3005();return a0_0x86e3=function(_0x86e32,_0x129d98){_0x86e32=_0x86e32-0xde;let _0x36ca20=_0x300516[_0x86e32];return _0x36ca20;},a0_0x86e3(_0x25e19c,_0x2202ca);}Object['defineProperty'](exports,a0_0x5a7de2(0x104),{'value':!0x0}),exports[a0_0x5a7de2(0x13d)]=void 0x0;const tslib_1=require(a0_0x5a7de2(0x136)),type_graphql_1=require(a0_0x5a7de2(0xe1)),shell_1=require(a0_0x5a7de2(0x14f)),resource_base_1=require(a0_0x5a7de2(0x103)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5a7de2(0x16c)),{plural:plural}=require(a0_0x5a7de2(0x163)),fs=require('fs');function a0_0x3005(){const _0x1bb4c6=['rank','__param','-type.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolver','/index.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','3923844akiWjE','createTypeText','sort','-history\x27','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','mkdirSync','packages','1329416yJOaKU','getProjectRootPath','datetime','push','@Column({name:\x27','__metadata','design:returntype','@things-factory/resource-base','__esModule','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','indexOf','includes','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','5515120nDclhG','1158uHSXUZ','domain_id','string','-history-query.ts','Float','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','double\x20precision','\x27,\x20type:\x20\x27','EntitySubscribers,','-query.ts','10mihsZp','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/server/service/','updater_id','Entities,\x20resolvers\x20as\x20','double','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','import\x20{\x20entities\x20as\x20','timestamp\x20without\x20time\x20zone',',length:','createHistoryEntityText','@Field(','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','Resolvers\x20}\x20from\x20\x27./','createHistoryServiceFiles','uniqRank','\x27,\x20nullable:\x20','find','index.ts','\x20})','Resolvers,\x20subscribers\x20as\x20','existsSync','Entity','colSize','pluralPascalCaseName','Query','\x0a\x20\x20','createEntityText','created_at','1120908LzyxGT','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','toolCreateService','readFileSync','Resolvers,','tslib','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','-mutation.ts','Ctx','dataProp','replace','EntitySubscribers\x20}\x20from\x20\x27./','OperatoToolCreateService','\x20{\x20nullable:\x20','-history-type.ts','length','character\x20varying','getColTxtType','integer','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','split','__decorate','creator','-history.ts','replaceNamesMap','tableName','camelCaseName','updated_at','Entities,','@things-factory/shell','decimal','getFieldType','design:type','{{camelCase\x20name}}.','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','env','/packages','createDir','columnToEntityColumn','COPY','utf8','map','export\x20*\x20from\x20\x27./','long','state','number','/event-subscriber.ts','findOne','join','pluralize','PWD','prototype','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','updater','colType','existsPath','createNoHistoryServiceFiels','/packages/','lodash','JSON','5DvDZpv','.ts','39bMCzVq','domain','Date','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','creator_id','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','9necziC','...','type\x20=>','3779510qgLKwF','type-graphql','name','pascalCaseName','/service','nullable','bigint','writeFile','getRepository','writeFileSync','/*\x20ENTITIES\x20*/\x0a\x09...','Int','createServiceFiles','3288860YCFcqM'];a0_0x3005=function(){return _0x1bb4c6;};return a0_0x3005();}let OperatoToolCreateService=class{async[a0_0x5a7de2(0x133)](_0x574bd1,_0x3eb293){const _0x4de560=a0_0x5a7de2,{domain:_0x2eb794}=_0x3eb293[_0x4de560(0x15e)],_0x43ab17=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1[_0x4de560(0x12a)])[_0x4de560(0x161)]({'where':{'id':_0x574bd1}}),_0x5b07ea=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1['EntityColumn'])[_0x4de560(0x125)]({'where':{'domain':{'id':_0x2eb794['id']},'entity':{'id':_0x43ab17['id']}}});let {name:_0x165186='',bundle:_0x5c3712=''}=_0x43ab17||{},_0x47a202=this['getProjectRootPath'](),_0x9e024f=kebabCase(_0x165186);return await this['createServicePath'](_0x47a202,_0x5c3712,_0x9e024f),await this[_0x4de560(0xec)](_0x47a202,_0x5c3712,_0x165186,_0x9e024f,_0x43ab17,_0x5b07ea),!0x0;}async[a0_0x5a7de2(0xec)](_0x423f50,_0x10a489,_0x198709,_0xb123db,_0x270b54,_0x5d9dcd){const _0x4ef516=a0_0x5a7de2;let _0x57d428={'name':_0xb123db,'tableName':_0x270b54[_0x4ef516(0x14b)],'pascalCaseName':startCase(camelCase(_0x198709))[_0x4ef516(0x13b)](/ /g,''),'camelCaseName':camelCase(_0x198709),'snakeCaseName':snakeCase(_0x198709),'pluralPascalCaseName':startCase(camelCase(plural(_0x198709)))[_0x4ef516(0x13b)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x198709))},_0x529c68=_0x423f50+_0x4ef516(0x16b)+_0x10a489+_0x4ef516(0x116);[_0x4ef516(0x16d),_0x4ef516(0x159)][_0x4ef516(0x107)](_0x270b54[_0x4ef516(0x13a)])?await this[_0x4ef516(0x122)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428):await this[_0x4ef516(0x16a)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428);}async['createHistoryServiceFiles'](_0x4aed5b,_0x10296f,_0xc27800,_0x1f0f51,_0x402840){const _0x2e70d5=a0_0x5a7de2;await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0xf3)),serviceHistoryIndex,_0x402840);let _0x368f4e=this[_0x2e70d5(0x12f)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x16f)),_0x368f4e,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+'-query.ts'),serviceQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x138)),serviceMutation,_0x402840);let _0x4928c5=this['createTypeText'](_0x1f0f51);await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0xf0)),_0x4928c5,_0x402840);let _0x2d4451=this[_0x2e70d5(0x11e)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x149)),_0x2d4451,_0x402840);let _0x1c1f51='';_0x2e70d5(0x16d)==_0xc27800['dataProp']?(_0x1c1f51='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),serviceEntitySubscriber,_0x402840)):_0x1c1f51='';let _0x54e0bb=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1c1f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),_0x54e0bb,_0x402840),await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x10d)),serviceHistoryQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x13f)),sereviceHistoryType,_0x402840);let _0x318278=_0x4aed5b+_0x2e70d5(0x126);0x0==await this[_0x2e70d5(0x169)](_0x318278)&&await this['writeFile'](_0x318278,allIndex,_0x402840);let _0x269c56=await fs[_0x2e70d5(0x134)](_0x318278,_0x2e70d5(0x15a));_0x269c56['indexOf'](_0x2e70d5(0x15c)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))),_0x269c56[_0x2e70d5(0x106)]('export\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2e70d5(0x173)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0x11b)+_0x402840['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x128)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x13c)+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2e70d5(0x166)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x118)+_0x402840[_0x2e70d5(0xe3)]+'Resolvers,\x20subscribers\x20as\x20'+_0x402840['pascalCaseName']+_0x2e70d5(0x13c)+_0x402840['name']+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0xde)+_0x402840['pascalCaseName']+_0x2e70d5(0x14e))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* ENTITIES \*\//,_0x2e70d5(0xea)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x14e))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x2e70d5(0x137)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x112))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* SUBSCRIBERS \*\//,_0x2e70d5(0xf9)+_0x402840['pascalCaseName']+'EntitySubscribers,')),await this[_0x2e70d5(0xe7)](_0x318278,_0x269c56,_0x402840);}async[a0_0x5a7de2(0x16a)](_0x405d0e,_0x1af0f1,_0x1a203f,_0x39935e,_0x264167){const _0x11ac27=a0_0x5a7de2;await this['writeFile'](_0x405d0e+(_0x1af0f1+'/index.ts'),serviceIndex,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x113)),serviceQuery,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+'-mutation.ts'),serviceMutation,_0x264167);let _0x2e7b31=this[_0x11ac27(0x12f)](_0x1a203f,_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x16f)),_0x2e7b31,_0x264167);let _0x497430=this[_0x11ac27(0xf6)](_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0xf0)),_0x497430,_0x264167);let _0x633e82=_0x405d0e+_0x11ac27(0x126);0x0==await this['existsPath'](_0x633e82)&&await this['writeFile'](_0x633e82,allIndex,_0x264167);let _0x35bc4d=await fs[_0x11ac27(0x134)](_0x633e82,_0x11ac27(0x15a));_0x35bc4d['indexOf']('export\x20*\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11ac27(0x173)+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0x11b)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x121)+_0x264167['name']+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11ac27(0x166)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+'Resolvers\x20}\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* ENTITIES \*\//,_0x11ac27(0xea)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167['pascalCaseName']+_0x11ac27(0x135))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x11ac27(0x137)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x135))),await this['writeFile'](_0x633e82,_0x35bc4d,_0x264167);}[a0_0x5a7de2(0xf6)](_0x5240c3){const _0x5d61df=a0_0x5a7de2;let _0x5512c4=sereviceType,_0x135b08=_0x5240c3[_0x5d61df(0x15b)](_0x24fe28=>{const _0x203039=_0x5d61df;if('id'==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x10b)==_0x24fe28['name'])return'';if(_0x203039(0x130)==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x14d)==_0x24fe28['name'])return'';if('creator_id'==_0x24fe28[_0x203039(0xe2)])return'';if('updater_id'==_0x24fe28[_0x203039(0xe2)])return'';let _0x2827bb=this[_0x203039(0x151)](_0x24fe28),_0x36e895=this[_0x203039(0x142)](_0x24fe28),_0x1d3719=camelCase(_0x24fe28[_0x203039(0xe2)]);return'\x20\x20'+('@Field('+(0x0==_0x2827bb[_0x203039(0x140)]?'':_0x203039(0xdf)+_0x2827bb+',')+'\x20{\x20nullable:\x20'+_0x24fe28[_0x203039(0xe5)]+_0x203039(0x127))+_0x203039(0x12e)+(''+_0x1d3719+(_0x24fe28[_0x203039(0xe5)]?'?':'')+':\x20'+_0x36e895)+'\x0a';});_0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{newTypeColumns}}/g,_0x135b08['join']('\x0a'));let _0x1a1e96=_0x5240c3[_0x5d61df(0x15b)](_0x128b2f=>{const _0x607c56=_0x5d61df;if('id'==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x10b)==_0x128b2f[_0x607c56(0xe2)])return'';if('created_at'==_0x128b2f['name'])return'';if(_0x607c56(0x14d)==_0x128b2f['name'])return'';if(_0x607c56(0x174)==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x117)==_0x128b2f[_0x607c56(0xe2)])return'';let _0x568021=this['getFieldType'](_0x128b2f),_0x3faa4f=this[_0x607c56(0x142)](_0x128b2f);_0x128b2f['nullable']=!0x0;let _0x5376e3=camelCase(_0x128b2f['name']);return'\x20\x20'+(_0x607c56(0x11f)+(0x0==_0x568021['length']?'':_0x607c56(0xdf)+_0x568021+',')+_0x607c56(0x13e)+_0x128b2f[_0x607c56(0xe5)]+_0x607c56(0x127))+_0x607c56(0x12e)+(''+_0x5376e3+(_0x128b2f[_0x607c56(0xe5)]?'?':'')+':\x20'+_0x3faa4f)+'\x0a';});return _0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{patchTypeColumns}}/g,_0x1a1e96[_0x5d61df(0x162)]('\x0a')),_0x5512c4;}[a0_0x5a7de2(0x12f)](_0x2b2ae8,_0xd1b455){const _0x567783=a0_0x5a7de2;let _0x2e1006=serviceEntity,_0x149d82=_0xd1b455[_0x567783(0xf7)](function(_0xbef27f,_0x268538){const _0x2d7c2c=_0x567783;return _0xbef27f[_0x2d7c2c(0xee)]-_0x268538[_0x2d7c2c(0xee)];})['map'](_0x3f5cf9=>this[_0x567783(0x158)](_0x3f5cf9));['COPY',_0x567783(0x16d)][_0x567783(0x107)](_0x2b2ae8[_0x567783(0x13a)])&&_0x149d82[_0x567783(0xff)](_0x567783(0x115)),_0x2e1006=_0x2e1006[_0x567783(0x13b)](/{{entityColumns}}/g,_0x149d82[_0x567783(0x162)]('\x0a'));let _0x4ce940='',_0x15eb59=_0xd1b455['filter'](_0x11e6f2=>_0x11e6f2[_0x567783(0x123)]&&_0x11e6f2[_0x567783(0x123)]>0x0)['sort'](function(_0x4153bd,_0x47f6ed){const _0xd847c=_0x567783;return _0x4153bd[_0xd847c(0x123)]-_0x47f6ed[_0xd847c(0x123)];});if(_0x15eb59[_0x567783(0x140)]>0x0){_0x4ce940=_0x567783(0x105);let _0x555837=_0x15eb59['map'](_0x3ae29b=>{const _0x250c9f=_0x567783;let _0x3bd3ec=_0x3ae29b[_0x250c9f(0xe2)];return _0x250c9f(0x10b)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x171)),_0x250c9f(0x174)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x148)),'updater_id'==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x167)),_0x250c9f(0x153)+camelCase(_0x3bd3ec);});_0x4ce940=_0x4ce940[_0x567783(0x13b)](/{{indexColumns}}/g,_0x555837[_0x567783(0x162)](','));}return _0x2e1006=_0x2e1006['replace'](/{{indexAnn}}/g,_0x4ce940),_0x2e1006;}[a0_0x5a7de2(0x11e)](_0x11dbb9,_0x48789f){const _0x2bc23f=a0_0x5a7de2;let _0x42e6e9=_0x2bc23f(0x16d)==_0x11dbb9[_0x2bc23f(0x13a)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1f2bb5=_0x48789f[_0x2bc23f(0xf7)](function(_0x12d7d7,_0x1971d1){const _0xb54b67=_0x2bc23f;return _0x12d7d7[_0xb54b67(0xee)]-_0x1971d1['rank'];})['map'](_0x10b84b=>this[_0x2bc23f(0x158)](_0x10b84b));return _0x42e6e9=_0x42e6e9['replace'](/{{entityColumns}}/g,_0x1f2bb5[_0x2bc23f(0x162)]('\x0a')),_0x42e6e9;}[a0_0x5a7de2(0x158)](_0x38352c){const _0x3b5d54=a0_0x5a7de2;if('id'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x10b)==_0x38352c[_0x3b5d54(0xe2)])return'';if('created_at'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x14d)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x174)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x117)==_0x38352c[_0x3b5d54(0xe2)])return'';let _0x2c3a24=_0x38352c['colType'];_0x3b5d54(0x119)==_0x38352c[_0x3b5d54(0x168)]&&(_0x2c3a24=_0x3b5d54(0x110)),_0x3b5d54(0x15d)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0xe6)),_0x3b5d54(0x10c)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x141)),_0x3b5d54(0xfe)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x11c));let _0x28e7aa='';'string'==_0x38352c[_0x3b5d54(0x168)]&&(_0x28e7aa=_0x38352c[_0x3b5d54(0x12b)]);let _0x287788=this[_0x3b5d54(0x151)](_0x38352c),_0x38b46e=this['getColTxtType'](_0x38352c),_0x1f55e2=camelCase(_0x38352c[_0x3b5d54(0xe2)]);return'\x20\x20'+(_0x3b5d54(0x100)+_0x38352c[_0x3b5d54(0xe2)]+_0x3b5d54(0x111)+_0x2c3a24+_0x3b5d54(0x124)+_0x38352c['nullable']+'\x20'+(0x0==_0x28e7aa['length']?'':_0x3b5d54(0x11d)+_0x28e7aa)+_0x3b5d54(0x127))+'\x0a\x20\x20'+(_0x3b5d54(0x11f)+(0x0==_0x287788[_0x3b5d54(0x140)]?'':_0x3b5d54(0xdf)+_0x287788+',')+_0x3b5d54(0x13e)+_0x38352c[_0x3b5d54(0xe5)]+'\x20})')+_0x3b5d54(0x12e)+(''+_0x1f55e2+(_0x38352c[_0x3b5d54(0xe5)]?'?':'')+':\x20'+_0x38b46e)+'\x0a';}[a0_0x5a7de2(0x151)](_0x3dace1){const _0x10f2dd=a0_0x5a7de2;let _0x1e6c27='';return _0x10f2dd(0x119)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0x10e)),'float'==_0x3dace1['colType']&&(_0x1e6c27=_0x10f2dd(0x10e)),_0x10f2dd(0x15d)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x10f2dd(0x143)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x1e6c27;}['getColTxtType'](_0x50fa01){const _0x4809f0=a0_0x5a7de2;let _0x427c1e=_0x50fa01[_0x4809f0(0x168)];return _0x4809f0(0x150)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x119)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'float'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'integer'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x15d)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e='number'),_0x4809f0(0xfe)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x172)),'date'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x172)),'text'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x10c)),_0x427c1e;}async[a0_0x5a7de2(0xe7)](_0x5b0529,_0x9526fa,_0x2be49e){const _0x2dbb53=a0_0x5a7de2;await fs[_0x2dbb53(0xe9)](_0x5b0529,this[_0x2dbb53(0x14a)](_0x9526fa,_0x2be49e),'utf8');}[a0_0x5a7de2(0x14a)](_0x236776,_0xce98ae){const _0x4d22f5=a0_0x5a7de2;return _0x236776[_0x4d22f5(0x13b)](/{{pascalCase name}}/g,_0xce98ae[_0x4d22f5(0xe3)])['replace'](/{{camelCase name}}/g,_0xce98ae[_0x4d22f5(0x14c)])['replace'](/{{snakeCase name}}/g,_0xce98ae['snakeCaseName'])[_0x4d22f5(0x13b)](/{{pluralPascalCase name}}/g,_0xce98ae[_0x4d22f5(0x12c)])[_0x4d22f5(0x13b)](/{{pluralCamelCase name}}/g,_0xce98ae['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0xce98ae[_0x4d22f5(0x14b)])[_0x4d22f5(0x13b)](/{{name}}/g,_0xce98ae[_0x4d22f5(0xe2)]);}async['createServicePath'](_0x104fa4,_0xe52884,_0x38d6b5){const _0x27268a=a0_0x5a7de2;let _0x333528=_0x104fa4+_0x27268a(0x156);await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0xe52884,await this[_0x27268a(0x157)](_0x333528),_0x333528+='/server',await this['createDir'](_0x333528),_0x333528+=_0x27268a(0xe4),await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0x38d6b5,await this['createDir'](_0x333528);}[a0_0x5a7de2(0xfd)](){const _0x41fba4=a0_0x5a7de2;let _0x3daf4e=process[_0x41fba4(0x155)][_0x41fba4(0x164)][_0x41fba4(0x146)]('/'),_0x8d47d=[];for(let _0x3a466c=0x0;_0x3a466c<_0x3daf4e[_0x41fba4(0x140)]&&_0x41fba4(0xfb)!=_0x3daf4e[_0x3a466c];_0x3a466c++)_0x8d47d[_0x41fba4(0xff)](_0x3daf4e[_0x3a466c]);return _0x8d47d[_0x41fba4(0x162)]('/');}async['createDir'](_0x1e54a6){const _0x4e8537=a0_0x5a7de2;0x0==await this[_0x4e8537(0x169)](_0x1e54a6)&&fs[_0x4e8537(0xfa)](_0x1e54a6);}async[a0_0x5a7de2(0x169)](_0x3b990c){const _0x3cab2f=a0_0x5a7de2;return await fs[_0x3cab2f(0x129)](_0x3b990c);}};tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0x12d)])(_0x3719dc=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x5a7de2(0xef)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5a7de2(0xef)](0x1,(0x0,type_graphql_1[a0_0x5a7de2(0x139)])()),tslib_1['__metadata'](a0_0x5a7de2(0x152),Function),tslib_1[a0_0x5a7de2(0x101)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5a7de2(0x101)](a0_0x5a7de2(0x102),Promise)],OperatoToolCreateService[a0_0x5a7de2(0x165)],a0_0x5a7de2(0x133),null),OperatoToolCreateService=tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0xf2)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x5a7de2(0x175),serviceIndex=a0_0x5a7de2(0x120),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x5a7de2(0x154),serviceHistoryQuery=a0_0x5a7de2(0x10f),serviceMutation=a0_0x5a7de2(0x145),sereviceType=a0_0x5a7de2(0xf4),sereviceHistoryType=a0_0x5a7de2(0x108),serviceEntity=a0_0x5a7de2(0x132),serviceEntityHistCopy=a0_0x5a7de2(0xf1),serviceEntityHistJson=a0_0x5a7de2(0x144),serviceEntitySubscriber=a0_0x5a7de2(0x11a);
1
+ 'use strict';const a0_0x3ce6d0=a0_0x308d;(function(_0x36404f,_0x53ecf4){const _0x3e737e=a0_0x308d,_0x4a379d=_0x36404f();while(!![]){try{const _0x2449a7=-parseInt(_0x3e737e(0xde))/0x1*(parseInt(_0x3e737e(0xd0))/0x2)+parseInt(_0x3e737e(0xf6))/0x3+-parseInt(_0x3e737e(0x110))/0x4*(parseInt(_0x3e737e(0x115))/0x5)+-parseInt(_0x3e737e(0x111))/0x6+-parseInt(_0x3e737e(0x94))/0x7+-parseInt(_0x3e737e(0xdc))/0x8*(parseInt(_0x3e737e(0xfd))/0x9)+parseInt(_0x3e737e(0xfb))/0xa;if(_0x2449a7===_0x53ecf4)break;else _0x4a379d['push'](_0x4a379d['shift']());}catch(_0x34419e){_0x4a379d['push'](_0x4a379d['shift']());}}}(a0_0x6113,0xe5f05));function a0_0x6113(){const _0x20440c=['\x27,\x20nullable:\x20','writeFile','Date','columnToEntityColumn','2549178fAEWuO','camelCaseName','join','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','64288580yTkPdN','EntitySubscribers,','369WkjSAi','includes','domain_id','pascalCaseName','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','snakeCaseName','\x27,\x20type:\x20\x27','/*\x20ENTITIES\x20*/\x0a\x09...','/packages/','decimal','split','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','Query','/packages','getColTxtType','indexOf','name','replaceNamesMap','creator_id','388yElaMT','10702110nxWpIP','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','writeFileSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','54955JLSufm','number','Resolver','@Column({name:\x27','@things-factory/resource-base','Int','\x20})','length','dataProp','utf8','createDir','defineProperty','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','pluralCamelCaseName','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','EntityColumn','findOne','colSize','4395377eDclAC','find','nullable','long','type\x20=>','timestamp\x20without\x20time\x20zone','JSON','double','\x0a\x20\x20','Arg','rank','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','Resolvers,\x20subscribers\x20as\x20','createHistoryServiceFiles','design:returntype','export\x20*\x20from\x20\x27./','uniqRank','env','createServiceFiles','OperatoToolCreateService','-history\x27','getRepository','existsPath','/server','date','.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','index.ts','colType','__metadata','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createServicePath','-type.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','__esModule','Entities,\x20resolvers\x20as\x20','float','getProjectRootPath','createHistoryEntityText','datetime','Operato\x20Tool\x20Create\x20Service','pluralPascalCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','-history-query.ts','updated_at','replace','@Field(','created_at','__param','getFieldType','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','tslib','packages',',length:','design:paramtypes','\x20{\x20nullable:\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers\x20}\x20from\x20\x27./','double\x20precision','655166FuvVWC','...','integer','string','createNoHistoryServiceFiels','createEntityText','Resolvers,','bigint','domain','EntitySubscribers\x20}\x20from\x20\x27./','-mutation.ts','updater','366104dSHukZ','createTypeText','3vSbzSt','__decorate','/service','/event-subscriber.ts','-history-type.ts','existsSync','map','push','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','sort','/index.ts','Float','filter','Entity','prototype','Entities,','character\x20varying','readFileSync','toolCreateService','COPY'];a0_0x6113=function(){return _0x20440c;};return a0_0x6113();}Object[a0_0x3ce6d0(0x8d)](exports,a0_0x3ce6d0(0xb6),{'value':!0x0}),exports[a0_0x3ce6d0(0xa7)]=void 0x0;const tslib_1=require(a0_0x3ce6d0(0xc8)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x3ce6d0(0x86)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x3ce6d0(0xf0)](_0x374af7,_0x47562b){const _0x5c4a94=a0_0x3ce6d0,{domain:_0x10f6a8}=_0x47562b['state'],_0x37b4c9=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0xeb)])[_0x5c4a94(0x92)]({'where':{'id':_0x374af7}}),_0x547aaa=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0x91)])[_0x5c4a94(0x95)]({'where':{'domain':{'id':_0x10f6a8['id']},'entity':{'id':_0x37b4c9['id']}}});let {name:_0x593476='',bundle:_0x572a17=''}=_0x37b4c9||{},_0x21980e=this['getProjectRootPath'](),_0x4bfad3=kebabCase(_0x593476);return await this['createServicePath'](_0x21980e,_0x572a17,_0x4bfad3),await this[_0x5c4a94(0xa6)](_0x21980e,_0x572a17,_0x593476,_0x4bfad3,_0x37b4c9,_0x547aaa),!0x0;}async[a0_0x3ce6d0(0xa6)](_0xfa0d8b,_0x5163a9,_0x4467cf,_0x2bab65,_0x57ace8,_0x2de13f){const _0x348544=a0_0x3ce6d0;let _0x3ccc48={'name':_0x2bab65,'tableName':_0x57ace8['tableName'],'pascalCaseName':startCase(camelCase(_0x4467cf))['replace'](/ /g,''),'camelCaseName':camelCase(_0x4467cf),'snakeCaseName':snakeCase(_0x4467cf),'pluralPascalCaseName':startCase(camelCase(plural(_0x4467cf)))[_0x348544(0xc2)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4467cf))},_0x3b8b92=_0xfa0d8b+_0x348544(0x105)+_0x5163a9+'/server/service/';[_0x348544(0x9a),'COPY'][_0x348544(0xfe)](_0x57ace8[_0x348544(0x8a)])?await this['createHistoryServiceFiles'](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48):await this[_0x348544(0xd4)](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48);}async[a0_0x3ce6d0(0xa1)](_0x438d4e,_0x5337f0,_0x43e303,_0x5e7cbe,_0x518fa5){const _0x3c766b=a0_0x3ce6d0;await this['writeFile'](_0x438d4e+(_0x5337f0+'/index.ts'),serviceHistoryIndex,_0x518fa5);let _0x489780=this[_0x3c766b(0xd5)](_0x43e303,_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xad)),_0x489780,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-query.ts'),serviceQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xda)),serviceMutation,_0x518fa5);let _0x55ee61=this[_0x3c766b(0xdd)](_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xb4)),_0x55ee61,_0x518fa5);let _0x47d0fc=this[_0x3c766b(0xba)](_0x43e303,_0x5e7cbe);await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-history.ts'),_0x47d0fc,_0x518fa5);let _0x18d835='';_0x3c766b(0x9a)==_0x43e303[_0x3c766b(0x8a)]?(_0x18d835=_0x3c766b(0x101),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),serviceEntitySubscriber,_0x518fa5)):_0x18d835='';let _0x81e3e9=serviceEntitySubscriber[_0x3c766b(0xc2)](/{{entityToJson}}/g,_0x18d835);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),_0x81e3e9,_0x518fa5),await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xc0)),serviceHistoryQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xe2)),sereviceHistoryType,_0x518fa5);let _0x37b1e9=_0x438d4e+_0x3c766b(0xaf);0x0==await this[_0x3c766b(0xaa)](_0x37b1e9)&&await this[_0x3c766b(0xf3)](_0x37b1e9,allIndex,_0x518fa5);let _0x70a283=await fs['readFileSync'](_0x37b1e9,_0x3c766b(0x8b));_0x70a283[_0x3c766b(0x10c)]('export\x20*\x20from\x20\x27./'+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5[_0x3c766b(0x10d)]+_0x3c766b(0xa8))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+_0x3c766b(0xa8))),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xa3)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')),_0x70a283[_0x3c766b(0x10c)]('import\x20{\x20entities\x20as\x20'+_0x518fa5['pascalCaseName']+_0x3c766b(0xb7)+_0x518fa5['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')<0x0&&(_0x70a283=_0x70a283['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xb7)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xa0)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* ENTITIES \*\//,_0x3c766b(0x104)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))),_0x70a283[_0x3c766b(0x10c)]('...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd6))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0x3c766b(0xb2)+_0x518fa5[_0x3c766b(0x100)]+'Resolvers,')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5['pascalCaseName']+_0x3c766b(0xfc))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xfc))),await this[_0x3c766b(0xf3)](_0x37b1e9,_0x70a283,_0x518fa5);}async['createNoHistoryServiceFiels'](_0x42d66e,_0x23f0bc,_0x2297eb,_0xb7ff78,_0xe02fdc){const _0xc59a97=a0_0x3ce6d0;await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+_0xc59a97(0xe8)),serviceIndex,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'-query.ts'),serviceQuery,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xda)),serviceMutation,_0xe02fdc);let _0x2fd7a3=this[_0xc59a97(0xd5)](_0x2297eb,_0xb7ff78);await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'.ts'),_0x2fd7a3,_0xe02fdc);let _0x575e11=this[_0xc59a97(0xdd)](_0xb7ff78);await this['writeFile'](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xb4)),_0x575e11,_0xe02fdc);let _0x5eb57c=_0x42d66e+'index.ts';0x0==await this[_0xc59a97(0xaa)](_0x5eb57c)&&await this[_0xc59a97(0xf3)](_0x5eb57c,allIndex,_0xe02fdc);let _0x3f53c0=await fs[_0xc59a97(0xef)](_0x5eb57c,_0xc59a97(0x8b));_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xa3)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xc59a97(0xf9)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)]('import\x20{\x20entities\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xb7)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xce)+_0xe02fdc['name']+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xc59a97(0xe6)+_0xe02fdc[_0xc59a97(0x100)]+'Entities,\x20resolvers\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+'Resolvers\x20}\x20from\x20\x27./'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0xc59a97(0xb2)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))),await this[_0xc59a97(0xf3)](_0x5eb57c,_0x3f53c0,_0xe02fdc);}[a0_0x3ce6d0(0xdd)](_0x58bb18){const _0x329af6=a0_0x3ce6d0;let _0xbd4308=sereviceType,_0x3032bd=_0x58bb18[_0x329af6(0xe4)](_0x16fe44=>{const _0x4ebe2b=_0x329af6;if('id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xff)==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('created_at'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('updated_at'==_0x16fe44['name'])return'';if('creator_id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xfa)==_0x16fe44['name'])return'';let _0x256e16=this['getFieldType'](_0x16fe44),_0x4da8ec=this[_0x4ebe2b(0x10b)](_0x16fe44),_0x233a51=camelCase(_0x16fe44[_0x4ebe2b(0x10d)]);return'\x20\x20'+('@Field('+(0x0==_0x256e16[_0x4ebe2b(0x89)]?'':_0x4ebe2b(0x98)+_0x256e16+',')+_0x4ebe2b(0xcc)+_0x16fe44[_0x4ebe2b(0x96)]+_0x4ebe2b(0x88))+'\x0a\x20\x20'+(''+_0x233a51+(_0x16fe44[_0x4ebe2b(0x96)]?'?':'')+':\x20'+_0x4da8ec)+'\x0a';});_0xbd4308=_0xbd4308['replace'](/{{newTypeColumns}}/g,_0x3032bd[_0x329af6(0xf8)]('\x0a'));let _0x5d9c50=_0x58bb18[_0x329af6(0xe4)](_0x44f6b7=>{const _0x5de640=_0x329af6;if('id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xff)==_0x44f6b7[_0x5de640(0x10d)])return'';if('created_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('updated_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('creator_id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xfa)==_0x44f6b7[_0x5de640(0x10d)])return'';let _0x5357e5=this[_0x5de640(0xc6)](_0x44f6b7),_0x8dc3c=this[_0x5de640(0x10b)](_0x44f6b7);_0x44f6b7[_0x5de640(0x96)]=!0x0;let _0x4a66e6=camelCase(_0x44f6b7[_0x5de640(0x10d)]);return'\x20\x20'+(_0x5de640(0xc3)+(0x0==_0x5357e5[_0x5de640(0x89)]?'':_0x5de640(0x98)+_0x5357e5+',')+_0x5de640(0xcc)+_0x44f6b7[_0x5de640(0x96)]+'\x20})')+_0x5de640(0x9c)+(''+_0x4a66e6+(_0x44f6b7[_0x5de640(0x96)]?'?':'')+':\x20'+_0x8dc3c)+'\x0a';});return _0xbd4308=_0xbd4308['replace'](/{{patchTypeColumns}}/g,_0x5d9c50[_0x329af6(0xf8)]('\x0a')),_0xbd4308;}[a0_0x3ce6d0(0xd5)](_0x4fde39,_0x1436e4){const _0x5a87b2=a0_0x3ce6d0;let _0xabe7d4=serviceEntity,_0x420e37=_0x1436e4[_0x5a87b2(0xe7)](function(_0x1da360,_0x1c4b7d){const _0x592e09=_0x5a87b2;return _0x1da360[_0x592e09(0x9e)]-_0x1c4b7d[_0x592e09(0x9e)];})[_0x5a87b2(0xe4)](_0xa29d9f=>this['columnToEntityColumn'](_0xa29d9f));[_0x5a87b2(0xf1),_0x5a87b2(0x9a)]['includes'](_0x4fde39[_0x5a87b2(0x8a)])&&_0x420e37[_0x5a87b2(0xe5)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{entityColumns}}/g,_0x420e37['join']('\x0a'));let _0xbfc521='',_0x4e1f3d=_0x1436e4[_0x5a87b2(0xea)](_0x28829b=>_0x28829b[_0x5a87b2(0xa4)]&&_0x28829b[_0x5a87b2(0xa4)]>0x0)['sort'](function(_0x4b27ea,_0x4af5b6){const _0x5457ee=_0x5a87b2;return _0x4b27ea[_0x5457ee(0xa4)]-_0x4af5b6['uniqRank'];});if(_0x4e1f3d[_0x5a87b2(0x89)]>0x0){_0xbfc521=_0x5a87b2(0xbe);let _0x16543b=_0x4e1f3d[_0x5a87b2(0xe4)](_0x436a49=>{const _0x3c787d=_0x5a87b2;let _0x693b44=_0x436a49['name'];return _0x3c787d(0xff)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xd8)),_0x3c787d(0x10f)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44='creator'),_0x3c787d(0xfa)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xdb)),'{{camelCase\x20name}}.'+camelCase(_0x693b44);});_0xbfc521=_0xbfc521[_0x5a87b2(0xc2)](/{{indexColumns}}/g,_0x16543b[_0x5a87b2(0xf8)](','));}return _0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{indexAnn}}/g,_0xbfc521),_0xabe7d4;}[a0_0x3ce6d0(0xba)](_0x2cd8fc,_0x42d908){const _0x2a1b9f=a0_0x3ce6d0;let _0x45ef97='JSON'==_0x2cd8fc['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x2b5520=_0x42d908['sort'](function(_0x2d47b5,_0x3c2fcd){const _0x33e8a5=a0_0x308d;return _0x2d47b5[_0x33e8a5(0x9e)]-_0x3c2fcd['rank'];})['map'](_0x5b7ce3=>this[_0x2a1b9f(0xf5)](_0x5b7ce3));return _0x45ef97=_0x45ef97['replace'](/{{entityColumns}}/g,_0x2b5520[_0x2a1b9f(0xf8)]('\x0a')),_0x45ef97;}[a0_0x3ce6d0(0xf5)](_0x5492da){const _0x199df6=a0_0x3ce6d0;if('id'==_0x5492da['name'])return'';if(_0x199df6(0xff)==_0x5492da['name'])return'';if(_0x199df6(0xc4)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xc1)==_0x5492da['name'])return'';if(_0x199df6(0x10f)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xfa)==_0x5492da[_0x199df6(0x10d)])return'';let _0xa7dcbe=_0x5492da['colType'];_0x199df6(0x9b)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xcf)),'long'==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0xd7)),_0x199df6(0xd3)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xee)),_0x199df6(0xbb)==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0x99));let _0x1a4ccd='';'string'==_0x5492da[_0x199df6(0xb0)]&&(_0x1a4ccd=_0x5492da[_0x199df6(0x93)]);let _0xc70b3a=this[_0x199df6(0xc6)](_0x5492da),_0x3406b4=this['getColTxtType'](_0x5492da),_0x4ae451=camelCase(_0x5492da['name']);return'\x20\x20'+(_0x199df6(0x85)+_0x5492da['name']+_0x199df6(0x103)+_0xa7dcbe+_0x199df6(0xf2)+_0x5492da[_0x199df6(0x96)]+'\x20'+(0x0==_0x1a4ccd[_0x199df6(0x89)]?'':_0x199df6(0xca)+_0x1a4ccd)+_0x199df6(0x88))+'\x0a\x20\x20'+(_0x199df6(0xc3)+(0x0==_0xc70b3a[_0x199df6(0x89)]?'':_0x199df6(0x98)+_0xc70b3a+',')+_0x199df6(0xcc)+_0x5492da[_0x199df6(0x96)]+_0x199df6(0x88))+_0x199df6(0x9c)+(''+_0x4ae451+(_0x5492da[_0x199df6(0x96)]?'?':'')+':\x20'+_0x3406b4)+'\x0a';}[a0_0x3ce6d0(0xc6)](_0x33242d){const _0xe32b4=a0_0x3ce6d0;let _0x47adee='';return'double'==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0xe9)),_0xe32b4(0xb8)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee='Float'),_0xe32b4(0x97)==_0x33242d['colType']&&(_0x47adee='Int'),_0xe32b4(0xd2)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0x87)),_0x47adee;}['getColTxtType'](_0x447693){const _0x26e769=a0_0x3ce6d0;let _0x5ad4f2=_0x447693['colType'];return _0x26e769(0x106)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x9b)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xb8)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xd2)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x97)==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xbb)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),_0x26e769(0xac)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),'text'==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0xd3)),_0x5ad4f2;}async[a0_0x3ce6d0(0xf3)](_0x5ab765,_0x1a42db,_0x2e402b){const _0x5be9bc=a0_0x3ce6d0;await fs[_0x5be9bc(0x113)](_0x5ab765,this[_0x5be9bc(0x10e)](_0x1a42db,_0x2e402b),_0x5be9bc(0x8b));}[a0_0x3ce6d0(0x10e)](_0x15681c,_0x2d0e7f){const _0x4f547d=a0_0x3ce6d0;return _0x15681c[_0x4f547d(0xc2)](/{{pascalCase name}}/g,_0x2d0e7f['pascalCaseName'])[_0x4f547d(0xc2)](/{{camelCase name}}/g,_0x2d0e7f[_0x4f547d(0xf7)])[_0x4f547d(0xc2)](/{{snakeCase name}}/g,_0x2d0e7f[_0x4f547d(0x102)])['replace'](/{{pluralPascalCase name}}/g,_0x2d0e7f[_0x4f547d(0xbd)])['replace'](/{{pluralCamelCase name}}/g,_0x2d0e7f[_0x4f547d(0x8f)])['replace'](/{{tableName}}/g,_0x2d0e7f['tableName'])['replace'](/{{name}}/g,_0x2d0e7f[_0x4f547d(0x10d)]);}async[a0_0x3ce6d0(0xb3)](_0x44a0e8,_0x3ba2b8,_0x4e7342){const _0x59374b=a0_0x3ce6d0;let _0x386933=_0x44a0e8+_0x59374b(0x10a);await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x3ba2b8,await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xab),await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xe0),await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x4e7342,await this[_0x59374b(0x8c)](_0x386933);}[a0_0x3ce6d0(0xb9)](){const _0x4b9a15=a0_0x3ce6d0;let _0x5b70c8=process[_0x4b9a15(0xa5)]['PWD'][_0x4b9a15(0x107)]('/'),_0x332880=[];for(let _0x13f1b3=0x0;_0x13f1b3<_0x5b70c8[_0x4b9a15(0x89)]&&_0x4b9a15(0xc9)!=_0x5b70c8[_0x13f1b3];_0x13f1b3++)_0x332880[_0x4b9a15(0xe5)](_0x5b70c8[_0x13f1b3]);return _0x332880[_0x4b9a15(0xf8)]('/');}async[a0_0x3ce6d0(0x8c)](_0x3ebf51){const _0xa1653d=a0_0x3ce6d0;0x0==await this[_0xa1653d(0xaa)](_0x3ebf51)&&fs['mkdirSync'](_0x3ebf51);}async[a0_0x3ce6d0(0xaa)](_0x80aae2){const _0x56d78a=a0_0x3ce6d0;return await fs[_0x56d78a(0xe3)](_0x80aae2);}};tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x109)])(_0x1cd20b=>Boolean,{'description':a0_0x3ce6d0(0xbc)}),tslib_1[a0_0x3ce6d0(0xc5)](0x0,(0x0,type_graphql_1[a0_0x3ce6d0(0x9d)])('id')),tslib_1[a0_0x3ce6d0(0xc5)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x3ce6d0(0xcb),[String,Object]),tslib_1[a0_0x3ce6d0(0xb1)](a0_0x3ce6d0(0xa2),Promise)],OperatoToolCreateService[a0_0x3ce6d0(0xec)],a0_0x3ce6d0(0xf0),null),OperatoToolCreateService=tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x117)])()],OperatoToolCreateService),exports[a0_0x3ce6d0(0xa7)]=OperatoToolCreateService;function a0_0x308d(_0x25bb4a,_0x4c43d1){const _0x611364=a0_0x6113();return a0_0x308d=function(_0x308da0,_0xdcba85){_0x308da0=_0x308da0-0x85;let _0x14ccd6=_0x611364[_0x308da0];return _0x14ccd6;},a0_0x308d(_0x25bb4a,_0x4c43d1);}const allIndex=a0_0x3ce6d0(0x112),serviceIndex=a0_0x3ce6d0(0x8e),serviceHistoryIndex=a0_0x3ce6d0(0x114),serviceQuery=a0_0x3ce6d0(0xbf),serviceHistoryQuery=a0_0x3ce6d0(0x90),serviceMutation=a0_0x3ce6d0(0x108),sereviceType=a0_0x3ce6d0(0xb5),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x3ce6d0(0xcd),serviceEntityHistCopy=a0_0x3ce6d0(0xae),serviceEntityHistJson=a0_0x3ce6d0(0xc7),serviceEntitySubscriber=a0_0x3ce6d0(0x9f);
@@ -1 +1 @@
1
- 'use strict';const a0_0xd7b6f3=a0_0x3081;(function(_0x1bd1b7,_0x12c2cb){const _0x5324d6=a0_0x3081,_0x20ccb1=_0x1bd1b7();while(!![]){try{const _0x42159d=parseInt(_0x5324d6(0x19b))/0x1+parseInt(_0x5324d6(0x19f))/0x2*(-parseInt(_0x5324d6(0x1a3))/0x3)+-parseInt(_0x5324d6(0x1b1))/0x4*(parseInt(_0x5324d6(0x1a6))/0x5)+-parseInt(_0x5324d6(0x1b0))/0x6*(-parseInt(_0x5324d6(0x1a2))/0x7)+-parseInt(_0x5324d6(0x194))/0x8*(-parseInt(_0x5324d6(0x1a4))/0x9)+-parseInt(_0x5324d6(0x1be))/0xa+parseInt(_0x5324d6(0x1ab))/0xb*(-parseInt(_0x5324d6(0x1b2))/0xc);if(_0x42159d===_0x12c2cb)break;else _0x20ccb1['push'](_0x20ccb1['shift']());}catch(_0x28b3c7){_0x20ccb1['push'](_0x20ccb1['shift']());}}}(a0_0xdc9f,0x271b4));Object[a0_0xd7b6f3(0x199)](exports,a0_0xd7b6f3(0x1b8),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0xd7b6f3(0x19d)]=void 0x0;function a0_0x3081(_0x440349,_0x198f82){const _0xdc9f53=a0_0xdc9f();return a0_0x3081=function(_0x3081fd,_0x5e7ccc){_0x3081fd=_0x3081fd-0x194;let _0x73931e=_0xdc9f53[_0x3081fd];return _0x73931e;},a0_0x3081(_0x440349,_0x198f82);}function a0_0xdc9f(){const _0x1e1cd4=['__esModule','LicenseError','Studio','map','OVER_LIMIT','Menu','1054400mGLyMy','16jeBtvG','select','@things-factory/operato-license-checker','checkTarget','andWhere','defineProperty','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','206894CZKhSj','ERROR_CODES','checkStudioPermission','../../errors/license-error','11118Pwpmhi','menu','manager','14OFpYJZ','57XvaqBk','836604csIwTZ','forEach','35665hXipEj','INVALID_LICENSE','split','getRepository','Permissions\x20For\x20Tailor\x20Tool','1167122ukfLBZ','@things-factory/menu-base','from','getCount','getPermission','636114RshXfF','12wZAyLX','24ABUOHG','@things-factory/shell','includes','createQueryBuilder','trim','where'];a0_0xdc9f=function(){return _0x1e1cd4;};return a0_0xdc9f();}const operato_license_checker_1=require(a0_0xd7b6f3(0x196)),shell_1=require(a0_0xd7b6f3(0x1b3)),menu_base_1=require(a0_0xd7b6f3(0x1ac)),license_error_1=require(a0_0xd7b6f3(0x19e));async function checkStudioPermission(){const _0x57a51c=a0_0xd7b6f3;let _0x1a92a2=((0x0,operato_license_checker_1[_0x57a51c(0x1af)])(_0x57a51c(0x1aa))||',')[_0x57a51c(0x1a8)](',')[_0x57a51c(0x1bb)](_0x1b49ab=>_0x1b49ab[_0x57a51c(0x1b6)]()),_0x3b9e18=!0x1;return _0x1a92a2[_0x57a51c(0x1a5)](_0x5874d1=>{const _0x5b94b8=_0x57a51c;_0x5874d1[_0x5b94b8(0x1b4)](_0x5b94b8(0x1ba))&&(_0x3b9e18=!0x0);}),_0x3b9e18;}async function checkStudioTemplateIsOverLimit(_0x40462e,_0x3cbbc8){const _0x593866=a0_0xd7b6f3;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3cbbc8['t'](license_error_1['LicenseError'][_0x593866(0x19c)][_0x593866(0x1a7)])});var _0x589778=0x0;if(_0x589778=_0x40462e&&''!=_0x40462e?await(0x0,shell_1[_0x593866(0x1a9)])(menu_base_1[_0x593866(0x1bd)])['manager'][_0x593866(0x1b5)]()[_0x593866(0x195)](_0x593866(0x1a0))[_0x593866(0x1ad)](menu_base_1[_0x593866(0x1bd)],_0x593866(0x1a0))[_0x593866(0x1b7)]('id\x20!=\x20:id',{'id':_0x40462e})[_0x593866(0x198)](_0x593866(0x19a))['getCount']()+0x1:await(0x0,shell_1[_0x593866(0x1a9)])(menu_base_1[_0x593866(0x1bd)])[_0x593866(0x1a1)][_0x593866(0x1b5)]()['select'](_0x593866(0x1a0))['from'](menu_base_1[_0x593866(0x1bd)],'menu')[_0x593866(0x1b7)](_0x593866(0x19a))[_0x593866(0x1ae)]()+0x1,!(0x0,operato_license_checker_1[_0x593866(0x197)])(_0x589778))throw new license_error_1[(_0x593866(0x1b9))]({'errorCode':_0x3cbbc8['t'](license_error_1[_0x593866(0x1b9)]['ERROR_CODES'][_0x593866(0x1bc)])});return!0x0;}exports[a0_0xd7b6f3(0x19d)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x34ba94=a0_0xbe7f;function a0_0x46ae(){const _0x32df90=['ERROR_CODES','includes','createQueryBuilder','map','48slUDej','@things-factory/shell','menu','1027585JlFwtz','4KZMlCq','andWhere','4796696bsZpdZ','LicenseError','getCount','@things-factory/operato-license-checker','Menu','INVALID_LICENSE','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1185801UFmuGw','trim','defineProperty','getPermission','getRepository','1495278EKxfmt','manager','110RNJKns','532028LOxKnq','87828Wezian','Permissions\x20For\x20Tailor\x20Tool','checkStudioPermission','forEach','__esModule','from','1550037sQYJPe','Studio','../../errors/license-error','OVER_LIMIT','id\x20!=\x20:id'];a0_0x46ae=function(){return _0x32df90;};return a0_0x46ae();}function a0_0xbe7f(_0x98b863,_0x5006ab){const _0x46ae15=a0_0x46ae();return a0_0xbe7f=function(_0xbe7f9a,_0x142c5c){_0xbe7f9a=_0xbe7f9a-0x197;let _0x58c765=_0x46ae15[_0xbe7f9a];return _0x58c765;},a0_0xbe7f(_0x98b863,_0x5006ab);}(function(_0x2535b8,_0x1ec651){const _0xf8f352=a0_0xbe7f,_0xce91fe=_0x2535b8();while(!![]){try{const _0x3fd781=-parseInt(_0xf8f352(0x1ad))/0x1+parseInt(_0xf8f352(0x1a4))/0x2*(-parseInt(_0xf8f352(0x197))/0x3)+parseInt(_0xf8f352(0x1b6))/0x4+-parseInt(_0xf8f352(0x1a3))/0x5+parseInt(_0xf8f352(0x1a0))/0x6*(parseInt(_0xf8f352(0x1b5))/0x7)+parseInt(_0xf8f352(0x1a6))/0x8+parseInt(_0xf8f352(0x1b2))/0x9*(parseInt(_0xf8f352(0x1b4))/0xa);if(_0x3fd781===_0x1ec651)break;else _0xce91fe['push'](_0xce91fe['shift']());}catch(_0x17eee7){_0xce91fe['push'](_0xce91fe['shift']());}}}(a0_0x46ae,0x9a68e));Object[a0_0x34ba94(0x1af)](exports,a0_0x34ba94(0x1ba),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x34ba94(0x1b8)]=void 0x0;const operato_license_checker_1=require(a0_0x34ba94(0x1a9)),shell_1=require(a0_0x34ba94(0x1a1)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x34ba94(0x199));async function checkStudioPermission(){const _0x5c1a3e=a0_0x34ba94;let _0x20db20=((0x0,operato_license_checker_1[_0x5c1a3e(0x1b0)])(_0x5c1a3e(0x1b7))||',')['split'](',')[_0x5c1a3e(0x19f)](_0x457eb6=>_0x457eb6[_0x5c1a3e(0x1ae)]()),_0x3524c9=!0x1;return _0x20db20[_0x5c1a3e(0x1b9)](_0x1f167f=>{const _0x26ed26=_0x5c1a3e;_0x1f167f[_0x26ed26(0x19d)](_0x26ed26(0x198))&&(_0x3524c9=!0x0);}),_0x3524c9;}async function checkStudioTemplateIsOverLimit(_0x46a2db,_0x524d05){const _0x552ba4=a0_0x34ba94;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x552ba4(0x1a7))]({'errorCode':_0x524d05['t'](license_error_1[_0x552ba4(0x1a7)][_0x552ba4(0x19c)][_0x552ba4(0x1ab)])});var _0x733280=0x0;if(_0x733280=_0x46a2db&&''!=_0x46a2db?await(0x0,shell_1['getRepository'])(menu_base_1[_0x552ba4(0x1aa)])[_0x552ba4(0x1b3)][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],_0x552ba4(0x1a2))['where'](_0x552ba4(0x19b),{'id':_0x46a2db})[_0x552ba4(0x1a5)](_0x552ba4(0x1ac))['getCount']()+0x1:await(0x0,shell_1[_0x552ba4(0x1b1)])(menu_base_1[_0x552ba4(0x1aa)])['manager'][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],'menu')['where'](_0x552ba4(0x1ac))[_0x552ba4(0x1a8)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x733280))throw new license_error_1['LicenseError']({'errorCode':_0x524d05['t'](license_error_1['LicenseError'][_0x552ba4(0x19c)][_0x552ba4(0x19a)])});return!0x0;}exports[a0_0x34ba94(0x1b8)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';const a0_0x35f1df=a0_0x4bce;function a0_0x4bce(_0x491cc5,_0x16008d){const _0x2c2211=a0_0x2c22();return a0_0x4bce=function(_0x4bce11,_0x326e92){_0x4bce11=_0x4bce11-0x1e8;let _0x594b03=_0x2c2211[_0x4bce11];return _0x594b03;},a0_0x4bce(_0x491cc5,_0x16008d);}function a0_0x2c22(){const _0xb78c40=['prototype','457091IdMvuy','design:type','type-graphql','defineProperty','2411382fphwsK','252606dDZJxA','__metadata','12VxvskO','__param','__esModule','231343pkHzot','72htpInw','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','checkStudioPermission','16bgjIYD','Query','2465iUdIoW','26936745mRUlJJ','792200Kofzmq','__decorate','studioPermission','./tool-permission','Resolver','Ctx','checkStudioTemplateIsOverLimit','studioTemplateIsOverLimit','2358PWHkfs','Operato\x20Tool\x20Studio\x20Limit\x20check','design:returntype'];a0_0x2c22=function(){return _0xb78c40;};return a0_0x2c22();}(function(_0xc270af,_0x3ed0f0){const _0x438bea=a0_0x4bce,_0xef93c5=_0xc270af();while(!![]){try{const _0x25148f=parseInt(_0x438bea(0x1f9))/0x1+-parseInt(_0x438bea(0x1fd))/0x2+-parseInt(_0x438bea(0x1fe))/0x3*(parseInt(_0x438bea(0x200))/0x4)+-parseInt(_0x438bea(0x1eb))/0x5*(parseInt(_0x438bea(0x1f5))/0x6)+-parseInt(_0x438bea(0x203))/0x7*(-parseInt(_0x438bea(0x1e9))/0x8)+-parseInt(_0x438bea(0x204))/0x9*(parseInt(_0x438bea(0x1ed))/0xa)+parseInt(_0x438bea(0x1ec))/0xb;if(_0x25148f===_0x3ed0f0)break;else _0xef93c5['push'](_0xef93c5['shift']());}catch(_0x3bbebd){_0xef93c5['push'](_0xef93c5['shift']());}}}(a0_0x2c22,0xa7862));Object[a0_0x35f1df(0x1fc)](exports,a0_0x35f1df(0x202),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x35f1df(0x1fb)),tool_permission_1=require(a0_0x35f1df(0x1f0));let OperatoToolResolver=class{async[a0_0x35f1df(0x1ef)](_0x3b9ac1){const _0xe4c279=a0_0x35f1df;return(0x0,tool_permission_1[_0xe4c279(0x1e8)])();}async[a0_0x35f1df(0x1f4)](_0x689a82,_0x346f55){const _0x303c21=a0_0x35f1df;return(0x0,tool_permission_1[_0x303c21(0x1f3)])(_0x689a82,_0x346f55);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35f1df(0x1ea)])(_0x5243a8=>Boolean,{'description':a0_0x35f1df(0x205)}),tslib_1[a0_0x35f1df(0x201)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1fa),Function),tslib_1['__metadata']('design:paramtypes',[Object]),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1f7),Promise)],OperatoToolResolver[a0_0x35f1df(0x1f8)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35f1df(0x1ea)])(_0x2e5726=>Boolean,{'description':a0_0x35f1df(0x1f6)}),tslib_1[a0_0x35f1df(0x201)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x35f1df(0x201)](0x1,(0x0,type_graphql_1[a0_0x35f1df(0x1f2)])()),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1fa),Function),tslib_1[a0_0x35f1df(0x1ff)]('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x35f1df(0x1ee)]([(0x0,type_graphql_1[a0_0x35f1df(0x1f1)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
1
+ 'use strict';const a0_0x1d68e0=a0_0x1473;function a0_0x2865(){const _0x2e14d7=['Resolver','prototype','Query','studioPermission','42gMLukB','__param','studioTemplateIsOverLimit','defineProperty','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','403716wwstEW','tslib','110778hgwlBC','4167342aKWsIS','1228750ybHdoc','12sUZQbw','2856720xUhJNg','design:type','checkStudioTemplateIsOverLimit','checkStudioPermission','OperatoToolResolver','2593743QjweUD','136415BPGiGi','design:paramtypes','Ctx','./tool-permission','__decorate','design:returntype','Arg','__metadata'];a0_0x2865=function(){return _0x2e14d7;};return a0_0x2865();}(function(_0x13ae92,_0x5704cc){const _0x5b7752=a0_0x1473,_0x4ff1f5=_0x13ae92();while(!![]){try{const _0x35a6f9=parseInt(_0x5b7752(0x14f))/0x1+parseInt(_0x5b7752(0x153))/0x2+-parseInt(_0x5b7752(0x15a))/0x3+parseInt(_0x5b7752(0x154))/0x4*(parseInt(_0x5b7752(0x15b))/0x5)+parseInt(_0x5b7752(0x151))/0x6*(parseInt(_0x5b7752(0x167))/0x7)+-parseInt(_0x5b7752(0x155))/0x8+parseInt(_0x5b7752(0x152))/0x9;if(_0x35a6f9===_0x5704cc)break;else _0x4ff1f5['push'](_0x4ff1f5['shift']());}catch(_0x593377){_0x4ff1f5['push'](_0x4ff1f5['shift']());}}}(a0_0x2865,0x6e5f5));Object[a0_0x1d68e0(0x14d)](exports,'__esModule',{'value':!0x0}),exports[a0_0x1d68e0(0x159)]=void 0x0;function a0_0x1473(_0x1555ae,_0x113062){const _0x286561=a0_0x2865();return a0_0x1473=function(_0x1473ea,_0x1ac6fd){_0x1473ea=_0x1473ea-0x14d;let _0x35d980=_0x286561[_0x1473ea];return _0x35d980;},a0_0x1473(_0x1555ae,_0x113062);}const tslib_1=require(a0_0x1d68e0(0x150)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x1d68e0(0x15e));let OperatoToolResolver=class{async[a0_0x1d68e0(0x166)](_0x2afaac){const _0x4c879c=a0_0x1d68e0;return(0x0,tool_permission_1[_0x4c879c(0x158)])();}async[a0_0x1d68e0(0x169)](_0x348980,_0x4439ca){const _0x3f75f2=a0_0x1d68e0;return(0x0,tool_permission_1[_0x3f75f2(0x157)])(_0x348980,_0x4439ca);}};tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0xa537f2=>Boolean,{'description':a0_0x1d68e0(0x14e)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata'](a0_0x1d68e0(0x156),Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0x5491f5=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x1d68e0(0x168)](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x161)])('id')),tslib_1[a0_0x1d68e0(0x168)](0x1,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[String,Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver[a0_0x1d68e0(0x164)],a0_0x1d68e0(0x169),null),OperatoToolResolver=tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x163)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
@@ -82,5 +82,8 @@
82
82
  "label.logic": "로직",
83
83
  "label.column_cnt": "열 수",
84
84
  "label.grid_column_list": "컬럼 리스트",
85
- "label.change-event-handler": "변경 이벤트 핸들러"
85
+ "label.change-event-handler": "변경 이벤트 핸들러",
86
+ "label.grid_emphasized_config": "그리드 강조 설정",
87
+ "label.grid_row_emphasized_config": "행 강조 설정",
88
+ "label.grid_column_emphasized_config": "컬럼 강조 설정"
86
89
  }
@@ -82,5 +82,8 @@
82
82
  "label.logic": "로직",
83
83
  "label.column_cnt": "열 수",
84
84
  "label.grid_column_list": "컬럼 리스트",
85
- "label.change-event-handler": "변경 이벤트 핸들러"
85
+ "label.change-event-handler": "변경 이벤트 핸들러",
86
+ "label.grid_emphasized_config": "그리드 강조 설정",
87
+ "label.grid_row_emphasized_config": "행 강조 설정",
88
+ "label.grid_column_emphasized_config": "컬럼 강조 설정"
86
89
  }
@@ -82,5 +82,8 @@
82
82
  "label.logic": "로직",
83
83
  "label.column_cnt": "열 수",
84
84
  "label.grid_column_list": "컬럼 리스트",
85
- "label.change-event-handler": "변경 이벤트 핸들러"
85
+ "label.change-event-handler": "변경 이벤트 핸들러",
86
+ "label.grid_emphasized_config": "그리드 강조 설정",
87
+ "label.grid_row_emphasized_config": "행 강조 설정",
88
+ "label.grid_column_emphasized_config": "컬럼 강조 설정"
86
89
  }
@@ -82,5 +82,8 @@
82
82
  "label.logic": "로직",
83
83
  "label.column_cnt": "열 수",
84
84
  "label.grid_column_list": "컬럼 리스트",
85
- "label.change-event-handler": "변경 이벤트 핸들러"
85
+ "label.change-event-handler": "변경 이벤트 핸들러",
86
+ "label.grid_emphasized_config": "그리드 강조 설정",
87
+ "label.grid_row_emphasized_config": "행 강조 설정",
88
+ "label.grid_column_emphasized_config": "컬럼 강조 설정"
86
89
  }