n8n-nodes-proofofauthenticity 1.0.1 → 1.0.2
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.
|
@@ -104,10 +104,44 @@ class ProofOfAuthenticity {
|
|
|
104
104
|
credentials: [
|
|
105
105
|
{
|
|
106
106
|
name: 'proofOfAuthenticityApi',
|
|
107
|
-
required:
|
|
107
|
+
required: false,
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
credentialType: ['proofOfAuthenticityApi'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'digiCryptoStoreApi',
|
|
116
|
+
required: false,
|
|
117
|
+
displayOptions: {
|
|
118
|
+
show: {
|
|
119
|
+
credentialType: ['digiCryptoStoreApi'],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
108
122
|
},
|
|
109
123
|
],
|
|
110
124
|
properties: [
|
|
125
|
+
// Credential Type Selection
|
|
126
|
+
{
|
|
127
|
+
displayName: 'Credential Type',
|
|
128
|
+
name: 'credentialType',
|
|
129
|
+
type: 'options',
|
|
130
|
+
options: [
|
|
131
|
+
{
|
|
132
|
+
name: 'ProofOfAuthenticity API (Light)',
|
|
133
|
+
value: 'proofOfAuthenticityApi',
|
|
134
|
+
description: 'Use dedicated ProofOfAuthenticity credentials',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'DigiCryptoStore API (Shared)',
|
|
138
|
+
value: 'digiCryptoStoreApi',
|
|
139
|
+
description: 'Use existing DigiCryptoStore credentials (same API)',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
default: 'proofOfAuthenticityApi',
|
|
143
|
+
description: 'Choose which credential to use. Both use the same CHECKHC API.',
|
|
144
|
+
},
|
|
111
145
|
// Operation
|
|
112
146
|
{
|
|
113
147
|
displayName: 'Operation',
|
|
@@ -315,7 +349,8 @@ class ProofOfAuthenticity {
|
|
|
315
349
|
for (let i = 0; i < items.length; i++) {
|
|
316
350
|
try {
|
|
317
351
|
const operation = this.getNodeParameter('operation', i);
|
|
318
|
-
const
|
|
352
|
+
const credentialType = this.getNodeParameter('credentialType', i, 'proofOfAuthenticityApi');
|
|
353
|
+
const credentials = await this.getCredentials(credentialType, i);
|
|
319
354
|
const baseUrl = credentials.digiCryptoStoreUrl.replace(/\/$/, '');
|
|
320
355
|
const apiKey = credentials.apiKey;
|
|
321
356
|
let responseData;
|
package/package.json
CHANGED