@leonailtd/n8n-nodes-priority-erp 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +27 -15
- package/dist/LICENSE +27 -15
- package/dist/credentials/PriorityErpApi.credentials.js +134 -1
- package/dist/credentials/PriorityErpWebSdk.credentials.js +134 -1
- package/dist/nodes/PriorityERP/PriorityERP.node.js +311 -1
- package/dist/nodes/PriorityERP/actions/batch/batch.properties.js +83 -1
- package/dist/nodes/PriorityERP/actions/batch/execute.operation.js +43 -1
- package/dist/nodes/PriorityERP/actions/batch/index.js +8 -1
- package/dist/nodes/PriorityERP/actions/entity/create.operation.js +13 -1
- package/dist/nodes/PriorityERP/actions/entity/delete.operation.js +12 -1
- package/dist/nodes/PriorityERP/actions/entity/entity.properties.js +296 -1
- package/dist/nodes/PriorityERP/actions/entity/get.operation.js +35 -1
- package/dist/nodes/PriorityERP/actions/entity/getMany.operation.js +43 -1
- package/dist/nodes/PriorityERP/actions/entity/index.js +16 -1
- package/dist/nodes/PriorityERP/actions/entity/update.operation.js +14 -1
- package/dist/nodes/PriorityERP/actions/file/download.operation.js +23 -1
- package/dist/nodes/PriorityERP/actions/file/file.properties.js +123 -1
- package/dist/nodes/PriorityERP/actions/file/getFiles.operation.js +16 -1
- package/dist/nodes/PriorityERP/actions/file/index.js +12 -1
- package/dist/nodes/PriorityERP/actions/file/upload.operation.js +26 -1
- package/dist/nodes/PriorityERP/actions/procedure/activate.operation.js +33 -1
- package/dist/nodes/PriorityERP/actions/procedure/activateSubForm.operation.js +37 -1
- package/dist/nodes/PriorityERP/actions/procedure/index.js +10 -1
- package/dist/nodes/PriorityERP/actions/procedure/procedure.properties.js +157 -1
- package/dist/nodes/PriorityERP/actions/subForm/create.operation.js +15 -1
- package/dist/nodes/PriorityERP/actions/subForm/delete.operation.js +14 -1
- package/dist/nodes/PriorityERP/actions/subForm/get.operation.js +37 -1
- package/dist/nodes/PriorityERP/actions/subForm/getMany.operation.js +45 -1
- package/dist/nodes/PriorityERP/actions/subForm/index.js +16 -1
- package/dist/nodes/PriorityERP/actions/subForm/subForm.properties.js +304 -1
- package/dist/nodes/PriorityERP/actions/subForm/update.operation.js +16 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/create.operation.js +17 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/delete.operation.js +16 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/get.operation.js +39 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/getMany.operation.js +47 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/index.js +16 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/subSubForm.properties.js +296 -1
- package/dist/nodes/PriorityERP/actions/subSubForm/update.operation.js +18 -1
- package/dist/nodes/PriorityERP/actions/text/getText.operation.js +16 -1
- package/dist/nodes/PriorityERP/actions/text/index.js +10 -1
- package/dist/nodes/PriorityERP/actions/text/setText.operation.js +19 -1
- package/dist/nodes/PriorityERP/actions/text/text.properties.js +107 -1
- package/dist/nodes/PriorityERP/helpers/odata.js +54 -1
- package/dist/nodes/PriorityERP/helpers/utils.js +62 -1
- package/dist/nodes/PriorityERP/methods/loadOptions.js +643 -1
- package/dist/nodes/PriorityERP/transport/priorityApi.js +203 -1
- package/dist/package.json +2 -2
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
Proprietary License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2024
|
|
3
|
+
Copyright (c) 2024-2026 LeonAI Ltd. All rights reserved.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of LeonAI Ltd.
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
RESTRICTIONS:
|
|
9
|
+
1. You may NOT copy, modify, merge, publish, distribute, sublicense, or sell
|
|
10
|
+
copies of the Software.
|
|
11
|
+
2. You may NOT reverse engineer, decompile, disassemble, or otherwise attempt
|
|
12
|
+
to derive the source code of the Software.
|
|
13
|
+
3. You may NOT create derivative works based on the Software.
|
|
14
|
+
4. You may NOT remove or alter any proprietary notices, labels, or marks on
|
|
15
|
+
the Software.
|
|
16
|
+
|
|
17
|
+
PERMITTED USE:
|
|
18
|
+
You are granted a limited, non-exclusive, non-transferable, revocable license
|
|
19
|
+
to use the Software solely through the n8n platform with a valid LeonAI token,
|
|
20
|
+
subject to the terms of your subscription or agreement with LeonAI Ltd.
|
|
21
|
+
|
|
22
|
+
TERMINATION:
|
|
23
|
+
This license is effective until terminated. LeonAI Ltd. may terminate this
|
|
24
|
+
license at any time if you fail to comply with any term of this agreement.
|
|
25
|
+
Upon termination, you must destroy all copies of the Software in your
|
|
26
|
+
possession.
|
|
14
27
|
|
|
15
28
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
29
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
SOFTWARE.
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
31
|
+
LEONAI LTD. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
32
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
33
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/LICENSE
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
Proprietary License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2024
|
|
3
|
+
Copyright (c) 2024-2026 LeonAI Ltd. All rights reserved.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of LeonAI Ltd.
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
RESTRICTIONS:
|
|
9
|
+
1. You may NOT copy, modify, merge, publish, distribute, sublicense, or sell
|
|
10
|
+
copies of the Software.
|
|
11
|
+
2. You may NOT reverse engineer, decompile, disassemble, or otherwise attempt
|
|
12
|
+
to derive the source code of the Software.
|
|
13
|
+
3. You may NOT create derivative works based on the Software.
|
|
14
|
+
4. You may NOT remove or alter any proprietary notices, labels, or marks on
|
|
15
|
+
the Software.
|
|
16
|
+
|
|
17
|
+
PERMITTED USE:
|
|
18
|
+
You are granted a limited, non-exclusive, non-transferable, revocable license
|
|
19
|
+
to use the Software solely through the n8n platform with a valid LeonAI token,
|
|
20
|
+
subject to the terms of your subscription or agreement with LeonAI Ltd.
|
|
21
|
+
|
|
22
|
+
TERMINATION:
|
|
23
|
+
This license is effective until terminated. LeonAI Ltd. may terminate this
|
|
24
|
+
license at any time if you fail to comply with any term of this agreement.
|
|
25
|
+
Upon termination, you must destroy all copies of the Software in your
|
|
26
|
+
possession.
|
|
14
27
|
|
|
15
28
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
29
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
SOFTWARE.
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
31
|
+
LEONAI LTD. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
32
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
33
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1 +1,134 @@
|
|
|
1
|
-
'use strict';const _0x206ada=_0x61ec;(function(_0x3ac34e,_0x2785ee){const _0x439d1f={_0xf0e599:0x71,_0x42a7ea:0xc6,_0x396f8f:0xbe,_0x257139:0xaf,_0x125da9:0xcd,_0x24543e:0xc0,_0x4f2584:0xb4,_0x9cbb30:0xcf},_0x1beda9=_0x61ec,_0x4cd24f=_0x3ac34e();while(!![]){try{const _0x10da98=-parseInt(_0x1beda9(_0x439d1f._0xf0e599))/0x1*(-parseInt(_0x1beda9(_0x439d1f._0x42a7ea))/0x2)+parseInt(_0x1beda9(_0x439d1f._0x396f8f))/0x3*(parseInt(_0x1beda9(0xaa))/0x4)+parseInt(_0x1beda9(0xdc))/0x5+-parseInt(_0x1beda9(_0x439d1f._0x257139))/0x6*(parseInt(_0x1beda9(_0x439d1f._0x125da9))/0x7)+parseInt(_0x1beda9(0xc9))/0x8*(parseInt(_0x1beda9(_0x439d1f._0x24543e))/0x9)+parseInt(_0x1beda9(0xe3))/0xa+-parseInt(_0x1beda9(_0x439d1f._0x4f2584))/0xb*(parseInt(_0x1beda9(_0x439d1f._0x9cbb30))/0xc);if(_0x10da98===_0x2785ee)break;else _0x4cd24f['push'](_0x4cd24f['shift']());}catch(_0x176302){_0x4cd24f['push'](_0x4cd24f['shift']());}}}(_0x17b1,0xdf708));const _0x498173={};function _0x61ec(_0x39f1c6,_0x4870d1){_0x39f1c6=_0x39f1c6-0x65;const _0x17b133=_0x17b1();let _0x61ecf2=_0x17b133[_0x39f1c6];if(_0x61ec['lBfDNn']===undefined){var _0x147ac0=function(_0x2c8947){const _0x51b42a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5f3ded='',_0x4256fa='';for(let _0x2e90e4=0x0,_0x2a4ca3,_0x403fd1,_0x2c99e0=0x0;_0x403fd1=_0x2c8947['charAt'](_0x2c99e0++);~_0x403fd1&&(_0x2a4ca3=_0x2e90e4%0x4?_0x2a4ca3*0x40+_0x403fd1:_0x403fd1,_0x2e90e4++%0x4)?_0x5f3ded+=String['fromCharCode'](0xff&_0x2a4ca3>>(-0x2*_0x2e90e4&0x6)):0x0){_0x403fd1=_0x51b42a['indexOf'](_0x403fd1);}for(let _0x1bc600=0x0,_0x2ccba4=_0x5f3ded['length'];_0x1bc600<_0x2ccba4;_0x1bc600++){_0x4256fa+='%'+('00'+_0x5f3ded['charCodeAt'](_0x1bc600)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4256fa);};_0x61ec['PWjSIE']=_0x147ac0,_0x61ec['xNRLXX']={},_0x61ec['lBfDNn']=!![];}const _0x1539d7=_0x17b133[0x0],_0x5d703c=_0x39f1c6+_0x1539d7,_0x3744ca=_0x61ec['xNRLXX'][_0x5d703c];return!_0x3744ca?(_0x61ecf2=_0x61ec['PWjSIE'](_0x61ecf2),_0x61ec['xNRLXX'][_0x5d703c]=_0x61ecf2):_0x61ecf2=_0x3744ca,_0x61ecf2;}_0x498173['value']=!![],Object['defineProperty'](exports,_0x206ada(0x72),_0x498173),exports[_0x206ada(0x89)]=void 0x0;function _0x17b1(){const _0x5eb9e8=['ue9tva','BeHyA3K','vuPeBKW','wLPRrvq','Eu1Qwei','ChjPB3jPDhLfCNbbCgK','Dufsyu0','mJq0yLrZwuLI','C3bSAxq','AgHbBwO','nxWXFdn8mhW3Fdr8mNW2','BwzzBei','odC4ndaZmgTly0HpvG','ChjPB3jPDhLLCNa','rw5NBgLZAa','qxv0Aa','zgvUy1e','mtfJzeH5C1O','zs5NlIWGAhr0Chm6lY93D3CUzxnOyMvSC2fHCY5JBY5PBc9WCJiWl29KyxrHl1bYAw9YAxr5','vNzbrM8','uNjhr3q','q29UBMvJDgLVBIbuExbL','vxnewKm','AgvHzgvYCW','uefRCvO','s2TVww4','Aw5JBhvKzxm','mtqWmZDjtMXku2K','ue14BKO','nduWqxvUzvPf','zg9JDw1LBNrHDgLVBLvYBa','ChjVCgvYDgLLCW','BMfTzq','DxfNy3q','vgHLihrVA2vUihbYB3zPzgvKigj5ieXLB25bss4Gr2v0ihLVDxjZigf0igH0DhbZoI8VzM9YBxmUBgvVBMfPlMLVl21HA2u','odiWmKvTzhfKzW','vwLruNG','z3fqvei','otGWmJrbCfvXBg0','sgvICMv3','BgfUz3vHz2u','yxv0AgvUDgLJyxrL','n2PMCuDcuG','qxjHyMLJ','nZuXmJeZmNnLvNvRvq','l3jWyY9HDxrO','DgvZDa','vgfIDwXHieLosq','m3W3Fdj8nxWXFdb8nNW0','vg9Rzw4','yM9KEq','q09nuefowv9oqu1f','y05dtxy','Bvzmvfy','CgvYBq','qvbjifvZzxjUyw1L','ugfZC3DVCMqGzM9YihrOzsbbueKGDxnLCG','oteWmty5nwjmwujSDa','yxbPDxjS','BK1vyu0','y29TCgfUEw5HBwu','zgvMyxvSDa','CgXHy2vOB2XKzxi','ANnVBG','mteWndCZmg10qvDqwa','zs5NlIWGDgfIEJbXEtqUAw5Plcb0ywjHzde2oc5PBMKSig9YihrHyNvSys5PBMK','BuvtqMO','DwLAzMi','AhnmC0W','Dg9Rzw4','DLP1t1K','rfLJr2K','qxv0Ag9YAxPHDgLVBG','y29UBMvJDgLVBLr5Cgu','B3b0Aw9UCW','DhLWzq','yMfZzty0','rMXoBhq','AMHhCwO','ndnvvMTJCM4','x19LC01VzhvSzq','AuLrrKy','C3rYAw5N','zgvZy3jPChrPB24','CurhB0K','B3fTrvi','s3zwq2y','r2vfBxe','vefcvuXbx0Losq','vNPlDwm','A1rZAhK','DxnLCM5HBwu','DKfOwwC','zNjVBq','CMvXDwvZDa','A0z1t0G','ww91CIbSAwnLBNnLihrVA2vU','y29TCgfUEu5HBwu','AMvQq1O','zgLZCgXHEu5HBwu','AgLKzgvU','DgfIDwXHsw5P','shfUC0O','uhjPB3jPDhLfCNbbCgK','CMvXDwLYzwq','CgfZC3DVCMq','se9Pwhy','rgf0ywjHC2uGBMfTzsbMCM9TienVBxbHBMLLCYbgB3jT','rhjtCxe','r1nfswG','vgHLignVBxbHBNKGzgf0ywjHC2uGBMfTzsbPBIbqCMLVCML0Eq','wMjnAwO','qvbjx3vYBa','qvbjifvsta','vgHLihrHyNvSys5PBMKGzMLSzsbMB3iGEw91CIbqCMLVCML0EsbPBNn0yw5Jzq','q2jWtvu','uhjPB3jPDhKGrvjqihvZzxjUyw1LihDPDgGGqvbjigXPy2vUC2u','tu1nrKu','CM91DgvY','DxjS','CMzcqKe','vgHLifbYAw9YAxr5ievsucbbueKGvvjmigzVCIb5B3vYigLUC3rHBMnL','uLzKBfm','CwDQs3q','DgfIDwXHAw5P','v2rnEha','yxbPvxjS','Bwv0Ag9K','tgfUz3vHz2u'];_0x17b1=function(){return _0x5eb9e8;};return _0x17b1();}const _rk=Buffer['from']([0x6c,0x65,0x6f,0x6e,0x61,0x69,0x3a,0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79,0x5f,0x61,0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6f,0x66,0x74,0x77,0x61,0x72,0x65]);function getRouterPerm(){const _0x5690ff={_0x221e71:0xd7},_0x30ab74=_0x206ada,_0x4b3b10={};_0x4b3b10[_0x30ab74(0xd7)]=_0x30ab74(0x6e);const _0x3a5453=_0x4b3b10;return'Bearer\x20'+_rk['toString'](_0x3a5453[_0x30ab74(_0x5690ff._0x221e71)]);}class PriorityErpApi{constructor(){const _0x1bdfe8={_0x556279:0x8e,_0xeccb67:0x86,_0xabb523:0x98,_0x5bae0e:0x74,_0x1dd7b2:0x82,_0x263708:0xc5,_0x417fd3:0xa0,_0x5959db:0xb5,_0x189602:0x7b,_0x27d9c2:0x76,_0x53115e:0x7c,_0x11dd3b:0xa5,_0x2303a4:0x95,_0xb49852:0x87,_0x412b47:0x81,_0x209012:0x94,_0x572e10:0x68,_0x56d034:0xa2,_0x4e1a81:0xcb,_0x564023:0xa6,_0x483b36:0xb1,_0x4750b0:0xbc,_0x36d46e:0xca,_0x11683b:0xce,_0x1e3a59:0xc8,_0x59d2a6:0x96,_0x1979d8:0x8b,_0x557901:0xdb,_0x5041d6:0xbb,_0x2afa6f:0xa3,_0x2a0018:0x69,_0x5a319b:0xb8,_0x56cf75:0xe0,_0x597ae2:0xe5,_0x320485:0xc3,_0x19552e:0xe1,_0x507f53:0x75,_0x4e19d9:0x8a,_0x1a3ad3:0x93,_0xe33be5:0xc3,_0x4c49c8:0x70,_0x517003:0x8a,_0x357145:0x85,_0x42e073:0xc3,_0x34e1ca:0x6d,_0x12fdd1:0x7c,_0x5e58bb:0x85,_0x4a3811:0xc3,_0x519d98:0x9f,_0x3253f8:0x75,_0x150d8c:0xc3,_0x2f50cb:0x7e,_0x20f072:0x6c,_0x35e97d:0xa6,_0x31428e:0xe0,_0x19a2ac:0x6f,_0x3c1a91:0x9a,_0x4b3177:0x8f,_0x2b8ca8:0xbb,_0x20f551:0xd1,_0x34ccf6:0xc1,_0x5af545:0xb0,_0xe9502b:0xa8},_0x45d905=_0x206ada,_0x18ad64={};_0x18ad64[_0x45d905(0x69)]='Priority\x20ERP\x20API',_0x18ad64[_0x45d905(_0x1bdfe8._0x556279)]=_0x45d905(_0x1bdfe8._0xeccb67),_0x18ad64['nMUaM']=_0x45d905(_0x1bdfe8._0xabb523),_0x18ad64['mESBj']=_0x45d905(0xd4),_0x18ad64['mVLTV']='token',_0x18ad64[_0x45d905(0x9f)]=_0x45d905(_0x1bdfe8._0x5bae0e),_0x18ad64[_0x45d905(0xc4)]=_0x45d905(_0x1bdfe8._0x1dd7b2),_0x18ad64['vlOWq']=_0x45d905(_0x1bdfe8._0x263708),_0x18ad64[_0x45d905(0x79)]=_0x45d905(_0x1bdfe8._0x417fd3),_0x18ad64[_0x45d905(0x70)]=_0x45d905(_0x1bdfe8._0x5959db),_0x18ad64[_0x45d905(_0x1bdfe8._0x189602)]='Company\x20Name',_0x18ad64[_0x45d905(_0x1bdfe8._0x27d9c2)]=_0x45d905(0x83),_0x18ad64[_0x45d905(_0x1bdfe8._0x53115e)]=_0x45d905(0x90),_0x18ad64[_0x45d905(_0x1bdfe8._0x11dd3b)]=_0x45d905(0xd2),_0x18ad64[_0x45d905(_0x1bdfe8._0x2303a4)]=_0x45d905(_0x1bdfe8._0xb49852),_0x18ad64[_0x45d905(0xa9)]=_0x45d905(0xe4),_0x18ad64[_0x45d905(_0x1bdfe8._0x412b47)]=_0x45d905(_0x1bdfe8._0x209012),_0x18ad64[_0x45d905(_0x1bdfe8._0x572e10)]=_0x45d905(_0x1bdfe8._0x56d034),_0x18ad64[_0x45d905(0x73)]=_0x45d905(_0x1bdfe8._0x4e1a81),_0x18ad64[_0x45d905(0x7e)]='options',_0x18ad64[_0x45d905(_0x1bdfe8._0x564023)]=_0x45d905(_0x1bdfe8._0x483b36),_0x18ad64[_0x45d905(_0x1bdfe8._0x4750b0)]=_0x45d905(_0x1bdfe8._0x36d46e),_0x18ad64['PgXWS']=_0x45d905(_0x1bdfe8._0x11683b),_0x18ad64[_0x45d905(_0x1bdfe8._0x1e3a59)]='The\x20language\x20for\x20Priority\x20ERP\x20responses',_0x18ad64['RrGGt']=_0x45d905(_0x1bdfe8._0x59d2a6),_0x18ad64[_0x45d905(0x6f)]='API\x20Password',_0x18ad64[_0x45d905(0x9a)]=_0x45d905(_0x1bdfe8._0x1979d8),_0x18ad64[_0x45d905(0x8f)]=_0x45d905(_0x1bdfe8._0x557901),_0x18ad64[_0x45d905(0x91)]='https://php-api-941574646138.me-west1.run.app/api/priority/rpc/auth',_0x18ad64[_0x45d905(_0x1bdfe8._0x5041d6)]=_0x45d905(_0x1bdfe8._0x2afa6f);const _0x46d969=_0x18ad64,_0x31377d='4|0|3|1|2'[_0x45d905(0xab)]('|');let _0x381bfd=0x0;while(!![]){switch(_0x31377d[_0x381bfd++]){case'0':this[_0x45d905(0x85)]=_0x46d969[_0x45d905(_0x1bdfe8._0x2a0018)];continue;case'1':const _0x1ef378={};_0x1ef378['displayName']=_0x45d905(_0x1bdfe8._0x5a319b),_0x1ef378[_0x45d905(0xc3)]=_0x45d905(0x6b),_0x1ef378[_0x45d905(0x6d)]=_0x46d969[_0x45d905(0x8e)],_0x1ef378[_0x45d905(_0x1bdfe8._0x56cf75)]=_0x46d969[_0x45d905(0xde)];const _0x4cfdf7={};_0x4cfdf7[_0x45d905(_0x1bdfe8._0x1979d8)]=!![];const _0xddd5c={};_0xddd5c[_0x45d905(0x85)]=_0x46d969[_0x45d905(_0x1bdfe8._0x597ae2)],_0xddd5c[_0x45d905(_0x1bdfe8._0x320485)]=_0x46d969[_0x45d905(0xd8)],_0xddd5c[_0x45d905(0x6d)]=_0x46d969['WdMxp'],_0xddd5c['typeOptions']=_0x4cfdf7,_0xddd5c['default']='',_0xddd5c[_0x45d905(_0x1bdfe8._0x19552e)]=_0x46d969[_0x45d905(0xc4)],_0xddd5c[_0x45d905(_0x1bdfe8._0x507f53)]=_0x46d969['vlOWq'],_0xddd5c[_0x45d905(_0x1bdfe8._0x4e19d9)]=!![];const _0x40a8bb={};_0x40a8bb['displayName']=_0x45d905(_0x1bdfe8._0x1a3ad3),_0x40a8bb[_0x45d905(_0x1bdfe8._0xe33be5)]=_0x46d969[_0x45d905(0x79)],_0x40a8bb[_0x45d905(0x6d)]=_0x46d969[_0x45d905(0x9f)],_0x40a8bb[_0x45d905(0xe0)]='',_0x40a8bb[_0x45d905(0xe1)]=_0x46d969[_0x45d905(_0x1bdfe8._0x4c49c8)],_0x40a8bb[_0x45d905(0x75)]=_0x45d905(0x9b),_0x40a8bb[_0x45d905(_0x1bdfe8._0x517003)]=!![];const _0x565b88={};_0x565b88[_0x45d905(_0x1bdfe8._0x357145)]=_0x46d969[_0x45d905(0x7b)],_0x565b88[_0x45d905(_0x1bdfe8._0x42e073)]=_0x46d969[_0x45d905(_0x1bdfe8._0x27d9c2)],_0x565b88[_0x45d905(_0x1bdfe8._0x34e1ca)]=_0x45d905(0x74),_0x565b88[_0x45d905(0xe0)]='',_0x565b88[_0x45d905(_0x1bdfe8._0x19552e)]=_0x45d905(0x8d),_0x565b88[_0x45d905(0x75)]=_0x46d969[_0x45d905(_0x1bdfe8._0x12fdd1)],_0x565b88['required']=!![];const _0x475fa2={};_0x475fa2[_0x45d905(_0x1bdfe8._0x5e58bb)]=_0x46d969[_0x45d905(_0x1bdfe8._0x11dd3b)],_0x475fa2[_0x45d905(_0x1bdfe8._0x4a3811)]=_0x46d969['CbpMU'],_0x475fa2['type']=_0x46d969[_0x45d905(_0x1bdfe8._0x519d98)],_0x475fa2['default']='',_0x475fa2[_0x45d905(_0x1bdfe8._0x19552e)]=_0x46d969[_0x45d905(0xa9)],_0x475fa2[_0x45d905(_0x1bdfe8._0x3253f8)]=_0x46d969[_0x45d905(0x81)],_0x475fa2['required']=!![];const _0x1f84eb={};_0x1f84eb['displayName']=_0x46d969[_0x45d905(0x68)],_0x1f84eb[_0x45d905(_0x1bdfe8._0x150d8c)]=_0x46d969['iIQFF'],_0x1f84eb[_0x45d905(_0x1bdfe8._0x34e1ca)]=_0x46d969[_0x45d905(_0x1bdfe8._0x2f50cb)],_0x1f84eb[_0x45d905(_0x1bdfe8._0x20f072)]=[{'name':_0x46d969[_0x45d905(_0x1bdfe8._0x35e97d)],'value':0x3},{'name':_0x46d969['KkoYn'],'value':0x1},{'name':_0x46d969['PgXWS'],'value':0x2}],_0x1f84eb[_0x45d905(0xe0)]=0x3,_0x1f84eb[_0x45d905(_0x1bdfe8._0x507f53)]=_0x46d969[_0x45d905(_0x1bdfe8._0x1e3a59)];const _0x3fba07={};_0x3fba07[_0x45d905(0x85)]=_0x45d905(0xda),_0x3fba07[_0x45d905(0xc3)]='username',_0x3fba07[_0x45d905(_0x1bdfe8._0x34e1ca)]=_0x46d969[_0x45d905(0x9f)],_0x3fba07[_0x45d905(_0x1bdfe8._0x31428e)]='',_0x3fba07[_0x45d905(0x75)]=_0x46d969[_0x45d905(0xb7)],_0x3fba07[_0x45d905(_0x1bdfe8._0x4e19d9)]=!![];const _0x2ee5b0={};_0x2ee5b0['password']=!![];const _0x28e2c2={};_0x28e2c2[_0x45d905(0x85)]=_0x46d969[_0x45d905(_0x1bdfe8._0x19a2ac)],_0x28e2c2['name']=_0x46d969[_0x45d905(_0x1bdfe8._0x3c1a91)],_0x28e2c2[_0x45d905(0x6d)]=_0x46d969[_0x45d905(0x9f)],_0x28e2c2['typeOptions']=_0x2ee5b0,_0x28e2c2[_0x45d905(0xe0)]='',_0x28e2c2['description']=_0x46d969[_0x45d905(_0x1bdfe8._0x4b3177)],_0x28e2c2['required']=!![],this[_0x45d905(0xc2)]=[_0x1ef378,_0xddd5c,_0x40a8bb,_0x565b88,_0x475fa2,_0x1f84eb,_0x3fba07,_0x28e2c2];continue;case'2':const _0x2bbfae={};_0x2bbfae['url']=_0x46d969[_0x45d905(0x91)],_0x2bbfae[_0x45d905(0xa1)]=_0x46d969[_0x45d905(_0x1bdfe8._0x2b8ca8)],_0x2bbfae['timeout']=0x493e0;const _0x4803d2={};_0x4803d2[_0x45d905(0x80)]=_0x2bbfae,this[_0x45d905(_0x1bdfe8._0x20f551)]=_0x4803d2;continue;case'3':this[_0x45d905(_0x1bdfe8._0x34ccf6)]=_0x45d905(_0x1bdfe8._0x5af545);continue;case'4':this[_0x45d905(_0x1bdfe8._0x320485)]=_0x45d905(_0x1bdfe8._0xe9502b);continue;}break;}}async[_0x206ada(0xcc)](_0x4eee4c,_0x4578a3){const _0x18d19e={_0x347395:0xdf,_0x594cf2:0xdd,_0x3fc175:0xad,_0x299744:0x7a,_0xccc722:0x6a,_0x272930:0xcb,_0x610f92:0x7d,_0xbb584a:0x6e,_0x2e911a:0x99,_0x423344:0xa7,_0x30a55a:0xab,_0x18d27d:0x9e,_0x1ce20a:0x87,_0x3bbb6e:0xba,_0x2e706e:0x84,_0x3e1e37:0xd5,_0x4332f5:0x67,_0xe28e6d:0x8c,_0x3056ad:0x9d,_0x5d73e1:0xa0,_0x31ead9:0xb2,_0x241bbb:0xe2,_0x56cbc0:0x9d,_0x1fd2e0:0x77,_0x3d58ba:0xab,_0x9ea16b:0x66,_0x130fdc:0xba,_0x46f34d:0xae,_0x3d11ba:0x77},_0x33ec85=_0x206ada,_0x442771={'UiQRx':_0x33ec85(0xd3),'uiZfb':_0x33ec85(_0x18d19e._0x347395),'oqmER':_0x33ec85(0xd9),'jejCZ':function(_0x4ca91b){return _0x4ca91b();},'HOiXv':'Auth','qgjKt':_0x33ec85(_0x18d19e._0x594cf2),'QblXH':_0x33ec85(0x6e),'yMjXB':_0x33ec85(0xd0),'lHXky':'oRoSF','PpwPu':_0x33ec85(0xb9),'KvVCf':_0x33ec85(_0x18d19e._0x3fc175),'hhAmj':function(_0x17e083){return _0x17e083();},'HqnsJ':_0x33ec85(0x9e),'pjUfl':_0x33ec85(0x67),'NkOUB':function(_0x21b3fe,_0x755f3f){return _0x21b3fe!==_0x755f3f;},'PMxnJ':'RVdlS','hsLsL':_0x33ec85(_0x18d19e._0x299744),'mfYlB':_0x33ec85(0xd6),'MMMFE':_0x33ec85(_0x18d19e._0xccc722),'VvAFo':_0x33ec85(_0x18d19e._0x272930),'dencQ':function(_0x2dee44,_0x47c9fc){return _0x2dee44(_0x47c9fc);}};!_0x4578a3[_0x33ec85(0xba)]&&(_0x4578a3['headers']={});const _0x26e2b6=_0x4eee4c[_0x33ec85(_0x18d19e._0x610f92)]+':'+_0x4eee4c[_0x33ec85(0x8b)],_0x3a75a8=Buffer[_0x33ec85(0x7f)](_0x26e2b6)['toString'](_0x33ec85(_0x18d19e._0xbb584a)),_0x3f1411=_0x4578a3[_0x33ec85(_0x18d19e._0x2e911a)]||'',_0x145af5=_0x3f1411[_0x33ec85(0xbd)](_0x442771[_0x33ec85(_0x18d19e._0x423344)]);if(_0x145af5){if(_0x442771[_0x33ec85(0xa4)]===_0x442771['PpwPu']){const _0x22f0b2=_0x442771[_0x33ec85(0xc7)][_0x33ec85(_0x18d19e._0x30a55a)]('|');let _0x2de41a=0x0;while(!![]){switch(_0x22f0b2[_0x2de41a++]){case'0':_0x51060b[_0x33ec85(0xba)][_0x33ec85(_0x18d19e._0x18d27d)]=_0x31ab15[_0x33ec85(_0x18d19e._0x1ce20a)];continue;case'1':_0x2d8dd6[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771['uiZfb']]=_0x30b7e5['companyName'];continue;case'2':_0x3dc655[_0x33ec85(0xba)][_0x442771[_0x33ec85(0x77)]]=_0x442771[_0x33ec85(_0x18d19e._0x2e706e)](_0x5c8242);continue;case'3':delete _0x439d6[_0x33ec85(_0x18d19e._0x3e1e37)];continue;case'4':_0x148c3a[_0x33ec85(0xba)][_0x33ec85(_0x18d19e._0x4332f5)]=_0x2f13d3['token'];continue;case'5':_0x5e4af1[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771[_0x33ec85(_0x18d19e._0xe28e6d)]]=_0x3ab4bd;continue;case'6':_0x157e03[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771[_0x33ec85(_0x18d19e._0x3056ad)]]=_0x2e9516[_0x33ec85(_0x18d19e._0x5d73e1)];continue;case'7':delete _0x421717['json'];continue;}break;}}else{const _0x5cf7da=_0x442771[_0x33ec85(0x78)][_0x33ec85(0xab)]('|');let _0x47ceb7=0x0;while(!![]){switch(_0x5cf7da[_0x47ceb7++]){case'0':_0x4578a3['headers'][_0x33ec85(_0x18d19e._0x31ead9)]=_0x3a75a8;continue;case'1':delete _0x4578a3[_0x33ec85(_0x18d19e._0x241bbb)];continue;case'2':_0x4578a3[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771[_0x33ec85(_0x18d19e._0x56cbc0)]]=_0x4eee4c[_0x33ec85(0xa0)];continue;case'3':_0x4578a3[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771[_0x33ec85(_0x18d19e._0x1fd2e0)]]=_0x442771[_0x33ec85(0xac)](getRouterPerm);continue;case'4':_0x4578a3['headers'][_0x442771[_0x33ec85(0x88)]]=_0x4eee4c[_0x33ec85(_0x18d19e._0x1ce20a)];continue;case'5':delete _0x4578a3[_0x33ec85(0xd5)];continue;case'6':_0x4578a3[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771['pjUfl']]=_0x4eee4c['token'];continue;case'7':_0x4578a3['headers'][_0x442771[_0x33ec85(0x65)]]=_0x4eee4c[_0x33ec85(0x83)];continue;}break;}}}else{if(_0x442771['NkOUB'](_0x442771[_0x33ec85(0xbf)],_0x33ec85(0x9c)))return'Bearer\x20'+_0x4256fa['toString'](CzQwZQ['QblXH']);else{const _0x596cac='5|4|3|0|2|1|6'[_0x33ec85(_0x18d19e._0x3d58ba)]('|');let _0x2c309d=0x0;while(!![]){switch(_0x596cac[_0x2c309d++]){case'0':_0x4578a3[_0x33ec85(0xba)][_0x442771[_0x33ec85(_0x18d19e._0x9ea16b)]]=_0x4eee4c['tabulaIni'];continue;case'1':_0x4578a3[_0x33ec85(_0x18d19e._0x3bbb6e)][_0x442771['pjUfl']]=_0x4eee4c['token'];continue;case'2':_0x4578a3[_0x33ec85(_0x18d19e._0x130fdc)][_0x33ec85(0x92)]=_0x4eee4c['apiUrl'];continue;case'3':_0x4578a3[_0x33ec85(0xba)][_0x442771[_0x33ec85(_0x18d19e._0x46f34d)]]=_0x4eee4c['companyName'];continue;case'4':_0x4578a3[_0x33ec85(_0x18d19e._0x130fdc)][_0x442771[_0x33ec85(_0x18d19e._0x3d11ba)]]=_0x442771[_0x33ec85(0xac)](getRouterPerm);continue;case'5':_0x4578a3[_0x33ec85(0xba)][_0x442771[_0x33ec85(0x97)]]='Basic\x20'+_0x3a75a8;continue;case'6':_0x4578a3['headers'][_0x442771[_0x33ec85(0xb6)]]=_0x442771[_0x33ec85(0xb3)](String,_0x4eee4c['language']||0x3);continue;}break;}}}return _0x4578a3;}}exports[_0x206ada(0x89)]=PriorityErpApi;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriorityErpApi = void 0;
|
|
4
|
+
const _rk = Buffer.from([
|
|
5
|
+
0x6c, 0x65, 0x6f, 0x6e, 0x61, 0x69, 0x3a, 0x70, 0x72, 0x69,
|
|
6
|
+
0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x6f,
|
|
7
|
+
0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x66,
|
|
8
|
+
0x74, 0x77, 0x61, 0x72, 0x65,
|
|
9
|
+
]);
|
|
10
|
+
function getRouterPerm() {
|
|
11
|
+
return `Bearer ${_rk.toString('base64')}`;
|
|
12
|
+
}
|
|
13
|
+
class PriorityErpApi {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'priorityErpApi';
|
|
16
|
+
this.displayName = 'Priority ERP API';
|
|
17
|
+
this.documentationUrl = 'priorityerp';
|
|
18
|
+
this.properties = [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Connection Type',
|
|
21
|
+
name: 'connectionType',
|
|
22
|
+
type: 'hidden',
|
|
23
|
+
default: 'router',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Token',
|
|
27
|
+
name: 'token',
|
|
28
|
+
type: 'string',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
password: true,
|
|
31
|
+
},
|
|
32
|
+
default: '',
|
|
33
|
+
placeholder: 'Your license token',
|
|
34
|
+
description: 'The token provided by LeonAI. Get yours at https://forms.leonai.io/make',
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'API URL',
|
|
39
|
+
name: 'apiUrl',
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: '',
|
|
42
|
+
placeholder: 'e.g., https://www.eshbelsaas.co.il/pr20/odata/Priority',
|
|
43
|
+
description: 'The Priority ERP API URL for your instance',
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Company Name',
|
|
48
|
+
name: 'companyName',
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: '',
|
|
51
|
+
placeholder: 'Database name from Companies Form',
|
|
52
|
+
description: 'The company database name in Priority',
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Tabula INI',
|
|
57
|
+
name: 'tabulaIni',
|
|
58
|
+
type: 'string',
|
|
59
|
+
default: '',
|
|
60
|
+
placeholder: 'e.g., tabz0qy4.ini, tabad168.ini, or tabula.ini',
|
|
61
|
+
description: 'The tabula.ini file for your Priority instance',
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Language',
|
|
66
|
+
name: 'language',
|
|
67
|
+
type: 'options',
|
|
68
|
+
options: [
|
|
69
|
+
{ name: 'English', value: 3 },
|
|
70
|
+
{ name: 'Hebrew', value: 1 },
|
|
71
|
+
{ name: 'Arabic', value: 2 },
|
|
72
|
+
],
|
|
73
|
+
default: 3,
|
|
74
|
+
description: 'The language for Priority ERP responses',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: 'API Username',
|
|
78
|
+
name: 'username',
|
|
79
|
+
type: 'string',
|
|
80
|
+
default: '',
|
|
81
|
+
description: 'Priority ERP username with API license',
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
displayName: 'API Password',
|
|
86
|
+
name: 'password',
|
|
87
|
+
type: 'string',
|
|
88
|
+
typeOptions: {
|
|
89
|
+
password: true,
|
|
90
|
+
},
|
|
91
|
+
default: '',
|
|
92
|
+
description: 'Password for the API user',
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
this.test = {
|
|
97
|
+
request: {
|
|
98
|
+
url: 'https://php-api-941574646138.me-west1.run.app/api/priority/rpc/auth',
|
|
99
|
+
method: 'POST',
|
|
100
|
+
timeout: 300000,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async authenticate(credentials, requestOptions) {
|
|
105
|
+
if (!requestOptions.headers) {
|
|
106
|
+
requestOptions.headers = {};
|
|
107
|
+
}
|
|
108
|
+
const authString = `${credentials.username}:${credentials.password}`;
|
|
109
|
+
const auth = Buffer.from(authString).toString('base64');
|
|
110
|
+
const fullUrl = requestOptions.url || '';
|
|
111
|
+
const isTestRequest = fullUrl.includes('/rpc/auth');
|
|
112
|
+
if (isTestRequest) {
|
|
113
|
+
delete requestOptions.body;
|
|
114
|
+
delete requestOptions.json;
|
|
115
|
+
requestOptions.headers['perm'] = getRouterPerm();
|
|
116
|
+
requestOptions.headers['Auth'] = auth;
|
|
117
|
+
requestOptions.headers['companyname'] = credentials.companyName;
|
|
118
|
+
requestOptions.headers['tabulaini'] = credentials.tabulaIni;
|
|
119
|
+
requestOptions.headers['apiurl'] = credentials.apiUrl;
|
|
120
|
+
requestOptions.headers['token'] = credentials.token;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
requestOptions.headers['Authorization'] = `Basic ${auth}`;
|
|
124
|
+
requestOptions.headers['perm'] = getRouterPerm();
|
|
125
|
+
requestOptions.headers['COMPANY_NAME'] = credentials.companyName;
|
|
126
|
+
requestOptions.headers['TABULA_INI'] = credentials.tabulaIni;
|
|
127
|
+
requestOptions.headers['API_url'] = credentials.apiUrl;
|
|
128
|
+
requestOptions.headers['token'] = credentials.token;
|
|
129
|
+
requestOptions.headers['language'] = String(credentials.language || 3);
|
|
130
|
+
}
|
|
131
|
+
return requestOptions;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.PriorityErpApi = PriorityErpApi;
|
|
@@ -1 +1,134 @@
|
|
|
1
|
-
'use strict';const _0x215aba=_0x382b;(function(_0x2b91fe,_0x12fb4b){const _0x234503={_0x4127e3:0x110,_0x44e8e5:0x14a,_0x3e60da:0x114,_0x5542e4:0x151,_0xd8b687:0x16e,_0x2f625c:0x122,_0x4fd91b:0x16d,_0x6b66b0:0x185},_0x1e6c1e=_0x382b,_0x99072=_0x2b91fe();while(!![]){try{const _0x485d58=parseInt(_0x1e6c1e(_0x234503._0x4127e3))/0x1+-parseInt(_0x1e6c1e(_0x234503._0x44e8e5))/0x2*(parseInt(_0x1e6c1e(_0x234503._0x3e60da))/0x3)+-parseInt(_0x1e6c1e(0x166))/0x4+parseInt(_0x1e6c1e(0x124))/0x5+-parseInt(_0x1e6c1e(_0x234503._0x5542e4))/0x6*(-parseInt(_0x1e6c1e(_0x234503._0xd8b687))/0x7)+-parseInt(_0x1e6c1e(_0x234503._0x2f625c))/0x8*(parseInt(_0x1e6c1e(0x132))/0x9)+parseInt(_0x1e6c1e(_0x234503._0x4fd91b))/0xa*(parseInt(_0x1e6c1e(_0x234503._0x6b66b0))/0xb);if(_0x485d58===_0x12fb4b)break;else _0x99072['push'](_0x99072['shift']());}catch(_0x2c7fd4){_0x99072['push'](_0x99072['shift']());}}}(_0x3f5f,0xe950e));const _0x57f118={};_0x57f118['value']=!![],Object[_0x215aba(0x125)](exports,_0x215aba(0x11f),_0x57f118),exports[_0x215aba(0x13e)]=void 0x0;const _rk=Buffer[_0x215aba(0x136)]([0x6c,0x65,0x6f,0x6e,0x61,0x69,0x3a,0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79,0x5f,0x61,0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6f,0x66,0x74,0x77,0x61,0x72,0x65]);function getRouterPerm(){const _0x389583={_0x29cc5d:0x157,_0x2191f4:0x161,_0x2372f1:0x112},_0x210a52=_0x215aba;return _0x210a52(_0x389583._0x29cc5d)+_rk[_0x210a52(_0x389583._0x2191f4)](_0x210a52(_0x389583._0x2372f1));}function _0x382b(_0x5f1d92,_0x2d8c4e){_0x5f1d92=_0x5f1d92-0x10d;const _0x3f5f8c=_0x3f5f();let _0x382b9a=_0x3f5f8c[_0x5f1d92];if(_0x382b['afSPER']===undefined){var _0x8a8157=function(_0x59cec1){const _0x5eaba2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x427832='',_0x5d3b77='';for(let _0x4df056=0x0,_0x521c1d,_0x41e9fa,_0x1da1c9=0x0;_0x41e9fa=_0x59cec1['charAt'](_0x1da1c9++);~_0x41e9fa&&(_0x521c1d=_0x4df056%0x4?_0x521c1d*0x40+_0x41e9fa:_0x41e9fa,_0x4df056++%0x4)?_0x427832+=String['fromCharCode'](0xff&_0x521c1d>>(-0x2*_0x4df056&0x6)):0x0){_0x41e9fa=_0x5eaba2['indexOf'](_0x41e9fa);}for(let _0x2f308d=0x0,_0x25c0af=_0x427832['length'];_0x2f308d<_0x25c0af;_0x2f308d++){_0x5d3b77+='%'+('00'+_0x427832['charCodeAt'](_0x2f308d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d3b77);};_0x382b['ZmdsVO']=_0x8a8157,_0x382b['rAndJy']={},_0x382b['afSPER']=!![];}const _0x18c6a5=_0x3f5f8c[0x0],_0x3ece73=_0x5f1d92+_0x18c6a5,_0x18afed=_0x382b['rAndJy'][_0x3ece73];return!_0x18afed?(_0x382b9a=_0x382b['ZmdsVO'](_0x382b9a),_0x382b['rAndJy'][_0x3ece73]=_0x382b9a):_0x382b9a=_0x18afed,_0x382b9a;}class PriorityErpWebSdk{constructor(){const _0x585094={_0x2a59f7:0x15f,_0x19ce68:0x113,_0x40b91d:0x165,_0x1b7aa1:0x118,_0x5aad10:0x12a,_0x101221:0x174,_0x185ceb:0x14c,_0x6015bc:0x13a,_0x96c2a1:0x15d,_0x4cc56c:0x175,_0x55553d:0x134,_0x177031:0x12c,_0x488aad:0x140,_0x4eba7e:0x143,_0x2fe734:0x17e,_0x510378:0x17f,_0x1e5e05:0x169,_0x2afce7:0x13d,_0x23ed67:0x123,_0x5d9826:0x148,_0x4b59af:0x179,_0x201cc9:0x16b,_0x8a850b:0x15f,_0x1f1ea5:0x149,_0x18d10d:0x14e,_0x3d0bcc:0x165,_0x3399c0:0x180,_0xa4879c:0x16a,_0x4c15ef:0x12e,_0x26cf55:0x11c,_0x2a7933:0x117,_0x348702:0x150,_0x469729:0x14d,_0x5dbf1a:0x144,_0x56ae95:0x10e,_0x755565:0x183,_0x5abb19:0x13b,_0x5dc6e5:0x170,_0x190007:0x160,_0x2646a3:0x150,_0x462558:0x143,_0x581b3c:0x14d,_0x584aa6:0x126,_0x3d7efa:0x12d,_0x3862b5:0x169,_0x24146f:0x163,_0x147d97:0x138,_0x16c806:0x142,_0x4e547e:0x12b,_0x39d882:0x170,_0x32acd5:0x11d},_0x5accde=_0x215aba,_0x23801c={};_0x23801c[_0x5accde(_0x585094._0x2a59f7)]=_0x5accde(0x10f),_0x23801c['pauOP']='Priority\x20ERP\x20WebSDK',_0x23801c[_0x5accde(0x176)]=_0x5accde(_0x585094._0x19ce68),_0x23801c[_0x5accde(_0x585094._0x40b91d)]='POST',_0x23801c[_0x5accde(0x117)]=_0x5accde(_0x585094._0x1b7aa1),_0x23801c[_0x5accde(_0x585094._0x5aad10)]=_0x5accde(0x158),_0x23801c['SyVsV']=_0x5accde(0x12f),_0x23801c['pmtJk']=_0x5accde(0x133),_0x23801c[_0x5accde(_0x585094._0x101221)]=_0x5accde(0x16c),_0x23801c[_0x5accde(_0x585094._0x185ceb)]=_0x5accde(_0x585094._0x6015bc),_0x23801c[_0x5accde(_0x585094._0x96c2a1)]=_0x5accde(0x120),_0x23801c['XPutR']=_0x5accde(_0x585094._0x4cc56c),_0x23801c[_0x5accde(0x15c)]=_0x5accde(_0x585094._0x55553d),_0x23801c['dcmGy']=_0x5accde(0x17c),_0x23801c['cRzWN']='The\x20company\x20database\x20name\x20in\x20Priority',_0x23801c[_0x5accde(_0x585094._0x177031)]='Tabula\x20INI',_0x23801c[_0x5accde(_0x585094._0x488aad)]='tabulaIni',_0x23801c[_0x5accde(_0x585094._0x4eba7e)]=_0x5accde(_0x585094._0x2fe734),_0x23801c[_0x5accde(0x12d)]=_0x5accde(_0x585094._0x510378),_0x23801c[_0x5accde(_0x585094._0x1e5e05)]='language',_0x23801c[_0x5accde(0x184)]=_0x5accde(0x156),_0x23801c[_0x5accde(0x163)]=_0x5accde(0x181),_0x23801c[_0x5accde(0x138)]=_0x5accde(0x152),_0x23801c[_0x5accde(0x129)]=_0x5accde(0x153),_0x23801c['hRnFD']=_0x5accde(_0x585094._0x2afce7),_0x23801c['wATKq']=_0x5accde(_0x585094._0x23ed67),_0x23801c['WeRTq']=_0x5accde(_0x585094._0x5d9826),_0x23801c['vXLmg']=_0x5accde(_0x585094._0x4b59af),_0x23801c[_0x5accde(_0x585094._0x201cc9)]='Password\x20for\x20the\x20WebSDK\x20user';const _0x561763=_0x23801c,_0x379a19=_0x561763[_0x5accde(_0x585094._0x8a850b)][_0x5accde(_0x585094._0x1f1ea5)]('|');let _0xe76a33=0x0;while(!![]){switch(_0x379a19[_0xe76a33++]){case'0':this[_0x5accde(0x126)]=_0x561763[_0x5accde(0x13f)];continue;case'1':const _0x2e53ca={};_0x2e53ca[_0x5accde(0x14f)]=_0x561763['QKjgj'],_0x2e53ca[_0x5accde(_0x585094._0x18d10d)]=_0x561763[_0x5accde(_0x585094._0x3d0bcc)],_0x2e53ca[_0x5accde(0x15a)]=0x493e0;const _0x2b21cb={};_0x2b21cb[_0x5accde(0x14b)]=_0x2e53ca,this[_0x5accde(_0x585094._0x3399c0)]=_0x2b21cb;continue;case'2':this[_0x5accde(_0x585094._0xa4879c)]='priorityErpWebSdk';continue;case'3':this[_0x5accde(_0x585094._0x4c15ef)]=_0x5accde(_0x585094._0x26cf55);continue;case'4':const _0x531a2f={};_0x531a2f[_0x5accde(0x17b)]=!![];const _0x4cf4e9={};_0x4cf4e9['displayName']=_0x561763[_0x5accde(_0x585094._0x2a7933)],_0x4cf4e9[_0x5accde(0x16a)]=_0x561763['LLqBn'],_0x4cf4e9['type']=_0x561763[_0x5accde(0x144)],_0x4cf4e9['typeOptions']=_0x531a2f,_0x4cf4e9['default']='',_0x4cf4e9[_0x5accde(_0x585094._0x348702)]=_0x561763[_0x5accde(0x17a)],_0x4cf4e9[_0x5accde(_0x585094._0x469729)]=_0x561763[_0x5accde(_0x585094._0x101221)],_0x4cf4e9[_0x5accde(0x13b)]=!![];const _0x3f32a8={};_0x3f32a8['displayName']=_0x561763[_0x5accde(_0x585094._0x185ceb)],_0x3f32a8[_0x5accde(0x16a)]=_0x561763[_0x5accde(_0x585094._0x96c2a1)],_0x3f32a8['type']=_0x561763[_0x5accde(_0x585094._0x5dbf1a)],_0x3f32a8['default']='',_0x3f32a8['placeholder']=_0x561763[_0x5accde(_0x585094._0x56ae95)],_0x3f32a8[_0x5accde(0x14d)]=_0x5accde(_0x585094._0x755565),_0x3f32a8[_0x5accde(_0x585094._0x5abb19)]=!![];const _0x26ea75={};_0x26ea75['displayName']=_0x561763['uZnUj'],_0x26ea75['name']='companyName',_0x26ea75[_0x5accde(_0x585094._0x5dc6e5)]=_0x561763[_0x5accde(0x144)],_0x26ea75['default']='',_0x26ea75[_0x5accde(_0x585094._0x348702)]=_0x561763[_0x5accde(_0x585094._0x190007)],_0x26ea75[_0x5accde(0x14d)]=_0x561763['cRzWN'],_0x26ea75[_0x5accde(_0x585094._0x5abb19)]=!![];const _0x312707={};_0x312707[_0x5accde(0x126)]=_0x561763[_0x5accde(0x12c)],_0x312707[_0x5accde(0x16a)]=_0x561763[_0x5accde(0x140)],_0x312707[_0x5accde(_0x585094._0x5dc6e5)]=_0x561763['SyVsV'],_0x312707['default']='',_0x312707[_0x5accde(_0x585094._0x2646a3)]=_0x561763[_0x5accde(_0x585094._0x462558)],_0x312707[_0x5accde(_0x585094._0x581b3c)]='The\x20tabula.ini\x20file\x20for\x20your\x20Priority\x20instance',_0x312707[_0x5accde(0x13b)]=!![];const _0x4992ef={};_0x4992ef[_0x5accde(_0x585094._0xa4879c)]='Arabic',_0x4992ef['value']=0x2;const _0x14c3c0={};_0x14c3c0[_0x5accde(_0x585094._0x584aa6)]=_0x561763[_0x5accde(_0x585094._0x3d7efa)],_0x14c3c0[_0x5accde(_0x585094._0xa4879c)]=_0x561763[_0x5accde(_0x585094._0x3862b5)],_0x14c3c0[_0x5accde(0x170)]=_0x561763[_0x5accde(0x184)],_0x14c3c0[_0x5accde(0x156)]=[{'name':_0x561763[_0x5accde(_0x585094._0x24146f)],'value':0x3},{'name':_0x561763[_0x5accde(_0x585094._0x147d97)],'value':0x1},_0x4992ef],_0x14c3c0[_0x5accde(_0x585094._0x16c806)]=0x3,_0x14c3c0['description']=_0x561763[_0x5accde(0x129)];const _0x2b9c30={};_0x2b9c30[_0x5accde(0x126)]=_0x561763[_0x5accde(_0x585094._0x4e547e)],_0x2b9c30['name']=_0x561763[_0x5accde(0x127)],_0x2b9c30[_0x5accde(_0x585094._0x39d882)]=_0x561763['SyVsV'],_0x2b9c30['default']='',_0x2b9c30[_0x5accde(0x14d)]=_0x561763['WeRTq'],_0x2b9c30[_0x5accde(_0x585094._0x5abb19)]=!![];const _0x25118e={};_0x25118e['password']=!![];const _0x5971a2={};_0x5971a2['displayName']=_0x561763['vXLmg'],_0x5971a2[_0x5accde(0x16a)]=_0x5accde(0x17b),_0x5971a2[_0x5accde(0x170)]=_0x561763[_0x5accde(_0x585094._0x5dbf1a)],_0x5971a2['typeOptions']=_0x25118e,_0x5971a2['default']='',_0x5971a2[_0x5accde(0x14d)]=_0x561763['XAiyJ'],_0x5971a2['required']=!![],this[_0x5accde(_0x585094._0x32acd5)]=[_0x4cf4e9,_0x3f32a8,_0x26ea75,_0x312707,_0x14c3c0,_0x2b9c30,_0x5971a2];continue;}break;}}async[_0x215aba(0x121)](_0x19b490,_0x13da5c){const _0x4cebb5={_0x3cb126:0x141,_0x1916b2:0x112,_0x5bcb2b:0x154,_0x3df3c8:0x116,_0x865e42:0x171,_0xc63e0:0x172,_0x4cbfd6:0x162,_0xff460c:0x149,_0x1fddf1:0x171,_0x5d8147:0x158,_0x7b856a:0x167,_0x5ec836:0x164,_0x2b1bdb:0x111,_0x11bf09:0x139,_0x174478:0x135,_0x2bfec4:0x155,_0x3f34e7:0x16f,_0x9a458a:0x11e,_0x5d1554:0x167,_0x49d19e:0x171,_0x3125b3:0x130,_0x15ebaf:0x10d,_0x1f60ce:0x136,_0x450d7d:0x161,_0x5cd0d7:0x136,_0x90dfbf:0x112,_0x2c863c:0x11b,_0x595bba:0x171,_0x5a296c:0x123,_0x2efb8e:0x115,_0x58ae7a:0x17d,_0x8f68dc:0x167,_0x5b6b9d:0x136,_0x12155b:0x136,_0x495282:0x120,_0x2e70c9:0x11e,_0x267db6:0x158,_0x5c8373:0x137,_0x102ef7:0x11b,_0x2d1fe4:0x16f,_0x2220bc:0x11e,_0x141874:0x130,_0x45eb25:0x171,_0x70511:0x13c,_0x388f6c:0x146,_0x1866ee:0x15b,_0x1df65e:0x171,_0x217040:0x141,_0x298abe:0x16f,_0x1a19ad:0x11e,_0x5c92fd:0x119,_0x3d8eab:0x17d},_0x15d034=_0x215aba,_0x203f4b={'XeBBg':_0x15d034(0x173),'nSotw':_0x15d034(_0x4cebb5._0x3cb126),'lVcsZ':'API_url','NhOnz':_0x15d034(0x159),'YWyVF':'perm','CqTSg':function(_0x320d94){return _0x320d94();},'FDhAR':_0x15d034(_0x4cebb5._0x1916b2),'eGrFz':'1|5|4|0|2|3','HMdua':function(_0x561059,_0x1bd5dd){return _0x561059(_0x1bd5dd);},'nNJeq':function(_0x27b395){return _0x27b395();},'tTiTq':'TABULA_INI','zZVRu':'token','MQnmw':'uujJy','iBcFc':_0x15d034(_0x4cebb5._0x5bcb2b),'cNCOT':function(_0x52ce60,_0x1e80e0){return _0x52ce60!==_0x1e80e0;},'doAqJ':'Qhxmq','BTYCj':function(_0x3c1f8f,_0x5656f7){return _0x3c1f8f(_0x5656f7);},'mxjzh':'password','fKoMb':function(_0x39e0af,_0x12755a){return _0x39e0af===_0x12755a;},'oeGIN':'Oqvts','TojrU':_0x15d034(_0x4cebb5._0x3df3c8),'ZyAOH':function(_0x32e065,_0x575c81){return _0x32e065(_0x575c81);},'hKVQI':function(_0x3bc518){return _0x3bc518();}};if(!_0x13da5c[_0x15d034(_0x4cebb5._0x865e42)]){if(_0x203f4b[_0x15d034(_0x4cebb5._0xc63e0)]===_0x203f4b[_0x15d034(_0x4cebb5._0x4cbfd6)]){const _0x946696=_0x15d034(0x131)[_0x15d034(_0x4cebb5._0xff460c)]('|');let _0x49d5ce=0x0;while(!![]){switch(_0x946696[_0x49d5ce++]){case'0':_0x2e97dc[_0x15d034(0x171)][_0x15d034(0x128)]=_0x5a8cff[_0x15d034(0x11b)];continue;case'1':_0x1b6b7c[_0x15d034(_0x4cebb5._0x1fddf1)][_0x15d034(_0x4cebb5._0x5d8147)]=_0x5a1e8f[_0x15d034(_0x4cebb5._0x5d8147)];continue;case'2':_0x131189[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x16f)]]='Basic\x20'+_0xa32b78;continue;case'3':_0x476270[_0x15d034(0x171)][_0x203f4b[_0x15d034(_0x4cebb5._0x7b856a)]]=_0x431aea(_0x55a1b9['language']||0x3);continue;case'4':_0x15af63[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x13c)]]=_0x588e3c['apiUrl'];continue;case'5':_0x1c97c0[_0x15d034(_0x4cebb5._0x1fddf1)][_0x203f4b[_0x15d034(_0x4cebb5._0x5ec836)]]=_0x323d28[_0x15d034(_0x4cebb5._0x2b1bdb)];continue;case'6':_0x339ea4['headers'][_0x203f4b[_0x15d034(0x145)]]=_0x203f4b[_0x15d034(_0x4cebb5._0x11bf09)](_0x1750e5);continue;}break;}}else _0x13da5c[_0x15d034(0x171)]={};}const _0x3ec141=_0x19b490['username'],_0x4f079b=_0x19b490['password'],_0x318a50=_0x3ec141+':'+_0x4f079b,_0x159c26=Buffer[_0x15d034(0x136)](_0x318a50)[_0x15d034(0x161)](_0x203f4b['FDhAR']),_0x5c8e2f=_0x13da5c['url']||'',_0x132bd0=_0x5c8e2f[_0x15d034(_0x4cebb5._0x174478)](_0x15d034(0x115));if(_0x132bd0){if(_0x203f4b[_0x15d034(_0x4cebb5._0x2bfec4)]('uQwqo',_0x203f4b[_0x15d034(0x168)])){const _0x2bf460=_0x15d034(0x147)[_0x15d034(_0x4cebb5._0xff460c)]('|');let _0x3ea486=0x0;while(!![]){switch(_0x2bf460[_0x3ea486++]){case'0':_0x13da5c[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x145)]]=_0x203f4b[_0x15d034(_0x4cebb5._0x11bf09)](getRouterPerm);continue;case'1':_0x13da5c[_0x15d034(0x171)][_0x203f4b[_0x15d034(_0x4cebb5._0x3f34e7)]]=_0x15d034(_0x4cebb5._0x9a458a)+_0x159c26;continue;case'2':_0x13da5c[_0x15d034(_0x4cebb5._0x865e42)][_0x203f4b[_0x15d034(_0x4cebb5._0x5d1554)]]=_0x203f4b['BTYCj'](String,_0x19b490[_0x15d034(0x141)]||0x3);continue;case'3':_0x13da5c[_0x15d034(_0x4cebb5._0x49d19e)][_0x203f4b[_0x15d034(_0x4cebb5._0x3125b3)]]=_0x19b490[_0x15d034(0x158)];continue;case'4':_0x13da5c[_0x15d034(_0x4cebb5._0x865e42)][_0x203f4b[_0x15d034(_0x4cebb5._0x15ebaf)]]=Buffer[_0x15d034(0x136)](_0x4f079b)[_0x15d034(0x161)](_0x203f4b[_0x15d034(0x17d)]);continue;case'5':_0x13da5c['body']={'username':Buffer[_0x15d034(_0x4cebb5._0x1f60ce)](_0x3ec141)[_0x15d034(_0x4cebb5._0x450d7d)](_0x203f4b['FDhAR']),'password':Buffer[_0x15d034(_0x4cebb5._0x5cd0d7)](_0x4f079b)[_0x15d034(0x161)](_0x15d034(_0x4cebb5._0x90dfbf)),'url':_0x19b490[_0x15d034(0x120)],'tabulaini':_0x19b490[_0x15d034(_0x4cebb5._0x2c863c)],'company':_0x19b490[_0x15d034(_0x4cebb5._0x2b1bdb)]};continue;}break;}}else{!_0x4084bf[_0x15d034(_0x4cebb5._0x595bba)]&&(_0x578907['headers']={});const _0x490ea1=_0x41dfa4[_0x15d034(_0x4cebb5._0x5a296c)],_0x2acb1e=_0x28add4[_0x15d034(0x17b)],_0x340abd=_0x490ea1+':'+_0x2acb1e,_0x4e6c47=_0x52429d[_0x15d034(_0x4cebb5._0x1f60ce)](_0x340abd)[_0x15d034(0x161)](_0x203f4b[_0x15d034(0x17d)]),_0x5a9126=_0xd4d0e3['url']||'',_0x40f6fb=_0x5a9126[_0x15d034(_0x4cebb5._0x174478)](_0x15d034(_0x4cebb5._0x2efb8e));if(_0x40f6fb){const _0x45cf68=_0x203f4b[_0x15d034(0x15e)][_0x15d034(0x149)]('|');let _0x1187d4=0x0;while(!![]){switch(_0x45cf68[_0x1187d4++]){case'0':_0x40b78e[_0x15d034(0x171)]['password']=_0x38a100[_0x15d034(0x136)](_0x2acb1e)[_0x15d034(_0x4cebb5._0x450d7d)](_0x203f4b[_0x15d034(_0x4cebb5._0x58ae7a)]);continue;case'1':_0x30768b[_0x15d034(_0x4cebb5._0x1fddf1)][_0x203f4b['YWyVF']]=_0x354e0c();continue;case'2':_0x24aefa['headers'][_0x203f4b[_0x15d034(_0x4cebb5._0x8f68dc)]]=_0x203f4b[_0x15d034(0x11a)](_0x25ecfc,_0x2e42b4[_0x15d034(0x141)]||0x3);continue;case'3':_0x2c226d[_0x15d034(0x177)]={'username':_0x29930e[_0x15d034(_0x4cebb5._0x5b6b9d)](_0x490ea1)[_0x15d034(0x161)](_0x15d034(0x112)),'password':_0x475768[_0x15d034(_0x4cebb5._0x12155b)](_0x2acb1e)[_0x15d034(_0x4cebb5._0x450d7d)](_0x203f4b[_0x15d034(_0x4cebb5._0x58ae7a)]),'url':_0x1292ec[_0x15d034(_0x4cebb5._0x495282)],'tabulaini':_0x588140[_0x15d034(0x11b)],'company':_0x3de865[_0x15d034(0x111)]};continue;case'4':_0x2f8f55[_0x15d034(_0x4cebb5._0x865e42)][_0x203f4b['XeBBg']]=_0x15d034(_0x4cebb5._0x2e70c9)+_0x4e6c47;continue;case'5':_0x125f8b['headers']['token']=_0x22152d[_0x15d034(_0x4cebb5._0x267db6)];continue;}break;}}else{const _0x1d291e=_0x15d034(_0x4cebb5._0x5c8373)['split']('|');let _0x3670cf=0x0;while(!![]){switch(_0x1d291e[_0x3670cf++]){case'0':_0x3081a3[_0x15d034(0x171)]['perm']=_0x203f4b['nNJeq'](_0x28e777);continue;case'1':_0x9b4a73[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x182)]]=_0x43ec24[_0x15d034(_0x4cebb5._0x102ef7)];continue;case'2':_0x23ddd9[_0x15d034(_0x4cebb5._0x595bba)][_0x203f4b[_0x15d034(_0x4cebb5._0x2d1fe4)]]=_0x15d034(_0x4cebb5._0x2220bc)+_0x4e6c47;continue;case'3':_0x54f0eb['headers'][_0x203f4b[_0x15d034(_0x4cebb5._0x141874)]]=_0x534801['token'];continue;case'4':_0x2a0962[_0x15d034(_0x4cebb5._0x1fddf1)][_0x203f4b[_0x15d034(0x164)]]=_0x4e14a1[_0x15d034(_0x4cebb5._0x2b1bdb)];continue;case'5':_0x1749d5[_0x15d034(0x171)][_0x203f4b[_0x15d034(_0x4cebb5._0x5d1554)]]=_0x54c60d(_0x16a979[_0x15d034(0x141)]||0x3);continue;case'6':_0x1c56b3[_0x15d034(_0x4cebb5._0x45eb25)][_0x203f4b[_0x15d034(_0x4cebb5._0x70511)]]=_0x33a6db[_0x15d034(0x120)];continue;}break;}}return _0x4f89a1;}}else{if(_0x203f4b[_0x15d034(_0x4cebb5._0x388f6c)](_0x203f4b[_0x15d034(_0x4cebb5._0x1866ee)],'Oqvts')){const _0x554859=_0x203f4b[_0x15d034(0x178)]['split']('|');let _0x210e0d=0x0;while(!![]){switch(_0x554859[_0x210e0d++]){case'0':_0x13da5c[_0x15d034(0x171)][_0x15d034(0x159)]=_0x19b490[_0x15d034(0x111)];continue;case'1':_0x13da5c[_0x15d034(_0x4cebb5._0x45eb25)][_0x203f4b[_0x15d034(_0x4cebb5._0x70511)]]=_0x19b490[_0x15d034(0x120)];continue;case'2':_0x13da5c[_0x15d034(_0x4cebb5._0x1df65e)][_0x203f4b[_0x15d034(0x167)]]=_0x203f4b['ZyAOH'](String,_0x19b490[_0x15d034(_0x4cebb5._0x217040)]||0x3);continue;case'3':_0x13da5c[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x182)]]=_0x19b490[_0x15d034(0x11b)];continue;case'4':_0x13da5c[_0x15d034(_0x4cebb5._0x45eb25)][_0x203f4b[_0x15d034(_0x4cebb5._0x298abe)]]=_0x15d034(_0x4cebb5._0x1a19ad)+_0x159c26;continue;case'5':_0x13da5c[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x130)]]=_0x19b490[_0x15d034(0x158)];continue;case'6':_0x13da5c[_0x15d034(0x171)][_0x203f4b[_0x15d034(0x145)]]=_0x203f4b[_0x15d034(_0x4cebb5._0x5c92fd)](getRouterPerm);continue;}break;}}else return _0x15d034(0x157)+_0x5d3b77[_0x15d034(0x161)](uZMNqp[_0x15d034(_0x4cebb5._0x3d8eab)]);}return _0x13da5c;}}exports[_0x215aba(0x13e)]=PriorityErpWebSdk;function _0x3f5f(){const _0x53e8ee=['ANj1BNG','y05dt1q','B3b0Aw9UCW','qMvHCMvYia','Dg9Rzw4','q09nuefowv9oqu1f','DgLTzw91Da','B2vhsu4','DvPUvwO','DvrstNq','zuDYrNO','Egr3yuC','zgnTr3K','Dg9tDhjPBMC','AujJrMm','D1LSDNy','tMHpBNO','rw10Bxe','ndGZmdq4vwTrBejo','BLnVDhC','zg9bCuO','z29iBvm','BMfTzq','wefPEuO','vgHLihrVA2vUihbYB3zPzgvKigj5ieXLB25bss4Gr2v0ihLVDxjZigf0igH0DhbZoI8VzM9YBxmUBgvVBMfPlMLVl21HA2u','mtKWnZuZmhviu012AG','mZmZodKZv1PLyNrl','wgvcqMC','DhLWzq','AgvHzgvYCW','tvfUBxC','qxv0Ag9YAxPHDgLVBG','qLn3vvG','zs5NlIWGAhr0Chm6lY9Zzxj2zxiVD2nMl3nLCNzPy2uUC3zJ','uuTQz2O','yM9KEq','vg9QCLu','ugfZC3DVCMq','Cg10sMS','CgfZC3DVCMq','rgf0ywjHC2uGBMfTzsbMCM9TienVBxbHBMLLCYbgB3jT','rKrOqvi','zs5NlIWGDgfIEJbXEtqUAw5Plcb0ywjHzde2oc5PBMKSig9YihrHyNvSys5PBMK','tgfUz3vHz2u','DgvZDa','rw5NBgLZAa','DfrPvhe','vgHLifbYAw9YAxr5ifDLyLnesYbvuKWGzM9YihLVDxiGAw5ZDgfUy2u','sNHiwLy','mtiXDffpzunL','BxHQEMG','wfb1Dfi','mNWWFdn8nhWX','mti0nZCXnfzcAhfeBq','y29TCgfUEu5HBwu','yMfZzty0','Ahr0Chm6lY9ZzgTHDxrOlxrJA3b6B3OZBNeTEMyUys5YDw4UyxbWl2fWAs9WCMLVCML0Es9ZzgTHDxrO','m1PYq1DdtG','C2rRyxv0Aa','nhW2Fdb8m3WXFdv8mG','wxzACwq','vg9Rzw4','AeTwuuK','se1KDwe','DgfIDwXHsw5P','ChjPB3jPDhLLCNa','ChjVCgvYDgLLCW','qMfZAwmG','x19LC01VzhvSzq','yxbPvxjS','yxv0AgvUDgLJyxrL','mtzPs3fsBMy','DxnLCM5HBwu','mte0odGWqvHLyu5K','zgvMAw5LuhjVCgvYDhK','zgLZCgXHEu5HBwu','D0fus3e','vefcvuXbx0Losq','rxD4qu4','teXXqM4','AfjUrKq','ug12z1y','uuPeEe4','zg9JDw1LBNrHDgLVBLvYBa','C3rYAw5N','ELPwuNu','mNW2Fdv8mhW0Fdf8mW','ndmXmZi0mvney1DorW','ww91CIbSAwnLBNnLihrVA2vU','q29TCgfUEsboyw1L','Aw5JBhvKzxm','zNjVBq','mNWWFdr8mxW2Fdn8nq','uLnSwu0','q3fuu2C','uhjPB3jPDhKGv2vIu0rlifvsta','CMvXDwLYzwq','BfzJC1O','vxnLCM5HBwu','uhjPB3jPDhLfCNbxzwjtzgS','Cgf1t1a','AxvVtfG','BgfUz3vHz2u','zgvMyxvSDa','AgLTALG','u3LwC1y','wvD5vKy','zKTVtwi','mhWZFdf8nhWYFdu','uhjPB3jPDhKGDxnLCIb3AxrOifDLyI9hvuKGBgLJzw5ZzsaOBM90iefqssb1C2vYkq','C3bSAxq','mJC2mZuWmg10AgnNrW','CMvXDwvZDa','qNf5rM4','zgvZy3jPChrPB24','Bwv0Ag9K','DxjS','CgXHy2vOB2XKzxi','nKPKEuDIta','sgvICMv3','vgHLigXHBMD1ywDLigzVCIbqCMLVCML0EsbfuLaGCMvZCg9UC2vZ'];_0x3f5f=function(){return _0x53e8ee;};return _0x3f5f();}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriorityErpWebSdk = void 0;
|
|
4
|
+
const _rk = Buffer.from([
|
|
5
|
+
0x6c, 0x65, 0x6f, 0x6e, 0x61, 0x69, 0x3a, 0x70, 0x72, 0x69,
|
|
6
|
+
0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x6f,
|
|
7
|
+
0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x66,
|
|
8
|
+
0x74, 0x77, 0x61, 0x72, 0x65,
|
|
9
|
+
]);
|
|
10
|
+
function getRouterPerm() {
|
|
11
|
+
return `Bearer ${_rk.toString('base64')}`;
|
|
12
|
+
}
|
|
13
|
+
class PriorityErpWebSdk {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'priorityErpWebSdk';
|
|
16
|
+
this.displayName = 'Priority ERP WebSDK';
|
|
17
|
+
this.documentationUrl = 'priorityerp';
|
|
18
|
+
this.properties = [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Token',
|
|
21
|
+
name: 'token',
|
|
22
|
+
type: 'string',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
default: '',
|
|
27
|
+
placeholder: 'Your license token',
|
|
28
|
+
description: 'The token provided by LeonAI. Get yours at https://forms.leonai.io/make',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Priority WebSDK URL',
|
|
33
|
+
name: 'apiUrl',
|
|
34
|
+
type: 'string',
|
|
35
|
+
default: '',
|
|
36
|
+
placeholder: 'e.g., https://server/wcf/service.svc',
|
|
37
|
+
description: 'The Priority WebSDK URL for your instance',
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Company Name',
|
|
42
|
+
name: 'companyName',
|
|
43
|
+
type: 'string',
|
|
44
|
+
default: '',
|
|
45
|
+
placeholder: 'Database name from Companies Form',
|
|
46
|
+
description: 'The company database name in Priority',
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Tabula INI',
|
|
51
|
+
name: 'tabulaIni',
|
|
52
|
+
type: 'string',
|
|
53
|
+
default: '',
|
|
54
|
+
placeholder: 'e.g., tabz0qy4.ini, tabad168.ini, or tabula.ini',
|
|
55
|
+
description: 'The tabula.ini file for your Priority instance',
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Language',
|
|
60
|
+
name: 'language',
|
|
61
|
+
type: 'options',
|
|
62
|
+
options: [
|
|
63
|
+
{ name: 'English', value: 3 },
|
|
64
|
+
{ name: 'Hebrew', value: 1 },
|
|
65
|
+
{ name: 'Arabic', value: 2 },
|
|
66
|
+
],
|
|
67
|
+
default: 3,
|
|
68
|
+
description: 'The language for Priority ERP responses',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Username',
|
|
72
|
+
name: 'username',
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: '',
|
|
75
|
+
description: 'Priority user with Web/GUI license (not API user)',
|
|
76
|
+
required: true,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Password',
|
|
80
|
+
name: 'password',
|
|
81
|
+
type: 'string',
|
|
82
|
+
typeOptions: {
|
|
83
|
+
password: true,
|
|
84
|
+
},
|
|
85
|
+
default: '',
|
|
86
|
+
description: 'Password for the WebSDK user',
|
|
87
|
+
required: true,
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
this.test = {
|
|
91
|
+
request: {
|
|
92
|
+
url: 'https://sdkauth-tckpzoz3nq-zf.a.run.app/api/priority/sdkauth',
|
|
93
|
+
method: 'POST',
|
|
94
|
+
timeout: 300000,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
async authenticate(credentials, requestOptions) {
|
|
99
|
+
if (!requestOptions.headers) {
|
|
100
|
+
requestOptions.headers = {};
|
|
101
|
+
}
|
|
102
|
+
const username = credentials.username;
|
|
103
|
+
const password = credentials.password;
|
|
104
|
+
const authString = `${username}:${password}`;
|
|
105
|
+
const auth = Buffer.from(authString).toString('base64');
|
|
106
|
+
const fullUrl = requestOptions.url || '';
|
|
107
|
+
const isTestRequest = fullUrl.includes('sdkauth');
|
|
108
|
+
if (isTestRequest) {
|
|
109
|
+
requestOptions.headers['perm'] = getRouterPerm();
|
|
110
|
+
requestOptions.headers['token'] = credentials.token;
|
|
111
|
+
requestOptions.headers['Authorization'] = `Basic ${auth}`;
|
|
112
|
+
requestOptions.headers['password'] = Buffer.from(password).toString('base64');
|
|
113
|
+
requestOptions.headers['language'] = String(credentials.language || 3);
|
|
114
|
+
requestOptions.body = {
|
|
115
|
+
username: Buffer.from(username).toString('base64'),
|
|
116
|
+
password: Buffer.from(password).toString('base64'),
|
|
117
|
+
url: credentials.apiUrl,
|
|
118
|
+
tabulaini: credentials.tabulaIni,
|
|
119
|
+
company: credentials.companyName,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
requestOptions.headers['Authorization'] = `Basic ${auth}`;
|
|
124
|
+
requestOptions.headers['perm'] = getRouterPerm();
|
|
125
|
+
requestOptions.headers['COMPANY_NAME'] = credentials.companyName;
|
|
126
|
+
requestOptions.headers['TABULA_INI'] = credentials.tabulaIni;
|
|
127
|
+
requestOptions.headers['API_url'] = credentials.apiUrl;
|
|
128
|
+
requestOptions.headers['token'] = credentials.token;
|
|
129
|
+
requestOptions.headers['language'] = String(credentials.language || 3);
|
|
130
|
+
}
|
|
131
|
+
return requestOptions;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.PriorityErpWebSdk = PriorityErpWebSdk;
|