@firedrill-tools/salesforce 0.1.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.
Files changed (41) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +156 -0
  3. package/firedrill/agent.target.json +17 -0
  4. package/firedrill/api-limit-exceeded.scenario.json +11 -0
  5. package/firedrill/baseline.scenario.json +2213 -0
  6. package/firedrill/conformance.suite.json +23 -0
  7. package/firedrill/row-locked.scenario.json +11 -0
  8. package/firedrill/salesforce-api-limit-exceeded.drill.json +336 -0
  9. package/firedrill/salesforce-collections-composite.drill.json +277 -0
  10. package/firedrill/salesforce-denied.drill.json +74 -0
  11. package/firedrill/salesforce-fresh-install.drill.json +86 -0
  12. package/firedrill/salesforce-inactive-user.drill.json +43 -0
  13. package/firedrill/salesforce-invalid-session.drill.json +336 -0
  14. package/firedrill/salesforce-large-responses.drill.json +138 -0
  15. package/firedrill/salesforce-mcp-aliases.drill.json +156 -0
  16. package/firedrill/salesforce-profile-permissions.drill.json +241 -0
  17. package/firedrill/salesforce-read-only.drill.json +154 -0
  18. package/firedrill/salesforce-rest-flow.drill.json +714 -0
  19. package/firedrill/salesforce-row-locked.drill.json +227 -0
  20. package/firedrill/salesforce-sharing.drill.json +201 -0
  21. package/firedrill/salesforce-soql.drill.json +139 -0
  22. package/firedrill/salesforce-tight-limits.drill.json +336 -0
  23. package/firedrill/salesforce-write-committed-lost.drill.json +176 -0
  24. package/firedrill/tight-limits.scenario.json +41 -0
  25. package/firedrill/tools/salesforce/behavior.mjs +637 -0
  26. package/firedrill/tools/salesforce/lib/bytes.mjs +56 -0
  27. package/firedrill/tools/salesforce/lib/ids.mjs +68 -0
  28. package/firedrill/tools/salesforce/lib/match.mjs +352 -0
  29. package/firedrill/tools/salesforce/lib/records.mjs +506 -0
  30. package/firedrill/tools/salesforce/lib/schema.mjs +429 -0
  31. package/firedrill/tools/salesforce/lib/search.mjs +92 -0
  32. package/firedrill/tools/salesforce/lib/soql.mjs +1119 -0
  33. package/firedrill/tools/salesforce/lib/state.mjs +378 -0
  34. package/firedrill/tools/salesforce/lib/wire.mjs +109 -0
  35. package/firedrill/tools/salesforce/salesforce.tool.json +3939 -0
  36. package/firedrill/world.json +2705 -0
  37. package/firedrill/write-committed-lost.scenario.json +11 -0
  38. package/firedrill.json +5 -0
  39. package/package.json +64 -0
  40. package/starter.json +2212 -0
  41. package/test/conformance.mjs +1122 -0
@@ -0,0 +1,227 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-row-locked",
4
+ "title": "Fault row-locked: the nine write operations answer 400 UNABLE_TO_LOCK_ROW and write nothing; reads keep working",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "row-locked",
7
+ "actorId": "admin",
8
+ "task": {
9
+ "instruction": "Run the row-locked conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "records-create-tool-error-eq-1",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "records.create"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "records-update-tool-error-eq-1",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "records.update"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "records-delete-tool-error-eq-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "records.delete"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "records-upsert-tool-error-eq-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "records.upsert"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "collections-create-tool-error-eq-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "collections.create"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "collections-update-tool-error-eq-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "collections.update"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "collections-delete-tool-error-eq-1",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "collections.delete"
108
+ },
109
+ "outcomes": [
110
+ "tool_error"
111
+ ],
112
+ "comparison": {
113
+ "operator": "equals",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "collections-upsert-tool-error-eq-1",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "salesforce",
122
+ "operationId": "collections.upsert"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "equals",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "composite-execute-tool-error-eq-1",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "salesforce",
137
+ "operationId": "composite.execute"
138
+ },
139
+ "outcomes": [
140
+ "tool_error"
141
+ ],
142
+ "comparison": {
143
+ "operator": "equals",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "query-execute-ok-ge-1",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "salesforce",
152
+ "operationId": "query.execute"
153
+ },
154
+ "outcomes": [
155
+ "ok"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "records-retrieve-ok-ge-2",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "salesforce",
167
+ "operationId": "records.retrieve"
168
+ },
169
+ "outcomes": [
170
+ "ok"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 2
175
+ }
176
+ },
177
+ {
178
+ "id": "accounts-count-10",
179
+ "kind": "state.count",
180
+ "packageId": "salesforce",
181
+ "namespace": "accounts",
182
+ "comparison": {
183
+ "operator": "equals",
184
+ "value": 10
185
+ }
186
+ },
187
+ {
188
+ "id": "event-record-created-eq-0",
189
+ "kind": "event.count",
190
+ "event": {
191
+ "packageId": "salesforce",
192
+ "eventId": "record.created"
193
+ },
194
+ "phase": "emitted",
195
+ "comparison": {
196
+ "operator": "equals",
197
+ "value": 0
198
+ }
199
+ },
200
+ {
201
+ "id": "event-record-updated-eq-0",
202
+ "kind": "event.count",
203
+ "event": {
204
+ "packageId": "salesforce",
205
+ "eventId": "record.updated"
206
+ },
207
+ "phase": "emitted",
208
+ "comparison": {
209
+ "operator": "equals",
210
+ "value": 0
211
+ }
212
+ },
213
+ {
214
+ "id": "event-record-deleted-eq-0",
215
+ "kind": "event.count",
216
+ "event": {
217
+ "packageId": "salesforce",
218
+ "eventId": "record.deleted"
219
+ },
220
+ "phase": "emitted",
221
+ "comparison": {
222
+ "operator": "equals",
223
+ "value": 0
224
+ }
225
+ }
226
+ ]
227
+ }
@@ -0,0 +1,201 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-sharing",
4
+ "title": "Org-wide defaults and ownership: a Standard User sees only own Private records, edits only own Public Read Only records, Controlled-by-Parent contacts follow the account",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "rep",
8
+ "task": {
9
+ "instruction": "Run the sharing conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "records-retrieve-tool-error-ge-3",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "records.retrieve"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 3
25
+ }
26
+ },
27
+ {
28
+ "id": "records-update-tool-error-eq-2",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "records.update"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 2
40
+ }
41
+ },
42
+ {
43
+ "id": "records-delete-tool-error-eq-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "records.delete"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "records-upsert-tool-error-eq-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "records.upsert"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "records-update-ok-eq-3",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "records.update"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 3
85
+ }
86
+ },
87
+ {
88
+ "id": "records-create-ok-eq-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "records.create"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "query-execute-ok-ge-5",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "query.execute"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 5
115
+ }
116
+ },
117
+ {
118
+ "id": "collections-retrieve-ok-ge-1",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "salesforce",
122
+ "operationId": "collections.retrieve"
123
+ },
124
+ "outcomes": [
125
+ "ok"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "search-parameterized-ok-ge-2",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "salesforce",
137
+ "operationId": "search.parameterized"
138
+ },
139
+ "outcomes": [
140
+ "ok"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 2
145
+ }
146
+ },
147
+ {
148
+ "id": "composite-execute-ok-ge-1",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "salesforce",
152
+ "operationId": "composite.execute"
153
+ },
154
+ "outcomes": [
155
+ "ok"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "account-104-unchanged",
164
+ "kind": "state.value",
165
+ "packageId": "salesforce",
166
+ "namespace": "accounts",
167
+ "rowId": "001Fd0000000104IAA",
168
+ "path": [
169
+ "fields",
170
+ "Phone"
171
+ ],
172
+ "comparison": {
173
+ "operator": "equals",
174
+ "value": "+41 61 555 0104"
175
+ }
176
+ },
177
+ {
178
+ "id": "opportunities-count-10",
179
+ "kind": "state.count",
180
+ "packageId": "salesforce",
181
+ "namespace": "opportunities",
182
+ "comparison": {
183
+ "operator": "equals",
184
+ "value": 10
185
+ }
186
+ },
187
+ {
188
+ "id": "event-record-deleted-eq-0",
189
+ "kind": "event.count",
190
+ "event": {
191
+ "packageId": "salesforce",
192
+ "eventId": "record.deleted"
193
+ },
194
+ "phase": "emitted",
195
+ "comparison": {
196
+ "operator": "equals",
197
+ "value": 0
198
+ }
199
+ }
200
+ ]
201
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-soql",
4
+ "title": "SOQL subset: projections, relationship fields, subqueries, FIELDS(), WHERE operators and date literals, ORDER BY, paging locators, rejections; parameterized search",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "admin",
8
+ "task": {
9
+ "instruction": "Run the soql conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "query-execute-ok-ge-20",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "query.execute"
18
+ },
19
+ "outcomes": [
20
+ "ok"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 20
25
+ }
26
+ },
27
+ {
28
+ "id": "query-more-ok-ge-3",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "query.more"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 3
40
+ }
41
+ },
42
+ {
43
+ "id": "search-parameterized-ok-ge-4",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "search.parameterized"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 4
55
+ }
56
+ },
57
+ {
58
+ "id": "query-execute-tool-error-ge-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "query.execute"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "query-more-tool-error-ge-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "query.more"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "search-parameterized-tool-error-ge-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "search.parameterized"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "accounts-count-10",
104
+ "kind": "state.count",
105
+ "packageId": "salesforce",
106
+ "namespace": "accounts",
107
+ "comparison": {
108
+ "operator": "equals",
109
+ "value": 10
110
+ }
111
+ },
112
+ {
113
+ "id": "event-record-created-eq-0",
114
+ "kind": "event.count",
115
+ "event": {
116
+ "packageId": "salesforce",
117
+ "eventId": "record.created"
118
+ },
119
+ "phase": "emitted",
120
+ "comparison": {
121
+ "operator": "equals",
122
+ "value": 0
123
+ }
124
+ },
125
+ {
126
+ "id": "event-record-updated-eq-0",
127
+ "kind": "event.count",
128
+ "event": {
129
+ "packageId": "salesforce",
130
+ "eventId": "record.updated"
131
+ },
132
+ "phase": "emitted",
133
+ "comparison": {
134
+ "operator": "equals",
135
+ "value": 0
136
+ }
137
+ }
138
+ ]
139
+ }