@salesforce/plugin-data 3.4.5 → 3.4.6

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 (3) hide show
  1. package/README.md +19 -19
  2. package/oclif.manifest.json +293 -293
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -143,7 +143,7 @@ EXAMPLES
143
143
  $ sf data create file --file path/to/astro.png --parent-id a03fakeLoJWPIA3
144
144
  ```
145
145
 
146
- _See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/create/file.ts)_
146
+ _See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/create/file.ts)_
147
147
 
148
148
  ## `sf data create record`
149
149
 
@@ -199,7 +199,7 @@ EXAMPLES
199
199
  TracedEntityId=01p17000000R6bLAAS"
200
200
  ```
201
201
 
202
- _See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/create/record.ts)_
202
+ _See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/create/record.ts)_
203
203
 
204
204
  ## `sf data delete bulk`
205
205
 
@@ -246,7 +246,7 @@ EXAMPLES
246
246
  $ sf data delete bulk --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
247
247
  ```
248
248
 
249
- _See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/delete/bulk.ts)_
249
+ _See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/delete/bulk.ts)_
250
250
 
251
251
  ## `sf data delete record`
252
252
 
@@ -307,7 +307,7 @@ EXAMPLES
307
307
  $ sf data delete record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
308
308
  ```
309
309
 
310
- _See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/delete/record.ts)_
310
+ _See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/delete/record.ts)_
311
311
 
312
312
  ## `sf data delete resume`
313
313
 
@@ -346,7 +346,7 @@ EXAMPLES
346
346
  $ sf data delete resume --use-most-recent --target-org my-scratch
347
347
  ```
348
348
 
349
- _See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/delete/resume.ts)_
349
+ _See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/delete/resume.ts)_
350
350
 
351
351
  ## `sf data export beta tree`
352
352
 
@@ -404,7 +404,7 @@ EXAMPLES
404
404
  my-scratch
405
405
  ```
406
406
 
407
- _See code: [src/commands/data/export/beta/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/export/beta/tree.ts)_
407
+ _See code: [src/commands/data/export/beta/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/export/beta/tree.ts)_
408
408
 
409
409
  ## `sf data export tree`
410
410
 
@@ -464,7 +464,7 @@ EXAMPLES
464
464
  my-scratch
465
465
  ```
466
466
 
467
- _See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/export/tree.ts)_
467
+ _See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/export/tree.ts)_
468
468
 
469
469
  ## `sf data get record`
470
470
 
@@ -528,7 +528,7 @@ EXAMPLES
528
528
  $ sf data get record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
529
529
  ```
530
530
 
531
- _See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/get/record.ts)_
531
+ _See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/get/record.ts)_
532
532
 
533
533
  ## `sf data import beta tree`
534
534
 
@@ -572,7 +572,7 @@ EXAMPLES
572
572
  $ sf data import beta tree --plan Account-Contact-plan.json
573
573
  ```
574
574
 
575
- _See code: [src/commands/data/import/beta/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/import/beta/tree.ts)_
575
+ _See code: [src/commands/data/import/beta/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/import/beta/tree.ts)_
576
576
 
577
577
  ## `sf data import tree`
578
578
 
@@ -622,7 +622,7 @@ EXAMPLES
622
622
  $ sf data import tree --plan Account-Contact-plan.json
623
623
  ```
624
624
 
625
- _See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/import/tree.ts)_
625
+ _See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/import/tree.ts)_
626
626
 
627
627
  ## `sf data query`
628
628
 
@@ -686,7 +686,7 @@ EXAMPLES
686
686
  $ sf data query --query "SELECT Id FROM Contact" --bulk --wait 0
687
687
  ```
688
688
 
689
- _See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/query.ts)_
689
+ _See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/query.ts)_
690
690
 
691
691
  ## `sf data query resume`
692
692
 
@@ -724,7 +724,7 @@ EXAMPLES
724
724
  $ sf data query resume --bulk-query-id 7500x000005BdFzXXX
725
725
  ```
726
726
 
727
- _See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/query/resume.ts)_
727
+ _See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/query/resume.ts)_
728
728
 
729
729
  ## `sf data resume`
730
730
 
@@ -761,7 +761,7 @@ EXAMPLES
761
761
  $ sf data resume --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA
762
762
  ```
763
763
 
764
- _See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/resume.ts)_
764
+ _See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/resume.ts)_
765
765
 
766
766
  ## `sf data update record`
767
767
 
@@ -823,7 +823,7 @@ EXAMPLES
823
823
  "ExpirationDate=2017-12-01T00:58:04.000+0000"
824
824
  ```
825
825
 
826
- _See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/update/record.ts)_
826
+ _See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/update/record.ts)_
827
827
 
828
828
  ## `sf data upsert bulk`
829
829
 
@@ -876,7 +876,7 @@ EXAMPLES
876
876
  my-scratch
877
877
  ```
878
878
 
879
- _See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/upsert/bulk.ts)_
879
+ _See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/upsert/bulk.ts)_
880
880
 
881
881
  ## `sf data upsert resume`
882
882
 
@@ -915,7 +915,7 @@ EXAMPLES
915
915
  $ sf data upsert resume --use-most-recent --target-org my-scratch
916
916
  ```
917
917
 
918
- _See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/data/upsert/resume.ts)_
918
+ _See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/data/upsert/resume.ts)_
919
919
 
920
920
  ## `sf force data bulk delete`
921
921
 
@@ -962,7 +962,7 @@ EXAMPLES
962
962
  $ sf force data bulk delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
963
963
  ```
964
964
 
965
- _See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/force/data/bulk/delete.ts)_
965
+ _See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/force/data/bulk/delete.ts)_
966
966
 
967
967
  ## `sf force data bulk status`
968
968
 
@@ -999,7 +999,7 @@ EXAMPLES
999
999
  $ sf force data bulk status --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA --target-org my-scratch
1000
1000
  ```
1001
1001
 
1002
- _See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/force/data/bulk/status.ts)_
1002
+ _See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/force/data/bulk/status.ts)_
1003
1003
 
1004
1004
  ## `sf force data bulk upsert`
1005
1005
 
@@ -1057,6 +1057,6 @@ EXAMPLES
1057
1057
  --target-org my-scratch
1058
1058
  ```
1059
1059
 
1060
- _See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.5/src/commands/force/data/bulk/upsert.ts)_
1060
+ _See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/3.4.6/src/commands/force/data/bulk/upsert.ts)_
1061
1061
 
1062
1062
  <!-- commandsstop -->
@@ -331,14 +331,13 @@
331
331
  "resume:data"
332
332
  ]
333
333
  },
334
- "data:create:file": {
334
+ "data:delete:bulk": {
335
335
  "aliases": [],
336
336
  "args": {},
337
- "description": "This command always creates a new file in the org; you can't update an existing file. After a successful upload, the command displays the ID of the new ContentDocument record which represents the uploaded file.\n\nBy default, the uploaded file isn't attached to a record; in the Salesforce UI the file shows up in the Files tab. You can optionally attach the file to an existing record, such as an account, as long as you know its record ID.\n\nYou can also give the file a new name after it's been uploaded; by default its name in the org is the same as the local file name.",
337
+ "description": "The CSV file must have only one column (\"Id\") and then the list of record IDs you want to delete, one ID per line.\n\nWhen you execute this command, it starts a job, displays the ID, and then immediately returns control of the terminal to you by default. If you prefer to wait, set the --wait flag to the number of minutes; if it times out, the command outputs the IDs. Use the job ID to check the status of the job with the \"<%= config.bin %> data delete resume\" command.",
338
338
  "examples": [
339
- "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
340
- "Give the file a different filename after it's uploaded to the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --file resources/astro.png --title AstroOnABoat.png --target-org my-scratch",
341
- "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
339
+ "Bulk delete Account records from your default org using the list of IDs in the \"files/delete.csv\" file:\n<%= config.bin %> <%= command.id %> --sobject Account --file files/delete.csv",
340
+ "Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to complete:\n<%= config.bin %> <%= command.id %> --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch"
342
341
  ],
343
342
  "flags": {
344
343
  "json": {
@@ -357,7 +356,12 @@
357
356
  "type": "option"
358
357
  },
359
358
  "target-org": {
359
+ "aliases": [
360
+ "targetusername",
361
+ "u"
362
+ ],
360
363
  "char": "o",
364
+ "deprecateAliases": true,
361
365
  "name": "target-org",
362
366
  "noCacheDefault": true,
363
367
  "required": true,
@@ -367,77 +371,120 @@
367
371
  "type": "option"
368
372
  },
369
373
  "api-version": {
374
+ "aliases": [
375
+ "apiversion"
376
+ ],
377
+ "deprecateAliases": true,
370
378
  "description": "Override the api version used for api requests made by this command",
371
379
  "name": "api-version",
372
380
  "hasDynamicHelp": false,
373
381
  "multiple": false,
374
382
  "type": "option"
375
383
  },
376
- "title": {
377
- "char": "t",
378
- "name": "title",
379
- "required": false,
380
- "summary": "New title given to the file (ContentDocument) after it's uploaded.",
384
+ "loglevel": {
385
+ "deprecated": {
386
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
387
+ },
388
+ "hidden": true,
389
+ "name": "loglevel",
381
390
  "hasDynamicHelp": false,
382
391
  "multiple": false,
383
392
  "type": "option"
384
393
  },
385
394
  "file": {
395
+ "aliases": [
396
+ "csvfile"
397
+ ],
386
398
  "char": "f",
399
+ "deprecateAliases": true,
387
400
  "name": "file",
388
401
  "required": true,
389
- "summary": "Path of file to upload.",
402
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
390
403
  "hasDynamicHelp": false,
391
404
  "multiple": false,
392
405
  "type": "option"
393
406
  },
394
- "parent-id": {
395
- "char": "i",
396
- "name": "parent-id",
397
- "summary": "ID of the record to attach the file to.",
407
+ "sobject": {
408
+ "aliases": [
409
+ "sobjecttype"
410
+ ],
411
+ "char": "s",
412
+ "deprecateAliases": true,
413
+ "name": "sobject",
414
+ "required": true,
415
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
398
416
  "hasDynamicHelp": false,
399
417
  "multiple": false,
400
418
  "type": "option"
419
+ },
420
+ "wait": {
421
+ "char": "w",
422
+ "exclusive": [
423
+ "async"
424
+ ],
425
+ "name": "wait",
426
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
427
+ "default": "0 minutes",
428
+ "hasDynamicHelp": true,
429
+ "multiple": false,
430
+ "type": "option"
431
+ },
432
+ "async": {
433
+ "char": "a",
434
+ "exclusive": [
435
+ "wait"
436
+ ],
437
+ "name": "async",
438
+ "summary": "Run the command asynchronously.",
439
+ "allowNo": false,
440
+ "type": "boolean"
441
+ },
442
+ "verbose": {
443
+ "name": "verbose",
444
+ "summary": "Print verbose output of failed records if result is available.",
445
+ "allowNo": false,
446
+ "type": "boolean"
401
447
  }
402
448
  },
403
449
  "hasDynamicHelp": true,
404
450
  "hiddenAliases": [],
405
- "id": "data:create:file",
451
+ "id": "data:delete:bulk",
406
452
  "pluginAlias": "@salesforce/plugin-data",
407
453
  "pluginName": "@salesforce/plugin-data",
408
454
  "pluginType": "core",
409
455
  "strict": true,
410
- "summary": "Upload a local file to an org.",
456
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
411
457
  "enableJsonFlag": true,
412
458
  "isESM": true,
413
459
  "relativePath": [
414
460
  "lib",
415
461
  "commands",
416
462
  "data",
417
- "create",
418
- "file.js"
463
+ "delete",
464
+ "bulk.js"
419
465
  ],
420
466
  "aliasPermutations": [],
421
467
  "permutations": [
422
- "data:create:file",
423
- "create:data:file",
424
- "create:file:data",
425
- "data:file:create",
426
- "file:data:create",
427
- "file:create:data"
468
+ "data:delete:bulk",
469
+ "delete:data:bulk",
470
+ "delete:bulk:data",
471
+ "data:bulk:delete",
472
+ "bulk:data:delete",
473
+ "bulk:delete:data"
428
474
  ]
429
475
  },
430
- "data:create:record": {
476
+ "data:delete:record": {
431
477
  "aliases": [
432
- "force:data:record:create"
478
+ "force:data:record:delete"
433
479
  ],
434
480
  "args": {},
435
481
  "deprecateAliases": true,
436
- "description": "You must specify a value for all required fields of the object.\n\nWhen specifying fields, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command inserts a record into Salesforce objects by default. Use the --use-tooling-api flag to insert into a Tooling API object.",
482
+ "description": "Specify the record you want to delete with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the delete fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command deletes a record from Salesforce objects by default. Use the --use-tooling-api flag to delete from a Tooling API object.",
437
483
  "examples": [
438
- "Insert a record into the Account object of your default org; only the required Name field has a value:\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name=Acme\"",
439
- "Insert an Account record with values for two fields, one value contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name='Universal Containers' Website=www.example.com\" --target-org my-scratch",
440
- "Insert a record into the Tooling API object TraceFlag:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --values \"DebugLevelId=7dl170000008U36AAE StartDate=2022-12-15T00:26:04.000+0000 ExpirationDate=2022-12-15T00:56:04.000+0000 LogType=CLASS_TRACING TracedEntityId=01p17000000R6bLAAS\""
484
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
485
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
486
+ "Delete a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
487
+ "Delete a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
441
488
  ],
442
489
  "flags": {
443
490
  "json": {
@@ -499,16 +546,27 @@
499
546
  "deprecateAliases": true,
500
547
  "name": "sobject",
501
548
  "required": true,
502
- "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
549
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
503
550
  "hasDynamicHelp": false,
504
551
  "multiple": false,
505
552
  "type": "option"
506
553
  },
507
- "values": {
508
- "char": "v",
509
- "name": "values",
510
- "required": true,
511
- "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
554
+ "record-id": {
555
+ "aliases": [
556
+ "sobjectid"
557
+ ],
558
+ "char": "i",
559
+ "deprecateAliases": true,
560
+ "name": "record-id",
561
+ "summary": "ID of the record you’re deleting.",
562
+ "hasDynamicHelp": false,
563
+ "multiple": false,
564
+ "type": "option"
565
+ },
566
+ "where": {
567
+ "char": "w",
568
+ "name": "where",
569
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
512
570
  "hasDynamicHelp": false,
513
571
  "multiple": false,
514
572
  "type": "option"
@@ -520,7 +578,7 @@
520
578
  "char": "t",
521
579
  "deprecateAliases": true,
522
580
  "name": "use-tooling-api",
523
- "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
581
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
524
582
  "allowNo": false,
525
583
  "type": "boolean"
526
584
  },
@@ -538,63 +596,64 @@
538
596
  },
539
597
  "hasDynamicHelp": true,
540
598
  "hiddenAliases": [],
541
- "id": "data:create:record",
599
+ "id": "data:delete:record",
542
600
  "pluginAlias": "@salesforce/plugin-data",
543
601
  "pluginName": "@salesforce/plugin-data",
544
602
  "pluginType": "core",
545
603
  "strict": true,
546
- "summary": "Create and insert a record into a Salesforce or Tooling API object.",
604
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
547
605
  "enableJsonFlag": true,
548
606
  "isESM": true,
549
607
  "relativePath": [
550
608
  "lib",
551
609
  "commands",
552
610
  "data",
553
- "create",
611
+ "delete",
554
612
  "record.js"
555
613
  ],
556
614
  "aliasPermutations": [
557
- "force:data:record:create",
558
- "data:force:record:create",
559
- "data:record:force:create",
560
- "data:record:create:force",
561
- "force:record:data:create",
562
- "record:force:data:create",
563
- "record:data:force:create",
564
- "record:data:create:force",
565
- "force:record:create:data",
566
- "record:force:create:data",
567
- "record:create:force:data",
568
- "record:create:data:force",
569
- "force:data:create:record",
570
- "data:force:create:record",
571
- "data:create:force:record",
572
- "data:create:record:force",
573
- "force:create:data:record",
574
- "create:force:data:record",
575
- "create:data:force:record",
576
- "create:data:record:force",
577
- "force:create:record:data",
578
- "create:force:record:data",
579
- "create:record:force:data",
580
- "create:record:data:force"
615
+ "force:data:record:delete",
616
+ "data:force:record:delete",
617
+ "data:record:force:delete",
618
+ "data:record:delete:force",
619
+ "force:record:data:delete",
620
+ "record:force:data:delete",
621
+ "record:data:force:delete",
622
+ "record:data:delete:force",
623
+ "force:record:delete:data",
624
+ "record:force:delete:data",
625
+ "record:delete:force:data",
626
+ "record:delete:data:force",
627
+ "force:data:delete:record",
628
+ "data:force:delete:record",
629
+ "data:delete:force:record",
630
+ "data:delete:record:force",
631
+ "force:delete:data:record",
632
+ "delete:force:data:record",
633
+ "delete:data:force:record",
634
+ "delete:data:record:force",
635
+ "force:delete:record:data",
636
+ "delete:force:record:data",
637
+ "delete:record:force:data",
638
+ "delete:record:data:force"
581
639
  ],
582
640
  "permutations": [
583
- "data:create:record",
584
- "create:data:record",
585
- "create:record:data",
586
- "data:record:create",
587
- "record:data:create",
588
- "record:create:data"
641
+ "data:delete:record",
642
+ "delete:data:record",
643
+ "delete:record:data",
644
+ "data:record:delete",
645
+ "record:data:delete",
646
+ "record:delete:data"
589
647
  ]
590
648
  },
591
- "data:delete:bulk": {
649
+ "data:delete:resume": {
592
650
  "aliases": [],
593
651
  "args": {},
594
- "description": "The CSV file must have only one column (\"Id\") and then the list of record IDs you want to delete, one ID per line.\n\nWhen you execute this command, it starts a job, displays the ID, and then immediately returns control of the terminal to you by default. If you prefer to wait, set the --wait flag to the number of minutes; if it times out, the command outputs the IDs. Use the job ID to check the status of the job with the \"<%= config.bin %> data delete resume\" command.",
652
+ "deprecateAliases": true,
653
+ "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
595
654
  "examples": [
596
- "Bulk delete Account records from your default org using the list of IDs in the \"files/delete.csv\" file:\n<%= config.bin %> <%= command.id %> --sobject Account --file files/delete.csv",
597
- "Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to complete:\n<%= config.bin %> <%= command.id %> --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch"
655
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
656
+ "Resume the most recently run bulk delete job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
598
657
  ],
599
658
  "flags": {
600
659
  "json": {
@@ -621,17 +680,41 @@
621
680
  "deprecateAliases": true,
622
681
  "name": "target-org",
623
682
  "noCacheDefault": true,
624
- "required": true,
625
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
683
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
626
684
  "hasDynamicHelp": true,
627
685
  "multiple": false,
628
686
  "type": "option"
629
687
  },
630
- "api-version": {
688
+ "job-id": {
631
689
  "aliases": [
632
- "apiversion"
690
+ "jobid"
633
691
  ],
692
+ "char": "i",
634
693
  "deprecateAliases": true,
694
+ "name": "job-id",
695
+ "summary": "ID of the job you want to resume.",
696
+ "hasDynamicHelp": false,
697
+ "multiple": false,
698
+ "type": "option"
699
+ },
700
+ "use-most-recent": {
701
+ "exclusive": [
702
+ "job-id"
703
+ ],
704
+ "name": "use-most-recent",
705
+ "summary": "Use the ID of the most recently-run bulk job.",
706
+ "allowNo": false,
707
+ "type": "boolean"
708
+ },
709
+ "wait": {
710
+ "name": "wait",
711
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
712
+ "default": "0 minutes",
713
+ "hasDynamicHelp": true,
714
+ "multiple": false,
715
+ "type": "option"
716
+ },
717
+ "api-version": {
635
718
  "description": "Override the api version used for api requests made by this command",
636
719
  "name": "api-version",
637
720
  "hasDynamicHelp": false,
@@ -647,70 +730,16 @@
647
730
  "hasDynamicHelp": false,
648
731
  "multiple": false,
649
732
  "type": "option"
650
- },
651
- "file": {
652
- "aliases": [
653
- "csvfile"
654
- ],
655
- "char": "f",
656
- "deprecateAliases": true,
657
- "name": "file",
658
- "required": true,
659
- "summary": "CSV file that contains the IDs of the records to update or delete.",
660
- "hasDynamicHelp": false,
661
- "multiple": false,
662
- "type": "option"
663
- },
664
- "sobject": {
665
- "aliases": [
666
- "sobjecttype"
667
- ],
668
- "char": "s",
669
- "deprecateAliases": true,
670
- "name": "sobject",
671
- "required": true,
672
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
673
- "hasDynamicHelp": false,
674
- "multiple": false,
675
- "type": "option"
676
- },
677
- "wait": {
678
- "char": "w",
679
- "exclusive": [
680
- "async"
681
- ],
682
- "name": "wait",
683
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
684
- "default": "0 minutes",
685
- "hasDynamicHelp": true,
686
- "multiple": false,
687
- "type": "option"
688
- },
689
- "async": {
690
- "char": "a",
691
- "exclusive": [
692
- "wait"
693
- ],
694
- "name": "async",
695
- "summary": "Run the command asynchronously.",
696
- "allowNo": false,
697
- "type": "boolean"
698
- },
699
- "verbose": {
700
- "name": "verbose",
701
- "summary": "Print verbose output of failed records if result is available.",
702
- "allowNo": false,
703
- "type": "boolean"
704
733
  }
705
734
  },
706
735
  "hasDynamicHelp": true,
707
736
  "hiddenAliases": [],
708
- "id": "data:delete:bulk",
737
+ "id": "data:delete:resume",
709
738
  "pluginAlias": "@salesforce/plugin-data",
710
739
  "pluginName": "@salesforce/plugin-data",
711
740
  "pluginType": "core",
712
741
  "strict": true,
713
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
742
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
714
743
  "enableJsonFlag": true,
715
744
  "isESM": true,
716
745
  "relativePath": [
@@ -718,30 +747,26 @@
718
747
  "commands",
719
748
  "data",
720
749
  "delete",
721
- "bulk.js"
750
+ "resume.js"
722
751
  ],
723
752
  "aliasPermutations": [],
724
753
  "permutations": [
725
- "data:delete:bulk",
726
- "delete:data:bulk",
727
- "delete:bulk:data",
728
- "data:bulk:delete",
729
- "bulk:data:delete",
730
- "bulk:delete:data"
754
+ "data:delete:resume",
755
+ "delete:data:resume",
756
+ "delete:resume:data",
757
+ "data:resume:delete",
758
+ "resume:data:delete",
759
+ "resume:delete:data"
731
760
  ]
732
761
  },
733
- "data:delete:record": {
734
- "aliases": [
735
- "force:data:record:delete"
736
- ],
762
+ "data:create:file": {
763
+ "aliases": [],
737
764
  "args": {},
738
- "deprecateAliases": true,
739
- "description": "Specify the record you want to delete with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the delete fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command deletes a record from Salesforce objects by default. Use the --use-tooling-api flag to delete from a Tooling API object.",
765
+ "description": "This command always creates a new file in the org; you can't update an existing file. After a successful upload, the command displays the ID of the new ContentDocument record which represents the uploaded file.\n\nBy default, the uploaded file isn't attached to a record; in the Salesforce UI the file shows up in the Files tab. You can optionally attach the file to an existing record, such as an account, as long as you know its record ID.\n\nYou can also give the file a new name after it's been uploaded; by default its name in the org is the same as the local file name.",
740
766
  "examples": [
741
- "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
742
- "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
743
- "Delete a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
744
- "Delete a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
767
+ "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
768
+ "Give the file a different filename after it's uploaded to the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --file resources/astro.png --title AstroOnABoat.png --target-org my-scratch",
769
+ "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
745
770
  ],
746
771
  "flags": {
747
772
  "json": {
@@ -760,12 +785,7 @@
760
785
  "type": "option"
761
786
  },
762
787
  "target-org": {
763
- "aliases": [
764
- "targetusername",
765
- "u"
766
- ],
767
788
  "char": "o",
768
- "deprecateAliases": true,
769
789
  "name": "target-org",
770
790
  "noCacheDefault": true,
771
791
  "required": true,
@@ -775,142 +795,77 @@
775
795
  "type": "option"
776
796
  },
777
797
  "api-version": {
778
- "aliases": [
779
- "apiversion"
780
- ],
781
- "deprecateAliases": true,
782
798
  "description": "Override the api version used for api requests made by this command",
783
799
  "name": "api-version",
784
800
  "hasDynamicHelp": false,
785
801
  "multiple": false,
786
802
  "type": "option"
787
803
  },
788
- "loglevel": {
789
- "deprecated": {
790
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
791
- },
792
- "hidden": true,
793
- "name": "loglevel",
804
+ "title": {
805
+ "char": "t",
806
+ "name": "title",
807
+ "required": false,
808
+ "summary": "New title given to the file (ContentDocument) after it's uploaded.",
794
809
  "hasDynamicHelp": false,
795
810
  "multiple": false,
796
811
  "type": "option"
797
812
  },
798
- "sobject": {
799
- "aliases": [
800
- "sobjecttype"
801
- ],
802
- "char": "s",
803
- "deprecateAliases": true,
804
- "name": "sobject",
813
+ "file": {
814
+ "char": "f",
815
+ "name": "file",
805
816
  "required": true,
806
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
817
+ "summary": "Path of file to upload.",
807
818
  "hasDynamicHelp": false,
808
819
  "multiple": false,
809
820
  "type": "option"
810
821
  },
811
- "record-id": {
812
- "aliases": [
813
- "sobjectid"
814
- ],
822
+ "parent-id": {
815
823
  "char": "i",
816
- "deprecateAliases": true,
817
- "name": "record-id",
818
- "summary": "ID of the record you’re deleting.",
819
- "hasDynamicHelp": false,
820
- "multiple": false,
821
- "type": "option"
822
- },
823
- "where": {
824
- "char": "w",
825
- "name": "where",
826
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
824
+ "name": "parent-id",
825
+ "summary": "ID of the record to attach the file to.",
827
826
  "hasDynamicHelp": false,
828
827
  "multiple": false,
829
828
  "type": "option"
830
- },
831
- "use-tooling-api": {
832
- "aliases": [
833
- "usetoolingapi"
834
- ],
835
- "char": "t",
836
- "deprecateAliases": true,
837
- "name": "use-tooling-api",
838
- "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
839
- "allowNo": false,
840
- "type": "boolean"
841
- },
842
- "perflog": {
843
- "deprecated": {
844
- "version": "57"
845
- },
846
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
847
- "hidden": true,
848
- "name": "perflog",
849
- "summary": "Get API performance data.",
850
- "allowNo": false,
851
- "type": "boolean"
852
829
  }
853
830
  },
854
831
  "hasDynamicHelp": true,
855
832
  "hiddenAliases": [],
856
- "id": "data:delete:record",
833
+ "id": "data:create:file",
857
834
  "pluginAlias": "@salesforce/plugin-data",
858
835
  "pluginName": "@salesforce/plugin-data",
859
836
  "pluginType": "core",
860
837
  "strict": true,
861
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
838
+ "summary": "Upload a local file to an org.",
862
839
  "enableJsonFlag": true,
863
840
  "isESM": true,
864
841
  "relativePath": [
865
842
  "lib",
866
843
  "commands",
867
844
  "data",
868
- "delete",
869
- "record.js"
870
- ],
871
- "aliasPermutations": [
872
- "force:data:record:delete",
873
- "data:force:record:delete",
874
- "data:record:force:delete",
875
- "data:record:delete:force",
876
- "force:record:data:delete",
877
- "record:force:data:delete",
878
- "record:data:force:delete",
879
- "record:data:delete:force",
880
- "force:record:delete:data",
881
- "record:force:delete:data",
882
- "record:delete:force:data",
883
- "record:delete:data:force",
884
- "force:data:delete:record",
885
- "data:force:delete:record",
886
- "data:delete:force:record",
887
- "data:delete:record:force",
888
- "force:delete:data:record",
889
- "delete:force:data:record",
890
- "delete:data:force:record",
891
- "delete:data:record:force",
892
- "force:delete:record:data",
893
- "delete:force:record:data",
894
- "delete:record:force:data",
895
- "delete:record:data:force"
845
+ "create",
846
+ "file.js"
896
847
  ],
848
+ "aliasPermutations": [],
897
849
  "permutations": [
898
- "data:delete:record",
899
- "delete:data:record",
900
- "delete:record:data",
901
- "data:record:delete",
902
- "record:data:delete",
903
- "record:delete:data"
850
+ "data:create:file",
851
+ "create:data:file",
852
+ "create:file:data",
853
+ "data:file:create",
854
+ "file:data:create",
855
+ "file:create:data"
904
856
  ]
905
857
  },
906
- "data:delete:resume": {
907
- "aliases": [],
858
+ "data:create:record": {
859
+ "aliases": [
860
+ "force:data:record:create"
861
+ ],
908
862
  "args": {},
909
863
  "deprecateAliases": true,
910
- "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
864
+ "description": "You must specify a value for all required fields of the object.\n\nWhen specifying fields, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command inserts a record into Salesforce objects by default. Use the --use-tooling-api flag to insert into a Tooling API object.",
911
865
  "examples": [
912
- "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
913
- "Resume the most recently run bulk delete job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
866
+ "Insert a record into the Account object of your default org; only the required Name field has a value:\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name=Acme\"",
867
+ "Insert an Account record with values for two fields, one value contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name='Universal Containers' Website=www.example.com\" --target-org my-scratch",
868
+ "Insert a record into the Tooling API object TraceFlag:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --values \"DebugLevelId=7dl170000008U36AAE StartDate=2022-12-15T00:26:04.000+0000 ExpirationDate=2022-12-15T00:56:04.000+0000 LogType=CLASS_TRACING TracedEntityId=01p17000000R6bLAAS\""
914
869
  ],
915
870
  "flags": {
916
871
  "json": {
@@ -937,41 +892,17 @@
937
892
  "deprecateAliases": true,
938
893
  "name": "target-org",
939
894
  "noCacheDefault": true,
940
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
895
+ "required": true,
896
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
941
897
  "hasDynamicHelp": true,
942
898
  "multiple": false,
943
899
  "type": "option"
944
900
  },
945
- "job-id": {
901
+ "api-version": {
946
902
  "aliases": [
947
- "jobid"
903
+ "apiversion"
948
904
  ],
949
- "char": "i",
950
905
  "deprecateAliases": true,
951
- "name": "job-id",
952
- "summary": "ID of the job you want to resume.",
953
- "hasDynamicHelp": false,
954
- "multiple": false,
955
- "type": "option"
956
- },
957
- "use-most-recent": {
958
- "exclusive": [
959
- "job-id"
960
- ],
961
- "name": "use-most-recent",
962
- "summary": "Use the ID of the most recently-run bulk job.",
963
- "allowNo": false,
964
- "type": "boolean"
965
- },
966
- "wait": {
967
- "name": "wait",
968
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
969
- "default": "0 minutes",
970
- "hasDynamicHelp": true,
971
- "multiple": false,
972
- "type": "option"
973
- },
974
- "api-version": {
975
906
  "description": "Override the api version used for api requests made by this command",
976
907
  "name": "api-version",
977
908
  "hasDynamicHelp": false,
@@ -987,33 +918,102 @@
987
918
  "hasDynamicHelp": false,
988
919
  "multiple": false,
989
920
  "type": "option"
921
+ },
922
+ "sobject": {
923
+ "aliases": [
924
+ "sobjecttype"
925
+ ],
926
+ "char": "s",
927
+ "deprecateAliases": true,
928
+ "name": "sobject",
929
+ "required": true,
930
+ "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
931
+ "hasDynamicHelp": false,
932
+ "multiple": false,
933
+ "type": "option"
934
+ },
935
+ "values": {
936
+ "char": "v",
937
+ "name": "values",
938
+ "required": true,
939
+ "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
940
+ "hasDynamicHelp": false,
941
+ "multiple": false,
942
+ "type": "option"
943
+ },
944
+ "use-tooling-api": {
945
+ "aliases": [
946
+ "usetoolingapi"
947
+ ],
948
+ "char": "t",
949
+ "deprecateAliases": true,
950
+ "name": "use-tooling-api",
951
+ "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
952
+ "allowNo": false,
953
+ "type": "boolean"
954
+ },
955
+ "perflog": {
956
+ "deprecated": {
957
+ "version": "57"
958
+ },
959
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
960
+ "hidden": true,
961
+ "name": "perflog",
962
+ "summary": "Get API performance data.",
963
+ "allowNo": false,
964
+ "type": "boolean"
990
965
  }
991
966
  },
992
967
  "hasDynamicHelp": true,
993
968
  "hiddenAliases": [],
994
- "id": "data:delete:resume",
969
+ "id": "data:create:record",
995
970
  "pluginAlias": "@salesforce/plugin-data",
996
971
  "pluginName": "@salesforce/plugin-data",
997
972
  "pluginType": "core",
998
973
  "strict": true,
999
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
974
+ "summary": "Create and insert a record into a Salesforce or Tooling API object.",
1000
975
  "enableJsonFlag": true,
1001
976
  "isESM": true,
1002
977
  "relativePath": [
1003
978
  "lib",
1004
979
  "commands",
1005
980
  "data",
1006
- "delete",
1007
- "resume.js"
981
+ "create",
982
+ "record.js"
983
+ ],
984
+ "aliasPermutations": [
985
+ "force:data:record:create",
986
+ "data:force:record:create",
987
+ "data:record:force:create",
988
+ "data:record:create:force",
989
+ "force:record:data:create",
990
+ "record:force:data:create",
991
+ "record:data:force:create",
992
+ "record:data:create:force",
993
+ "force:record:create:data",
994
+ "record:force:create:data",
995
+ "record:create:force:data",
996
+ "record:create:data:force",
997
+ "force:data:create:record",
998
+ "data:force:create:record",
999
+ "data:create:force:record",
1000
+ "data:create:record:force",
1001
+ "force:create:data:record",
1002
+ "create:force:data:record",
1003
+ "create:data:force:record",
1004
+ "create:data:record:force",
1005
+ "force:create:record:data",
1006
+ "create:force:record:data",
1007
+ "create:record:force:data",
1008
+ "create:record:data:force"
1008
1009
  ],
1009
- "aliasPermutations": [],
1010
1010
  "permutations": [
1011
- "data:delete:resume",
1012
- "delete:data:resume",
1013
- "delete:resume:data",
1014
- "data:resume:delete",
1015
- "resume:data:delete",
1016
- "resume:delete:data"
1011
+ "data:create:record",
1012
+ "create:data:record",
1013
+ "create:record:data",
1014
+ "data:record:create",
1015
+ "record:data:create",
1016
+ "record:create:data"
1017
1017
  ]
1018
1018
  },
1019
1019
  "data:export:tree": {
@@ -2917,5 +2917,5 @@
2917
2917
  ]
2918
2918
  }
2919
2919
  },
2920
- "version": "3.4.5"
2920
+ "version": "3.4.6"
2921
2921
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-data",
3
- "version": "3.4.5",
3
+ "version": "3.4.6",
4
4
  "description": "Plugin for salesforce data commands",
5
5
  "author": "Salesforce",
6
6
  "homepage": "https://github.com/salesforcecli/plugin-data",
@@ -120,13 +120,13 @@
120
120
  "form-data": "^4.0.0"
121
121
  },
122
122
  "devDependencies": {
123
- "@oclif/plugin-command-snapshot": "^5.2.0",
124
- "@salesforce/cli-plugins-testkit": "^5.3.9",
123
+ "@oclif/plugin-command-snapshot": "^5.2.2",
124
+ "@salesforce/cli-plugins-testkit": "^5.3.10",
125
125
  "@salesforce/dev-scripts": "^10.1.0",
126
126
  "@salesforce/plugin-command-reference": "^3.0.89",
127
127
  "@salesforce/types": "^1.1.0",
128
128
  "eslint-plugin-sf-plugin": "^1.18.5",
129
- "oclif": "^4.12.1",
129
+ "oclif": "^4.13.2",
130
130
  "ts-node": "^10.9.2",
131
131
  "typescript": "^5.4.5"
132
132
  },
@@ -248,7 +248,7 @@
248
248
  "exports": "./lib/index.js",
249
249
  "type": "module",
250
250
  "sfdx": {
251
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.5.crt",
252
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.5.sig"
251
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.6.crt",
252
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.6.sig"
253
253
  }
254
254
  }