@salesforce/plugin-data 3.4.8 → 3.5.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 (57) hide show
  1. package/README.md +31 -20
  2. package/lib/api/data/tree/exportApi.js +1 -1
  3. package/lib/api/data/tree/exportApi.js.map +1 -1
  4. package/lib/api/data/tree/importApi.js +1 -1
  5. package/lib/api/data/tree/importApi.js.map +1 -1
  6. package/lib/api/data/tree/importFiles.js +1 -1
  7. package/lib/api/data/tree/importFiles.js.map +1 -1
  8. package/lib/api/data/tree/importPlan.js.map +1 -1
  9. package/lib/{bulkOperationCommand.js → bulkOperationBase.js} +18 -7
  10. package/lib/bulkOperationBase.js.map +1 -0
  11. package/lib/bulkUtils.js +76 -0
  12. package/lib/bulkUtils.js.map +1 -1
  13. package/lib/commands/data/create/record.js +1 -1
  14. package/lib/commands/data/create/record.js.map +1 -1
  15. package/lib/commands/data/delete/bulk.js +11 -4
  16. package/lib/commands/data/delete/bulk.js.map +1 -1
  17. package/lib/commands/data/delete/record.js +1 -1
  18. package/lib/commands/data/delete/record.js.map +1 -1
  19. package/lib/commands/data/delete/resume.js +1 -1
  20. package/lib/commands/data/delete/resume.js.map +1 -1
  21. package/lib/commands/data/get/record.js +1 -1
  22. package/lib/commands/data/get/record.js.map +1 -1
  23. package/lib/commands/data/query.js +1 -1
  24. package/lib/commands/data/query.js.map +1 -1
  25. package/lib/commands/data/update/record.js +1 -1
  26. package/lib/commands/data/update/record.js.map +1 -1
  27. package/lib/commands/data/upsert/bulk.js +1 -1
  28. package/lib/commands/data/upsert/bulk.js.map +1 -1
  29. package/lib/commands/data/upsert/resume.js +1 -1
  30. package/lib/commands/data/upsert/resume.js.map +1 -1
  31. package/lib/{dataCommand.js → dataUtils.js} +1 -1
  32. package/lib/dataUtils.js.map +1 -0
  33. package/lib/export.js +1 -1
  34. package/lib/export.js.map +1 -1
  35. package/lib/queryUtils.js +1 -1
  36. package/lib/queryUtils.js.map +1 -1
  37. package/lib/reporters/humanReporter.js +1 -1
  38. package/lib/reporters/humanReporter.js.map +1 -1
  39. package/lib/reporters/reporters.js +1 -1
  40. package/lib/reporters/reporters.js.map +1 -1
  41. package/lib/{resumeBulkCommand.js → resumeBulkBaseCommand.js} +2 -3
  42. package/lib/resumeBulkBaseCommand.js.map +1 -0
  43. package/lib/types.js +15 -1
  44. package/lib/types.js.map +1 -1
  45. package/messages/bulk.operation.command.md +4 -0
  46. package/messages/bulkv2.delete.md +8 -0
  47. package/messages/messages.md +25 -0
  48. package/oclif.manifest.json +300 -293
  49. package/package.json +8 -8
  50. package/lib/BulkBaseCommand.js +0 -84
  51. package/lib/BulkBaseCommand.js.map +0 -1
  52. package/lib/bulkOperationCommand.js.map +0 -1
  53. package/lib/dataCommand.js.map +0 -1
  54. package/lib/dataSoqlQueryTypes.js +0 -22
  55. package/lib/dataSoqlQueryTypes.js.map +0 -1
  56. package/lib/resumeBulkCommand.js.map +0 -1
  57. package/messages/bulk.base.command.md +0 -24
@@ -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,127 @@
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"
447
+ },
448
+ "hard-delete": {
449
+ "description": "You must have the \"Bulk API Hard Delete\" system permission to use this flag. The permission is disabled by default and can be enabled only by a system administrator.",
450
+ "name": "hard-delete",
451
+ "summary": "Mark the records as immediately eligible for deletion by your org. If you don't specify this flag, the deleted records go into the Recycle Bin.",
452
+ "allowNo": false,
453
+ "type": "boolean"
401
454
  }
402
455
  },
403
456
  "hasDynamicHelp": true,
404
457
  "hiddenAliases": [],
405
- "id": "data:create:file",
458
+ "id": "data:delete:bulk",
406
459
  "pluginAlias": "@salesforce/plugin-data",
407
460
  "pluginName": "@salesforce/plugin-data",
408
461
  "pluginType": "core",
409
462
  "strict": true,
410
- "summary": "Upload a local file to an org.",
463
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
411
464
  "enableJsonFlag": true,
412
465
  "isESM": true,
413
466
  "relativePath": [
414
467
  "lib",
415
468
  "commands",
416
469
  "data",
417
- "create",
418
- "file.js"
470
+ "delete",
471
+ "bulk.js"
419
472
  ],
420
473
  "aliasPermutations": [],
421
474
  "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"
475
+ "data:delete:bulk",
476
+ "delete:data:bulk",
477
+ "delete:bulk:data",
478
+ "data:bulk:delete",
479
+ "bulk:data:delete",
480
+ "bulk:delete:data"
428
481
  ]
429
482
  },
430
- "data:create:record": {
483
+ "data:delete:record": {
431
484
  "aliases": [
432
- "force:data:record:create"
485
+ "force:data:record:delete"
433
486
  ],
434
487
  "args": {},
435
488
  "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.",
489
+ "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
490
  "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\""
491
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
492
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
493
+ "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",
494
+ "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
495
  ],
442
496
  "flags": {
443
497
  "json": {
@@ -499,16 +553,27 @@
499
553
  "deprecateAliases": true,
500
554
  "name": "sobject",
501
555
  "required": true,
502
- "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
556
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
503
557
  "hasDynamicHelp": false,
504
558
  "multiple": false,
505
559
  "type": "option"
506
560
  },
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.",
561
+ "record-id": {
562
+ "aliases": [
563
+ "sobjectid"
564
+ ],
565
+ "char": "i",
566
+ "deprecateAliases": true,
567
+ "name": "record-id",
568
+ "summary": "ID of the record you’re deleting.",
569
+ "hasDynamicHelp": false,
570
+ "multiple": false,
571
+ "type": "option"
572
+ },
573
+ "where": {
574
+ "char": "w",
575
+ "name": "where",
576
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
512
577
  "hasDynamicHelp": false,
513
578
  "multiple": false,
514
579
  "type": "option"
@@ -520,7 +585,7 @@
520
585
  "char": "t",
521
586
  "deprecateAliases": true,
522
587
  "name": "use-tooling-api",
523
- "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
588
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
524
589
  "allowNo": false,
525
590
  "type": "boolean"
526
591
  },
@@ -538,63 +603,64 @@
538
603
  },
539
604
  "hasDynamicHelp": true,
540
605
  "hiddenAliases": [],
541
- "id": "data:create:record",
606
+ "id": "data:delete:record",
542
607
  "pluginAlias": "@salesforce/plugin-data",
543
608
  "pluginName": "@salesforce/plugin-data",
544
609
  "pluginType": "core",
545
610
  "strict": true,
546
- "summary": "Create and insert a record into a Salesforce or Tooling API object.",
611
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
547
612
  "enableJsonFlag": true,
548
613
  "isESM": true,
549
614
  "relativePath": [
550
615
  "lib",
551
616
  "commands",
552
617
  "data",
553
- "create",
618
+ "delete",
554
619
  "record.js"
555
620
  ],
556
621
  "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"
622
+ "force:data:record:delete",
623
+ "data:force:record:delete",
624
+ "data:record:force:delete",
625
+ "data:record:delete:force",
626
+ "force:record:data:delete",
627
+ "record:force:data:delete",
628
+ "record:data:force:delete",
629
+ "record:data:delete:force",
630
+ "force:record:delete:data",
631
+ "record:force:delete:data",
632
+ "record:delete:force:data",
633
+ "record:delete:data:force",
634
+ "force:data:delete:record",
635
+ "data:force:delete:record",
636
+ "data:delete:force:record",
637
+ "data:delete:record:force",
638
+ "force:delete:data:record",
639
+ "delete:force:data:record",
640
+ "delete:data:force:record",
641
+ "delete:data:record:force",
642
+ "force:delete:record:data",
643
+ "delete:force:record:data",
644
+ "delete:record:force:data",
645
+ "delete:record:data:force"
581
646
  ],
582
647
  "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"
648
+ "data:delete:record",
649
+ "delete:data:record",
650
+ "delete:record:data",
651
+ "data:record:delete",
652
+ "record:data:delete",
653
+ "record:delete:data"
589
654
  ]
590
655
  },
591
- "data:delete:bulk": {
656
+ "data:delete:resume": {
592
657
  "aliases": [],
593
658
  "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.",
659
+ "deprecateAliases": true,
660
+ "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
661
  "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"
662
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
663
+ "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
664
  ],
599
665
  "flags": {
600
666
  "json": {
@@ -621,17 +687,41 @@
621
687
  "deprecateAliases": true,
622
688
  "name": "target-org",
623
689
  "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.",
690
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
626
691
  "hasDynamicHelp": true,
627
692
  "multiple": false,
628
693
  "type": "option"
629
694
  },
630
- "api-version": {
695
+ "job-id": {
631
696
  "aliases": [
632
- "apiversion"
697
+ "jobid"
633
698
  ],
699
+ "char": "i",
634
700
  "deprecateAliases": true,
701
+ "name": "job-id",
702
+ "summary": "ID of the job you want to resume.",
703
+ "hasDynamicHelp": false,
704
+ "multiple": false,
705
+ "type": "option"
706
+ },
707
+ "use-most-recent": {
708
+ "exclusive": [
709
+ "job-id"
710
+ ],
711
+ "name": "use-most-recent",
712
+ "summary": "Use the ID of the most recently-run bulk job.",
713
+ "allowNo": false,
714
+ "type": "boolean"
715
+ },
716
+ "wait": {
717
+ "name": "wait",
718
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
719
+ "default": "0 minutes",
720
+ "hasDynamicHelp": true,
721
+ "multiple": false,
722
+ "type": "option"
723
+ },
724
+ "api-version": {
635
725
  "description": "Override the api version used for api requests made by this command",
636
726
  "name": "api-version",
637
727
  "hasDynamicHelp": false,
@@ -647,70 +737,16 @@
647
737
  "hasDynamicHelp": false,
648
738
  "multiple": false,
649
739
  "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
740
  }
705
741
  },
706
742
  "hasDynamicHelp": true,
707
743
  "hiddenAliases": [],
708
- "id": "data:delete:bulk",
744
+ "id": "data:delete:resume",
709
745
  "pluginAlias": "@salesforce/plugin-data",
710
746
  "pluginName": "@salesforce/plugin-data",
711
747
  "pluginType": "core",
712
748
  "strict": true,
713
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
749
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
714
750
  "enableJsonFlag": true,
715
751
  "isESM": true,
716
752
  "relativePath": [
@@ -718,30 +754,26 @@
718
754
  "commands",
719
755
  "data",
720
756
  "delete",
721
- "bulk.js"
757
+ "resume.js"
722
758
  ],
723
759
  "aliasPermutations": [],
724
760
  "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"
761
+ "data:delete:resume",
762
+ "delete:data:resume",
763
+ "delete:resume:data",
764
+ "data:resume:delete",
765
+ "resume:data:delete",
766
+ "resume:delete:data"
731
767
  ]
732
768
  },
733
- "data:delete:record": {
734
- "aliases": [
735
- "force:data:record:delete"
736
- ],
769
+ "data:create:file": {
770
+ "aliases": [],
737
771
  "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.",
772
+ "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
773
  "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"
774
+ "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
775
+ "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",
776
+ "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
745
777
  ],
746
778
  "flags": {
747
779
  "json": {
@@ -760,12 +792,7 @@
760
792
  "type": "option"
761
793
  },
762
794
  "target-org": {
763
- "aliases": [
764
- "targetusername",
765
- "u"
766
- ],
767
795
  "char": "o",
768
- "deprecateAliases": true,
769
796
  "name": "target-org",
770
797
  "noCacheDefault": true,
771
798
  "required": true,
@@ -775,142 +802,77 @@
775
802
  "type": "option"
776
803
  },
777
804
  "api-version": {
778
- "aliases": [
779
- "apiversion"
780
- ],
781
- "deprecateAliases": true,
782
805
  "description": "Override the api version used for api requests made by this command",
783
806
  "name": "api-version",
784
807
  "hasDynamicHelp": false,
785
808
  "multiple": false,
786
809
  "type": "option"
787
810
  },
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",
811
+ "title": {
812
+ "char": "t",
813
+ "name": "title",
814
+ "required": false,
815
+ "summary": "New title given to the file (ContentDocument) after it's uploaded.",
794
816
  "hasDynamicHelp": false,
795
817
  "multiple": false,
796
818
  "type": "option"
797
819
  },
798
- "sobject": {
799
- "aliases": [
800
- "sobjecttype"
801
- ],
802
- "char": "s",
803
- "deprecateAliases": true,
804
- "name": "sobject",
820
+ "file": {
821
+ "char": "f",
822
+ "name": "file",
805
823
  "required": true,
806
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
824
+ "summary": "Path of file to upload.",
807
825
  "hasDynamicHelp": false,
808
826
  "multiple": false,
809
827
  "type": "option"
810
828
  },
811
- "record-id": {
812
- "aliases": [
813
- "sobjectid"
814
- ],
829
+ "parent-id": {
815
830
  "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.",
831
+ "name": "parent-id",
832
+ "summary": "ID of the record to attach the file to.",
827
833
  "hasDynamicHelp": false,
828
834
  "multiple": false,
829
835
  "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
836
  }
853
837
  },
854
838
  "hasDynamicHelp": true,
855
839
  "hiddenAliases": [],
856
- "id": "data:delete:record",
840
+ "id": "data:create:file",
857
841
  "pluginAlias": "@salesforce/plugin-data",
858
842
  "pluginName": "@salesforce/plugin-data",
859
843
  "pluginType": "core",
860
844
  "strict": true,
861
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
845
+ "summary": "Upload a local file to an org.",
862
846
  "enableJsonFlag": true,
863
847
  "isESM": true,
864
848
  "relativePath": [
865
849
  "lib",
866
850
  "commands",
867
851
  "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"
852
+ "create",
853
+ "file.js"
896
854
  ],
855
+ "aliasPermutations": [],
897
856
  "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"
857
+ "data:create:file",
858
+ "create:data:file",
859
+ "create:file:data",
860
+ "data:file:create",
861
+ "file:data:create",
862
+ "file:create:data"
904
863
  ]
905
864
  },
906
- "data:delete:resume": {
907
- "aliases": [],
865
+ "data:create:record": {
866
+ "aliases": [
867
+ "force:data:record:create"
868
+ ],
908
869
  "args": {},
909
870
  "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.",
871
+ "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
872
  "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"
873
+ "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\"",
874
+ "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",
875
+ "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
876
  ],
915
877
  "flags": {
916
878
  "json": {
@@ -937,41 +899,17 @@
937
899
  "deprecateAliases": true,
938
900
  "name": "target-org",
939
901
  "noCacheDefault": true,
940
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
902
+ "required": true,
903
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
941
904
  "hasDynamicHelp": true,
942
905
  "multiple": false,
943
906
  "type": "option"
944
907
  },
945
- "job-id": {
908
+ "api-version": {
946
909
  "aliases": [
947
- "jobid"
910
+ "apiversion"
948
911
  ],
949
- "char": "i",
950
912
  "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
913
  "description": "Override the api version used for api requests made by this command",
976
914
  "name": "api-version",
977
915
  "hasDynamicHelp": false,
@@ -987,33 +925,102 @@
987
925
  "hasDynamicHelp": false,
988
926
  "multiple": false,
989
927
  "type": "option"
928
+ },
929
+ "sobject": {
930
+ "aliases": [
931
+ "sobjecttype"
932
+ ],
933
+ "char": "s",
934
+ "deprecateAliases": true,
935
+ "name": "sobject",
936
+ "required": true,
937
+ "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
938
+ "hasDynamicHelp": false,
939
+ "multiple": false,
940
+ "type": "option"
941
+ },
942
+ "values": {
943
+ "char": "v",
944
+ "name": "values",
945
+ "required": true,
946
+ "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
947
+ "hasDynamicHelp": false,
948
+ "multiple": false,
949
+ "type": "option"
950
+ },
951
+ "use-tooling-api": {
952
+ "aliases": [
953
+ "usetoolingapi"
954
+ ],
955
+ "char": "t",
956
+ "deprecateAliases": true,
957
+ "name": "use-tooling-api",
958
+ "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
959
+ "allowNo": false,
960
+ "type": "boolean"
961
+ },
962
+ "perflog": {
963
+ "deprecated": {
964
+ "version": "57"
965
+ },
966
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
967
+ "hidden": true,
968
+ "name": "perflog",
969
+ "summary": "Get API performance data.",
970
+ "allowNo": false,
971
+ "type": "boolean"
990
972
  }
991
973
  },
992
974
  "hasDynamicHelp": true,
993
975
  "hiddenAliases": [],
994
- "id": "data:delete:resume",
976
+ "id": "data:create:record",
995
977
  "pluginAlias": "@salesforce/plugin-data",
996
978
  "pluginName": "@salesforce/plugin-data",
997
979
  "pluginType": "core",
998
980
  "strict": true,
999
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
981
+ "summary": "Create and insert a record into a Salesforce or Tooling API object.",
1000
982
  "enableJsonFlag": true,
1001
983
  "isESM": true,
1002
984
  "relativePath": [
1003
985
  "lib",
1004
986
  "commands",
1005
987
  "data",
1006
- "delete",
1007
- "resume.js"
988
+ "create",
989
+ "record.js"
990
+ ],
991
+ "aliasPermutations": [
992
+ "force:data:record:create",
993
+ "data:force:record:create",
994
+ "data:record:force:create",
995
+ "data:record:create:force",
996
+ "force:record:data:create",
997
+ "record:force:data:create",
998
+ "record:data:force:create",
999
+ "record:data:create:force",
1000
+ "force:record:create:data",
1001
+ "record:force:create:data",
1002
+ "record:create:force:data",
1003
+ "record:create:data:force",
1004
+ "force:data:create:record",
1005
+ "data:force:create:record",
1006
+ "data:create:force:record",
1007
+ "data:create:record:force",
1008
+ "force:create:data:record",
1009
+ "create:force:data:record",
1010
+ "create:data:force:record",
1011
+ "create:data:record:force",
1012
+ "force:create:record:data",
1013
+ "create:force:record:data",
1014
+ "create:record:force:data",
1015
+ "create:record:data:force"
1008
1016
  ],
1009
- "aliasPermutations": [],
1010
1017
  "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"
1018
+ "data:create:record",
1019
+ "create:data:record",
1020
+ "create:record:data",
1021
+ "data:record:create",
1022
+ "record:data:create",
1023
+ "record:create:data"
1017
1024
  ]
1018
1025
  },
1019
1026
  "data:export:tree": {
@@ -2917,5 +2924,5 @@
2917
2924
  ]
2918
2925
  }
2919
2926
  },
2920
- "version": "3.4.8"
2927
+ "version": "3.5.1"
2921
2928
  }