@kitalive/sfdx-plugin 0.1.6 → 0.3.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 (31) hide show
  1. package/README.md +264 -31
  2. package/lib/bulk.d.ts +22 -0
  3. package/lib/bulk.js +282 -0
  4. package/lib/bulk.js.map +1 -0
  5. package/lib/commands/kit/data/bulk/delete.d.ts +18 -0
  6. package/lib/commands/kit/data/bulk/delete.js +91 -0
  7. package/lib/commands/kit/data/bulk/delete.js.map +1 -0
  8. package/lib/commands/kit/data/bulk/insert.d.ts +2 -0
  9. package/lib/commands/kit/data/bulk/insert.js +5 -0
  10. package/lib/commands/kit/data/bulk/insert.js.map +1 -0
  11. package/lib/commands/kit/data/bulk/query.d.ts +15 -0
  12. package/lib/commands/kit/data/bulk/query.js +57 -0
  13. package/lib/commands/kit/data/bulk/query.js.map +1 -0
  14. package/lib/commands/kit/data/bulk/update.d.ts +2 -0
  15. package/lib/commands/kit/data/bulk/update.js +5 -0
  16. package/lib/commands/kit/data/bulk/update.js.map +1 -0
  17. package/lib/commands/kit/data/bulk/upsert.d.ts +2 -49
  18. package/lib/commands/kit/data/bulk/upsert.js +2 -209
  19. package/lib/commands/kit/data/bulk/upsert.js.map +1 -1
  20. package/lib/commands/kit/data/csv/convert.js +53 -21
  21. package/lib/commands/kit/data/csv/convert.js.map +1 -1
  22. package/lib/commands/kit/layout/assignments/deploy.js +8 -3
  23. package/lib/commands/kit/layout/assignments/deploy.js.map +1 -1
  24. package/lib/commands/kit/layout/assignments/retrieve.d.ts +1 -0
  25. package/lib/commands/kit/layout/assignments/retrieve.js +51 -16
  26. package/lib/commands/kit/layout/assignments/retrieve.js.map +1 -1
  27. package/lib/commands/kit/script/execute.d.ts +1 -1
  28. package/lib/commands/kit/script/execute.js +19 -8
  29. package/lib/commands/kit/script/execute.js.map +1 -1
  30. package/oclif.manifest.json +1 -1
  31. package/package.json +28 -18
package/README.md CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @kitalive/sfdx-plugin
18
18
  $ sfdx COMMAND
19
19
  running command...
20
20
  $ sfdx (-v|--version|version)
21
- @kitalive/sfdx-plugin/0.1.6 darwin-x64 node-v14.15.0
21
+ @kitalive/sfdx-plugin/0.3.0 darwin-x64 node-v16.14.2
22
22
  $ sfdx --help [COMMAND]
23
23
  USAGE
24
24
  $ sfdx COMMAND
@@ -29,23 +29,268 @@ USAGE
29
29
  ## Commands
30
30
 
31
31
  <!-- commands -->
32
- * [`sfdx kit:data:bulk:upsert -o <string> -i <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupsert--o-string--i-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
32
+ * [`sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkdelete--q-string---hard---concurrencymode-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
33
+ * [`sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkinsert--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
34
+ * [`sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkquery--q-string--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
35
+ * [`sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupdate--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
36
+ * [`sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupsert--o-string--f-filepath--i-string--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
33
37
  * [`sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatacsvconvert--f-filepath--o-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
34
38
  * [`sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsdeploy--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
35
39
  * [`sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsretrieve--f-string--p-string--o-string---merge--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
36
40
  * [`sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitscriptexecute--f-filepath--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
37
41
 
38
- ## `sfdx kit:data:bulk:upsert -o <string> -i <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
42
+ ## `sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
39
43
 
40
- bulk upsert records from a CSV file
44
+ bulk delete records by SOQL select query
45
+
46
+ ```
47
+ USAGE
48
+ $ sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u
49
+ <string>] [--apiversion <string>] [--json] [--loglevel
50
+ trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
51
+
52
+ OPTIONS
53
+ -q, --query=query (required) SOQL query to delete
54
+
55
+ -s, --batchsize=batchsize [default: 10000] the batch size of
56
+ the job
57
+
58
+ -u, --targetusername=targetusername username or alias for the target
59
+ org; overrides default target org
60
+
61
+ -w, --wait=wait the number of minutes to wait for
62
+ the command to complete before
63
+ displaying the results
64
+
65
+ --apiversion=apiversion override the api version used for
66
+ api requests made by this command
67
+
68
+ --concurrencymode=concurrencymode [default: Parallel] the concurrency
69
+ mode (Parallel or Serial) for the
70
+ job
71
+
72
+ --hard perform a hard delete
73
+
74
+ --json format output as json
75
+
76
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
77
+ this command invocation
78
+
79
+ EXAMPLE
80
+ $ sfdx kit:data:bulk:delete -q 'SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:5'
81
+ ```
82
+
83
+ _See code: [src/commands/kit/data/bulk/delete.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/bulk/delete.ts)_
84
+
85
+ ## `sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
86
+
87
+ bulk insert records from a CSV file
88
+
89
+ ```
90
+ USAGE
91
+ $ sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>]
92
+ [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode
93
+ <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json]
94
+ [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
95
+
96
+ OPTIONS
97
+ -c, --converter=converter the path of the script to convert
98
+ CSV rows
99
+
100
+ -d, --delimiter=delimiter [default: ,] the input CSV file
101
+ delimiter
102
+
103
+ -e, --encoding=encoding [default: utf8] the input CSV file
104
+ encoding
105
+
106
+ -f, --csvfile=csvfile (required) the CSV file path that
107
+ defines the records to insert
108
+
109
+ -m, --mapping=mapping the path of the JSON file that
110
+ defines CSV column mappings
111
+
112
+ -o, --object=object (required) the sObject name to
113
+ insert
114
+
115
+ -q, --quote=quote [default: "] the input CSV file
116
+ quote character
117
+
118
+ -r, --resultfile=resultfile the CSV file path for writing the
119
+ insert results
120
+
121
+ -s, --batchsize=batchsize [default: 10000] the batch size of
122
+ the job
123
+
124
+ -u, --targetusername=targetusername username or alias for the target
125
+ org; overrides default target org
41
126
 
127
+ -w, --wait=wait the number of minutes to wait for
128
+ the command to complete before
129
+ displaying the results
130
+
131
+ --apiversion=apiversion override the api version used for
132
+ api requests made by this command
133
+
134
+ --assignmentruleid=assignmentruleid the ID of a specific assignment rule
135
+ to run for a case or a lead.
136
+
137
+ --concurrencymode=concurrencymode [default: Parallel] the concurrency
138
+ mode (Parallel or Serial) for the
139
+ job
140
+
141
+ --convertonly output converted.csv file and skip
142
+ insert for debugging
143
+
144
+ --json format output as json
145
+
146
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
147
+ this command invocation
148
+
149
+ --setnull set blank values as null values
150
+ during insert operations (default:
151
+ empty field values are ignored)
152
+
153
+ --skiplines=skiplines [default: 0] the number of lines to
154
+ skip
155
+
156
+ --trim trim all white space from columns
157
+
158
+ DESCRIPTION
159
+ For information about CSV file formats, see [Prepare CSV
160
+ Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
161
+ the Bulk API Developer Guide.
162
+
163
+ EXAMPLES
164
+ $ sfdx kit:data:bulk:insert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
165
+ $ sfdx kit:data:bulk:insert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
42
166
  ```
167
+
168
+ _See code: [src/commands/kit/data/bulk/insert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/bulk/insert.ts)_
169
+
170
+ ## `sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
171
+
172
+ bulk query records
173
+
174
+ ```
175
+ USAGE
176
+ $ sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
177
+ trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
178
+
179
+ OPTIONS
180
+ -f, --csvfile=csvfile output csv file (default: standard
181
+ output)
182
+
183
+ -q, --query=query (required) SOQL query to export
184
+
185
+ -u, --targetusername=targetusername username or alias for the target
186
+ org; overrides default target org
187
+
188
+ --apiversion=apiversion override the api version used for
189
+ api requests made by this command
190
+
191
+ --json format output as json
192
+
193
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
194
+ this command invocation
195
+
196
+ EXAMPLE
197
+ $ sfdx kit:data:bulk:query -q 'SELECT Id, Name FROM Account' -f ./path/to/Account.csv
198
+ ```
199
+
200
+ _See code: [src/commands/kit/data/bulk/query.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/bulk/query.ts)_
201
+
202
+ ## `sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
203
+
204
+ bulk update records from a CSV file
205
+
206
+ ```
207
+ USAGE
208
+ $ sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>]
209
+ [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode
210
+ <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json]
211
+ [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
212
+
213
+ OPTIONS
214
+ -c, --converter=converter the path of the script to convert
215
+ CSV rows
216
+
217
+ -d, --delimiter=delimiter [default: ,] the input CSV file
218
+ delimiter
219
+
220
+ -e, --encoding=encoding [default: utf8] the input CSV file
221
+ encoding
222
+
223
+ -f, --csvfile=csvfile (required) the CSV file path that
224
+ defines the records to update
225
+
226
+ -m, --mapping=mapping the path of the JSON file that
227
+ defines CSV column mappings
228
+
229
+ -o, --object=object (required) the sObject name to
230
+ update
231
+
232
+ -q, --quote=quote [default: "] the input CSV file
233
+ quote character
234
+
235
+ -r, --resultfile=resultfile the CSV file path for writing the
236
+ update results
237
+
238
+ -s, --batchsize=batchsize [default: 10000] the batch size of
239
+ the job
240
+
241
+ -u, --targetusername=targetusername username or alias for the target
242
+ org; overrides default target org
243
+
244
+ -w, --wait=wait the number of minutes to wait for
245
+ the command to complete before
246
+ displaying the results
247
+
248
+ --apiversion=apiversion override the api version used for
249
+ api requests made by this command
250
+
251
+ --assignmentruleid=assignmentruleid the ID of a specific assignment rule
252
+ to run for a case or a lead.
253
+
254
+ --concurrencymode=concurrencymode [default: Parallel] the concurrency
255
+ mode (Parallel or Serial) for the
256
+ job
257
+
258
+ --convertonly output converted.csv file and skip
259
+ update for debugging
260
+
261
+ --json format output as json
262
+
263
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
264
+ this command invocation
265
+
266
+ --setnull set blank values as null values
267
+ during update operations (default:
268
+ empty field values are ignored)
269
+
270
+ --skiplines=skiplines [default: 0] the number of lines to
271
+ skip
272
+
273
+ --trim trim all white space from columns
274
+
275
+ DESCRIPTION
276
+ For information about CSV file formats, see [Prepare CSV
277
+ Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
278
+ the Bulk API Developer Guide.
279
+
280
+ EXAMPLES
281
+ $ sfdx kit:data:bulk:update -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
282
+ $ sfdx kit:data:bulk:update -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
283
+ ```
284
+
285
+ _See code: [src/commands/kit/data/bulk/update.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/bulk/update.ts)_
286
+
287
+ ## `sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
288
+
43
289
  bulk upsert records from a CSV file
44
- Upsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.
45
- For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
46
290
 
291
+ ```
47
292
  USAGE
48
- $ sfdx kit:data:bulk:upsert -o <string> -i <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q
293
+ $ sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q
49
294
  <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly]
50
295
  [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion
51
296
  <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
@@ -110,13 +355,12 @@ OPTIONS
110
355
  during upsert operations (default:
111
356
  empty field values are ignored)
112
357
 
113
- --skiplines=skiplines the number of lines to skip
358
+ --skiplines=skiplines [default: 0] the number of lines to
359
+ skip
114
360
 
115
361
  --trim trim all white space from columns
116
362
 
117
363
  DESCRIPTION
118
- Upsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with
119
- data:bulk:status.
120
364
  For information about CSV file formats, see [Prepare CSV
121
365
  Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
122
366
  the Bulk API Developer Guide.
@@ -127,15 +371,13 @@ EXAMPLES
127
371
  10
128
372
  ```
129
373
 
130
- _See code: [src/commands/kit/data/bulk/upsert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.1.6/src/commands/kit/data/bulk/upsert.ts)_
374
+ _See code: [src/commands/kit/data/bulk/upsert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/bulk/upsert.ts)_
131
375
 
132
376
  ## `sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
133
377
 
134
378
  convert CSV data using column mapping file or Node.js script
135
379
 
136
380
  ```
137
- convert CSV data using column mapping file or Node.js script
138
-
139
381
  USAGE
140
382
  $ sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines
141
383
  <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel
@@ -168,7 +410,8 @@ OPTIONS
168
410
  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
169
411
  this command invocation
170
412
 
171
- --skiplines=skiplines the number of lines to skip
413
+ --skiplines=skiplines [default: 0] the number of lines to
414
+ skip
172
415
 
173
416
  --trim trim all white space from columns
174
417
 
@@ -177,15 +420,13 @@ EXAMPLES
177
420
  $ sfdx kit:data:csv:convert -f ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js -e cp932 -d :
178
421
  ```
179
422
 
180
- _See code: [src/commands/kit/data/csv/convert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.1.6/src/commands/kit/data/csv/convert.ts)_
423
+ _See code: [src/commands/kit/data/csv/convert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/data/csv/convert.ts)_
181
424
 
182
425
  ## `sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
183
426
 
184
427
  deploy page layout assignments from JSON file
185
428
 
186
429
  ```
187
- deploy page layout assignments from JSON file
188
-
189
430
  USAGE
190
431
  $ sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel
191
432
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
@@ -212,15 +453,13 @@ EXAMPLES
212
453
  $ sfdx kit:layout:assignments:deploy -u me@my.org -f config/layout-assignments.sandbox.json
213
454
  ```
214
455
 
215
- _See code: [src/commands/kit/layout/assignments/deploy.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.1.6/src/commands/kit/layout/assignments/deploy.ts)_
456
+ _See code: [src/commands/kit/layout/assignments/deploy.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/layout/assignments/deploy.ts)_
216
457
 
217
458
  ## `sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
218
459
 
219
460
  retrieve page layout assignments and save to JSON file
220
461
 
221
462
  ```
222
- retrieve page layout assignments and save to JSON file
223
-
224
463
  USAGE
225
464
  $ sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion
226
465
  <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
@@ -258,19 +497,13 @@ EXAMPLES
258
497
  $ sfdx kit:layout:assignments:retrieve -u me@my.org -f config/layout-assignments.sandbox.json
259
498
  ```
260
499
 
261
- _See code: [src/commands/kit/layout/assignments/retrieve.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.1.6/src/commands/kit/layout/assignments/retrieve.ts)_
500
+ _See code: [src/commands/kit/layout/assignments/retrieve.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/layout/assignments/retrieve.ts)_
262
501
 
263
502
  ## `sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
264
503
 
265
504
  execute Node.js scripts in SfdxCommand context
266
505
 
267
506
  ```
268
- execute Node.js scripts in SfdxCommand context
269
- Available variables in Node.js scripts
270
- argv: Parsed command line arguments after the file option
271
- conn: jsforce Connection
272
- context: SfdxCommand
273
-
274
507
  USAGE
275
508
  $ sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
276
509
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
@@ -292,9 +525,9 @@ OPTIONS
292
525
 
293
526
  DESCRIPTION
294
527
  Available variables in Node.js scripts
295
- argv: Parsed command line arguments after the file option
296
- conn: jsforce Connection
297
- context: SfdxCommand
528
+ argv: Parsed command line arguments after the file option
529
+ conn: jsforce Connection
530
+ context: SfdxCommand
298
531
 
299
532
  ALIASES
300
533
  $ sfdx kit:script
@@ -307,5 +540,5 @@ EXAMPLES
307
540
  $ NODE_OPTIONS=--experimental-repl-await sfdx kit:script:execute
308
541
  ```
309
542
 
310
- _See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.1.6/src/commands/kit/script/execute.ts)_
543
+ _See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.3.0/src/commands/kit/script/execute.ts)_
311
544
  <!-- commandsstop -->
package/lib/bulk.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { SfdxCommand } from '@salesforce/command';
2
+ import { JsonMap } from '@salesforce/ts-types';
3
+ import { BatchInfo, BatchResultInfo, Connection, JobInfo } from 'jsforce';
4
+ declare type BulkOperation = 'insert' | 'update' | 'upsert' | 'delete' | 'hardDelete';
5
+ declare type BulkOptions = {
6
+ extIdField?: string;
7
+ concurrencyMode?: 'Serial' | 'Parallel';
8
+ assignmentRuleId?: string;
9
+ batchSize?: number;
10
+ wait?: number;
11
+ };
12
+ export declare type BulkResult = {
13
+ job?: JobInfo;
14
+ batches?: BatchInfo[];
15
+ records: BatchResultInfo[];
16
+ errors?: JsonMap[];
17
+ };
18
+ export declare function bulkQuery(conn: Connection, query: string): Promise<JsonMap[]>;
19
+ export declare function bulkLoad(conn: Connection, sobject: string, operation: BulkOperation, rows: JsonMap[], options?: BulkOptions): Promise<BulkResult>;
20
+ export declare function normalizeDateString(str: any, format?: any): any;
21
+ export declare const createBulkCommand: (operation: BulkOperation) => new (...args: any[]) => SfdxCommand;
22
+ export {};