@bonsae/node-red-salesforce 0.3.0 → 0.4.1
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/index.d.ts +47 -36
- package/index.html +1 -1
- package/index.mjs +154 -154
- package/index.mjs.map +1 -1
- package/locales/de/index.html +18 -16
- package/locales/de/index.json +90 -34
- package/locales/en-US/index.html +18 -16
- package/locales/en-US/index.json +91 -35
- package/locales/es-ES/index.html +18 -16
- package/locales/es-ES/index.json +90 -34
- package/locales/fr/index.html +18 -16
- package/locales/fr/index.json +90 -34
- package/locales/ja/index.html +18 -16
- package/locales/ja/index.json +90 -34
- package/locales/ko/index.html +18 -16
- package/locales/ko/index.json +90 -34
- package/locales/pt-BR/index.html +18 -16
- package/locales/pt-BR/index.json +90 -34
- package/locales/ru/index.html +18 -16
- package/locales/ru/index.json +90 -34
- package/locales/zh-CN/index.html +18 -16
- package/locales/zh-CN/index.json +90 -34
- package/locales/zh-TW/index.html +18 -16
- package/locales/zh-TW/index.json +90 -34
- package/package.json +2 -2
- package/resources/index.FDBQSjT7.js +1 -0
- package/resources/index.e3npw131.js +0 -1
package/locales/zh-CN/index.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"salesforce-apex": {
|
|
3
|
+
"configs": {
|
|
4
|
+
"name": "名称",
|
|
5
|
+
"connection": "Connection",
|
|
6
|
+
"method": "方法",
|
|
7
|
+
"path": "路径"
|
|
8
|
+
},
|
|
9
|
+
"toggles": {
|
|
10
|
+
"validateInput": "验证输入",
|
|
11
|
+
"validateOutput": "验证输出",
|
|
12
|
+
"errorPort": "错误端口",
|
|
13
|
+
"completePort": "完成端口",
|
|
14
|
+
"statusPort": "状态端口"
|
|
15
|
+
},
|
|
3
16
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
4
17
|
"label": "Apex",
|
|
5
18
|
"description": "调用Salesforce Apex REST端点。",
|
|
@@ -7,11 +20,6 @@
|
|
|
7
20
|
"outputLabels": [
|
|
8
21
|
"响应"
|
|
9
22
|
],
|
|
10
|
-
"configs": {
|
|
11
|
-
"connection": "Connection",
|
|
12
|
-
"method": "方法",
|
|
13
|
-
"path": "路径"
|
|
14
|
-
},
|
|
15
23
|
"input": {
|
|
16
24
|
"payload": "请求正文"
|
|
17
25
|
},
|
|
@@ -22,6 +30,20 @@
|
|
|
22
30
|
]
|
|
23
31
|
},
|
|
24
32
|
"salesforce-bulk": {
|
|
33
|
+
"configs": {
|
|
34
|
+
"name": "名称",
|
|
35
|
+
"connection": "Connection",
|
|
36
|
+
"operation": "操作",
|
|
37
|
+
"sObjectType": "SObject类型",
|
|
38
|
+
"externalIdField": "外部ID字段"
|
|
39
|
+
},
|
|
40
|
+
"toggles": {
|
|
41
|
+
"validateInput": "验证输入",
|
|
42
|
+
"validateOutput": "验证输出",
|
|
43
|
+
"errorPort": "错误端口",
|
|
44
|
+
"completePort": "完成端口",
|
|
45
|
+
"statusPort": "状态端口"
|
|
46
|
+
},
|
|
25
47
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
26
48
|
"label": "Bulk",
|
|
27
49
|
"description": "使用Salesforce Bulk API 2.0对大数据量执行批量操作。",
|
|
@@ -30,12 +52,6 @@
|
|
|
30
52
|
"记录",
|
|
31
53
|
"作业完成"
|
|
32
54
|
],
|
|
33
|
-
"configs": {
|
|
34
|
-
"connection": "Connection",
|
|
35
|
-
"operation": "操作",
|
|
36
|
-
"sObjectType": "SObject类型",
|
|
37
|
-
"externalIdField": "外部ID字段"
|
|
38
|
-
},
|
|
39
55
|
"input": {
|
|
40
56
|
"payload": "记录数组或SOQL查询"
|
|
41
57
|
},
|
|
@@ -46,15 +62,23 @@
|
|
|
46
62
|
]
|
|
47
63
|
},
|
|
48
64
|
"salesforce-connection": {
|
|
49
|
-
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
50
|
-
"label": "Connection",
|
|
51
|
-
"description": "使用带有PKCE的OAuth 2.0管理与Salesforce组织的连接。为其他Salesforce节点提供身份验证和令牌管理。",
|
|
52
65
|
"configs": {
|
|
66
|
+
"name": "名称",
|
|
53
67
|
"loginUrl": "登录URL",
|
|
54
68
|
"clientId": "客户端ID",
|
|
55
69
|
"apiVersion": "API版本",
|
|
56
70
|
"callbackUrl": "回调URL"
|
|
57
71
|
},
|
|
72
|
+
"toggles": {
|
|
73
|
+
"validateInput": "验证输入",
|
|
74
|
+
"validateOutput": "验证输出",
|
|
75
|
+
"errorPort": "错误端口",
|
|
76
|
+
"completePort": "完成端口",
|
|
77
|
+
"statusPort": "状态端口"
|
|
78
|
+
},
|
|
79
|
+
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
80
|
+
"label": "Connection",
|
|
81
|
+
"description": "使用带有PKCE的OAuth 2.0管理与Salesforce组织的连接。为其他Salesforce节点提供身份验证和令牌管理。",
|
|
58
82
|
"credentials": {
|
|
59
83
|
"accessToken": "访问令牌",
|
|
60
84
|
"refreshToken": "刷新令牌",
|
|
@@ -62,6 +86,18 @@
|
|
|
62
86
|
}
|
|
63
87
|
},
|
|
64
88
|
"salesforce-describe": {
|
|
89
|
+
"configs": {
|
|
90
|
+
"name": "名称",
|
|
91
|
+
"connection": "Connection",
|
|
92
|
+
"sObjectType": "SObject类型"
|
|
93
|
+
},
|
|
94
|
+
"toggles": {
|
|
95
|
+
"validateInput": "验证输入",
|
|
96
|
+
"validateOutput": "验证输出",
|
|
97
|
+
"errorPort": "错误端口",
|
|
98
|
+
"completePort": "完成端口",
|
|
99
|
+
"statusPort": "状态端口"
|
|
100
|
+
},
|
|
65
101
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
66
102
|
"label": "Describe",
|
|
67
103
|
"description": "检索Salesforce SObject的元数据,包括字段、关系和记录类型。",
|
|
@@ -69,10 +105,6 @@
|
|
|
69
105
|
"outputLabels": [
|
|
70
106
|
"SObject元数据"
|
|
71
107
|
],
|
|
72
|
-
"configs": {
|
|
73
|
-
"connection": "Connection",
|
|
74
|
-
"sObjectType": "SObject类型"
|
|
75
|
-
},
|
|
76
108
|
"input": {
|
|
77
109
|
"payload": "输入负载"
|
|
78
110
|
},
|
|
@@ -83,6 +115,20 @@
|
|
|
83
115
|
]
|
|
84
116
|
},
|
|
85
117
|
"salesforce-dml": {
|
|
118
|
+
"configs": {
|
|
119
|
+
"name": "名称",
|
|
120
|
+
"connection": "Connection",
|
|
121
|
+
"operation": "操作",
|
|
122
|
+
"sObjectType": "SObject类型",
|
|
123
|
+
"externalIdField": "外部ID字段"
|
|
124
|
+
},
|
|
125
|
+
"toggles": {
|
|
126
|
+
"validateInput": "验证输入",
|
|
127
|
+
"validateOutput": "验证输出",
|
|
128
|
+
"errorPort": "错误端口",
|
|
129
|
+
"completePort": "完成端口",
|
|
130
|
+
"statusPort": "状态端口"
|
|
131
|
+
},
|
|
86
132
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
87
133
|
"label": "DML",
|
|
88
134
|
"description": "对Salesforce SObject执行创建、读取、更新、删除或upsert操作。",
|
|
@@ -90,12 +136,6 @@
|
|
|
90
136
|
"outputLabels": [
|
|
91
137
|
"操作结果"
|
|
92
138
|
],
|
|
93
|
-
"configs": {
|
|
94
|
-
"connection": "Connection",
|
|
95
|
-
"operation": "操作",
|
|
96
|
-
"sObjectType": "SObject类型",
|
|
97
|
-
"externalIdField": "外部ID字段"
|
|
98
|
-
},
|
|
99
139
|
"input": {
|
|
100
140
|
"payload": "记录数据或ID"
|
|
101
141
|
},
|
|
@@ -106,6 +146,18 @@
|
|
|
106
146
|
]
|
|
107
147
|
},
|
|
108
148
|
"salesforce-soql": {
|
|
149
|
+
"configs": {
|
|
150
|
+
"name": "名称",
|
|
151
|
+
"connection": "Connection",
|
|
152
|
+
"query": "查询"
|
|
153
|
+
},
|
|
154
|
+
"toggles": {
|
|
155
|
+
"validateInput": "验证输入",
|
|
156
|
+
"validateOutput": "验证输出",
|
|
157
|
+
"errorPort": "错误端口",
|
|
158
|
+
"completePort": "完成端口",
|
|
159
|
+
"statusPort": "状态端口"
|
|
160
|
+
},
|
|
109
161
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
110
162
|
"label": "SOQL",
|
|
111
163
|
"description": "对Salesforce执行SOQL查询并返回匹配的记录。",
|
|
@@ -113,10 +165,6 @@
|
|
|
113
165
|
"outputLabels": [
|
|
114
166
|
"查询结果"
|
|
115
167
|
],
|
|
116
|
-
"configs": {
|
|
117
|
-
"connection": "Connection",
|
|
118
|
-
"query": "查询"
|
|
119
|
-
},
|
|
120
168
|
"input": {
|
|
121
169
|
"payload": "输入负载"
|
|
122
170
|
},
|
|
@@ -129,19 +177,27 @@
|
|
|
129
177
|
]
|
|
130
178
|
},
|
|
131
179
|
"salesforce-streaming": {
|
|
132
|
-
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
133
|
-
"label": "Streaming",
|
|
134
|
-
"description": "使用Pub/Sub API(gRPC)订阅Salesforce平台事件和变更数据捕获事件。",
|
|
135
|
-
"outputLabels": [
|
|
136
|
-
"事件"
|
|
137
|
-
],
|
|
138
180
|
"configs": {
|
|
181
|
+
"name": "名称",
|
|
139
182
|
"connection": "Connection",
|
|
140
183
|
"channelName": "频道",
|
|
141
184
|
"subscribeType": "订阅起点",
|
|
142
185
|
"replayId": "重播ID",
|
|
143
186
|
"numRequested": "批次大小"
|
|
144
187
|
},
|
|
188
|
+
"toggles": {
|
|
189
|
+
"validateInput": "验证输入",
|
|
190
|
+
"validateOutput": "验证输出",
|
|
191
|
+
"errorPort": "错误端口",
|
|
192
|
+
"completePort": "完成端口",
|
|
193
|
+
"statusPort": "状态端口"
|
|
194
|
+
},
|
|
195
|
+
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
196
|
+
"label": "Streaming",
|
|
197
|
+
"description": "使用Pub/Sub API(gRPC)订阅Salesforce平台事件和变更数据捕获事件。",
|
|
198
|
+
"outputLabels": [
|
|
199
|
+
"事件"
|
|
200
|
+
],
|
|
145
201
|
"outputs": [
|
|
146
202
|
{
|
|
147
203
|
"payload": "事件负载",
|
package/locales/zh-TW/index.html
CHANGED
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
<tbody>
|
|
35
35
|
<tr><td>Connection</td><td>connection</td><td>NodeRef → salesforce-connection [format: node-id]</td><td>是</td><td></td><td>Reference to salesforce-connection</td></tr>
|
|
36
36
|
<tr><td>查詢</td><td>query</td><td>TypedInput</td><td>是</td><td><code>{"type":"str","value":""}</code></td><td>Represents a Node-RED TypedInput value and its type.</td></tr>
|
|
37
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
38
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
39
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
37
40
|
</tbody>
|
|
38
41
|
</table>
|
|
39
42
|
</div>
|
|
@@ -72,9 +75,9 @@
|
|
|
72
75
|
<tr><td>SObject類型</td><td>sObjectType</td><td>TypedInput</td><td>是</td><td><code>{"type":"str","value":""}</code></td><td>Represents a Node-RED TypedInput value and its type.</td></tr>
|
|
73
76
|
<tr><td></td><td>record</td><td>TypedInput</td><td>是</td><td><code>{"type":"str","value":""}</code></td><td>Represents a Node-RED TypedInput value and its type.</td></tr>
|
|
74
77
|
<tr><td>外部ID欄位</td><td>externalIdField</td><td>string</td><td>否</td><td><code>""</code></td><td></td></tr>
|
|
75
|
-
<tr><td></td><td>
|
|
76
|
-
<tr><td></td><td>
|
|
77
|
-
<tr><td></td><td>
|
|
78
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
79
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
80
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
78
81
|
</tbody>
|
|
79
82
|
</table>
|
|
80
83
|
</div>
|
|
@@ -115,11 +118,9 @@
|
|
|
115
118
|
<tr><td></td><td>lineEnding</td><td></td><td>是</td><td><code>"LF"</code></td><td></td></tr>
|
|
116
119
|
<tr><td></td><td>pollInterval</td><td>number [min: 1000]</td><td>是</td><td><code>5000</code></td><td></td></tr>
|
|
117
120
|
<tr><td></td><td>pollTimeout</td><td>number [min: 5000]</td><td>是</td><td><code>60000</code></td><td></td></tr>
|
|
118
|
-
<tr><td></td><td>
|
|
119
|
-
<tr><td></td><td>
|
|
120
|
-
<tr><td></td><td>
|
|
121
|
-
<tr><td></td><td>emitComplete</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
122
|
-
<tr><td></td><td>emitStatus</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
121
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
122
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>true</code></td><td></td></tr>
|
|
123
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
123
124
|
</tbody>
|
|
124
125
|
</table>
|
|
125
126
|
</div>
|
|
@@ -143,9 +144,9 @@
|
|
|
143
144
|
<tbody>
|
|
144
145
|
<tr><td>Connection</td><td>connection</td><td>NodeRef → salesforce-connection [format: node-id]</td><td>是</td><td></td><td>Reference to salesforce-connection</td></tr>
|
|
145
146
|
<tr><td>SObject類型</td><td>sObjectType</td><td>TypedInput</td><td>是</td><td><code>{"type":"str","value":""}</code></td><td>Represents a Node-RED TypedInput value and its type.</td></tr>
|
|
146
|
-
<tr><td></td><td>
|
|
147
|
-
<tr><td></td><td>
|
|
148
|
-
<tr><td></td><td>
|
|
147
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
148
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
149
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
149
150
|
</tbody>
|
|
150
151
|
</table>
|
|
151
152
|
</div>
|
|
@@ -182,8 +183,9 @@
|
|
|
182
183
|
<tr><td>訂閱起點</td><td>subscribeType</td><td></td><td>是</td><td><code>"LATEST"</code></td><td></td></tr>
|
|
183
184
|
<tr><td>重播ID</td><td>replayId</td><td>string</td><td>否</td><td><code>""</code></td><td></td></tr>
|
|
184
185
|
<tr><td>批次大小</td><td>numRequested</td><td>number [min: 1, max: 100]</td><td>是</td><td><code>100</code></td><td></td></tr>
|
|
185
|
-
<tr><td></td><td>
|
|
186
|
-
<tr><td></td><td>
|
|
186
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
187
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
188
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
187
189
|
</tbody>
|
|
188
190
|
</table>
|
|
189
191
|
</div>
|
|
@@ -211,9 +213,9 @@
|
|
|
211
213
|
<tr><td>Connection</td><td>connection</td><td>NodeRef → salesforce-connection [format: node-id]</td><td>是</td><td></td><td>Reference to salesforce-connection</td></tr>
|
|
212
214
|
<tr><td>方法</td><td>method</td><td></td><td>是</td><td><code>"POST"</code></td><td></td></tr>
|
|
213
215
|
<tr><td>路徑</td><td>path</td><td>TypedInput</td><td>是</td><td><code>{"type":"str","value":""}</code></td><td>Represents a Node-RED TypedInput value and its type.</td></tr>
|
|
214
|
-
<tr><td></td><td>
|
|
215
|
-
<tr><td></td><td>
|
|
216
|
-
<tr><td></td><td>
|
|
216
|
+
<tr><td></td><td>errorPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
217
|
+
<tr><td></td><td>completePort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
218
|
+
<tr><td></td><td>statusPort</td><td>boolean</td><td>是</td><td><code>false</code></td><td></td></tr>
|
|
217
219
|
</tbody>
|
|
218
220
|
</table>
|
|
219
221
|
</div>
|
package/locales/zh-TW/index.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"salesforce-apex": {
|
|
3
|
+
"configs": {
|
|
4
|
+
"name": "名稱",
|
|
5
|
+
"connection": "Connection",
|
|
6
|
+
"method": "方法",
|
|
7
|
+
"path": "路徑"
|
|
8
|
+
},
|
|
9
|
+
"toggles": {
|
|
10
|
+
"validateInput": "驗證輸入",
|
|
11
|
+
"validateOutput": "驗證輸出",
|
|
12
|
+
"errorPort": "錯誤端口",
|
|
13
|
+
"completePort": "完成端口",
|
|
14
|
+
"statusPort": "狀態端口"
|
|
15
|
+
},
|
|
3
16
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
4
17
|
"label": "Apex",
|
|
5
18
|
"description": "呼叫Salesforce Apex REST端點。",
|
|
@@ -7,11 +20,6 @@
|
|
|
7
20
|
"outputLabels": [
|
|
8
21
|
"回應"
|
|
9
22
|
],
|
|
10
|
-
"configs": {
|
|
11
|
-
"connection": "Connection",
|
|
12
|
-
"method": "方法",
|
|
13
|
-
"path": "路徑"
|
|
14
|
-
},
|
|
15
23
|
"input": {
|
|
16
24
|
"payload": "請求主體"
|
|
17
25
|
},
|
|
@@ -22,6 +30,20 @@
|
|
|
22
30
|
]
|
|
23
31
|
},
|
|
24
32
|
"salesforce-bulk": {
|
|
33
|
+
"configs": {
|
|
34
|
+
"name": "名稱",
|
|
35
|
+
"connection": "Connection",
|
|
36
|
+
"operation": "操作",
|
|
37
|
+
"sObjectType": "SObject類型",
|
|
38
|
+
"externalIdField": "外部ID欄位"
|
|
39
|
+
},
|
|
40
|
+
"toggles": {
|
|
41
|
+
"validateInput": "驗證輸入",
|
|
42
|
+
"validateOutput": "驗證輸出",
|
|
43
|
+
"errorPort": "錯誤端口",
|
|
44
|
+
"completePort": "完成端口",
|
|
45
|
+
"statusPort": "狀態端口"
|
|
46
|
+
},
|
|
25
47
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
26
48
|
"label": "Bulk",
|
|
27
49
|
"description": "使用Salesforce Bulk API 2.0對大資料量執行批次操作。",
|
|
@@ -30,12 +52,6 @@
|
|
|
30
52
|
"記錄",
|
|
31
53
|
"工作完成"
|
|
32
54
|
],
|
|
33
|
-
"configs": {
|
|
34
|
-
"connection": "Connection",
|
|
35
|
-
"operation": "操作",
|
|
36
|
-
"sObjectType": "SObject類型",
|
|
37
|
-
"externalIdField": "外部ID欄位"
|
|
38
|
-
},
|
|
39
55
|
"input": {
|
|
40
56
|
"payload": "記錄陣列或SOQL查詢"
|
|
41
57
|
},
|
|
@@ -46,15 +62,23 @@
|
|
|
46
62
|
]
|
|
47
63
|
},
|
|
48
64
|
"salesforce-connection": {
|
|
49
|
-
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
50
|
-
"label": "Connection",
|
|
51
|
-
"description": "使用帶有PKCE的OAuth 2.0管理與Salesforce組織的連線。為其他Salesforce節點提供身份驗證和權杖管理。",
|
|
52
65
|
"configs": {
|
|
66
|
+
"name": "名稱",
|
|
53
67
|
"loginUrl": "登入URL",
|
|
54
68
|
"clientId": "用戶端ID",
|
|
55
69
|
"apiVersion": "API版本",
|
|
56
70
|
"callbackUrl": "回呼URL"
|
|
57
71
|
},
|
|
72
|
+
"toggles": {
|
|
73
|
+
"validateInput": "驗證輸入",
|
|
74
|
+
"validateOutput": "驗證輸出",
|
|
75
|
+
"errorPort": "錯誤端口",
|
|
76
|
+
"completePort": "完成端口",
|
|
77
|
+
"statusPort": "狀態端口"
|
|
78
|
+
},
|
|
79
|
+
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
80
|
+
"label": "Connection",
|
|
81
|
+
"description": "使用帶有PKCE的OAuth 2.0管理與Salesforce組織的連線。為其他Salesforce節點提供身份驗證和權杖管理。",
|
|
58
82
|
"credentials": {
|
|
59
83
|
"accessToken": "存取權杖",
|
|
60
84
|
"refreshToken": "重新整理權杖",
|
|
@@ -62,6 +86,18 @@
|
|
|
62
86
|
}
|
|
63
87
|
},
|
|
64
88
|
"salesforce-describe": {
|
|
89
|
+
"configs": {
|
|
90
|
+
"name": "名稱",
|
|
91
|
+
"connection": "Connection",
|
|
92
|
+
"sObjectType": "SObject類型"
|
|
93
|
+
},
|
|
94
|
+
"toggles": {
|
|
95
|
+
"validateInput": "驗證輸入",
|
|
96
|
+
"validateOutput": "驗證輸出",
|
|
97
|
+
"errorPort": "錯誤端口",
|
|
98
|
+
"completePort": "完成端口",
|
|
99
|
+
"statusPort": "狀態端口"
|
|
100
|
+
},
|
|
65
101
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
66
102
|
"label": "Describe",
|
|
67
103
|
"description": "擷取Salesforce SObject的中繼資料,包括欄位、關聯和記錄類型。",
|
|
@@ -69,10 +105,6 @@
|
|
|
69
105
|
"outputLabels": [
|
|
70
106
|
"SObject中繼資料"
|
|
71
107
|
],
|
|
72
|
-
"configs": {
|
|
73
|
-
"connection": "Connection",
|
|
74
|
-
"sObjectType": "SObject類型"
|
|
75
|
-
},
|
|
76
108
|
"input": {
|
|
77
109
|
"payload": "輸入酬載"
|
|
78
110
|
},
|
|
@@ -83,6 +115,20 @@
|
|
|
83
115
|
]
|
|
84
116
|
},
|
|
85
117
|
"salesforce-dml": {
|
|
118
|
+
"configs": {
|
|
119
|
+
"name": "名稱",
|
|
120
|
+
"connection": "Connection",
|
|
121
|
+
"operation": "操作",
|
|
122
|
+
"sObjectType": "SObject類型",
|
|
123
|
+
"externalIdField": "外部ID欄位"
|
|
124
|
+
},
|
|
125
|
+
"toggles": {
|
|
126
|
+
"validateInput": "驗證輸入",
|
|
127
|
+
"validateOutput": "驗證輸出",
|
|
128
|
+
"errorPort": "錯誤端口",
|
|
129
|
+
"completePort": "完成端口",
|
|
130
|
+
"statusPort": "狀態端口"
|
|
131
|
+
},
|
|
86
132
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
87
133
|
"label": "DML",
|
|
88
134
|
"description": "對Salesforce SObject執行建立、讀取、更新、刪除或upsert操作。",
|
|
@@ -90,12 +136,6 @@
|
|
|
90
136
|
"outputLabels": [
|
|
91
137
|
"操作結果"
|
|
92
138
|
],
|
|
93
|
-
"configs": {
|
|
94
|
-
"connection": "Connection",
|
|
95
|
-
"operation": "操作",
|
|
96
|
-
"sObjectType": "SObject類型",
|
|
97
|
-
"externalIdField": "外部ID欄位"
|
|
98
|
-
},
|
|
99
139
|
"input": {
|
|
100
140
|
"payload": "記錄資料或ID"
|
|
101
141
|
},
|
|
@@ -106,6 +146,18 @@
|
|
|
106
146
|
]
|
|
107
147
|
},
|
|
108
148
|
"salesforce-soql": {
|
|
149
|
+
"configs": {
|
|
150
|
+
"name": "名稱",
|
|
151
|
+
"connection": "Connection",
|
|
152
|
+
"query": "查詢"
|
|
153
|
+
},
|
|
154
|
+
"toggles": {
|
|
155
|
+
"validateInput": "驗證輸入",
|
|
156
|
+
"validateOutput": "驗證輸出",
|
|
157
|
+
"errorPort": "錯誤端口",
|
|
158
|
+
"completePort": "完成端口",
|
|
159
|
+
"statusPort": "狀態端口"
|
|
160
|
+
},
|
|
109
161
|
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
110
162
|
"label": "SOQL",
|
|
111
163
|
"description": "對Salesforce執行SOQL查詢並傳回符合的記錄。",
|
|
@@ -113,10 +165,6 @@
|
|
|
113
165
|
"outputLabels": [
|
|
114
166
|
"查詢結果"
|
|
115
167
|
],
|
|
116
|
-
"configs": {
|
|
117
|
-
"connection": "Connection",
|
|
118
|
-
"query": "查詢"
|
|
119
|
-
},
|
|
120
168
|
"input": {
|
|
121
169
|
"payload": "輸入酬載"
|
|
122
170
|
},
|
|
@@ -129,19 +177,27 @@
|
|
|
129
177
|
]
|
|
130
178
|
},
|
|
131
179
|
"salesforce-streaming": {
|
|
132
|
-
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
133
|
-
"label": "Streaming",
|
|
134
|
-
"description": "使用Pub/Sub API(gRPC)訂閱Salesforce平台事件和變更資料擷取事件。",
|
|
135
|
-
"outputLabels": [
|
|
136
|
-
"事件"
|
|
137
|
-
],
|
|
138
180
|
"configs": {
|
|
181
|
+
"name": "名稱",
|
|
139
182
|
"connection": "Connection",
|
|
140
183
|
"channelName": "頻道",
|
|
141
184
|
"subscribeType": "訂閱起點",
|
|
142
185
|
"replayId": "重播ID",
|
|
143
186
|
"numRequested": "批次大小"
|
|
144
187
|
},
|
|
188
|
+
"toggles": {
|
|
189
|
+
"validateInput": "驗證輸入",
|
|
190
|
+
"validateOutput": "驗證輸出",
|
|
191
|
+
"errorPort": "錯誤端口",
|
|
192
|
+
"completePort": "完成端口",
|
|
193
|
+
"statusPort": "狀態端口"
|
|
194
|
+
},
|
|
195
|
+
"$schema": "https://unpkg.com/@bonsae/nrg/schemas/labels.schema.json",
|
|
196
|
+
"label": "Streaming",
|
|
197
|
+
"description": "使用Pub/Sub API(gRPC)訂閱Salesforce平台事件和變更資料擷取事件。",
|
|
198
|
+
"outputLabels": [
|
|
199
|
+
"事件"
|
|
200
|
+
],
|
|
145
201
|
"outputs": [
|
|
146
202
|
{
|
|
147
203
|
"payload": "事件酬載",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonsae/node-red-salesforce",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Salesforce nodes for Node-RED built with @bonsae/nrg",
|
|
5
5
|
"author": "Allan Oricil <allanoricil@duck.com>",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@bonsae/nrg": "^0.
|
|
33
|
+
"@bonsae/nrg": "^0.15.1",
|
|
34
34
|
"jsforce": "^3.10.14",
|
|
35
35
|
"salesforce-pubsub-api-client": "^5.5.2"
|
|
36
36
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineNode as f,__setSchemas as F,__setForms as O,registerTypes as U}from"/nrg/assets/nrg-client.js";import{defineComponent as T,ref as x,onMounted as k,onUnmounted as w,resolveComponent as c,openBlock as u,createElementBlock as p,Fragment as v,createElementVNode as r,createVNode as s,createTextVNode as b,normalizeStyle as N,toDisplayString as S,createCommentVNode as I}from"/nrg/assets/vue.esm-browser.prod.js";const E={"salesforce-connection":{type:"salesforce-connection",category:"config",configSchema:{$id:"salesforce-connection:config",type:"object",required:["name","loginUrl","clientId","apiVersion"],properties:{name:{default:"",type:"string"},loginUrl:{default:"https://login.salesforce.com","x-nrg-form":{icon:"globe"},type:"string"},clientId:{default:"","x-nrg-form":{icon:"key"},type:"string"},apiVersion:{default:"62.0","x-nrg-form":{icon:"code-fork"},anyOf:[{const:"62.0",type:"string"},{const:"61.0",type:"string"},{const:"60.0",type:"string"},{const:"59.0",type:"string"},{const:"58.0",type:"string"},{const:"57.0",type:"string"},{const:"56.0",type:"string"},{const:"55.0",type:"string"}]},callbackUrl:{default:"","x-nrg-form":{icon:"exchange"},type:"string"}}},credentialsSchema:{$id:"salesforce-connection:credentials",type:"object",required:["accessToken","refreshToken","instanceUrl"],properties:{accessToken:{default:"",format:"password",type:"string"},refreshToken:{default:"",format:"password",type:"string"},instanceUrl:{default:"",type:"string"}}},settingsSchema:null,defaults:{name:{required:!1,value:""},loginUrl:{required:!1,value:"https://login.salesforce.com"},clientId:{required:!1,value:""},apiVersion:{required:!1,value:"62.0"},callbackUrl:{required:!1,value:""}},credentials:{accessToken:{required:!1,type:"password",value:""},refreshToken:{required:!1,type:"password",value:""},instanceUrl:{required:!1,type:"text",value:""}},icon:"salesforce-connection.png",inputSchema:null,outputsSchema:null},"salesforce-soql":{type:"salesforce-soql",category:"salesforce",configSchema:{$id:"salesforce-soql:config",type:"object",required:["name","connection","query","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},query:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"search",typedInputTypes:["str","msg","flow","global"]}},errorPort:{default:!1,type:"boolean"},completePort:{default:!1,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},query:{required:!1,value:{type:"str",value:""}},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!1},statusPort:{required:!1,value:!1},validateInput:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-soql.png",inputs:1,outputs:1,inputSchema:{$id:"salesforce-soql:input",type:"object",required:["payload"],properties:{payload:{}}},outputsSchema:{$id:"salesforce-soql:output",type:"object",required:["payload","totalSize","done"],properties:{payload:{type:"array",items:{}},totalSize:{type:"number"},done:{type:"boolean"}}}},"salesforce-dml":{type:"salesforce-dml",category:"salesforce",configSchema:{$id:"salesforce-dml:config",if:{type:"object",required:["operation"],properties:{operation:{const:"upsert",type:"string"}}},then:{type:"object",required:["externalIdField"],properties:{externalIdField:{minLength:1,type:"string"}}},errorMessage:{properties:{externalIdField:"External ID Field is required for upsert operations"}},type:"object",required:["name","connection","operation","sObjectType","record","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},operation:{default:"create","x-nrg-form":{icon:"pencil"},anyOf:[{const:"create",type:"string"},{const:"read",type:"string"},{const:"update",type:"string"},{const:"delete",type:"string"},{const:"upsert",type:"string"}]},sObjectType:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"cube",typedInputTypes:["str","msg"]}},record:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"file-code-o",typedInputTypes:["json","msg"]}},externalIdField:{default:"","x-nrg-form":{icon:"key"},type:"string"},errorPort:{default:!1,type:"boolean"},completePort:{default:!1,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},operation:{required:!1,value:"create"},sObjectType:{required:!1,value:{type:"str",value:""}},record:{required:!1,value:{type:"str",value:""}},externalIdField:{required:!1,value:""},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!1},statusPort:{required:!1,value:!1},validateInput:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-dml.png",inputs:1,outputs:1,inputSchema:{$id:"salesforce-dml:input",type:"object",required:["payload"],properties:{payload:{}}},outputsSchema:{$id:"salesforce-dml:output",type:"object",required:["payload"],properties:{payload:{}}}},"salesforce-bulk":{type:"salesforce-bulk",category:"salesforce",configSchema:{$id:"salesforce-bulk:config",if:{type:"object",required:["operation"],properties:{operation:{const:"upsert",type:"string"}}},then:{type:"object",required:["externalIdField"],properties:{externalIdField:{minLength:1,type:"string"}}},errorMessage:{properties:{externalIdField:"External ID Field is required for upsert operations"}},type:"object",required:["name","connection","operation","sObjectType","columnDelimiter","lineEnding","pollInterval","pollTimeout","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},operation:{default:"insert","x-nrg-form":{icon:"database"},anyOf:[{const:"insert",type:"string"},{const:"update",type:"string"},{const:"upsert",type:"string"},{const:"delete",type:"string"},{const:"query",type:"string"}]},sObjectType:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"cube",typedInputTypes:["str","msg"]}},externalIdField:{default:"","x-nrg-form":{icon:"key"},type:"string"},assignmentRuleId:{default:"","x-nrg-form":{icon:"gavel"},type:"string"},columnDelimiter:{default:"COMMA","x-nrg-form":{icon:"columns"},anyOf:[{const:"COMMA",type:"string"},{const:"TAB",type:"string"},{const:"PIPE",type:"string"},{const:"SEMICOLON",type:"string"},{const:"CARET",type:"string"},{const:"BACKQUOTE",type:"string"}]},lineEnding:{default:"LF","x-nrg-form":{icon:"level-down"},anyOf:[{const:"LF",type:"string"},{const:"CRLF",type:"string"}]},pollInterval:{default:5e3,minimum:1e3,"x-nrg-form":{icon:"clock-o"},type:"number"},pollTimeout:{default:6e4,minimum:5e3,"x-nrg-form":{icon:"hourglass"},type:"number"},errorPort:{default:!1,type:"boolean"},completePort:{default:!0,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},operation:{required:!1,value:"insert"},sObjectType:{required:!1,value:{type:"str",value:""}},externalIdField:{required:!1,value:""},assignmentRuleId:{required:!1,value:""},columnDelimiter:{required:!1,value:"COMMA"},lineEnding:{required:!1,value:"LF"},pollInterval:{required:!1,value:5e3},pollTimeout:{required:!1,value:6e4},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!0},statusPort:{required:!1,value:!1},validateInput:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-bulk.png",inputs:1,outputs:2,inputSchema:{$id:"salesforce-bulk:input",type:"object",required:["payload"],properties:{payload:{}}},outputsSchema:{record:{$id:"salesforce-bulk:record-output",type:"object",properties:{}},jobCreated:{$id:"salesforce-bulk:job-created-output",type:"object",properties:{}}}},"salesforce-describe":{type:"salesforce-describe",category:"salesforce",configSchema:{$id:"salesforce-describe:config",type:"object",required:["name","connection","sObjectType","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},sObjectType:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"cube",typedInputTypes:["str","msg"]}},errorPort:{default:!1,type:"boolean"},completePort:{default:!1,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},sObjectType:{required:!1,value:{type:"str",value:""}},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!1},statusPort:{required:!1,value:!1},validateInput:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-describe.png",inputs:1,outputs:1,inputSchema:{$id:"salesforce-describe:input",type:"object",required:["payload"],properties:{payload:{}}},outputsSchema:{$id:"salesforce-describe:output",type:"object",required:["payload"],properties:{payload:{type:"object",required:["name","fields","childRelationships","recordTypeInfos"],properties:{name:{type:"string"},fields:{type:"array",items:{}},childRelationships:{type:"array",items:{}},recordTypeInfos:{type:"array",items:{}}}}}}},"salesforce-streaming":{type:"salesforce-streaming",category:"salesforce",configSchema:{$id:"salesforce-streaming:config",if:{type:"object",required:["subscribeType"],properties:{subscribeType:{const:"CUSTOM",type:"string"}}},then:{type:"object",required:["replayId"],properties:{replayId:{minLength:1,type:"string"}}},errorMessage:{properties:{replayId:"Replay ID is required when Subscribe Type is CUSTOM"}},type:"object",required:["name","connection","channelName","subscribeType","numRequested","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},channelName:{default:"","x-nrg-form":{icon:"rss"},type:"string"},subscribeType:{default:"LATEST","x-nrg-form":{icon:"history"},anyOf:[{const:"LATEST",type:"string"},{const:"EARLIEST",type:"string"},{const:"CUSTOM",type:"string"}]},replayId:{default:"","x-nrg-form":{icon:"bookmark"},type:"string"},numRequested:{default:100,minimum:1,maximum:100,"x-nrg-form":{icon:"sort-numeric-asc"},type:"number"},errorPort:{default:!1,type:"boolean"},completePort:{default:!1,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},channelName:{required:!1,value:""},subscribeType:{required:!1,value:"LATEST"},replayId:{required:!1,value:""},numRequested:{required:!1,value:100},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!1},statusPort:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-streaming.png",inputs:0,outputs:1,inputSchema:null,outputsSchema:{$id:"salesforce-streaming:output",type:"object",required:["payload","replayId","channel","topic"],properties:{payload:{},replayId:{},channel:{type:"string"},topic:{type:"string"}}}},"salesforce-apex":{type:"salesforce-apex",category:"salesforce",configSchema:{$id:"salesforce-apex:config",type:"object",required:["name","connection","method","path","errorPort","completePort","statusPort"],properties:{name:{default:"","x-nrg-form":{icon:"tag"},type:"string"},connection:{description:"Reference to salesforce-connection",format:"node-id",type:"string","x-nrg-node-type":"salesforce-connection","x-nrg-form":{icon:"cloud"}},method:{default:"POST","x-nrg-form":{icon:"random"},anyOf:[{const:"GET",type:"string"},{const:"POST",type:"string"},{const:"PUT",type:"string"},{const:"PATCH",type:"string"},{const:"DELETE",type:"string"}]},path:{description:"Represents a Node-RED TypedInput value and its type.",default:{type:"str",value:""},type:"object",required:["value","type"],properties:{value:{description:"The actual value entered or selected.",default:"",anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},type:{description:"The type of the value (string, number, message property, etc.)",default:"str",anyOf:[{const:"msg",type:"string"},{const:"flow",type:"string"},{const:"global",type:"string"},{const:"str",type:"string"},{const:"num",type:"string"},{const:"bool",type:"string"},{const:"json",type:"string"},{const:"bin",type:"string"},{const:"re",type:"string"},{const:"jsonata",type:"string"},{const:"date",type:"string"},{const:"env",type:"string"},{const:"node",type:"string"},{const:"cred",type:"string"}]}},"x-nrg-typed-input":!0,"x-nrg-form":{icon:"link",typedInputTypes:["str","msg"]}},errorPort:{default:!1,type:"boolean"},completePort:{default:!1,type:"boolean"},statusPort:{default:!1,type:"boolean"}}},credentialsSchema:null,settingsSchema:null,defaults:{name:{required:!1,value:""},connection:{required:!1,type:"salesforce-connection"},method:{required:!1,value:"POST"},path:{required:!1,value:{type:"str",value:""}},errorPort:{required:!1,value:!1},completePort:{required:!1,value:!1},statusPort:{required:!1,value:!1},validateInput:{required:!1,value:!1},validateOutput:{required:!1,value:!1}},color:"#FFFFFF",icon:"salesforce-apex.png",inputs:1,outputs:1,inputSchema:{$id:"salesforce-apex:input",type:"object",required:["payload"],properties:{payload:{}}},outputsSchema:{$id:"salesforce-apex:output",type:"object",required:["payload"],properties:{payload:{}}}}},C={class:"form-row"},D={class:"form-row"},L={class:"form-row"},A={class:"form-row"},M={class:"form-row"},z={class:"form-row",style:{border:"1px solid var(--red-ui-primary-border-color, #ddd)","border-radius":"4px",padding:"12px","margin-top":"8px"}},V={style:{display:"flex","align-items":"center",gap:"8px","margin-bottom":"8px"}},B={style:{"font-weight":"500"}},J=["disabled"],j=T({__name:"salesforce-connection",props:{node:{}},setup(e){const i=x("unknown"),y=x(""),a=x(!1);async function g(){if(!e.node.id){i.value="disconnected";return}try{const n=await $.ajax({url:`salesforce/auth/status/${e.node.id}`,type:"GET",dataType:"json"});i.value=n.authenticated?"connected":"disconnected",n.instanceUrl&&(y.value=n.instanceUrl)}catch{i.value="disconnected"}}async function q(){if(!e.node.loginUrl||!e.node.clientId){RED.notify("Please fill in Login URL and Client ID before authorizing.","warning");return}a.value=!0;try{const n=await $.ajax({url:"salesforce/auth/start",type:"POST",contentType:"application/json",data:JSON.stringify({nodeId:e.node.id,loginUrl:e.node.loginUrl,clientId:e.node.clientId,callbackUrl:e.node.callbackUrl||void 0}),dataType:"json"});window.open(n.authorizationUrl,"salesforce-auth","width=600,height=700,menubar=no,toolbar=no")}catch{RED.notify("Failed to start authorization. Check the logs.","error")}finally{a.value=!1}}function o(n){var l;((l=n.data)==null?void 0:l.type)==="salesforce-auth-success"&&n.data.nodeId===e.node.id&&(i.value="connected",n.data.instanceUrl&&(y.value=n.data.instanceUrl),e.node.credentials||(e.node.credentials={}),e.node.credentials.accessToken=n.data.accessToken,e.node.credentials.refreshToken=n.data.refreshToken,e.node.credentials.instanceUrl=n.data.instanceUrl,RED.notify("Salesforce authorization successful!","success"))}k(()=>{window.addEventListener("message",o),g()}),w(()=>{window.removeEventListener("message",o)});const d=[{value:"62.0",label:"62.0"},{value:"61.0",label:"61.0"},{value:"60.0",label:"60.0"},{value:"59.0",label:"59.0"},{value:"58.0",label:"58.0"},{value:"57.0",label:"57.0"},{value:"56.0",label:"56.0"},{value:"55.0",label:"55.0"}];return(n,l)=>{const m=c("NodeRedInput"),h=c("NodeRedSelectInput");return u(),p(v,null,[r("div",C,[s(m,{value:e.node.name,"onUpdate:value":l[0]||(l[0]=t=>e.node.name=t),label:"Name",icon:"tag"},null,8,["value"])]),r("div",D,[s(m,{value:e.node.loginUrl,"onUpdate:value":l[1]||(l[1]=t=>e.node.loginUrl=t),label:"Login URL",icon:"globe"},null,8,["value"])]),r("div",L,[s(m,{value:e.node.clientId,"onUpdate:value":l[2]||(l[2]=t=>e.node.clientId=t),label:"Client ID",icon:"key"},null,8,["value"])]),r("div",A,[s(h,{value:e.node.apiVersion,"onUpdate:value":l[3]||(l[3]=t=>e.node.apiVersion=t),label:"API Version",icon:"code-fork",options:d},null,8,["value"])]),r("div",M,[s(m,{value:e.node.callbackUrl,"onUpdate:value":l[4]||(l[4]=t=>e.node.callbackUrl=t),label:"Callback URL",icon:"exchange"},null,8,["value"]),l[5]||(l[5]=r("div",{class:"form-tips",style:{"max-width":"100%",width:"100%","box-sizing":"border-box","margin-top":"4px"}},[r("i",{class:"fa fa-info-circle"}),b(" Optional. Override the auto-detected callback URL for reverse proxy setups. ")],-1))]),r("div",z,[r("div",V,[r("i",{class:"fa fa-circle",style:N({color:i.value==="connected"?"#22c55e":i.value==="disconnected"?"#ef4444":"#9ca3af",fontSize:"10px"})},null,4),r("span",B,[i.value==="connected"?(u(),p(v,{key:0},[b(" Connected to "+S(y.value),1)],64)):i.value==="disconnected"?(u(),p(v,{key:1},[b(" Not Connected ")],64)):(u(),p(v,{key:2},[b(" Checking... ")],64))])]),r("button",{class:"red-ui-button",disabled:a.value,style:{width:"100%"},onClick:q},[l[6]||(l[6]=r("i",{class:"fa fa-sign-in"},null,-1)),b(" "+S(a.value?"Opening Salesforce...":i.value==="connected"?"Re-authorize":"Authorize with Salesforce"),1)],8,J)])],64)}}}),G={class:"form-row"},K={class:"form-row"},Q={class:"form-row"},H={class:"form-row"},W={class:"form-row"},X={key:0,class:"form-row"},P=T({__name:"salesforce-dml",props:{node:{}},setup(e){const i=[{value:"create",label:"create"},{value:"read",label:"read"},{value:"update",label:"update"},{value:"delete",label:"delete"},{value:"upsert",label:"upsert"}];return(y,a)=>{const g=c("NodeRedInput"),q=c("NodeRedConfigInput"),o=c("NodeRedSelectInput"),d=c("NodeRedTypedInput");return u(),p(v,null,[r("div",G,[s(g,{value:e.node.name,"onUpdate:value":a[0]||(a[0]=n=>e.node.name=n),label:"Name",icon:"tag"},null,8,["value"])]),r("div",K,[s(q,{value:e.node.connection,type:"salesforce-connection",node:e.node,"prop-name":"connection",label:"Connection",icon:"cloud","onUpdate:value":a[1]||(a[1]=n=>e.node.connection=n)},null,8,["value","node"])]),r("div",Q,[s(o,{value:e.node.operation,"onUpdate:value":a[2]||(a[2]=n=>e.node.operation=n),label:"Operation",icon:"pencil",options:i},null,8,["value"])]),r("div",H,[s(d,{value:e.node.sObjectType,label:"SObject Type",icon:"cube",types:["str","msg"],"onUpdate:value":a[3]||(a[3]=n=>e.node.sObjectType=n)},null,8,["value"])]),r("div",W,[s(d,{value:e.node.record,label:"Record",icon:"file-code-o",types:["json","msg"],"onUpdate:value":a[4]||(a[4]=n=>e.node.record=n)},null,8,["value"])]),e.node.operation==="upsert"?(u(),p("div",X,[s(g,{value:e.node.externalIdField,"onUpdate:value":a[5]||(a[5]=n=>e.node.externalIdField=n),label:"External ID Field",icon:"key"},null,8,["value"])])):I("",!0)],64)}}}),Y={class:"form-row"},Z={class:"form-row"},_={class:"form-row"},ee={class:"form-row"},te={key:0,class:"form-row"},ne={key:1,class:"form-row"},oe={class:"form-row"},re={class:"form-row"},se={class:"form-row"},le={class:"form-row"},ae={class:"form-row"},R=T({__name:"salesforce-bulk",props:{node:{}},setup(e){const i=()=>e.node.operation!=="query",y=[{value:"insert",label:"insert"},{value:"update",label:"update"},{value:"upsert",label:"upsert"},{value:"delete",label:"delete"},{value:"query",label:"query"}],a=[{value:"COMMA",label:"Comma (,)"},{value:"TAB",label:"Tab"},{value:"PIPE",label:"Pipe (|)"},{value:"SEMICOLON",label:"Semicolon (;)"},{value:"CARET",label:"Caret (^)"},{value:"BACKQUOTE",label:"Backquote (`)"}],g=[{value:"LF",label:"LF (Unix)"},{value:"CRLF",label:"CRLF (Windows)"}];return(q,o)=>{const d=c("NodeRedInput"),n=c("NodeRedConfigInput"),l=c("NodeRedSelectInput"),m=c("NodeRedTypedInput"),h=c("NodeRedToggle");return u(),p(v,null,[r("div",Y,[s(d,{value:e.node.name,"onUpdate:value":o[0]||(o[0]=t=>e.node.name=t),label:"Name",icon:"tag"},null,8,["value"])]),r("div",Z,[s(n,{value:e.node.connection,type:"salesforce-connection",node:e.node,"prop-name":"connection",label:"Connection",icon:"cloud","onUpdate:value":o[1]||(o[1]=t=>e.node.connection=t)},null,8,["value","node"])]),r("div",_,[s(l,{value:e.node.operation,"onUpdate:value":o[2]||(o[2]=t=>e.node.operation=t),label:"Operation",icon:"database",options:y},null,8,["value"])]),r("div",ee,[s(m,{value:e.node.sObjectType,label:"SObject Type",icon:"cube",types:["str","msg"],"onUpdate:value":o[3]||(o[3]=t=>e.node.sObjectType=t)},null,8,["value"])]),e.node.operation==="upsert"?(u(),p("div",te,[s(d,{value:e.node.externalIdField,"onUpdate:value":o[4]||(o[4]=t=>e.node.externalIdField=t),label:"External ID Field",icon:"key"},null,8,["value"])])):I("",!0),i()&&e.node.operation!=="delete"?(u(),p("div",ne,[s(d,{value:e.node.assignmentRuleId,"onUpdate:value":o[5]||(o[5]=t=>e.node.assignmentRuleId=t),label:"Assignment Rule ID",icon:"gavel"},null,8,["value"])])):I("",!0),r("div",oe,[s(l,{value:e.node.columnDelimiter,"onUpdate:value":o[6]||(o[6]=t=>e.node.columnDelimiter=t),label:"Column Delimiter",icon:"columns",options:a},null,8,["value"])]),r("div",re,[s(l,{value:e.node.lineEnding,"onUpdate:value":o[7]||(o[7]=t=>e.node.lineEnding=t),label:"Line Ending",icon:"level-down",options:g},null,8,["value"])]),r("div",se,[s(d,{value:e.node.pollInterval,"onUpdate:value":o[8]||(o[8]=t=>e.node.pollInterval=t),label:"Poll Interval (ms)",icon:"clock-o",type:"number"},null,8,["value"])]),r("div",le,[s(d,{value:e.node.pollTimeout,"onUpdate:value":o[9]||(o[9]=t=>e.node.pollTimeout=t),label:"Poll Timeout (ms)",icon:"hourglass",type:"number"},null,8,["value"])]),r("div",ae,[s(h,{"model-value":e.node.emitJobCreated,label:"Emit Job Created",icon:"flag","onUpdate:modelValue":o[10]||(o[10]=t=>{e.node.emitJobCreated=t,e.node.outputs=t?3:2})},null,8,["model-value"])])],64)}}}),ie=f({type:"salesforce-connection",form:{component:j}}),ce=f({type:"salesforce-soql"}),de=f({type:"salesforce-dml",form:{component:P}}),ue=f({type:"salesforce-bulk",form:{component:R}}),pe=f({type:"salesforce-describe"}),fe=f({type:"salesforce-streaming"}),ye=f({type:"salesforce-apex"});F(E),O({"salesforce-connection":j,"salesforce-dml":P,"salesforce-bulk":R}),U([ie,ce,de,ue,pe,fe,ye]);
|