@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.
Files changed (48) hide show
  1. package/LICENSE +27 -15
  2. package/dist/LICENSE +27 -15
  3. package/dist/credentials/PriorityErpApi.credentials.js +134 -1
  4. package/dist/credentials/PriorityErpWebSdk.credentials.js +134 -1
  5. package/dist/nodes/PriorityERP/PriorityERP.node.js +311 -1
  6. package/dist/nodes/PriorityERP/actions/batch/batch.properties.js +83 -1
  7. package/dist/nodes/PriorityERP/actions/batch/execute.operation.js +43 -1
  8. package/dist/nodes/PriorityERP/actions/batch/index.js +8 -1
  9. package/dist/nodes/PriorityERP/actions/entity/create.operation.js +13 -1
  10. package/dist/nodes/PriorityERP/actions/entity/delete.operation.js +12 -1
  11. package/dist/nodes/PriorityERP/actions/entity/entity.properties.js +296 -1
  12. package/dist/nodes/PriorityERP/actions/entity/get.operation.js +35 -1
  13. package/dist/nodes/PriorityERP/actions/entity/getMany.operation.js +43 -1
  14. package/dist/nodes/PriorityERP/actions/entity/index.js +16 -1
  15. package/dist/nodes/PriorityERP/actions/entity/update.operation.js +14 -1
  16. package/dist/nodes/PriorityERP/actions/file/download.operation.js +23 -1
  17. package/dist/nodes/PriorityERP/actions/file/file.properties.js +123 -1
  18. package/dist/nodes/PriorityERP/actions/file/getFiles.operation.js +16 -1
  19. package/dist/nodes/PriorityERP/actions/file/index.js +12 -1
  20. package/dist/nodes/PriorityERP/actions/file/upload.operation.js +26 -1
  21. package/dist/nodes/PriorityERP/actions/procedure/activate.operation.js +33 -1
  22. package/dist/nodes/PriorityERP/actions/procedure/activateSubForm.operation.js +37 -1
  23. package/dist/nodes/PriorityERP/actions/procedure/index.js +10 -1
  24. package/dist/nodes/PriorityERP/actions/procedure/procedure.properties.js +157 -1
  25. package/dist/nodes/PriorityERP/actions/subForm/create.operation.js +15 -1
  26. package/dist/nodes/PriorityERP/actions/subForm/delete.operation.js +14 -1
  27. package/dist/nodes/PriorityERP/actions/subForm/get.operation.js +37 -1
  28. package/dist/nodes/PriorityERP/actions/subForm/getMany.operation.js +45 -1
  29. package/dist/nodes/PriorityERP/actions/subForm/index.js +16 -1
  30. package/dist/nodes/PriorityERP/actions/subForm/subForm.properties.js +304 -1
  31. package/dist/nodes/PriorityERP/actions/subForm/update.operation.js +16 -1
  32. package/dist/nodes/PriorityERP/actions/subSubForm/create.operation.js +17 -1
  33. package/dist/nodes/PriorityERP/actions/subSubForm/delete.operation.js +16 -1
  34. package/dist/nodes/PriorityERP/actions/subSubForm/get.operation.js +39 -1
  35. package/dist/nodes/PriorityERP/actions/subSubForm/getMany.operation.js +47 -1
  36. package/dist/nodes/PriorityERP/actions/subSubForm/index.js +16 -1
  37. package/dist/nodes/PriorityERP/actions/subSubForm/subSubForm.properties.js +296 -1
  38. package/dist/nodes/PriorityERP/actions/subSubForm/update.operation.js +18 -1
  39. package/dist/nodes/PriorityERP/actions/text/getText.operation.js +16 -1
  40. package/dist/nodes/PriorityERP/actions/text/index.js +10 -1
  41. package/dist/nodes/PriorityERP/actions/text/setText.operation.js +19 -1
  42. package/dist/nodes/PriorityERP/actions/text/text.properties.js +107 -1
  43. package/dist/nodes/PriorityERP/helpers/odata.js +54 -1
  44. package/dist/nodes/PriorityERP/helpers/utils.js +62 -1
  45. package/dist/nodes/PriorityERP/methods/loadOptions.js +643 -1
  46. package/dist/nodes/PriorityERP/transport/priorityApi.js +203 -1
  47. package/dist/package.json +2 -2
  48. package/package.json +3 -3
@@ -1 +1,107 @@
1
- 'use strict';var _0x575a61=_0xb235;(function(_0xeccc4c,_0x515245){var _0x329db3={_0x53f83e:0x141,_0x2cfe9b:0x13f,_0x511bee:0x163,_0x32c458:0x145,_0x4195f4:0x156,_0x219a6b:0x140,_0x11bee9:0x133,_0xb63fe7:0x142,_0x22c525:0x12f},_0xefe4ed=_0xb235,_0x17551c=_0xeccc4c();while(!![]){try{var _0xf4f2e7=parseInt(_0xefe4ed(_0x329db3._0x53f83e))/0x1+-parseInt(_0xefe4ed(0x14a))/0x2*(-parseInt(_0xefe4ed(_0x329db3._0x2cfe9b))/0x3)+parseInt(_0xefe4ed(_0x329db3._0x511bee))/0x4+parseInt(_0xefe4ed(_0x329db3._0x32c458))/0x5*(-parseInt(_0xefe4ed(_0x329db3._0x4195f4))/0x6)+-parseInt(_0xefe4ed(_0x329db3._0x219a6b))/0x7+parseInt(_0xefe4ed(0x143))/0x8*(parseInt(_0xefe4ed(_0x329db3._0x11bee9))/0x9)+-parseInt(_0xefe4ed(_0x329db3._0xb63fe7))/0xa*(parseInt(_0xefe4ed(_0x329db3._0x22c525))/0xb);if(_0xf4f2e7===_0x515245)break;else _0x17551c['push'](_0x17551c['shift']());}catch(_0x263591){_0x17551c['push'](_0x17551c['shift']());}}}(_0x468c,0xe3f23));var _0x4ae0a0={};_0x4ae0a0[_0x575a61(0x13d)]=!![],Object[_0x575a61(0x161)](exports,_0x575a61(0x168),_0x4ae0a0),exports[_0x575a61(0x159)]=exports['textOperations']=void 0x0;var _0xd3c0c={};_0xd3c0c[_0x575a61(0x139)]=[_0x575a61(0x152)];var _0x5ede6d={};_0x5ede6d[_0x575a61(0x166)]=_0xd3c0c;var _0x245093={};_0x245093[_0x575a61(0x138)]=_0x575a61(0x155),_0x245093[_0x575a61(0x13d)]=_0x575a61(0x164),_0x245093['description']=_0x575a61(0x13c),_0x245093[_0x575a61(0x154)]=_0x575a61(0x14f);var _0x35f6fe={};_0x35f6fe[_0x575a61(0x138)]=_0x575a61(0x147),_0x35f6fe[_0x575a61(0x13d)]='setText',_0x35f6fe[_0x575a61(0x151)]=_0x575a61(0x12e),_0x35f6fe[_0x575a61(0x154)]='Set\x20text\x20content';var _0x2822e8={};_0x2822e8[_0x575a61(0x14c)]='Operation',_0x2822e8[_0x575a61(0x138)]=_0x575a61(0x134),_0x2822e8[_0x575a61(0x157)]=_0x575a61(0x14b),_0x2822e8[_0x575a61(0x130)]=!![],_0x2822e8[_0x575a61(0x149)]=_0x5ede6d,_0x2822e8[_0x575a61(0x14b)]=[_0x245093,_0x35f6fe],_0x2822e8[_0x575a61(0x144)]=_0x575a61(0x164),exports[_0x575a61(0x13a)]=_0x2822e8;var _0x316d33={};_0x316d33['loadOptionsMethod']='getForms';var _0x1144ea={};_0x1144ea[_0x575a61(0x139)]=[_0x575a61(0x152)];var _0x5a8f54={};_0x5a8f54[_0x575a61(0x166)]=_0x1144ea;var _0x4746ff={};_0x4746ff[_0x575a61(0x14c)]=_0x575a61(0x153),_0x4746ff['name']=_0x575a61(0x148),_0x4746ff[_0x575a61(0x157)]=_0x575a61(0x14b),_0x4746ff[_0x575a61(0x167)]=_0x316d33,_0x4746ff['required']=!![],_0x4746ff[_0x575a61(0x149)]=_0x5a8f54,_0x4746ff[_0x575a61(0x144)]='',_0x4746ff[_0x575a61(0x151)]=_0x575a61(0x136);var _0x291f77={};_0x291f77['resource']=[_0x575a61(0x152)];var _0x52243f={};_0x52243f[_0x575a61(0x166)]=_0x291f77;var _0x3ad702={};_0x3ad702[_0x575a61(0x14c)]=_0x575a61(0x132),_0x3ad702[_0x575a61(0x138)]=_0x575a61(0x131),_0x3ad702[_0x575a61(0x157)]=_0x575a61(0x160),_0x3ad702['required']=!![],_0x3ad702[_0x575a61(0x149)]=_0x52243f,_0x3ad702['default']='',_0x3ad702[_0x575a61(0x151)]=_0x575a61(0x165);var _0x31af46={};_0x31af46[_0x575a61(0x15c)]=_0x575a61(0x15a);var _0x3d8286={};_0x3d8286[_0x575a61(0x139)]=[_0x575a61(0x152)];var _0x525344={};_0x525344[_0x575a61(0x166)]=_0x3d8286;var _0x88b1fd={};_0x88b1fd[_0x575a61(0x14c)]='Sub-Form\x20Name',_0x88b1fd[_0x575a61(0x138)]=_0x575a61(0x137),_0x88b1fd[_0x575a61(0x157)]='options',_0x88b1fd[_0x575a61(0x167)]=_0x31af46,_0x88b1fd[_0x575a61(0x13b)]=!![],_0x88b1fd[_0x575a61(0x149)]=_0x525344,_0x88b1fd[_0x575a61(0x144)]='',_0x88b1fd[_0x575a61(0x151)]='The\x20sub-form\x20containing\x20the\x20text\x20field.\x20Switch\x20to\x20expression\x20mode\x20to\x20type\x20manually.';var _0x38ee8b={};_0x38ee8b['resource']=[_0x575a61(0x152)];var _0x1a02da={};_0x1a02da['show']=_0x38ee8b;var _0x1a648e={};_0x1a648e[_0x575a61(0x14c)]='Sub-Form\x20ID',_0x1a648e[_0x575a61(0x138)]=_0x575a61(0x146),_0x1a648e['type']=_0x575a61(0x160),_0x1a648e[_0x575a61(0x13b)]=!![],_0x1a648e['displayOptions']=_0x1a02da,_0x1a648e[_0x575a61(0x144)]='',_0x1a648e[_0x575a61(0x151)]='The\x20ID\x20of\x20the\x20sub-form\x20record';var _0x6a6e96={};_0x6a6e96['loadOptionsMethod']=_0x575a61(0x162);var _0x2e19fa={};_0x2e19fa[_0x575a61(0x139)]=[_0x575a61(0x152)];var _0x184239={};_0x184239[_0x575a61(0x166)]=_0x2e19fa;var _0x386c1d={};_0x386c1d[_0x575a61(0x14c)]=_0x575a61(0x15b),_0x386c1d['name']=_0x575a61(0x135),_0x386c1d[_0x575a61(0x157)]=_0x575a61(0x14b),_0x386c1d['typeOptions']=_0x6a6e96,_0x386c1d['required']=!![],_0x386c1d[_0x575a61(0x149)]=_0x184239,_0x386c1d[_0x575a61(0x144)]='',_0x386c1d['description']='The\x20text\x20sub-form\x20name.\x20Switch\x20to\x20expression\x20mode\x20to\x20type\x20manually.';function _0xb235(_0x2b86b9,_0x4453e6){_0x2b86b9=_0x2b86b9-0x12e;var _0x468c7e=_0x468c();var _0xb2355a=_0x468c7e[_0x2b86b9];if(_0xb235['ByCnlo']===undefined){var _0x301eba=function(_0x3ffb64){var _0x50d903='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4ae0a0='',_0xd3c0c='';for(var _0x5ede6d=0x0,_0x245093,_0x35f6fe,_0x2822e8=0x0;_0x35f6fe=_0x3ffb64['charAt'](_0x2822e8++);~_0x35f6fe&&(_0x245093=_0x5ede6d%0x4?_0x245093*0x40+_0x35f6fe:_0x35f6fe,_0x5ede6d++%0x4)?_0x4ae0a0+=String['fromCharCode'](0xff&_0x245093>>(-0x2*_0x5ede6d&0x6)):0x0){_0x35f6fe=_0x50d903['indexOf'](_0x35f6fe);}for(var _0x316d33=0x0,_0x1144ea=_0x4ae0a0['length'];_0x316d33<_0x1144ea;_0x316d33++){_0xd3c0c+='%'+('00'+_0x4ae0a0['charCodeAt'](_0x316d33)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xd3c0c);};_0xb235['dAfyRH']=_0x301eba,_0xb235['icSlPY']={},_0xb235['ByCnlo']=!![];}var _0xf572c1=_0x468c7e[0x0],_0x217376=_0x2b86b9+_0xf572c1,_0x3a4537=_0xb235['icSlPY'][_0x217376];return!_0x3a4537?(_0xb2355a=_0xb235['dAfyRH'](_0xb2355a),_0xb235['icSlPY'][_0x217376]=_0xb2355a):_0xb2355a=_0x3a4537,_0xb2355a;}var _0x1b1977={};_0x1b1977['rows']=0x5;var _0x3e3ba0={};_0x3e3ba0[_0x575a61(0x139)]=[_0x575a61(0x152)],_0x3e3ba0[_0x575a61(0x134)]=[_0x575a61(0x14e)];var _0x219eae={};_0x219eae[_0x575a61(0x166)]=_0x3e3ba0;function _0x468c(){var _0x32c7fb=['Dgv4DezPzwXKCW','z2v0u3vIrM9YBxm','vgv4DcbtDwiTrM9YBsboyw1L','Bg9Hze9WDgLVBNnnzxrOB2q','vgv4DcbgAwvSzcboyw1L','vevyva','vgHLigzPzwXKig5HBwuGDgHHDcbOB2XKCYb0AguGDgv4DcaODxn1ywXSEsburvHukq','C3rYAw5N','zgvMAw5LuhjVCgvYDhK','z2v0vgv4Dfn1yKzVCM1Z','ntq0mZiWmffys1DNrq','z2v0vgv4Da','vgHLieLeig9MihrOzsbWyxjLBNqGCMvJB3jK','C2HVDW','DhLWzu9WDgLVBNm','x19LC01VzhvSzq','u2v0ihrLEhqGy29UDgvUDcbVBIbHihn1yI1MB3jT','mZe5mZeYnZniuuzYBhK','BM9eyxrHrxHWCMvZC2LVBG','CMvJB3jKswq','uMvJB3jKieLe','mZmZD2HSuhzQ','B3bLCMf0Aw9U','Dgv4Dfn1yKzVCM1oyw1L','vgHLihbHCMvUDcbMB3jTig5HBwuUifn3AxrJAcb0BYbLEhbYzxnZAw9Uig1VzguGDg8GDhLWzsbTyw51ywXSEs4','C3vIrM9YBu5HBwu','BMfTzq','CMvZB3vYy2u','Dgv4De9WzxjHDgLVBNm','CMvXDwLYzwq','r2v0ihrLEhqGy29UDgvUDcbMCM9TigeGC3vIlwzVCM0','DMfSDwu','Dgv4DenVBNrLBNq','mJi1q1ztBNDU','mZGWntq4wunUvgTT','mtu2odG1mKrZsef5yq','mtbJqLfWEfe','mtqYmZi4zgXYvu5y','zgvMyxvSDa','ntbstNvrt1e','C3vIrM9YBuLK','u2v0ifrLEhq','zM9YBu5HBwu','zgLZCgXHEu9WDgLVBNm','mJm0ndjVr0jyuvy','B3b0Aw9UCW','zgLZCgXHEu5HBwu','vgHLihrLEhqGy29UDgvUDcb0BYbZzxq','C2v0vgv4Da','r2v0ihrLEhqGy29UDgvUDa','vgv4DcbdB250zw50','zgvZy3jPChrPB24','Dgv4Da','rM9YBsboyw1L','ywn0Aw9U','r2v0ifrLEhq','mZq1nJCYz2PrD25v','DhLWzq','Dgv4DezPzwXKtMfTzq'];_0x468c=function(){return _0x32c7fb;};return _0x468c();}var _0xf0b9a={};_0xf0b9a[_0x575a61(0x14c)]=_0x575a61(0x150),_0xf0b9a[_0x575a61(0x138)]=_0x575a61(0x13e),_0xf0b9a[_0x575a61(0x157)]=_0x575a61(0x160),_0xf0b9a[_0x575a61(0x167)]=_0x1b1977,_0xf0b9a[_0x575a61(0x13b)]=!![],_0xf0b9a[_0x575a61(0x149)]=_0x219eae,_0xf0b9a[_0x575a61(0x144)]='',_0xf0b9a['description']=_0x575a61(0x14d);var _0x137941={};_0x137941[_0x575a61(0x139)]=['text'];var _0x4556df={};_0x4556df[_0x575a61(0x166)]=_0x137941;var _0x1b487a={};_0x1b487a[_0x575a61(0x14c)]=_0x575a61(0x15d),_0x1b487a[_0x575a61(0x138)]=_0x575a61(0x158),_0x1b487a[_0x575a61(0x157)]='string',_0x1b487a[_0x575a61(0x149)]=_0x4556df,_0x1b487a[_0x575a61(0x144)]=_0x575a61(0x15e),_0x1b487a[_0x575a61(0x151)]=_0x575a61(0x15f),exports[_0x575a61(0x159)]=[_0x4746ff,_0x3ad702,_0x88b1fd,_0x1a648e,_0x386c1d,_0xf0b9a,_0x1b487a];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.textFields = exports.textOperations = void 0;
4
+ exports.textOperations = {
5
+ displayName: 'Operation',
6
+ name: 'operation',
7
+ type: 'options',
8
+ noDataExpression: true,
9
+ displayOptions: {
10
+ show: {
11
+ resource: ['text'],
12
+ },
13
+ },
14
+ options: [
15
+ {
16
+ name: 'Get Text',
17
+ value: 'getText',
18
+ description: 'Get text content from a sub-form',
19
+ action: 'Get text content',
20
+ },
21
+ {
22
+ name: 'Set Text',
23
+ value: 'setText',
24
+ description: 'Set text content on a sub-form',
25
+ action: 'Set text content',
26
+ },
27
+ ],
28
+ default: 'getText',
29
+ };
30
+ exports.textFields = [
31
+ {
32
+ displayName: 'Form Name',
33
+ name: 'formName',
34
+ type: 'options',
35
+ typeOptions: {
36
+ loadOptionsMethod: 'getForms',
37
+ },
38
+ required: true,
39
+ displayOptions: { show: { resource: ['text'] } },
40
+ default: '',
41
+ description: 'The parent form name. Switch to expression mode to type manually.',
42
+ },
43
+ {
44
+ displayName: 'Record ID',
45
+ name: 'recordId',
46
+ type: 'string',
47
+ required: true,
48
+ displayOptions: { show: { resource: ['text'] } },
49
+ default: '',
50
+ description: 'The ID of the parent record',
51
+ },
52
+ {
53
+ displayName: 'Sub-Form Name',
54
+ name: 'subFormName',
55
+ type: 'options',
56
+ typeOptions: {
57
+ loadOptionsMethod: 'getSubForms',
58
+ },
59
+ required: true,
60
+ displayOptions: { show: { resource: ['text'] } },
61
+ default: '',
62
+ description: 'The sub-form containing the text field. Switch to expression mode to type manually.',
63
+ },
64
+ {
65
+ displayName: 'Sub-Form ID',
66
+ name: 'subFormId',
67
+ type: 'string',
68
+ required: true,
69
+ displayOptions: { show: { resource: ['text'] } },
70
+ default: '',
71
+ description: 'The ID of the sub-form record',
72
+ },
73
+ {
74
+ displayName: 'Text Sub-Form Name',
75
+ name: 'textSubFormName',
76
+ type: 'options',
77
+ typeOptions: {
78
+ loadOptionsMethod: 'getTextSubForms',
79
+ },
80
+ required: true,
81
+ displayOptions: { show: { resource: ['text'] } },
82
+ default: '',
83
+ description: 'The text sub-form name. Switch to expression mode to type manually.',
84
+ },
85
+ {
86
+ displayName: 'Text Content',
87
+ name: 'textContent',
88
+ type: 'string',
89
+ typeOptions: {
90
+ rows: 5,
91
+ },
92
+ required: true,
93
+ displayOptions: {
94
+ show: { resource: ['text'], operation: ['setText'] },
95
+ },
96
+ default: '',
97
+ description: 'The text content to set',
98
+ },
99
+ {
100
+ displayName: 'Text Field Name',
101
+ name: 'textFieldName',
102
+ type: 'string',
103
+ displayOptions: { show: { resource: ['text'] } },
104
+ default: 'TEXT',
105
+ description: 'The field name that holds the text (usually TEXT)',
106
+ },
107
+ ];
@@ -1 +1,54 @@
1
- 'use strict';const _0x372c4e=_0x10fd;(function(_0x32a0d6,_0x14841c){const _0x50a8ce={_0xacb247:0x127,_0x2f3cd9:0x111,_0x3f9929:0x10e,_0x5920b8:0x11a,_0x182b7d:0x132,_0x43f5bd:0x11b},_0x274669=_0x10fd,_0x53a572=_0x32a0d6();while(!![]){try{const _0x2c7d19=parseInt(_0x274669(0x10d))/0x1+-parseInt(_0x274669(_0x50a8ce._0xacb247))/0x2+-parseInt(_0x274669(_0x50a8ce._0x2f3cd9))/0x3+-parseInt(_0x274669(_0x50a8ce._0x3f9929))/0x4*(-parseInt(_0x274669(_0x50a8ce._0x5920b8))/0x5)+parseInt(_0x274669(0x110))/0x6+parseInt(_0x274669(_0x50a8ce._0x182b7d))/0x7*(parseInt(_0x274669(0x114))/0x8)+-parseInt(_0x274669(0x12d))/0x9*(parseInt(_0x274669(_0x50a8ce._0x43f5bd))/0xa);if(_0x2c7d19===_0x14841c)break;else _0x53a572['push'](_0x53a572['shift']());}catch(_0x224df0){_0x53a572['push'](_0x53a572['shift']());}}}(_0x4064,0x27d02));const _0x5605e1={};_0x5605e1[_0x372c4e(0x136)]=!![],Object[_0x372c4e(0x131)](exports,_0x372c4e(0x135),_0x5605e1),exports[_0x372c4e(0x124)]=buildODataQuery,exports['buildFilterString']=buildFilterString,exports['buildOrderByString']=buildOrderByString;function buildODataQuery(_0x1c5fbf){const _0x2881d6={_0x5e9e87:0x116,_0x416b17:0x121,_0x1b9aa0:0x123,_0x18bc1e:0x10a,_0x2aed44:0x123,_0x5857f3:0x123,_0x1ffbc1:0x12e,_0x9b9a6b:0x118,_0x104642:0x115,_0xfebc74:0x12a,_0x571816:0x128,_0x523966:0x12c},_0x327557=_0x372c4e,_0x4ddd82={};_0x4ddd82[_0x327557(_0x2881d6._0x5e9e87)]=function(_0x127e7f,_0x158c2e){return _0x127e7f===_0x158c2e;},_0x4ddd82['FvbyH']='poQRl',_0x4ddd82[_0x327557(0x138)]=_0x327557(_0x2881d6._0x416b17);const _0x55e633=_0x4ddd82,_0x5f17e0={};_0x1c5fbf[_0x327557(_0x2881d6._0x1b9aa0)]&&(_0x55e633[_0x327557(0x116)](_0x55e633[_0x327557(_0x2881d6._0x18bc1e)],_0x55e633[_0x327557(0x138)])?_0x2eeb99['push'](_0x1e55ce+'\x20'+_0x235378+'\x20\x27'+_0xf404b8+'\x27'):_0x5f17e0[_0x327557(0x11c)]=Array[_0x327557(0x120)](_0x1c5fbf[_0x327557(_0x2881d6._0x2aed44)])?_0x1c5fbf['select'][_0x327557(0x10c)](','):_0x1c5fbf[_0x327557(_0x2881d6._0x5857f3)]);if(_0x1c5fbf[_0x327557(0x113)])_0x5f17e0['$filter']=_0x1c5fbf[_0x327557(0x113)];if(_0x1c5fbf['orderby'])_0x5f17e0[_0x327557(_0x2881d6._0x1ffbc1)]=_0x1c5fbf[_0x327557(0x11d)];_0x1c5fbf[_0x327557(_0x2881d6._0x9b9a6b)]&&(_0x5f17e0['$expand']=Array[_0x327557(0x120)](_0x1c5fbf['expand'])?_0x1c5fbf['expand']['join'](','):_0x1c5fbf[_0x327557(0x118)]);if(_0x1c5fbf[_0x327557(_0x2881d6._0x104642)])_0x5f17e0[_0x327557(_0x2881d6._0xfebc74)]=_0x1c5fbf[_0x327557(0x115)];if(_0x1c5fbf[_0x327557(0x117)])_0x5f17e0[_0x327557(_0x2881d6._0x571816)]=_0x1c5fbf[_0x327557(0x117)];if(_0x1c5fbf[_0x327557(0x11e)])_0x5f17e0[_0x327557(_0x2881d6._0x523966)]=_0x1c5fbf[_0x327557(0x11e)];return _0x5f17e0;}function _0x4064(){const _0x3b4091=['zuXVBM4','nty5mZy0v09Azhfd','jhnRAxa','yxnJ','jhrVCa','y29SDw1U','jhnPBMnL','mJDIzeLlqxq','jg9YzgvYyNK','ChvZAa','swrUBvu','zgvMAw5LuhjVCgvYDhK','mti0nMjzD2Hmvq','CwXUyMq','uxbwrNO','x19LC01VzhvSzq','DMfSDwu','y29UDgfPBNm','Cej6svy','rNzIEuG','rvb2tha','AM9PBG','mtC5mZC1zhDlAgzu','odGWnJHgz294AgC','igfUzca','mteZmtG4mNztq3DJta','ndu2mJK3DgT6q2ve','Aw5JBhvKzxm','zMLSDgvY','ntq2ngH4Cw9rDq','Dg9W','yNbltKm','C2TPCa','zxHWyw5K','sNPrt2u','nJbxzhDvyw0','nteZmtuWrKv4swn3','jhnLBgvJDa','B3jKzxjIEq','C2LUy2u','zw5KC3DPDgG','AxnbCNjHEq','u2vdzNC','tvfhrhi','C2vSzwn0','yNvPBgrprgf0yvf1zxj5','BM9otui'];_0x4064=function(){return _0x3b4091;};return _0x4064();}function _0x10fd(_0x3e88c2,_0x39a8e9){_0x3e88c2=_0x3e88c2-0x10a;const _0x406478=_0x4064();let _0x10fd0b=_0x406478[_0x3e88c2];if(_0x10fd['xUchVU']===undefined){var _0x23a8ba=function(_0x1ddb88){const _0x4ee997='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5167d1='',_0x4b349c='';for(let _0x1033cb=0x0,_0x4a9b04,_0x4c6a4e,_0x2b6c0f=0x0;_0x4c6a4e=_0x1ddb88['charAt'](_0x2b6c0f++);~_0x4c6a4e&&(_0x4a9b04=_0x1033cb%0x4?_0x4a9b04*0x40+_0x4c6a4e:_0x4c6a4e,_0x1033cb++%0x4)?_0x5167d1+=String['fromCharCode'](0xff&_0x4a9b04>>(-0x2*_0x1033cb&0x6)):0x0){_0x4c6a4e=_0x4ee997['indexOf'](_0x4c6a4e);}for(let _0x20582a=0x0,_0x2b6f28=_0x5167d1['length'];_0x20582a<_0x2b6f28;_0x20582a++){_0x4b349c+='%'+('00'+_0x5167d1['charCodeAt'](_0x20582a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b349c);};_0x10fd['AjBGvz']=_0x23a8ba,_0x10fd['WBNxFO']={},_0x10fd['xUchVU']=!![];}const _0x45976a=_0x406478[0x0],_0x5d82a8=_0x3e88c2+_0x45976a,_0x566d79=_0x10fd['WBNxFO'][_0x5d82a8];return!_0x566d79?(_0x10fd0b=_0x10fd['AjBGvz'](_0x10fd0b),_0x10fd['WBNxFO'][_0x5d82a8]=_0x10fd0b):_0x10fd0b=_0x566d79,_0x10fd0b;}function buildFilterString(_0x1926d8){const _0x37a3cc={_0x1a3c1c:0x10b,_0x1f849f:0x133,_0x476de4:0x11f,_0x3a78e2:0x134,_0x343aea:0x10f,_0x3b24a9:0x133,_0x1f683a:0x130,_0x5a0fed:0x123,_0x56d78b:0x11c,_0x3a9953:0x10c,_0x1109f9:0x11d,_0x9a76ac:0x12a,_0x241543:0x115,_0x8bd025:0x117,_0x2f64dd:0x12c,_0x13e5e7:0x12b,_0x182956:0x136,_0x48fa8c:0x134,_0xb7210a:0x112,_0x5706e1:0x12f,_0x26c224:0x10c},_0x2a4a7a=_0x372c4e,_0x5008fe={};_0x5008fe[_0x2a4a7a(0x122)]=_0x2a4a7a(0x137),_0x5008fe[_0x2a4a7a(_0x37a3cc._0x1a3c1c)]='startswith',_0x5008fe[_0x2a4a7a(_0x37a3cc._0x1f849f)]=_0x2a4a7a(_0x37a3cc._0x476de4),_0x5008fe[_0x2a4a7a(0x125)]=function(_0x3223f1,_0x63a178){return _0x3223f1===_0x63a178;},_0x5008fe[_0x2a4a7a(0x130)]='FDLRh',_0x5008fe[_0x2a4a7a(_0x37a3cc._0x3a78e2)]=function(_0x3f274e,_0x350cb5){return _0x3f274e||_0x350cb5;},_0x5008fe['JzQOe']=_0x2a4a7a(_0x37a3cc._0x343aea);const _0x25d62c=_0x5008fe,_0xa6f303=[_0x25d62c[_0x2a4a7a(0x122)],_0x25d62c[_0x2a4a7a(_0x37a3cc._0x1a3c1c)],_0x25d62c[_0x2a4a7a(_0x37a3cc._0x3b24a9)]],_0x3b3108=[];for(const _0x5e4afc of _0x1926d8){if(_0x25d62c[_0x2a4a7a(0x125)](_0x2a4a7a(0x126),_0x25d62c[_0x2a4a7a(_0x37a3cc._0x1f683a)])){const _0x426439={};_0x44dc12[_0x2a4a7a(_0x37a3cc._0x5a0fed)]&&(_0x426439[_0x2a4a7a(_0x37a3cc._0x56d78b)]=_0x232b48['isArray'](_0x3ef070['select'])?_0x55459b['select'][_0x2a4a7a(_0x37a3cc._0x3a9953)](','):_0x2428e6[_0x2a4a7a(_0x37a3cc._0x5a0fed)]);if(_0x1c5632[_0x2a4a7a(0x113)])_0x426439['$filter']=_0x35d23c[_0x2a4a7a(0x113)];if(_0x3d261a[_0x2a4a7a(0x11d)])_0x426439[_0x2a4a7a(0x12e)]=_0x5a1ab3[_0x2a4a7a(_0x37a3cc._0x1109f9)];_0xcdb573['expand']&&(_0x426439['$expand']=_0x5c09cc[_0x2a4a7a(0x120)](_0x14854c[_0x2a4a7a(0x118)])?_0x4808a3['expand']['join'](','):_0x4fac83[_0x2a4a7a(0x118)]);if(_0x4667dd['top'])_0x426439[_0x2a4a7a(_0x37a3cc._0x9a76ac)]=_0x41ea01[_0x2a4a7a(_0x37a3cc._0x241543)];if(_0x21bcaf[_0x2a4a7a(_0x37a3cc._0x8bd025)])_0x426439['$skip']=_0x596170[_0x2a4a7a(_0x37a3cc._0x8bd025)];if(_0x15b814['since'])_0x426439[_0x2a4a7a(_0x37a3cc._0x2f64dd)]=_0x4bc108['since'];return _0x426439;}else{const _0x57468a=_0x5e4afc[_0x2a4a7a(_0x37a3cc._0x13e5e7)],_0x352919=_0x5e4afc['operator'],_0x17fe70=_0x5e4afc[_0x2a4a7a(_0x37a3cc._0x182956)];if(_0x25d62c[_0x2a4a7a(_0x37a3cc._0x48fa8c)](!_0x57468a,!_0x352919))continue;_0xa6f303[_0x2a4a7a(_0x37a3cc._0xb7210a)](_0x352919)?_0x3b3108[_0x2a4a7a(_0x37a3cc._0x5706e1)](_0x352919+'('+_0x57468a+',\x27'+_0x17fe70+'\x27)'):_0x3b3108[_0x2a4a7a(_0x37a3cc._0x5706e1)](_0x57468a+'\x20'+_0x352919+'\x20\x27'+_0x17fe70+'\x27');}}return _0x3b3108[_0x2a4a7a(_0x37a3cc._0x26c224)](_0x25d62c[_0x2a4a7a(0x119)]);}function buildOrderByString(_0x4abbde){const _0x39c4d9={_0x2bf29a:0x129,_0x1d1b1b:0x10c},_0x489437=_0x372c4e,_0x593166=[];for(const _0x4e0569 of _0x4abbde){const _0x267b1c=_0x4e0569['column'],_0x36540c=_0x4e0569['direction']||_0x489437(_0x39c4d9._0x2bf29a);if(!_0x267b1c)continue;_0x593166['push'](_0x267b1c+'\x20'+_0x36540c);}return _0x593166[_0x489437(_0x39c4d9._0x1d1b1b)](',\x20');}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildODataQuery = buildODataQuery;
4
+ exports.buildFilterString = buildFilterString;
5
+ exports.buildOrderByString = buildOrderByString;
6
+ function buildODataQuery(options) {
7
+ const qs = {};
8
+ if (options.select) {
9
+ qs.$select = Array.isArray(options.select) ? options.select.join(',') : options.select;
10
+ }
11
+ if (options.filter)
12
+ qs.$filter = options.filter;
13
+ if (options.orderby)
14
+ qs.$orderby = options.orderby;
15
+ if (options.expand) {
16
+ qs.$expand = Array.isArray(options.expand) ? options.expand.join(',') : options.expand;
17
+ }
18
+ if (options.top)
19
+ qs.$top = options.top;
20
+ if (options.skip)
21
+ qs.$skip = options.skip;
22
+ if (options.since)
23
+ qs.$since = options.since;
24
+ return qs;
25
+ }
26
+ function buildFilterString(filterValues) {
27
+ const functionOperators = ['contains', 'startswith', 'endswith'];
28
+ const parts = [];
29
+ for (const filter of filterValues) {
30
+ const column = filter.column;
31
+ const operator = filter.operator;
32
+ const value = filter.value;
33
+ if (!column || !operator)
34
+ continue;
35
+ if (functionOperators.includes(operator)) {
36
+ parts.push(`${operator}(${column},'${value}')`);
37
+ }
38
+ else {
39
+ parts.push(`${column} ${operator} '${value}'`);
40
+ }
41
+ }
42
+ return parts.join(' and ');
43
+ }
44
+ function buildOrderByString(sortValues) {
45
+ const parts = [];
46
+ for (const sort of sortValues) {
47
+ const column = sort.column;
48
+ const direction = sort.direction || 'asc';
49
+ if (!column)
50
+ continue;
51
+ parts.push(`${column} ${direction}`);
52
+ }
53
+ return parts.join(', ');
54
+ }
@@ -1 +1,62 @@
1
- 'use strict';const _0x3aa6b7=_0x532d;function _0x532d(_0x236859,_0x34ac1d){_0x236859=_0x236859-0x107;const _0x5643bc=_0x5643();let _0x532d65=_0x5643bc[_0x236859];if(_0x532d['NapXse']===undefined){var _0x4f6ce1=function(_0xfcdd95){const _0x2a57bf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ae287='',_0x45d1c1='';for(let _0x5cc172=0x0,_0x5bf80a,_0x55d406,_0x472d71=0x0;_0x55d406=_0xfcdd95['charAt'](_0x472d71++);~_0x55d406&&(_0x5bf80a=_0x5cc172%0x4?_0x5bf80a*0x40+_0x55d406:_0x55d406,_0x5cc172++%0x4)?_0x2ae287+=String['fromCharCode'](0xff&_0x5bf80a>>(-0x2*_0x5cc172&0x6)):0x0){_0x55d406=_0x2a57bf['indexOf'](_0x55d406);}for(let _0x4c9ecd=0x0,_0x32808c=_0x2ae287['length'];_0x4c9ecd<_0x32808c;_0x4c9ecd++){_0x45d1c1+='%'+('00'+_0x2ae287['charCodeAt'](_0x4c9ecd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x45d1c1);};_0x532d['OKzOhG']=_0x4f6ce1,_0x532d['RCpasp']={},_0x532d['NapXse']=!![];}const _0x2b8366=_0x5643bc[0x0],_0x415a6e=_0x236859+_0x2b8366,_0xebeaf3=_0x532d['RCpasp'][_0x415a6e];return!_0xebeaf3?(_0x532d65=_0x532d['OKzOhG'](_0x532d65),_0x532d['RCpasp'][_0x415a6e]=_0x532d65):_0x532d65=_0xebeaf3,_0x532d65;}(function(_0x1fe35d,_0x5b365e){const _0x3e3859={_0x14eae1:0x117,_0x4a26e0:0x122,_0x5f4a5b:0x108},_0x3df6d9=_0x532d,_0x4ef6c0=_0x1fe35d();while(!![]){try{const _0x4b8bdc=-parseInt(_0x3df6d9(_0x3e3859._0x14eae1))/0x1*(-parseInt(_0x3df6d9(0x12a))/0x2)+parseInt(_0x3df6d9(0x11e))/0x3+parseInt(_0x3df6d9(0x137))/0x4+parseInt(_0x3df6d9(_0x3e3859._0x4a26e0))/0x5+parseInt(_0x3df6d9(0x13d))/0x6*(-parseInt(_0x3df6d9(0x125))/0x7)+parseInt(_0x3df6d9(0x134))/0x8*(parseInt(_0x3df6d9(0x12b))/0x9)+-parseInt(_0x3df6d9(_0x3e3859._0x5f4a5b))/0xa*(parseInt(_0x3df6d9(0x124))/0xb);if(_0x4b8bdc===_0x5b365e)break;else _0x4ef6c0['push'](_0x4ef6c0['shift']());}catch(_0x5c78e0){_0x4ef6c0['push'](_0x4ef6c0['shift']());}}}(_0x5643,0x563ec));function _0x5643(){const _0x6af2b2=['mJu1nuTAsLPfra','y2fSBa','AgvSCgvYCW','BLvxwxK','zMv0y2HgAwvSzeXHyMvSCW','mtG4mZaYEg9OEwXg','mte0m09jELjeta','DMfSDwu','tNfxDei','se5tAvm','veXlv0S','Aur2qMy','rvnztNu','y29UBMvJDgLVBLr5Cgu','ANnVBG','mtq0ndbpzwnnAKS','u3rZywW','DKDdAeG','mJmXody3nMHTt2rmsW','CNjRu1y','y29SDw1UtMfTzq','vefctevFtKfnrq','tKDowgK','ELnIveq','nJy3mKTNsuPvvW','BKnnzKy','yMfZzvvsta','l3jWyY9YCgm','s1PTCK8','zgvZy3jPChrPB24','rhHfyw0','mtbqy05nAg8','CM91DgvY','ANPoDwG','Bwv0Ag9K','wNf0rgO','Ahr0Chm6lY9WAhaTyxbPltK0mtu3ndy0nJeZoc5Tzs13zxn0ms5YDw4UyxbWl2fWAs9WCMLVCML0Eq','CKjuyxG','uKvbra','zMLLBgrwywX1zq','zgvMAw5LuhjVCgvYDhK','zMLLBgroyw1L','ExzcA3O','A25kB3q','AgvHzgvYCW','AxnbCNjHEq','m2T5AKDMza','rg16wLO','yMfZzvjLCxvLC3rpChrPB25Z','BuDQBM0','BfPpzwy','Ahr0CfjLCxvLC3rxAxrOqxv0AgvUDgLJyxrPB24','zMLLBgrwywX1zxm','mtK2nta4mwvRv2fjzW','x19LC01VzhvSzq','DgLTzw91Da','DxjS','mty4ndC3nwjbyw1xwq','s3PqteW','mtq1nJyXodL1r2nMCg0'];_0x5643=function(){return _0x6af2b2;};return _0x5643();}const _0x1a35e2={};_0x1a35e2[_0x3aa6b7(0x12c)]=!![],Object[_0x3aa6b7(0x111)](exports,_0x3aa6b7(0x11f),_0x1a35e2),exports['buildRequestUrl']=buildRequestUrl,exports['extractFieldValues']=extractFieldValues,exports[_0x3aa6b7(0x119)]=baseRequestOptions,exports[_0x3aa6b7(0x129)]=fetchFieldLabels;function buildRequestUrl(_0x461b23,_0x27fc69){const _0x4d16ab={_0x586f79:0x107,_0x27f3ae:0x131,_0x3fa5d4:0x107,_0x425890:0x142,_0x16d5c1:0x13f},_0x21b695=_0x3aa6b7,_0x26a98f={};_0x26a98f['qpJIx']=function(_0x2f17c7,_0x361a49){return _0x2f17c7===_0x361a49;},_0x26a98f[_0x21b695(0x10e)]='router',_0x26a98f[_0x21b695(_0x4d16ab._0x586f79)]=_0x21b695(_0x4d16ab._0x27f3ae);const _0x1110dd=_0x26a98f;if(_0x1110dd['qpJIx'](_0x461b23['connectionType'],_0x1110dd[_0x21b695(0x10e)])){if(_0x1110dd[_0x21b695(_0x4d16ab._0x3fa5d4)]!==_0x1110dd['DxEam'])_0x6280fb['columnName']&&_0x2e0bf8['description']&&(_0x18707c[_0x391130['columnName']]=_0x59550b[_0x21b695(_0x4d16ab._0x425890)]);else{const _0x42a10b={};return _0x42a10b[_0x21b695(0x121)]=''+_0x461b23['baseUrl']+_0x27fc69,_0x42a10b;}}const _0x306e3f={};return _0x306e3f['url']=_0x27fc69,_0x306e3f[_0x21b695(_0x4d16ab._0x16d5c1)]=_0x461b23['baseUrl'],_0x306e3f;}function extractFieldValues(_0x557ead){const _0x542e0b={_0x4b9a90:0x11a,_0x3a5ca5:0x141,_0x24b433:0x13c,_0xe0e5ab:0x135,_0x565790:0x142,_0x8cd7a8:0x13c,_0x17a997:0x110,_0x1c4e33:0x113,_0x19e719:0x112},_0x3a41e5=_0x3aa6b7,_0xc7865d={};_0xc7865d[_0x3a41e5(_0x542e0b._0x4b9a90)]=function(_0xb71694,_0x8428cc){return _0xb71694!==_0x8428cc;},_0xc7865d[_0x3a41e5(0x135)]=_0x3a41e5(_0x542e0b._0x3a5ca5),_0xc7865d[_0x3a41e5(_0x542e0b._0x24b433)]=function(_0x5e06f6,_0x15d51a){return _0x5e06f6!==_0x15d51a;},_0xc7865d[_0x3a41e5(0x138)]=function(_0x55a51c,_0xa73338){return _0x55a51c===_0xa73338;},_0xc7865d[_0x3a41e5(0x113)]=_0x3a41e5(0x11b);const _0x32a5c1=_0xc7865d,_0x574192={};if(_0x557ead&&_0x557ead[_0x3a41e5(0x11d)]){if(_0x32a5c1[_0x3a41e5(0x11a)](_0x32a5c1[_0x3a41e5(_0x542e0b._0xe0e5ab)],_0x32a5c1['Stsal']))_0x190346[_0x529a06[_0x3a41e5(0x139)]]=_0x3114cf[_0x3a41e5(_0x542e0b._0x565790)];else{const _0x5030c1=_0x557ead[_0x3a41e5(0x11d)];if(Array[_0x3a41e5(0x116)](_0x5030c1))for(const _0x3a875d of _0x5030c1){if(_0x3a875d[_0x3a41e5(0x112)]&&_0x32a5c1[_0x3a41e5(_0x542e0b._0x8cd7a8)](_0x3a875d[_0x3a41e5(_0x542e0b._0x17a997)],undefined)){if(_0x32a5c1[_0x3a41e5(0x138)](_0x3a41e5(0x12d),_0x32a5c1[_0x3a41e5(_0x542e0b._0x1c4e33)]))return{};else _0x574192[_0x3a875d[_0x3a41e5(_0x542e0b._0x19e719)]]=_0x3a875d[_0x3a41e5(0x110)];}}}}return _0x574192;}function baseRequestOptions(){const _0x397d5e={_0x37b2f5:0x133},_0x39dfa4=_0x3aa6b7,_0x3fc4d4={};return _0x3fc4d4[_0x39dfa4(_0x397d5e._0x37b2f5)]=!![],_0x3fc4d4[_0x39dfa4(0x120)]=0x493e0,_0x3fc4d4;}const ROUTER_BASE_URL=_0x3aa6b7(0x10d);async function fetchFieldLabels(_0xb3ef8c,_0x33a41d,_0x2f291e){const _0x125282={_0x5d887b:0x109,_0x402ba4:0x13b,_0x35870f:0x118,_0x563f15:0x12e,_0x288a95:0x136,_0x41610f:0x13e,_0x1fd960:0x13a,_0xd4c26:0x10b,_0x21752f:0x140,_0x5a33bf:0x115,_0x535d77:0x127,_0xafc081:0x126,_0x3e3138:0x116,_0x42ee22:0x10a,_0x3e4543:0x110,_0x4b6294:0x114,_0x6ae1d5:0x128,_0x8b2486:0x120,_0x57ef7c:0x112},_0x3ffe75=_0x3aa6b7,_0x1c1e9e={};_0x1c1e9e['jzNuh']=function(_0x2c84ab,_0x2a76e1){return _0x2c84ab!==_0x2a76e1;},_0x1c1e9e['fcqOq']=function(_0xcef392,_0x330e7d){return _0xcef392===_0x330e7d;},_0x1c1e9e[_0x3ffe75(0x13e)]=_0x3ffe75(_0x125282._0x5d887b),_0x1c1e9e[_0x3ffe75(_0x125282._0x402ba4)]=function(_0x3b630e,_0x1dfead){return _0x3b630e!==_0x1dfead;},_0x1c1e9e['hKsiB']=_0x3ffe75(_0x125282._0x35870f),_0x1c1e9e['iILQs']='RUeGZ',_0x1c1e9e[_0x3ffe75(_0x125282._0x563f15)]='priorityErpApi',_0x1c1e9e[_0x3ffe75(0x10c)]=_0x3ffe75(_0x125282._0x288a95),_0x1c1e9e[_0x3ffe75(0x114)]=function(_0x562b88,_0x269234){return _0x562b88!==_0x269234;},_0x1c1e9e['nUWYy']=_0x3ffe75(0x12f),_0x1c1e9e['KzPLL']=_0x3ffe75(0x130);const _0x53f494=_0x1c1e9e;try{const _0x20f522={};if(_0x53f494['fcqOq'](_0x2f291e[_0x3ffe75(0x132)],_0x53f494[_0x3ffe75(_0x125282._0x41610f)])){if(_0x53f494[_0x3ffe75(0x13b)](_0x53f494['hKsiB'],_0x53f494['iILQs'])){const _0x1e44e2={};_0x1e44e2[_0x3ffe75(_0x125282._0x1fd960)]=_0x33a41d,_0x1e44e2[_0x3ffe75(0x10f)]='1';const _0x1a88e2={};_0x1a88e2[_0x3ffe75(_0x125282._0xd4c26)]='GET',_0x1a88e2[_0x3ffe75(0x121)]=ROUTER_BASE_URL+_0x3ffe75(_0x125282._0x21752f),_0x1a88e2[_0x3ffe75(_0x125282._0x5a33bf)]=_0x1e44e2,_0x1a88e2[_0x3ffe75(0x133)]=!![],_0x1a88e2['timeout']=0x3a98;const _0x4101b4=_0x1a88e2,_0x33797b=await _0xb3ef8c[_0x3ffe75(_0x125282._0x535d77)][_0x3ffe75(0x11c)][_0x3ffe75(_0x125282._0xafc081)](_0xb3ef8c,_0x53f494[_0x3ffe75(0x12e)],_0x4101b4);if(Array[_0x3ffe75(_0x125282._0x3e3138)](_0x33797b)){if(_0x53f494[_0x3ffe75(0x10c)]!==_0x53f494['ZqtDj']){const _0x5c1965=_0x1ea85f[_0x3ffe75(0x11d)];if(_0x11f32d[_0x3ffe75(_0x125282._0x3e3138)](_0x5c1965))for(const _0x2b5422 of _0x5c1965){_0x2b5422['fieldName']&&KjiDBu[_0x3ffe75(_0x125282._0x42ee22)](_0x2b5422[_0x3ffe75(_0x125282._0x3e4543)],_0x12b5a6)&&(_0x9128ac[_0x2b5422[_0x3ffe75(0x112)]]=_0x2b5422[_0x3ffe75(0x110)]);}}else for(const _0x454977 of _0x33797b){if(_0x53f494[_0x3ffe75(_0x125282._0x4b6294)](_0x53f494[_0x3ffe75(_0x125282._0x6ae1d5)],_0x53f494[_0x3ffe75(0x123)]))_0x454977['columnName']&&_0x454977['description']&&(_0x20f522[_0x454977[_0x3ffe75(0x139)]]=_0x454977['description']);else{const _0x1feb65={};return _0x1feb65[_0x3ffe75(0x133)]=!![],_0x1feb65[_0x3ffe75(_0x125282._0x8b2486)]=0x493e0,_0x1feb65;}}}}else _0x37de7e[_0x49e5a9[_0x3ffe75(_0x125282._0x57ef7c)]]=_0x2e94cb[_0x3ffe75(0x110)];}return _0x20f522;}catch{return{};}}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildRequestUrl = buildRequestUrl;
4
+ exports.extractFieldValues = extractFieldValues;
5
+ exports.baseRequestOptions = baseRequestOptions;
6
+ exports.fetchFieldLabels = fetchFieldLabels;
7
+ function buildRequestUrl(context, path) {
8
+ if (context.connectionType === 'router') {
9
+ return { url: `${context.baseUrl}${path}` };
10
+ }
11
+ return { url: path, baseURL: context.baseUrl };
12
+ }
13
+ function extractFieldValues(fieldsUi) {
14
+ const body = {};
15
+ if (fieldsUi && fieldsUi.fieldValues) {
16
+ const fieldValues = fieldsUi.fieldValues;
17
+ if (Array.isArray(fieldValues)) {
18
+ for (const field of fieldValues) {
19
+ if (field.fieldName && field.fieldValue !== undefined) {
20
+ body[field.fieldName] = field.fieldValue;
21
+ }
22
+ }
23
+ }
24
+ }
25
+ return body;
26
+ }
27
+ function baseRequestOptions() {
28
+ return {
29
+ json: true,
30
+ timeout: 300000,
31
+ };
32
+ }
33
+ const ROUTER_BASE_URL = 'https://php-api-941574646138.me-west1.run.app/api/priority';
34
+ async function fetchFieldLabels(execFns, formName, context) {
35
+ try {
36
+ const labels = {};
37
+ if (context.connectionType === 'router') {
38
+ const requestOptions = {
39
+ method: 'GET',
40
+ url: `${ROUTER_BASE_URL}/rpc/rpc`,
41
+ headers: {
42
+ TABLE_NAME: formName,
43
+ READ: '1',
44
+ },
45
+ json: true,
46
+ timeout: 15000,
47
+ };
48
+ const response = await execFns.helpers.httpRequestWithAuthentication.call(execFns, 'priorityErpApi', requestOptions);
49
+ if (Array.isArray(response)) {
50
+ for (const item of response) {
51
+ if (item.columnName && item.description) {
52
+ labels[item.columnName] = item.description;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ return labels;
58
+ }
59
+ catch {
60
+ return {};
61
+ }
62
+ }