@zkp2p/providers 1.0.0 → 2.0.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.
@@ -68,8 +68,7 @@
68
68
  },
69
69
  {
70
70
  "type": "regex",
71
- "value": "\"aliasToken\":\"(?<aliasToken>[^\"]+)\"",
72
- "hash": true
71
+ "value": "\"aliasToken\":\"(?<aliasToken>[^\"]+)\""
73
72
  }
74
73
  ],
75
74
  "responseRedactions": [
@@ -86,8 +86,7 @@
86
86
  },
87
87
  {
88
88
  "type": "regex",
89
- "value": "\"cashtag\":\"(?<receiverId>[^\"]+)\"",
90
- "hash": true
89
+ "value": "\"cashtag\":\"(?<receiverId>[^\"]+)\""
91
90
  },
92
91
  {
93
92
  "type": "regex",
@@ -125,8 +125,7 @@
125
125
  "responseMatches": [
126
126
  {
127
127
  "type": "regex",
128
- "value": "\"recipientEmail\":\"(?<recipientEmail>[^\"]+)\"",
129
- "hash": true
128
+ "value": "\"recipientEmail\":\"(?<recipientEmail>[^\"]+)\""
130
129
  }
131
130
  ],
132
131
  "responseRedactions": [
@@ -69,8 +69,7 @@
69
69
  },
70
70
  {
71
71
  "type": "regex",
72
- "value": "\"partyToken\":\"(?<partyToken>[^\"]+)\"",
73
- "hash": true
72
+ "value": "\"partyToken\":\"(?<partyToken>[^\"]+)\""
74
73
  }
75
74
  ],
76
75
  "responseRedactions": [
@@ -76,8 +76,7 @@
76
76
  },
77
77
  {
78
78
  "type": "regex",
79
- "value": "\"toPayeeName\":\"(?<receiverId>[^\"]+)\"",
80
- "hash": true
79
+ "value": "\"toPayeeName\":\"(?<receiverId>[^\"]+)\""
81
80
  },
82
81
  {
83
82
  "type": "regex",
@@ -60,8 +60,7 @@
60
60
  "responseMatches": [
61
61
  {
62
62
  "type": "regex",
63
- "value": "v2__detail\">(.*?)CVU: (?<recipientId>[0-9]+)</li>",
64
- "hash": true
63
+ "value": "v2__detail\">(.*?)CVU: (?<recipientId>[0-9]+)</li>"
65
64
  },
66
65
  {
67
66
  "type": "regex",
@@ -65,8 +65,7 @@
65
65
  },
66
66
  {
67
67
  "type": "regex",
68
- "value": "\"user_id\":\"(?<userId>[^\"]+)\"",
69
- "hash": true
68
+ "value": "\"user_id\":\"(?<userId>[^\"]+)\""
70
69
  },
71
70
  {
72
71
  "type": "regex",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zkp2p/providers",
3
- "version": "1.0.0",
4
- "description": "Provider JSON templates for ZKP2P (data-only)",
3
+ "version": "2.0.0",
4
+ "description": "Provider JSON templates for ZKP2P",
5
5
  "scripts": {
6
6
  "start": "node index.js"
7
7
  },
@@ -48,8 +48,7 @@
48
48
  "responseMatches": [
49
49
  {
50
50
  "type": "regex",
51
- "value": "\"email\":\"(?<recvId>[^\"]+)\"",
52
- "hash": true
51
+ "value": "\"email\":\"(?<recvId>[^\"]+)\""
53
52
  },
54
53
  {
55
54
  "type": "regex",
@@ -84,8 +84,7 @@
84
84
  },
85
85
  {
86
86
  "type": "regex",
87
- "value": "\"username\":\"(?<username>[^\"]+)\"",
88
- "hash": true
87
+ "value": "\"username\":\"(?<username>[^\"]+)\""
89
88
  }
90
89
  ],
91
90
  "responseRedactions": [
@@ -68,8 +68,7 @@
68
68
  },
69
69
  {
70
70
  "type": "regex",
71
- "value": "\"email\":\"(?<email>[^\"]+)\"",
72
- "hash": true
71
+ "value": "\"email\":\"(?<email>[^\"]+)\""
73
72
  }
74
73
  ],
75
74
  "responseRedactions": [
@@ -64,8 +64,7 @@
64
64
  },
65
65
  {
66
66
  "type": "regex",
67
- "value": "\"id\":\"(?<receiverId>[^\"]+)\"",
68
- "hash": true
67
+ "value": "\"id\":\"(?<receiverId>[^\"]+)\""
69
68
  },
70
69
  {
71
70
  "type": "regex",
@@ -82,8 +82,7 @@
82
82
  },
83
83
  {
84
84
  "type": "regex",
85
- "value": "\"targetRecipientId\":(?<targetRecipientId>[0-9]+)",
86
- "hash": true
85
+ "value": "\"targetRecipientId\":(?<targetRecipientId>[0-9]+)"
87
86
  }
88
87
  ],
89
88
  "responseRedactions": [
@@ -1,121 +0,0 @@
1
- {
2
- "actionType": "transfer_mercado_pago",
3
- "authLink": "https://www.mercadopago.com.ar/home",
4
- "url": "https://www.mercadopago.com.ar/activities/detail/{{PAYMENT_ID}}?from={{URL_PARAMS_FROM}}",
5
- "method": "GET",
6
- "body": "",
7
- "metadata": {
8
- "platform": "mercadopago",
9
- "urlRegex": "https://www.mercadopago.com.ar/home",
10
- "method": "GET",
11
- "fallbackUrlRegex": "",
12
- "fallbackMethod": "",
13
- "preprocessRegex": "<script\\s+[^>]*id=[\"']__PRELOADED_STATE__[\"'][^>]*>([\\s\\S]*?)</script>",
14
- "transactionsExtraction": {
15
- "transactionJsonPathListSelector": "$.pageState.mpHome.result.sections.activities.content.activities_container.results",
16
- "transactionJsonPathSelectors": {
17
- "recipient": "$.title",
18
- "amount": "$.amount.fraction",
19
- "date": "$.creationDate",
20
- "paymentId": "$.id",
21
- "currency": "$.amount.currency_id"
22
- }
23
- },
24
- "proofMetadataSelectors": [
25
- {
26
- "type": "jsonPath",
27
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].title"
28
- },
29
- {
30
- "type": "jsonPath",
31
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].amount.fraction"
32
- },
33
- {
34
- "type": "jsonPath",
35
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
36
- }
37
- ]
38
- },
39
- "paramNames": [
40
- "PAYMENT_ID",
41
- "URL_PARAMS_FROM"
42
- ],
43
- "paramSelectors": [
44
- {
45
- "type": "jsonPath",
46
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
47
- },
48
- {
49
- "type": "regex",
50
- "value": "(mp-home)"
51
- }
52
- ],
53
- "skipRequestHeaders": [
54
- "Cookie",
55
- "Accept-Encoding"
56
- ],
57
- "secretHeaders": [
58
- "Cookie"
59
- ],
60
- "responseMatches": [
61
- {
62
- "type": "regex",
63
- "value": "v2__detail\">(.*?)CVU: (?<recipientId>[0-9]+)</li>",
64
- "hash": true
65
- },
66
- {
67
- "type": "regex",
68
- "value": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(?<amt>[0-9.]+)</span><span aria-hidden=\"true\">,</span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(?<cents>[0-9]+)</span>"
69
- },
70
- {
71
- "type": "regex",
72
- "value": "Total\",\"amount\":{\"currency_id\":\"(?<curr>[^\"]+)\""
73
- },
74
- {
75
- "type": "regex",
76
- "value": ",\"date\":\"(?<date>[^\"]+)\",\"sections\""
77
- },
78
- {
79
- "type": "regex",
80
- "value": "\"operationId\":(?<paymentId>[^,]+),\"activityName\":\"(?<paymentType>[^\"]+)\",\"activityStatus\":\"(?<paymentStatus>[^\"]+)\","
81
- }
82
- ],
83
- "responseRedactions": [
84
- {
85
- "jsonPath": "",
86
- "xPath": "",
87
- "regex": "v2__detail\">(.*?)CVU: (.*?)</li>"
88
- },
89
- {
90
- "jsonPath": "",
91
- "xPath": "",
92
- "regex": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(.*?)<\/span><span aria-hidden=\"true\">,<\/span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(.*?)<\/span>"
93
- },
94
- {
95
- "jsonPath": "",
96
- "xPath": "",
97
- "regex": "\"Total\",\"amount\":{\"currency_id\":\"(.*?)\""
98
- },
99
- {
100
- "jsonPath": "",
101
- "xPath": "",
102
- "regex": ",\"date\":\"(.*)\",\"sections\""
103
- },
104
- {
105
- "jsonPath": "",
106
- "xPath": "",
107
- "regex": "\"operationId\":(.*?),\"activityName\":\"(.*?)\",\"activityStatus\":\"(.*?),"
108
- }
109
- ],
110
- "mobile": {
111
- "includeAdditionalCookieDomains": [
112
- "mercadolibre.com",
113
- "www.mercadolibre.com"
114
- ],
115
- "internal": {
116
- "actionLink": "https://www.mercadopago.com.ar/money-out/transfer/",
117
- "actionCompletedUrlRegex": "https://www.mercadopago.com.ar/money-out/transfer/congrats\\?data=\\S+",
118
- "injectedJavaScript": "(function(){const style=document.createElement('style');style.textContent='.zkp2p-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:24px;height:24px;background:#007AFF;border-radius:4px;cursor:pointer;z-index:9999;display:flex;align-items:center;justify-content:center;color:white;font-weight:bold;font-size:12px;}.zkp2p-dropdown{position:absolute;background:#FFF;border:1px solid #E0E0E0;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.15);z-index:99999;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;font-size:14px;color:#333;width:auto;min-width:250px;}.zkp2p-dropdown-item{padding:12px 16px;cursor:pointer;}.zkp2p-dropdown-item:hover{background:#F5F5F5;}.zkp2p-dropdown-item:active{background:#E8E8E8;}.zkp2p-dropdown-label{color:#666;font-size:12px;margin-bottom:4px;}.zkp2p-dropdown-value{font-weight:500;color:#333;font-size:16px;}.zkp2p-toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#333;color:white;padding:10px 20px;border-radius:6px;z-index:999999;font-family:system-ui;}';document.head.appendChild(style);const copyToClipboard=function(text){const textArea=document.createElement('textarea');textArea.value=text;textArea.style.position='fixed';textArea.style.top='-9999px';document.body.appendChild(textArea);textArea.select();textArea.setSelectionRange(0,99999);document.execCommand('copy');document.body.removeChild(textArea);const toast=document.createElement('div');toast.className='zkp2p-toast';toast.textContent='Copied!';document.body.appendChild(toast);setTimeout(()=>toast.remove(),2000);};const createDropdown=function(input,label,value){const rect=input.getBoundingClientRect();const dropdown=document.createElement('div');dropdown.className='zkp2p-dropdown';dropdown.id='zkp2p-dropdown-'+Date.now();dropdown.style.position='absolute';dropdown.style.top=(rect.bottom+window.scrollY+4)+'px';dropdown.style.left=rect.left+'px';dropdown.style.display='block';const item=document.createElement('div');item.className='zkp2p-dropdown-item';item.innerHTML='<div class=\"zkp2p-dropdown-label\">'+label+'</div><div class=\"zkp2p-dropdown-value\">'+value+'</div>';item.addEventListener('click',function(){copyToClipboard(value);dropdown.remove();});dropdown.appendChild(item);document.body.appendChild(dropdown);setTimeout(()=>{document.addEventListener('click',function hideDropdown(e){if(!dropdown.contains(e.target)&&e.target!==input&&!e.target.classList.contains('zkp2p-icon')){dropdown.remove();document.removeEventListener('click',hideDropdown);}});},100);};const addIcon=function(input,label,value){const container=input.closest('.andes-amount-field__input-container')||input.parentElement;container.style.position='relative';const icon=document.createElement('div');icon.className='zkp2p-icon';icon.textContent='Z';icon.addEventListener('click',function(e){e.stopPropagation();const existing=document.querySelector('.zkp2p-dropdown');if(existing)existing.remove();createDropdown(input,label,value);});container.appendChild(icon);createDropdown(input,label,value);};const setupFields=function(){const cvuInput=document.querySelector('input[name=\"identification_account\"]');if(cvuInput&&!cvuInput.hasAttribute('data-zkp2p')){cvuInput.setAttribute('data-zkp2p','true');addIcon(cvuInput,'CVU for ZKP2P:','{{RECIPIENT_ID}}');}const amountInput=document.querySelector('#amount-field-input');if(amountInput&&!amountInput.hasAttribute('data-zkp2p')){amountInput.setAttribute('data-zkp2p','true');addIcon(amountInput,'Amount for ZKP2P:','{{AMOUNT}}');}};setTimeout(setupFields,1500);const observer=new MutationObserver(setupFields);observer.observe(document.body,{childList:true,subtree:true});})();"
119
- }
120
- }
121
- }