@salesforce/plugin-data 3.6.8 → 3.7.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.
@@ -424,14 +424,13 @@
424
424
  "search:data"
425
425
  ]
426
426
  },
427
- "data:create:file": {
427
+ "data:delete:bulk": {
428
428
  "aliases": [],
429
429
  "args": {},
430
- "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.",
430
+ "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.",
431
431
  "examples": [
432
- "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
433
- "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",
434
- "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
432
+ "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",
433
+ "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"
435
434
  ],
436
435
  "flags": {
437
436
  "json": {
@@ -450,7 +449,12 @@
450
449
  "type": "option"
451
450
  },
452
451
  "target-org": {
452
+ "aliases": [
453
+ "targetusername",
454
+ "u"
455
+ ],
453
456
  "char": "o",
457
+ "deprecateAliases": true,
454
458
  "name": "target-org",
455
459
  "noCacheDefault": true,
456
460
  "required": true,
@@ -460,77 +464,127 @@
460
464
  "type": "option"
461
465
  },
462
466
  "api-version": {
467
+ "aliases": [
468
+ "apiversion"
469
+ ],
470
+ "deprecateAliases": true,
463
471
  "description": "Override the api version used for api requests made by this command",
464
472
  "name": "api-version",
465
473
  "hasDynamicHelp": false,
466
474
  "multiple": false,
467
475
  "type": "option"
468
476
  },
469
- "title": {
470
- "char": "t",
471
- "name": "title",
472
- "required": false,
473
- "summary": "New title given to the file (ContentDocument) after it's uploaded.",
477
+ "loglevel": {
478
+ "deprecated": {
479
+ "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."
480
+ },
481
+ "hidden": true,
482
+ "name": "loglevel",
474
483
  "hasDynamicHelp": false,
475
484
  "multiple": false,
476
485
  "type": "option"
477
486
  },
478
487
  "file": {
488
+ "aliases": [
489
+ "csvfile"
490
+ ],
479
491
  "char": "f",
492
+ "deprecateAliases": true,
480
493
  "name": "file",
481
494
  "required": true,
482
- "summary": "Path of file to upload.",
495
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
483
496
  "hasDynamicHelp": false,
484
497
  "multiple": false,
485
498
  "type": "option"
486
499
  },
487
- "parent-id": {
488
- "char": "i",
489
- "name": "parent-id",
490
- "summary": "ID of the record to attach the file to.",
500
+ "sobject": {
501
+ "aliases": [
502
+ "sobjecttype"
503
+ ],
504
+ "char": "s",
505
+ "deprecateAliases": true,
506
+ "name": "sobject",
507
+ "required": true,
508
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
491
509
  "hasDynamicHelp": false,
492
510
  "multiple": false,
493
511
  "type": "option"
512
+ },
513
+ "wait": {
514
+ "char": "w",
515
+ "exclusive": [
516
+ "async"
517
+ ],
518
+ "name": "wait",
519
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
520
+ "default": "0 minutes",
521
+ "hasDynamicHelp": true,
522
+ "multiple": false,
523
+ "type": "option"
524
+ },
525
+ "async": {
526
+ "char": "a",
527
+ "exclusive": [
528
+ "wait"
529
+ ],
530
+ "name": "async",
531
+ "summary": "Run the command asynchronously.",
532
+ "allowNo": false,
533
+ "type": "boolean"
534
+ },
535
+ "verbose": {
536
+ "name": "verbose",
537
+ "summary": "Print verbose output of failed records if result is available.",
538
+ "allowNo": false,
539
+ "type": "boolean"
540
+ },
541
+ "hard-delete": {
542
+ "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.",
543
+ "name": "hard-delete",
544
+ "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.",
545
+ "allowNo": false,
546
+ "type": "boolean"
494
547
  }
495
548
  },
496
549
  "hasDynamicHelp": true,
497
550
  "hiddenAliases": [],
498
- "id": "data:create:file",
551
+ "id": "data:delete:bulk",
499
552
  "pluginAlias": "@salesforce/plugin-data",
500
553
  "pluginName": "@salesforce/plugin-data",
501
554
  "pluginType": "core",
502
555
  "strict": true,
503
- "summary": "Upload a local file to an org.",
556
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
504
557
  "enableJsonFlag": true,
505
558
  "isESM": true,
506
559
  "relativePath": [
507
560
  "lib",
508
561
  "commands",
509
562
  "data",
510
- "create",
511
- "file.js"
563
+ "delete",
564
+ "bulk.js"
512
565
  ],
513
566
  "aliasPermutations": [],
514
567
  "permutations": [
515
- "data:create:file",
516
- "create:data:file",
517
- "create:file:data",
518
- "data:file:create",
519
- "file:data:create",
520
- "file:create:data"
568
+ "data:delete:bulk",
569
+ "delete:data:bulk",
570
+ "delete:bulk:data",
571
+ "data:bulk:delete",
572
+ "bulk:data:delete",
573
+ "bulk:delete:data"
521
574
  ]
522
575
  },
523
- "data:create:record": {
576
+ "data:delete:record": {
524
577
  "aliases": [
525
- "force:data:record:create"
578
+ "force:data:record:delete"
526
579
  ],
527
580
  "args": {},
528
581
  "deprecateAliases": true,
529
- "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.",
582
+ "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.",
530
583
  "examples": [
531
- "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\"",
532
- "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",
533
- "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\""
584
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
585
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
586
+ "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",
587
+ "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"
534
588
  ],
535
589
  "flags": {
536
590
  "json": {
@@ -592,16 +646,27 @@
592
646
  "deprecateAliases": true,
593
647
  "name": "sobject",
594
648
  "required": true,
595
- "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
649
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
596
650
  "hasDynamicHelp": false,
597
651
  "multiple": false,
598
652
  "type": "option"
599
653
  },
600
- "values": {
601
- "char": "v",
602
- "name": "values",
603
- "required": true,
604
- "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
654
+ "record-id": {
655
+ "aliases": [
656
+ "sobjectid"
657
+ ],
658
+ "char": "i",
659
+ "deprecateAliases": true,
660
+ "name": "record-id",
661
+ "summary": "ID of the record you’re deleting.",
662
+ "hasDynamicHelp": false,
663
+ "multiple": false,
664
+ "type": "option"
665
+ },
666
+ "where": {
667
+ "char": "w",
668
+ "name": "where",
669
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
605
670
  "hasDynamicHelp": false,
606
671
  "multiple": false,
607
672
  "type": "option"
@@ -613,7 +678,7 @@
613
678
  "char": "t",
614
679
  "deprecateAliases": true,
615
680
  "name": "use-tooling-api",
616
- "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
681
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
617
682
  "allowNo": false,
618
683
  "type": "boolean"
619
684
  },
@@ -631,63 +696,64 @@
631
696
  },
632
697
  "hasDynamicHelp": true,
633
698
  "hiddenAliases": [],
634
- "id": "data:create:record",
699
+ "id": "data:delete:record",
635
700
  "pluginAlias": "@salesforce/plugin-data",
636
701
  "pluginName": "@salesforce/plugin-data",
637
702
  "pluginType": "core",
638
703
  "strict": true,
639
- "summary": "Create and insert a record into a Salesforce or Tooling API object.",
704
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
640
705
  "enableJsonFlag": true,
641
706
  "isESM": true,
642
707
  "relativePath": [
643
708
  "lib",
644
709
  "commands",
645
710
  "data",
646
- "create",
711
+ "delete",
647
712
  "record.js"
648
713
  ],
649
714
  "aliasPermutations": [
650
- "force:data:record:create",
651
- "data:force:record:create",
652
- "data:record:force:create",
653
- "data:record:create:force",
654
- "force:record:data:create",
655
- "record:force:data:create",
656
- "record:data:force:create",
657
- "record:data:create:force",
658
- "force:record:create:data",
659
- "record:force:create:data",
660
- "record:create:force:data",
661
- "record:create:data:force",
662
- "force:data:create:record",
663
- "data:force:create:record",
664
- "data:create:force:record",
665
- "data:create:record:force",
666
- "force:create:data:record",
667
- "create:force:data:record",
668
- "create:data:force:record",
669
- "create:data:record:force",
670
- "force:create:record:data",
671
- "create:force:record:data",
672
- "create:record:force:data",
673
- "create:record:data:force"
715
+ "force:data:record:delete",
716
+ "data:force:record:delete",
717
+ "data:record:force:delete",
718
+ "data:record:delete:force",
719
+ "force:record:data:delete",
720
+ "record:force:data:delete",
721
+ "record:data:force:delete",
722
+ "record:data:delete:force",
723
+ "force:record:delete:data",
724
+ "record:force:delete:data",
725
+ "record:delete:force:data",
726
+ "record:delete:data:force",
727
+ "force:data:delete:record",
728
+ "data:force:delete:record",
729
+ "data:delete:force:record",
730
+ "data:delete:record:force",
731
+ "force:delete:data:record",
732
+ "delete:force:data:record",
733
+ "delete:data:force:record",
734
+ "delete:data:record:force",
735
+ "force:delete:record:data",
736
+ "delete:force:record:data",
737
+ "delete:record:force:data",
738
+ "delete:record:data:force"
674
739
  ],
675
740
  "permutations": [
676
- "data:create:record",
677
- "create:data:record",
678
- "create:record:data",
679
- "data:record:create",
680
- "record:data:create",
681
- "record:create:data"
741
+ "data:delete:record",
742
+ "delete:data:record",
743
+ "delete:record:data",
744
+ "data:record:delete",
745
+ "record:data:delete",
746
+ "record:delete:data"
682
747
  ]
683
748
  },
684
- "data:delete:bulk": {
749
+ "data:delete:resume": {
685
750
  "aliases": [],
686
751
  "args": {},
687
- "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.",
752
+ "deprecateAliases": true,
753
+ "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
688
754
  "examples": [
689
- "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",
690
- "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"
755
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
756
+ "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"
691
757
  ],
692
758
  "flags": {
693
759
  "json": {
@@ -714,17 +780,41 @@
714
780
  "deprecateAliases": true,
715
781
  "name": "target-org",
716
782
  "noCacheDefault": true,
717
- "required": true,
718
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
783
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
719
784
  "hasDynamicHelp": true,
720
785
  "multiple": false,
721
786
  "type": "option"
722
787
  },
723
- "api-version": {
788
+ "job-id": {
724
789
  "aliases": [
725
- "apiversion"
790
+ "jobid"
726
791
  ],
792
+ "char": "i",
727
793
  "deprecateAliases": true,
794
+ "name": "job-id",
795
+ "summary": "ID of the job you want to resume.",
796
+ "hasDynamicHelp": false,
797
+ "multiple": false,
798
+ "type": "option"
799
+ },
800
+ "use-most-recent": {
801
+ "exclusive": [
802
+ "job-id"
803
+ ],
804
+ "name": "use-most-recent",
805
+ "summary": "Use the ID of the most recently-run bulk job.",
806
+ "allowNo": false,
807
+ "type": "boolean"
808
+ },
809
+ "wait": {
810
+ "name": "wait",
811
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
812
+ "default": "0 minutes",
813
+ "hasDynamicHelp": true,
814
+ "multiple": false,
815
+ "type": "option"
816
+ },
817
+ "api-version": {
728
818
  "description": "Override the api version used for api requests made by this command",
729
819
  "name": "api-version",
730
820
  "hasDynamicHelp": false,
@@ -740,108 +830,142 @@
740
830
  "hasDynamicHelp": false,
741
831
  "multiple": false,
742
832
  "type": "option"
743
- },
744
- "file": {
745
- "aliases": [
746
- "csvfile"
747
- ],
748
- "char": "f",
749
- "deprecateAliases": true,
750
- "name": "file",
751
- "required": true,
752
- "summary": "CSV file that contains the IDs of the records to update or delete.",
833
+ }
834
+ },
835
+ "hasDynamicHelp": true,
836
+ "hiddenAliases": [],
837
+ "id": "data:delete:resume",
838
+ "pluginAlias": "@salesforce/plugin-data",
839
+ "pluginName": "@salesforce/plugin-data",
840
+ "pluginType": "core",
841
+ "strict": true,
842
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
843
+ "enableJsonFlag": true,
844
+ "isESM": true,
845
+ "relativePath": [
846
+ "lib",
847
+ "commands",
848
+ "data",
849
+ "delete",
850
+ "resume.js"
851
+ ],
852
+ "aliasPermutations": [],
853
+ "permutations": [
854
+ "data:delete:resume",
855
+ "delete:data:resume",
856
+ "delete:resume:data",
857
+ "data:resume:delete",
858
+ "resume:data:delete",
859
+ "resume:delete:data"
860
+ ]
861
+ },
862
+ "data:create:file": {
863
+ "aliases": [],
864
+ "args": {},
865
+ "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.",
866
+ "examples": [
867
+ "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
868
+ "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",
869
+ "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
870
+ ],
871
+ "flags": {
872
+ "json": {
873
+ "description": "Format output as json.",
874
+ "helpGroup": "GLOBAL",
875
+ "name": "json",
876
+ "allowNo": false,
877
+ "type": "boolean"
878
+ },
879
+ "flags-dir": {
880
+ "helpGroup": "GLOBAL",
881
+ "name": "flags-dir",
882
+ "summary": "Import flag values from a directory.",
753
883
  "hasDynamicHelp": false,
754
884
  "multiple": false,
755
885
  "type": "option"
756
886
  },
757
- "sobject": {
758
- "aliases": [
759
- "sobjecttype"
760
- ],
761
- "char": "s",
762
- "deprecateAliases": true,
763
- "name": "sobject",
887
+ "target-org": {
888
+ "char": "o",
889
+ "name": "target-org",
890
+ "noCacheDefault": true,
764
891
  "required": true,
765
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
766
- "hasDynamicHelp": false,
892
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
893
+ "hasDynamicHelp": true,
767
894
  "multiple": false,
768
895
  "type": "option"
769
896
  },
770
- "wait": {
771
- "char": "w",
772
- "exclusive": [
773
- "async"
774
- ],
775
- "name": "wait",
776
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
777
- "default": "0 minutes",
778
- "hasDynamicHelp": true,
897
+ "api-version": {
898
+ "description": "Override the api version used for api requests made by this command",
899
+ "name": "api-version",
900
+ "hasDynamicHelp": false,
779
901
  "multiple": false,
780
902
  "type": "option"
781
903
  },
782
- "async": {
783
- "char": "a",
784
- "exclusive": [
785
- "wait"
786
- ],
787
- "name": "async",
788
- "summary": "Run the command asynchronously.",
789
- "allowNo": false,
790
- "type": "boolean"
904
+ "title": {
905
+ "char": "t",
906
+ "name": "title",
907
+ "required": false,
908
+ "summary": "New title given to the file (ContentDocument) after it's uploaded.",
909
+ "hasDynamicHelp": false,
910
+ "multiple": false,
911
+ "type": "option"
791
912
  },
792
- "verbose": {
793
- "name": "verbose",
794
- "summary": "Print verbose output of failed records if result is available.",
795
- "allowNo": false,
796
- "type": "boolean"
913
+ "file": {
914
+ "char": "f",
915
+ "name": "file",
916
+ "required": true,
917
+ "summary": "Path of file to upload.",
918
+ "hasDynamicHelp": false,
919
+ "multiple": false,
920
+ "type": "option"
797
921
  },
798
- "hard-delete": {
799
- "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.",
800
- "name": "hard-delete",
801
- "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.",
802
- "allowNo": false,
803
- "type": "boolean"
922
+ "parent-id": {
923
+ "char": "i",
924
+ "name": "parent-id",
925
+ "summary": "ID of the record to attach the file to.",
926
+ "hasDynamicHelp": false,
927
+ "multiple": false,
928
+ "type": "option"
804
929
  }
805
930
  },
806
931
  "hasDynamicHelp": true,
807
932
  "hiddenAliases": [],
808
- "id": "data:delete:bulk",
933
+ "id": "data:create:file",
809
934
  "pluginAlias": "@salesforce/plugin-data",
810
935
  "pluginName": "@salesforce/plugin-data",
811
936
  "pluginType": "core",
812
937
  "strict": true,
813
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
938
+ "summary": "Upload a local file to an org.",
814
939
  "enableJsonFlag": true,
815
940
  "isESM": true,
816
941
  "relativePath": [
817
942
  "lib",
818
943
  "commands",
819
944
  "data",
820
- "delete",
821
- "bulk.js"
945
+ "create",
946
+ "file.js"
822
947
  ],
823
948
  "aliasPermutations": [],
824
949
  "permutations": [
825
- "data:delete:bulk",
826
- "delete:data:bulk",
827
- "delete:bulk:data",
828
- "data:bulk:delete",
829
- "bulk:data:delete",
830
- "bulk:delete:data"
950
+ "data:create:file",
951
+ "create:data:file",
952
+ "create:file:data",
953
+ "data:file:create",
954
+ "file:data:create",
955
+ "file:create:data"
831
956
  ]
832
957
  },
833
- "data:delete:record": {
958
+ "data:create:record": {
834
959
  "aliases": [
835
- "force:data:record:delete"
960
+ "force:data:record:create"
836
961
  ],
837
962
  "args": {},
838
963
  "deprecateAliases": true,
839
- "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.",
964
+ "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.",
840
965
  "examples": [
841
- "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
842
- "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
843
- "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",
844
- "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"
966
+ "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\"",
967
+ "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",
968
+ "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\""
845
969
  ],
846
970
  "flags": {
847
971
  "json": {
@@ -903,27 +1027,16 @@
903
1027
  "deprecateAliases": true,
904
1028
  "name": "sobject",
905
1029
  "required": true,
906
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
907
- "hasDynamicHelp": false,
908
- "multiple": false,
909
- "type": "option"
910
- },
911
- "record-id": {
912
- "aliases": [
913
- "sobjectid"
914
- ],
915
- "char": "i",
916
- "deprecateAliases": true,
917
- "name": "record-id",
918
- "summary": "ID of the record you’re deleting.",
1030
+ "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
919
1031
  "hasDynamicHelp": false,
920
1032
  "multiple": false,
921
1033
  "type": "option"
922
1034
  },
923
- "where": {
924
- "char": "w",
925
- "name": "where",
926
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1035
+ "values": {
1036
+ "char": "v",
1037
+ "name": "values",
1038
+ "required": true,
1039
+ "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
927
1040
  "hasDynamicHelp": false,
928
1041
  "multiple": false,
929
1042
  "type": "option"
@@ -935,7 +1048,7 @@
935
1048
  "char": "t",
936
1049
  "deprecateAliases": true,
937
1050
  "name": "use-tooling-api",
938
- "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1051
+ "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
939
1052
  "allowNo": false,
940
1053
  "type": "boolean"
941
1054
  },
@@ -953,64 +1066,64 @@
953
1066
  },
954
1067
  "hasDynamicHelp": true,
955
1068
  "hiddenAliases": [],
956
- "id": "data:delete:record",
1069
+ "id": "data:create:record",
957
1070
  "pluginAlias": "@salesforce/plugin-data",
958
1071
  "pluginName": "@salesforce/plugin-data",
959
1072
  "pluginType": "core",
960
1073
  "strict": true,
961
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1074
+ "summary": "Create and insert a record into a Salesforce or Tooling API object.",
962
1075
  "enableJsonFlag": true,
963
1076
  "isESM": true,
964
1077
  "relativePath": [
965
1078
  "lib",
966
1079
  "commands",
967
1080
  "data",
968
- "delete",
1081
+ "create",
969
1082
  "record.js"
970
1083
  ],
971
1084
  "aliasPermutations": [
972
- "force:data:record:delete",
973
- "data:force:record:delete",
974
- "data:record:force:delete",
975
- "data:record:delete:force",
976
- "force:record:data:delete",
977
- "record:force:data:delete",
978
- "record:data:force:delete",
979
- "record:data:delete:force",
980
- "force:record:delete:data",
981
- "record:force:delete:data",
982
- "record:delete:force:data",
983
- "record:delete:data:force",
984
- "force:data:delete:record",
985
- "data:force:delete:record",
986
- "data:delete:force:record",
987
- "data:delete:record:force",
988
- "force:delete:data:record",
989
- "delete:force:data:record",
990
- "delete:data:force:record",
991
- "delete:data:record:force",
992
- "force:delete:record:data",
993
- "delete:force:record:data",
994
- "delete:record:force:data",
995
- "delete:record:data:force"
1085
+ "force:data:record:create",
1086
+ "data:force:record:create",
1087
+ "data:record:force:create",
1088
+ "data:record:create:force",
1089
+ "force:record:data:create",
1090
+ "record:force:data:create",
1091
+ "record:data:force:create",
1092
+ "record:data:create:force",
1093
+ "force:record:create:data",
1094
+ "record:force:create:data",
1095
+ "record:create:force:data",
1096
+ "record:create:data:force",
1097
+ "force:data:create:record",
1098
+ "data:force:create:record",
1099
+ "data:create:force:record",
1100
+ "data:create:record:force",
1101
+ "force:create:data:record",
1102
+ "create:force:data:record",
1103
+ "create:data:force:record",
1104
+ "create:data:record:force",
1105
+ "force:create:record:data",
1106
+ "create:force:record:data",
1107
+ "create:record:force:data",
1108
+ "create:record:data:force"
996
1109
  ],
997
1110
  "permutations": [
998
- "data:delete:record",
999
- "delete:data:record",
1000
- "delete:record:data",
1001
- "data:record:delete",
1002
- "record:data:delete",
1003
- "record:delete:data"
1111
+ "data:create:record",
1112
+ "create:data:record",
1113
+ "create:record:data",
1114
+ "data:record:create",
1115
+ "record:data:create",
1116
+ "record:create:data"
1004
1117
  ]
1005
1118
  },
1006
- "data:delete:resume": {
1119
+ "data:export:bulk": {
1007
1120
  "aliases": [],
1008
1121
  "args": {},
1009
- "deprecateAliases": true,
1010
- "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1122
+ "description": "You can use this command to export millions of records from an org, either to migrate data or to back it up.\n\nUse a SOQL query to specify the fields of a standard or custom object that you want to export. Specify the SOQL query either at the command line with the --query flag or read it from a file with the --query-file flag; you can't specify both flags. The --output-file flag is required, which means you can only write the records to a file, in either CSV or JSON format. \n\nBulk exports can take a while, depending on how many records are returned by the SOQL query. If the command times out, or you specified the --async flag, the command displays the job ID. To see the status and get the results of the job, run \"sf data export resume\" and pass the job ID to the --job-id flag.\n\nIMPORTANT: This command uses Bulk API 2.0, which limits the type of SOQL queries you can run. For example, you can't use aggregate functions such as count(). For the complete list of limitations, see the \"SOQL Considerations\" section in the \"Bulk API 2.0 and Bulk API Developer Guide\" (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm).",
1011
1123
  "examples": [
1012
- "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1013
- "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"
1124
+ "Export the Id, Name, and Account.Name fields of the Contact object into a CSV-formatted file; if the export doesn't complete in 10 minutes, the command ends and displays a job ID. Use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.csv --wait 10 --target-org my-scratch",
1125
+ "Similar to previous example, but use the default org, export the records into a JSON-formatted file, and include records that have been soft deleted:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --wait 10 --all-rows",
1126
+ "Export asynchronously; the command immediately returns a job ID that you then pass to the \"sf data export resume\" command:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --async"
1014
1127
  ],
1015
1128
  "flags": {
1016
1129
  "json": {
@@ -1029,91 +1142,237 @@
1029
1142
  "type": "option"
1030
1143
  },
1031
1144
  "target-org": {
1032
- "aliases": [
1033
- "targetusername",
1034
- "u"
1035
- ],
1036
1145
  "char": "o",
1037
- "deprecateAliases": true,
1038
1146
  "name": "target-org",
1039
1147
  "noCacheDefault": true,
1040
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1148
+ "required": true,
1149
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1041
1150
  "hasDynamicHelp": true,
1042
1151
  "multiple": false,
1043
1152
  "type": "option"
1044
1153
  },
1045
- "job-id": {
1046
- "aliases": [
1047
- "jobid"
1154
+ "api-version": {
1155
+ "description": "Override the api version used for api requests made by this command",
1156
+ "name": "api-version",
1157
+ "hasDynamicHelp": false,
1158
+ "multiple": false,
1159
+ "type": "option"
1160
+ },
1161
+ "wait": {
1162
+ "char": "w",
1163
+ "exclusive": [
1164
+ "async"
1048
1165
  ],
1049
- "char": "i",
1050
- "deprecateAliases": true,
1051
- "name": "job-id",
1052
- "summary": "ID of the job you want to resume.",
1166
+ "name": "wait",
1167
+ "summary": "Time to wait for the command to finish, in minutes.",
1168
+ "hasDynamicHelp": true,
1169
+ "helpValue": "<minutes>",
1170
+ "multiple": false,
1171
+ "type": "option"
1172
+ },
1173
+ "async": {
1174
+ "exclusive": [
1175
+ "wait"
1176
+ ],
1177
+ "name": "async",
1178
+ "summary": "Don't wait for the job to complete.",
1179
+ "allowNo": false,
1180
+ "type": "boolean"
1181
+ },
1182
+ "query": {
1183
+ "char": "q",
1184
+ "exclusive": [
1185
+ "query-file"
1186
+ ],
1187
+ "name": "query",
1188
+ "summary": "SOQL query to execute.",
1053
1189
  "hasDynamicHelp": false,
1054
1190
  "multiple": false,
1055
1191
  "type": "option"
1056
1192
  },
1057
- "use-most-recent": {
1193
+ "query-file": {
1058
1194
  "exclusive": [
1059
- "job-id"
1195
+ "query"
1060
1196
  ],
1061
- "name": "use-most-recent",
1062
- "summary": "Use the ID of the most recently-run bulk job.",
1197
+ "name": "query-file",
1198
+ "summary": "File that contains the SOQL query.",
1199
+ "hasDynamicHelp": false,
1200
+ "multiple": false,
1201
+ "type": "option"
1202
+ },
1203
+ "all-rows": {
1204
+ "name": "all-rows",
1205
+ "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
1063
1206
  "allowNo": false,
1064
1207
  "type": "boolean"
1065
1208
  },
1066
- "wait": {
1067
- "name": "wait",
1068
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1069
- "default": "0 minutes",
1070
- "hasDynamicHelp": true,
1209
+ "output-file": {
1210
+ "name": "output-file",
1211
+ "required": true,
1212
+ "summary": "File where records are written.",
1213
+ "hasDynamicHelp": false,
1071
1214
  "multiple": false,
1072
1215
  "type": "option"
1073
1216
  },
1074
- "api-version": {
1075
- "description": "Override the api version used for api requests made by this command",
1076
- "name": "api-version",
1217
+ "result-format": {
1218
+ "char": "r",
1219
+ "name": "result-format",
1220
+ "required": true,
1221
+ "summary": "Format to write the results.",
1222
+ "default": "csv",
1077
1223
  "hasDynamicHelp": false,
1078
1224
  "multiple": false,
1225
+ "options": [
1226
+ "csv",
1227
+ "json"
1228
+ ],
1079
1229
  "type": "option"
1080
1230
  },
1081
- "loglevel": {
1082
- "deprecated": {
1083
- "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."
1084
- },
1085
- "hidden": true,
1086
- "name": "loglevel",
1231
+ "column-delimiter": {
1232
+ "name": "column-delimiter",
1233
+ "relationships": [
1234
+ {
1235
+ "type": "some",
1236
+ "flags": [
1237
+ {
1238
+ "name": "result-format"
1239
+ }
1240
+ ]
1241
+ }
1242
+ ],
1243
+ "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
1087
1244
  "hasDynamicHelp": false,
1088
1245
  "multiple": false,
1246
+ "options": [
1247
+ "BACKQUOTE",
1248
+ "CARET",
1249
+ "COMMA",
1250
+ "PIPE",
1251
+ "SEMICOLON",
1252
+ "TAB"
1253
+ ],
1254
+ "type": "option"
1255
+ },
1256
+ "line-ending": {
1257
+ "name": "line-ending",
1258
+ "relationships": [
1259
+ {
1260
+ "type": "some",
1261
+ "flags": [
1262
+ {
1263
+ "name": "result-format"
1264
+ }
1265
+ ]
1266
+ }
1267
+ ],
1268
+ "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
1269
+ "hasDynamicHelp": false,
1270
+ "multiple": false,
1271
+ "options": [
1272
+ "LF",
1273
+ "CRLF"
1274
+ ],
1089
1275
  "type": "option"
1090
1276
  }
1091
1277
  },
1092
1278
  "hasDynamicHelp": true,
1093
1279
  "hiddenAliases": [],
1094
- "id": "data:delete:resume",
1280
+ "id": "data:export:bulk",
1095
1281
  "pluginAlias": "@salesforce/plugin-data",
1096
1282
  "pluginName": "@salesforce/plugin-data",
1097
1283
  "pluginType": "core",
1098
1284
  "strict": true,
1099
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1285
+ "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
1100
1286
  "enableJsonFlag": true,
1101
1287
  "isESM": true,
1102
1288
  "relativePath": [
1103
1289
  "lib",
1104
1290
  "commands",
1105
1291
  "data",
1106
- "delete",
1292
+ "export",
1293
+ "bulk.js"
1294
+ ],
1295
+ "aliasPermutations": [],
1296
+ "permutations": [
1297
+ "data:export:bulk",
1298
+ "export:data:bulk",
1299
+ "export:bulk:data",
1300
+ "data:bulk:export",
1301
+ "bulk:data:export",
1302
+ "bulk:export:data"
1303
+ ]
1304
+ },
1305
+ "data:export:resume": {
1306
+ "aliases": [],
1307
+ "args": {},
1308
+ "description": "When the original \"data export bulk\" command either times out or is run with the --async flag, it displays a job ID. To see the status and get the results of the bulk export, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk export job.",
1309
+ "examples": [
1310
+ "Resume a bulk export job run on your default org by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
1311
+ "Resume the most recently-run bulk export job for an org with alias my-scratch:\nsf data export resume --use-most-recent --target-org my-scratch"
1312
+ ],
1313
+ "flags": {
1314
+ "json": {
1315
+ "description": "Format output as json.",
1316
+ "helpGroup": "GLOBAL",
1317
+ "name": "json",
1318
+ "allowNo": false,
1319
+ "type": "boolean"
1320
+ },
1321
+ "flags-dir": {
1322
+ "helpGroup": "GLOBAL",
1323
+ "name": "flags-dir",
1324
+ "summary": "Import flag values from a directory.",
1325
+ "hasDynamicHelp": false,
1326
+ "multiple": false,
1327
+ "type": "option"
1328
+ },
1329
+ "job-id": {
1330
+ "char": "i",
1331
+ "name": "job-id",
1332
+ "summary": "Job ID of the bulk export.",
1333
+ "hasDynamicHelp": false,
1334
+ "multiple": false,
1335
+ "type": "option"
1336
+ },
1337
+ "use-most-recent": {
1338
+ "name": "use-most-recent",
1339
+ "summary": "Use the job ID of the bulk export job that was most recently run.",
1340
+ "allowNo": false,
1341
+ "type": "boolean"
1342
+ },
1343
+ "api-version": {
1344
+ "description": "Override the api version used for api requests made by this command",
1345
+ "name": "api-version",
1346
+ "hasDynamicHelp": false,
1347
+ "multiple": false,
1348
+ "type": "option"
1349
+ }
1350
+ },
1351
+ "hasDynamicHelp": false,
1352
+ "hiddenAliases": [],
1353
+ "id": "data:export:resume",
1354
+ "pluginAlias": "@salesforce/plugin-data",
1355
+ "pluginName": "@salesforce/plugin-data",
1356
+ "pluginType": "core",
1357
+ "strict": true,
1358
+ "summary": "Resume a bulk export job that you previously started.",
1359
+ "enableJsonFlag": true,
1360
+ "isESM": true,
1361
+ "relativePath": [
1362
+ "lib",
1363
+ "commands",
1364
+ "data",
1365
+ "export",
1107
1366
  "resume.js"
1108
1367
  ],
1109
1368
  "aliasPermutations": [],
1110
1369
  "permutations": [
1111
- "data:delete:resume",
1112
- "delete:data:resume",
1113
- "delete:resume:data",
1114
- "data:resume:delete",
1115
- "resume:data:delete",
1116
- "resume:delete:data"
1370
+ "data:export:resume",
1371
+ "export:data:resume",
1372
+ "export:resume:data",
1373
+ "data:resume:export",
1374
+ "resume:data:export",
1375
+ "resume:export:data"
1117
1376
  ]
1118
1377
  },
1119
1378
  "data:export:tree": {
@@ -3077,5 +3336,5 @@
3077
3336
  ]
3078
3337
  }
3079
3338
  },
3080
- "version": "3.6.8"
3339
+ "version": "3.7.0"
3081
3340
  }