@salesforce/plugin-data 3.13.4 → 3.13.5

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.
@@ -775,14 +775,13 @@
775
775
  "record:create:data"
776
776
  ]
777
777
  },
778
- "data:export:bulk": {
778
+ "data:delete:bulk": {
779
779
  "aliases": [],
780
780
  "args": {},
781
- "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).",
781
+ "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.",
782
782
  "examples": [
783
- "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",
784
- "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",
785
- "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"
783
+ "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",
784
+ "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"
786
785
  ],
787
786
  "flags": {
788
787
  "json": {
@@ -801,7 +800,12 @@
801
800
  "type": "option"
802
801
  },
803
802
  "target-org": {
803
+ "aliases": [
804
+ "targetusername",
805
+ "u"
806
+ ],
804
807
  "char": "o",
808
+ "deprecateAliases": true,
805
809
  "name": "target-org",
806
810
  "noCacheDefault": true,
807
811
  "required": true,
@@ -811,163 +815,144 @@
811
815
  "type": "option"
812
816
  },
813
817
  "api-version": {
818
+ "aliases": [
819
+ "apiversion"
820
+ ],
821
+ "deprecateAliases": true,
814
822
  "description": "Override the api version used for api requests made by this command",
815
823
  "name": "api-version",
816
824
  "hasDynamicHelp": false,
817
825
  "multiple": false,
818
826
  "type": "option"
819
827
  },
828
+ "loglevel": {
829
+ "deprecated": {
830
+ "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."
831
+ },
832
+ "hidden": true,
833
+ "name": "loglevel",
834
+ "hasDynamicHelp": false,
835
+ "multiple": false,
836
+ "type": "option"
837
+ },
838
+ "file": {
839
+ "aliases": [
840
+ "csvfile"
841
+ ],
842
+ "char": "f",
843
+ "deprecateAliases": true,
844
+ "name": "file",
845
+ "required": true,
846
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
847
+ "hasDynamicHelp": false,
848
+ "multiple": false,
849
+ "type": "option"
850
+ },
851
+ "sobject": {
852
+ "aliases": [
853
+ "sobjecttype"
854
+ ],
855
+ "char": "s",
856
+ "deprecateAliases": true,
857
+ "name": "sobject",
858
+ "required": true,
859
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
860
+ "hasDynamicHelp": false,
861
+ "multiple": false,
862
+ "type": "option"
863
+ },
820
864
  "wait": {
821
865
  "char": "w",
822
866
  "exclusive": [
823
867
  "async"
824
868
  ],
825
869
  "name": "wait",
826
- "summary": "Time to wait for the command to finish, in minutes.",
870
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
871
+ "default": "0 minutes",
827
872
  "hasDynamicHelp": true,
828
- "helpValue": "<minutes>",
829
873
  "multiple": false,
830
874
  "type": "option"
831
875
  },
832
876
  "async": {
877
+ "char": "a",
833
878
  "exclusive": [
834
879
  "wait"
835
880
  ],
836
881
  "name": "async",
837
- "summary": "Don't wait for the job to complete.",
882
+ "summary": "Run the command asynchronously.",
838
883
  "allowNo": false,
839
884
  "type": "boolean"
840
885
  },
841
- "query": {
842
- "char": "q",
843
- "exclusive": [
844
- "query-file"
845
- ],
846
- "name": "query",
847
- "summary": "SOQL query to execute.",
848
- "hasDynamicHelp": false,
849
- "multiple": false,
850
- "type": "option"
851
- },
852
- "query-file": {
853
- "exclusive": [
854
- "query"
855
- ],
856
- "name": "query-file",
857
- "summary": "File that contains the SOQL query.",
858
- "hasDynamicHelp": false,
859
- "multiple": false,
860
- "type": "option"
861
- },
862
- "all-rows": {
863
- "name": "all-rows",
864
- "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
886
+ "verbose": {
887
+ "deprecated": {
888
+ "message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
889
+ },
890
+ "name": "verbose",
891
+ "summary": "Print verbose output of failed records if result is available.",
865
892
  "allowNo": false,
866
893
  "type": "boolean"
867
894
  },
868
- "output-file": {
869
- "name": "output-file",
870
- "required": true,
871
- "summary": "File where records are written.",
872
- "hasDynamicHelp": false,
873
- "multiple": false,
874
- "type": "option"
875
- },
876
- "result-format": {
877
- "char": "r",
878
- "name": "result-format",
879
- "required": true,
880
- "summary": "Format to write the results.",
881
- "default": "csv",
882
- "hasDynamicHelp": false,
883
- "multiple": false,
884
- "options": [
885
- "csv",
886
- "json"
887
- ],
888
- "type": "option"
889
- },
890
- "column-delimiter": {
891
- "name": "column-delimiter",
892
- "relationships": [
893
- {
894
- "type": "some",
895
- "flags": [
896
- {
897
- "name": "result-format"
898
- }
899
- ]
900
- }
901
- ],
902
- "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
903
- "hasDynamicHelp": false,
904
- "multiple": false,
905
- "options": [
906
- "BACKQUOTE",
907
- "CARET",
908
- "COMMA",
909
- "PIPE",
910
- "SEMICOLON",
911
- "TAB"
912
- ],
913
- "type": "option"
914
- },
915
895
  "line-ending": {
916
- "name": "line-ending",
917
- "relationships": [
918
- {
919
- "type": "some",
920
- "flags": [
921
- {
922
- "name": "result-format"
923
- }
924
- ]
925
- }
896
+ "dependsOn": [
897
+ "file"
926
898
  ],
927
- "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
899
+ "name": "line-ending",
900
+ "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
928
901
  "hasDynamicHelp": false,
929
902
  "multiple": false,
930
903
  "options": [
931
- "LF",
932
- "CRLF"
904
+ "CRLF",
905
+ "LF"
933
906
  ],
934
907
  "type": "option"
908
+ },
909
+ "hard-delete": {
910
+ "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.",
911
+ "name": "hard-delete",
912
+ "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.",
913
+ "allowNo": false,
914
+ "type": "boolean"
935
915
  }
936
916
  },
937
917
  "hasDynamicHelp": true,
938
918
  "hiddenAliases": [],
939
- "id": "data:export:bulk",
919
+ "id": "data:delete:bulk",
940
920
  "pluginAlias": "@salesforce/plugin-data",
941
921
  "pluginName": "@salesforce/plugin-data",
942
922
  "pluginType": "core",
943
923
  "strict": true,
944
- "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
924
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
945
925
  "enableJsonFlag": true,
946
926
  "isESM": true,
947
927
  "relativePath": [
948
928
  "lib",
949
929
  "commands",
950
930
  "data",
951
- "export",
931
+ "delete",
952
932
  "bulk.js"
953
933
  ],
954
934
  "aliasPermutations": [],
955
935
  "permutations": [
956
- "data:export:bulk",
957
- "export:data:bulk",
958
- "export:bulk:data",
959
- "data:bulk:export",
960
- "bulk:data:export",
961
- "bulk:export:data"
936
+ "data:delete:bulk",
937
+ "delete:data:bulk",
938
+ "delete:bulk:data",
939
+ "data:bulk:delete",
940
+ "bulk:data:delete",
941
+ "bulk:delete:data"
962
942
  ]
963
943
  },
964
- "data:export:resume": {
965
- "aliases": [],
944
+ "data:delete:record": {
945
+ "aliases": [
946
+ "force:data:record:delete"
947
+ ],
966
948
  "args": {},
967
- "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.",
949
+ "deprecateAliases": true,
950
+ "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.",
968
951
  "examples": [
969
- "Resume a bulk export job run on your default org by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
970
- "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"
952
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
953
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
954
+ "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",
955
+ "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"
971
956
  ],
972
957
  "flags": {
973
958
  "json": {
@@ -985,240 +970,158 @@
985
970
  "multiple": false,
986
971
  "type": "option"
987
972
  },
988
- "job-id": {
989
- "char": "i",
990
- "name": "job-id",
991
- "summary": "Job ID of the bulk export.",
992
- "hasDynamicHelp": false,
973
+ "target-org": {
974
+ "aliases": [
975
+ "targetusername",
976
+ "u"
977
+ ],
978
+ "char": "o",
979
+ "deprecateAliases": true,
980
+ "name": "target-org",
981
+ "noCacheDefault": true,
982
+ "required": true,
983
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
984
+ "hasDynamicHelp": true,
993
985
  "multiple": false,
994
986
  "type": "option"
995
987
  },
996
- "use-most-recent": {
997
- "name": "use-most-recent",
998
- "summary": "Use the job ID of the bulk export job that was most recently run.",
999
- "allowNo": false,
1000
- "type": "boolean"
1001
- },
1002
988
  "api-version": {
989
+ "aliases": [
990
+ "apiversion"
991
+ ],
992
+ "deprecateAliases": true,
1003
993
  "description": "Override the api version used for api requests made by this command",
1004
994
  "name": "api-version",
1005
995
  "hasDynamicHelp": false,
1006
996
  "multiple": false,
1007
997
  "type": "option"
1008
- }
1009
- },
1010
- "hasDynamicHelp": false,
1011
- "hiddenAliases": [],
1012
- "id": "data:export:resume",
1013
- "pluginAlias": "@salesforce/plugin-data",
1014
- "pluginName": "@salesforce/plugin-data",
1015
- "pluginType": "core",
1016
- "strict": true,
1017
- "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
1018
- "enableJsonFlag": true,
1019
- "isESM": true,
1020
- "relativePath": [
1021
- "lib",
1022
- "commands",
1023
- "data",
1024
- "export",
1025
- "resume.js"
1026
- ],
1027
- "aliasPermutations": [],
1028
- "permutations": [
1029
- "data:export:resume",
1030
- "export:data:resume",
1031
- "export:resume:data",
1032
- "data:resume:export",
1033
- "resume:data:export",
1034
- "resume:export:data"
1035
- ]
1036
- },
1037
- "data:export:tree": {
1038
- "aliases": [
1039
- "force:data:tree:export",
1040
- "data:export:beta:tree"
1041
- ],
1042
- "args": {},
1043
- "deprecateAliases": true,
1044
- "description": "Specify a SOQL query, either directly at the command line or read from a file, to retrieve the data you want to export. The exported data is written to JSON files in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use these JSON files to import data into an org with the \"<%= config.bin %> data import tree\" command.\n\nIf your SOQL query references multiple objects, the command generates a single JSON file by default. You can specify the --plan flag to generate separate JSON files for each object and a plan definition file that aggregates them. You then specify just this plan definition file when you import the data into an org.\n\nThe SOQL query can return a maximum of 2,000 records. For more information, see the REST API Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm).",
1045
- "examples": [
1046
- "Export records retrieved with the specified SOQL query into a single JSON file in the current directory; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c\"",
1047
- "Export data using a SOQL query in the \"query.txt\" file and generate JSON files for each object and a plan that aggregates them:\n<%= config.bin %> <%= command.id %> --query query.txt --plan",
1048
- "Prepend \"export-demo\" before each generated file and generate the files in the \"export-out\" directory; run the command on the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query query.txt --plan --prefix export-demo --output-dir export-out --target-org my-scratch"
1049
- ],
1050
- "flags": {
1051
- "json": {
1052
- "description": "Format output as json.",
1053
- "helpGroup": "GLOBAL",
1054
- "name": "json",
1055
- "allowNo": false,
1056
- "type": "boolean"
1057
998
  },
1058
- "flags-dir": {
1059
- "helpGroup": "GLOBAL",
1060
- "name": "flags-dir",
1061
- "summary": "Import flag values from a directory.",
999
+ "loglevel": {
1000
+ "deprecated": {
1001
+ "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."
1002
+ },
1003
+ "hidden": true,
1004
+ "name": "loglevel",
1062
1005
  "hasDynamicHelp": false,
1063
1006
  "multiple": false,
1064
1007
  "type": "option"
1065
1008
  },
1066
- "target-org": {
1009
+ "sobject": {
1067
1010
  "aliases": [
1068
- "targetusername",
1069
- "u"
1011
+ "sobjecttype"
1070
1012
  ],
1071
- "char": "o",
1013
+ "char": "s",
1072
1014
  "deprecateAliases": true,
1073
- "name": "target-org",
1074
- "noCacheDefault": true,
1015
+ "name": "sobject",
1075
1016
  "required": true,
1076
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1077
- "hasDynamicHelp": true,
1017
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1018
+ "hasDynamicHelp": false,
1078
1019
  "multiple": false,
1079
1020
  "type": "option"
1080
1021
  },
1081
- "api-version": {
1022
+ "record-id": {
1082
1023
  "aliases": [
1083
- "apiversion"
1024
+ "sobjectid"
1084
1025
  ],
1026
+ "char": "i",
1085
1027
  "deprecateAliases": true,
1086
- "description": "Override the api version used for api requests made by this command",
1087
- "name": "api-version",
1088
- "hasDynamicHelp": false,
1089
- "multiple": false,
1090
- "type": "option"
1091
- },
1092
- "loglevel": {
1093
- "deprecated": {
1094
- "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."
1095
- },
1096
- "hidden": true,
1097
- "name": "loglevel",
1028
+ "name": "record-id",
1029
+ "summary": "ID of the record you’re deleting.",
1098
1030
  "hasDynamicHelp": false,
1099
1031
  "multiple": false,
1100
1032
  "type": "option"
1101
1033
  },
1102
- "query": {
1103
- "char": "q",
1104
- "name": "query",
1105
- "required": true,
1106
- "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
1107
- "hasDynamicHelp": false,
1108
- "multiple": true,
1109
- "type": "option"
1110
- },
1111
- "plan": {
1112
- "char": "p",
1113
- "name": "plan",
1114
- "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1115
- "allowNo": false,
1116
- "type": "boolean"
1117
- },
1118
- "prefix": {
1119
- "char": "x",
1120
- "name": "prefix",
1121
- "summary": "Prefix of generated files.",
1034
+ "where": {
1035
+ "char": "w",
1036
+ "name": "where",
1037
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1122
1038
  "hasDynamicHelp": false,
1123
1039
  "multiple": false,
1124
1040
  "type": "option"
1125
1041
  },
1126
- "output-dir": {
1042
+ "use-tooling-api": {
1127
1043
  "aliases": [
1128
- "outputdir"
1044
+ "usetoolingapi"
1129
1045
  ],
1130
- "char": "d",
1046
+ "char": "t",
1131
1047
  "deprecateAliases": true,
1132
- "name": "output-dir",
1133
- "summary": "Directory in which to generate the JSON files; default is current directory.",
1134
- "hasDynamicHelp": false,
1135
- "multiple": false,
1136
- "type": "option"
1048
+ "name": "use-tooling-api",
1049
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1050
+ "allowNo": false,
1051
+ "type": "boolean"
1052
+ },
1053
+ "perflog": {
1054
+ "deprecated": {
1055
+ "version": "57"
1056
+ },
1057
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1058
+ "hidden": true,
1059
+ "name": "perflog",
1060
+ "summary": "Get API performance data.",
1061
+ "allowNo": false,
1062
+ "type": "boolean"
1137
1063
  }
1138
1064
  },
1139
1065
  "hasDynamicHelp": true,
1140
1066
  "hiddenAliases": [],
1141
- "id": "data:export:tree",
1067
+ "id": "data:delete:record",
1142
1068
  "pluginAlias": "@salesforce/plugin-data",
1143
1069
  "pluginName": "@salesforce/plugin-data",
1144
1070
  "pluginType": "core",
1145
1071
  "strict": true,
1146
- "summary": "Export data from an org into one or more JSON files.",
1072
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1147
1073
  "enableJsonFlag": true,
1148
1074
  "isESM": true,
1149
1075
  "relativePath": [
1150
1076
  "lib",
1151
1077
  "commands",
1152
1078
  "data",
1153
- "export",
1154
- "tree.js"
1079
+ "delete",
1080
+ "record.js"
1155
1081
  ],
1156
1082
  "aliasPermutations": [
1157
- "force:data:tree:export",
1158
- "data:force:tree:export",
1159
- "data:tree:force:export",
1160
- "data:tree:export:force",
1161
- "force:tree:data:export",
1162
- "tree:force:data:export",
1163
- "tree:data:force:export",
1164
- "tree:data:export:force",
1165
- "force:tree:export:data",
1166
- "tree:force:export:data",
1167
- "tree:export:force:data",
1168
- "tree:export:data:force",
1169
- "force:data:export:tree",
1170
- "data:force:export:tree",
1171
- "data:export:force:tree",
1172
- "data:export:tree:force",
1173
- "force:export:data:tree",
1174
- "export:force:data:tree",
1175
- "export:data:force:tree",
1176
- "export:data:tree:force",
1177
- "force:export:tree:data",
1178
- "export:force:tree:data",
1179
- "export:tree:force:data",
1180
- "export:tree:data:force",
1181
- "data:export:beta:tree",
1182
- "export:data:beta:tree",
1183
- "export:beta:data:tree",
1184
- "export:beta:tree:data",
1185
- "data:beta:export:tree",
1186
- "beta:data:export:tree",
1187
- "beta:export:data:tree",
1188
- "beta:export:tree:data",
1189
- "data:beta:tree:export",
1190
- "beta:data:tree:export",
1191
- "beta:tree:data:export",
1192
- "beta:tree:export:data",
1193
- "data:export:tree:beta",
1194
- "export:data:tree:beta",
1195
- "export:tree:data:beta",
1196
- "export:tree:beta:data",
1197
- "data:tree:export:beta",
1198
- "tree:data:export:beta",
1199
- "tree:export:data:beta",
1200
- "tree:export:beta:data",
1201
- "data:tree:beta:export",
1202
- "tree:data:beta:export",
1203
- "tree:beta:data:export",
1204
- "tree:beta:export:data"
1083
+ "force:data:record:delete",
1084
+ "data:force:record:delete",
1085
+ "data:record:force:delete",
1086
+ "data:record:delete:force",
1087
+ "force:record:data:delete",
1088
+ "record:force:data:delete",
1089
+ "record:data:force:delete",
1090
+ "record:data:delete:force",
1091
+ "force:record:delete:data",
1092
+ "record:force:delete:data",
1093
+ "record:delete:force:data",
1094
+ "record:delete:data:force",
1095
+ "force:data:delete:record",
1096
+ "data:force:delete:record",
1097
+ "data:delete:force:record",
1098
+ "data:delete:record:force",
1099
+ "force:delete:data:record",
1100
+ "delete:force:data:record",
1101
+ "delete:data:force:record",
1102
+ "delete:data:record:force",
1103
+ "force:delete:record:data",
1104
+ "delete:force:record:data",
1105
+ "delete:record:force:data",
1106
+ "delete:record:data:force"
1205
1107
  ],
1206
1108
  "permutations": [
1207
- "data:export:tree",
1208
- "export:data:tree",
1209
- "export:tree:data",
1210
- "data:tree:export",
1211
- "tree:data:export",
1212
- "tree:export:data"
1109
+ "data:delete:record",
1110
+ "delete:data:record",
1111
+ "delete:record:data",
1112
+ "data:record:delete",
1113
+ "record:data:delete",
1114
+ "record:delete:data"
1213
1115
  ]
1214
1116
  },
1215
- "data:delete:bulk": {
1117
+ "data:delete:resume": {
1216
1118
  "aliases": [],
1217
1119
  "args": {},
1218
- "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.",
1120
+ "deprecateAliases": true,
1121
+ "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1219
1122
  "examples": [
1220
- "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",
1221
- "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"
1123
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1124
+ "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"
1222
1125
  ],
1223
1126
  "flags": {
1224
1127
  "json": {
@@ -1245,17 +1148,41 @@
1245
1148
  "deprecateAliases": true,
1246
1149
  "name": "target-org",
1247
1150
  "noCacheDefault": true,
1248
- "required": true,
1249
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1151
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1250
1152
  "hasDynamicHelp": true,
1251
1153
  "multiple": false,
1252
1154
  "type": "option"
1253
1155
  },
1254
- "api-version": {
1156
+ "job-id": {
1255
1157
  "aliases": [
1256
- "apiversion"
1158
+ "jobid"
1257
1159
  ],
1160
+ "char": "i",
1258
1161
  "deprecateAliases": true,
1162
+ "name": "job-id",
1163
+ "summary": "ID of the job you want to resume.",
1164
+ "hasDynamicHelp": false,
1165
+ "multiple": false,
1166
+ "type": "option"
1167
+ },
1168
+ "use-most-recent": {
1169
+ "exclusive": [
1170
+ "job-id"
1171
+ ],
1172
+ "name": "use-most-recent",
1173
+ "summary": "Use the ID of the most recently-run bulk job.",
1174
+ "allowNo": false,
1175
+ "type": "boolean"
1176
+ },
1177
+ "wait": {
1178
+ "name": "wait",
1179
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1180
+ "default": "5 minutes",
1181
+ "hasDynamicHelp": true,
1182
+ "multiple": false,
1183
+ "type": "option"
1184
+ },
1185
+ "api-version": {
1259
1186
  "description": "Override the api version used for api requests made by this command",
1260
1187
  "name": "api-version",
1261
1188
  "hasDynamicHelp": false,
@@ -1271,29 +1198,73 @@
1271
1198
  "hasDynamicHelp": false,
1272
1199
  "multiple": false,
1273
1200
  "type": "option"
1201
+ }
1202
+ },
1203
+ "hasDynamicHelp": true,
1204
+ "hiddenAliases": [],
1205
+ "id": "data:delete:resume",
1206
+ "pluginAlias": "@salesforce/plugin-data",
1207
+ "pluginName": "@salesforce/plugin-data",
1208
+ "pluginType": "core",
1209
+ "strict": true,
1210
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1211
+ "enableJsonFlag": true,
1212
+ "isESM": true,
1213
+ "relativePath": [
1214
+ "lib",
1215
+ "commands",
1216
+ "data",
1217
+ "delete",
1218
+ "resume.js"
1219
+ ],
1220
+ "aliasPermutations": [],
1221
+ "permutations": [
1222
+ "data:delete:resume",
1223
+ "delete:data:resume",
1224
+ "delete:resume:data",
1225
+ "data:resume:delete",
1226
+ "resume:data:delete",
1227
+ "resume:delete:data"
1228
+ ]
1229
+ },
1230
+ "data:export:bulk": {
1231
+ "aliases": [],
1232
+ "args": {},
1233
+ "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).",
1234
+ "examples": [
1235
+ "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",
1236
+ "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",
1237
+ "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"
1238
+ ],
1239
+ "flags": {
1240
+ "json": {
1241
+ "description": "Format output as json.",
1242
+ "helpGroup": "GLOBAL",
1243
+ "name": "json",
1244
+ "allowNo": false,
1245
+ "type": "boolean"
1274
1246
  },
1275
- "file": {
1276
- "aliases": [
1277
- "csvfile"
1278
- ],
1279
- "char": "f",
1280
- "deprecateAliases": true,
1281
- "name": "file",
1282
- "required": true,
1283
- "summary": "CSV file that contains the IDs of the records to update or delete.",
1284
- "hasDynamicHelp": false,
1285
- "multiple": false,
1286
- "type": "option"
1287
- },
1288
- "sobject": {
1289
- "aliases": [
1290
- "sobjecttype"
1291
- ],
1292
- "char": "s",
1293
- "deprecateAliases": true,
1294
- "name": "sobject",
1247
+ "flags-dir": {
1248
+ "helpGroup": "GLOBAL",
1249
+ "name": "flags-dir",
1250
+ "summary": "Import flag values from a directory.",
1251
+ "hasDynamicHelp": false,
1252
+ "multiple": false,
1253
+ "type": "option"
1254
+ },
1255
+ "target-org": {
1256
+ "char": "o",
1257
+ "name": "target-org",
1258
+ "noCacheDefault": true,
1295
1259
  "required": true,
1296
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
1260
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1261
+ "hasDynamicHelp": true,
1262
+ "multiple": false,
1263
+ "type": "option"
1264
+ },
1265
+ "api-version": {
1266
+ "description": "Override the api version used for api requests made by this command",
1267
+ "name": "api-version",
1297
1268
  "hasDynamicHelp": false,
1298
1269
  "multiple": false,
1299
1270
  "type": "option"
@@ -1304,92 +1275,151 @@
1304
1275
  "async"
1305
1276
  ],
1306
1277
  "name": "wait",
1307
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1308
- "default": "0 minutes",
1278
+ "summary": "Time to wait for the command to finish, in minutes.",
1309
1279
  "hasDynamicHelp": true,
1280
+ "helpValue": "<minutes>",
1310
1281
  "multiple": false,
1311
1282
  "type": "option"
1312
1283
  },
1313
1284
  "async": {
1314
- "char": "a",
1315
1285
  "exclusive": [
1316
1286
  "wait"
1317
1287
  ],
1318
1288
  "name": "async",
1319
- "summary": "Run the command asynchronously.",
1289
+ "summary": "Don't wait for the job to complete.",
1320
1290
  "allowNo": false,
1321
1291
  "type": "boolean"
1322
1292
  },
1323
- "verbose": {
1324
- "deprecated": {
1325
- "message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
1326
- },
1327
- "name": "verbose",
1328
- "summary": "Print verbose output of failed records if result is available.",
1293
+ "query": {
1294
+ "char": "q",
1295
+ "exclusive": [
1296
+ "query-file"
1297
+ ],
1298
+ "name": "query",
1299
+ "summary": "SOQL query to execute.",
1300
+ "hasDynamicHelp": false,
1301
+ "multiple": false,
1302
+ "type": "option"
1303
+ },
1304
+ "query-file": {
1305
+ "exclusive": [
1306
+ "query"
1307
+ ],
1308
+ "name": "query-file",
1309
+ "summary": "File that contains the SOQL query.",
1310
+ "hasDynamicHelp": false,
1311
+ "multiple": false,
1312
+ "type": "option"
1313
+ },
1314
+ "all-rows": {
1315
+ "name": "all-rows",
1316
+ "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
1329
1317
  "allowNo": false,
1330
1318
  "type": "boolean"
1331
1319
  },
1332
- "line-ending": {
1333
- "dependsOn": [
1334
- "file"
1320
+ "output-file": {
1321
+ "name": "output-file",
1322
+ "required": true,
1323
+ "summary": "File where records are written.",
1324
+ "hasDynamicHelp": false,
1325
+ "multiple": false,
1326
+ "type": "option"
1327
+ },
1328
+ "result-format": {
1329
+ "char": "r",
1330
+ "name": "result-format",
1331
+ "required": true,
1332
+ "summary": "Format to write the results.",
1333
+ "default": "csv",
1334
+ "hasDynamicHelp": false,
1335
+ "multiple": false,
1336
+ "options": [
1337
+ "csv",
1338
+ "json"
1335
1339
  ],
1336
- "name": "line-ending",
1337
- "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
1340
+ "type": "option"
1341
+ },
1342
+ "column-delimiter": {
1343
+ "name": "column-delimiter",
1344
+ "relationships": [
1345
+ {
1346
+ "type": "some",
1347
+ "flags": [
1348
+ {
1349
+ "name": "result-format"
1350
+ }
1351
+ ]
1352
+ }
1353
+ ],
1354
+ "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
1338
1355
  "hasDynamicHelp": false,
1339
1356
  "multiple": false,
1340
1357
  "options": [
1341
- "CRLF",
1342
- "LF"
1358
+ "BACKQUOTE",
1359
+ "CARET",
1360
+ "COMMA",
1361
+ "PIPE",
1362
+ "SEMICOLON",
1363
+ "TAB"
1343
1364
  ],
1344
1365
  "type": "option"
1345
1366
  },
1346
- "hard-delete": {
1347
- "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.",
1348
- "name": "hard-delete",
1349
- "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.",
1350
- "allowNo": false,
1351
- "type": "boolean"
1367
+ "line-ending": {
1368
+ "name": "line-ending",
1369
+ "relationships": [
1370
+ {
1371
+ "type": "some",
1372
+ "flags": [
1373
+ {
1374
+ "name": "result-format"
1375
+ }
1376
+ ]
1377
+ }
1378
+ ],
1379
+ "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
1380
+ "hasDynamicHelp": false,
1381
+ "multiple": false,
1382
+ "options": [
1383
+ "LF",
1384
+ "CRLF"
1385
+ ],
1386
+ "type": "option"
1352
1387
  }
1353
1388
  },
1354
1389
  "hasDynamicHelp": true,
1355
1390
  "hiddenAliases": [],
1356
- "id": "data:delete:bulk",
1391
+ "id": "data:export:bulk",
1357
1392
  "pluginAlias": "@salesforce/plugin-data",
1358
1393
  "pluginName": "@salesforce/plugin-data",
1359
1394
  "pluginType": "core",
1360
1395
  "strict": true,
1361
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
1396
+ "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
1362
1397
  "enableJsonFlag": true,
1363
1398
  "isESM": true,
1364
1399
  "relativePath": [
1365
1400
  "lib",
1366
1401
  "commands",
1367
1402
  "data",
1368
- "delete",
1403
+ "export",
1369
1404
  "bulk.js"
1370
1405
  ],
1371
1406
  "aliasPermutations": [],
1372
1407
  "permutations": [
1373
- "data:delete:bulk",
1374
- "delete:data:bulk",
1375
- "delete:bulk:data",
1376
- "data:bulk:delete",
1377
- "bulk:data:delete",
1378
- "bulk:delete:data"
1408
+ "data:export:bulk",
1409
+ "export:data:bulk",
1410
+ "export:bulk:data",
1411
+ "data:bulk:export",
1412
+ "bulk:data:export",
1413
+ "bulk:export:data"
1379
1414
  ]
1380
1415
  },
1381
- "data:delete:record": {
1382
- "aliases": [
1383
- "force:data:record:delete"
1384
- ],
1416
+ "data:export:resume": {
1417
+ "aliases": [],
1385
1418
  "args": {},
1386
- "deprecateAliases": true,
1387
- "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.",
1419
+ "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.",
1388
1420
  "examples": [
1389
- "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1390
- "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1391
- "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",
1392
- "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"
1421
+ "Resume a bulk export job run on your default org by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
1422
+ "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"
1393
1423
  ],
1394
1424
  "flags": {
1395
1425
  "json": {
@@ -1407,158 +1437,67 @@
1407
1437
  "multiple": false,
1408
1438
  "type": "option"
1409
1439
  },
1410
- "target-org": {
1411
- "aliases": [
1412
- "targetusername",
1413
- "u"
1414
- ],
1415
- "char": "o",
1416
- "deprecateAliases": true,
1417
- "name": "target-org",
1418
- "noCacheDefault": true,
1419
- "required": true,
1420
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1421
- "hasDynamicHelp": true,
1440
+ "job-id": {
1441
+ "char": "i",
1442
+ "name": "job-id",
1443
+ "summary": "Job ID of the bulk export.",
1444
+ "hasDynamicHelp": false,
1422
1445
  "multiple": false,
1423
1446
  "type": "option"
1424
1447
  },
1448
+ "use-most-recent": {
1449
+ "name": "use-most-recent",
1450
+ "summary": "Use the job ID of the bulk export job that was most recently run.",
1451
+ "allowNo": false,
1452
+ "type": "boolean"
1453
+ },
1425
1454
  "api-version": {
1426
- "aliases": [
1427
- "apiversion"
1428
- ],
1429
- "deprecateAliases": true,
1430
1455
  "description": "Override the api version used for api requests made by this command",
1431
1456
  "name": "api-version",
1432
1457
  "hasDynamicHelp": false,
1433
1458
  "multiple": false,
1434
1459
  "type": "option"
1435
- },
1436
- "loglevel": {
1437
- "deprecated": {
1438
- "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."
1439
- },
1440
- "hidden": true,
1441
- "name": "loglevel",
1442
- "hasDynamicHelp": false,
1443
- "multiple": false,
1444
- "type": "option"
1445
- },
1446
- "sobject": {
1447
- "aliases": [
1448
- "sobjecttype"
1449
- ],
1450
- "char": "s",
1451
- "deprecateAliases": true,
1452
- "name": "sobject",
1453
- "required": true,
1454
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1455
- "hasDynamicHelp": false,
1456
- "multiple": false,
1457
- "type": "option"
1458
- },
1459
- "record-id": {
1460
- "aliases": [
1461
- "sobjectid"
1462
- ],
1463
- "char": "i",
1464
- "deprecateAliases": true,
1465
- "name": "record-id",
1466
- "summary": "ID of the record you’re deleting.",
1467
- "hasDynamicHelp": false,
1468
- "multiple": false,
1469
- "type": "option"
1470
- },
1471
- "where": {
1472
- "char": "w",
1473
- "name": "where",
1474
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1475
- "hasDynamicHelp": false,
1476
- "multiple": false,
1477
- "type": "option"
1478
- },
1479
- "use-tooling-api": {
1480
- "aliases": [
1481
- "usetoolingapi"
1482
- ],
1483
- "char": "t",
1484
- "deprecateAliases": true,
1485
- "name": "use-tooling-api",
1486
- "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1487
- "allowNo": false,
1488
- "type": "boolean"
1489
- },
1490
- "perflog": {
1491
- "deprecated": {
1492
- "version": "57"
1493
- },
1494
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1495
- "hidden": true,
1496
- "name": "perflog",
1497
- "summary": "Get API performance data.",
1498
- "allowNo": false,
1499
- "type": "boolean"
1500
1460
  }
1501
1461
  },
1502
- "hasDynamicHelp": true,
1462
+ "hasDynamicHelp": false,
1503
1463
  "hiddenAliases": [],
1504
- "id": "data:delete:record",
1464
+ "id": "data:export:resume",
1505
1465
  "pluginAlias": "@salesforce/plugin-data",
1506
1466
  "pluginName": "@salesforce/plugin-data",
1507
1467
  "pluginType": "core",
1508
1468
  "strict": true,
1509
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1469
+ "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
1510
1470
  "enableJsonFlag": true,
1511
1471
  "isESM": true,
1512
1472
  "relativePath": [
1513
1473
  "lib",
1514
1474
  "commands",
1515
1475
  "data",
1516
- "delete",
1517
- "record.js"
1518
- ],
1519
- "aliasPermutations": [
1520
- "force:data:record:delete",
1521
- "data:force:record:delete",
1522
- "data:record:force:delete",
1523
- "data:record:delete:force",
1524
- "force:record:data:delete",
1525
- "record:force:data:delete",
1526
- "record:data:force:delete",
1527
- "record:data:delete:force",
1528
- "force:record:delete:data",
1529
- "record:force:delete:data",
1530
- "record:delete:force:data",
1531
- "record:delete:data:force",
1532
- "force:data:delete:record",
1533
- "data:force:delete:record",
1534
- "data:delete:force:record",
1535
- "data:delete:record:force",
1536
- "force:delete:data:record",
1537
- "delete:force:data:record",
1538
- "delete:data:force:record",
1539
- "delete:data:record:force",
1540
- "force:delete:record:data",
1541
- "delete:force:record:data",
1542
- "delete:record:force:data",
1543
- "delete:record:data:force"
1476
+ "export",
1477
+ "resume.js"
1544
1478
  ],
1479
+ "aliasPermutations": [],
1545
1480
  "permutations": [
1546
- "data:delete:record",
1547
- "delete:data:record",
1548
- "delete:record:data",
1549
- "data:record:delete",
1550
- "record:data:delete",
1551
- "record:delete:data"
1481
+ "data:export:resume",
1482
+ "export:data:resume",
1483
+ "export:resume:data",
1484
+ "data:resume:export",
1485
+ "resume:data:export",
1486
+ "resume:export:data"
1552
1487
  ]
1553
1488
  },
1554
- "data:delete:resume": {
1555
- "aliases": [],
1489
+ "data:export:tree": {
1490
+ "aliases": [
1491
+ "force:data:tree:export",
1492
+ "data:export:beta:tree"
1493
+ ],
1556
1494
  "args": {},
1557
1495
  "deprecateAliases": true,
1558
- "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1496
+ "description": "Specify a SOQL query, either directly at the command line or read from a file, to retrieve the data you want to export. The exported data is written to JSON files in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use these JSON files to import data into an org with the \"<%= config.bin %> data import tree\" command.\n\nIf your SOQL query references multiple objects, the command generates a single JSON file by default. You can specify the --plan flag to generate separate JSON files for each object and a plan definition file that aggregates them. You then specify just this plan definition file when you import the data into an org.\n\nThe SOQL query can return a maximum of 2,000 records. For more information, see the REST API Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm).",
1559
1497
  "examples": [
1560
- "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1561
- "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"
1498
+ "Export records retrieved with the specified SOQL query into a single JSON file in the current directory; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c\"",
1499
+ "Export data using a SOQL query in the \"query.txt\" file and generate JSON files for each object and a plan that aggregates them:\n<%= config.bin %> <%= command.id %> --query query.txt --plan",
1500
+ "Prepend \"export-demo\" before each generated file and generate the files in the \"export-out\" directory; run the command on the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query query.txt --plan --prefix export-demo --output-dir export-out --target-org my-scratch"
1562
1501
  ],
1563
1502
  "flags": {
1564
1503
  "json": {
@@ -1585,41 +1524,17 @@
1585
1524
  "deprecateAliases": true,
1586
1525
  "name": "target-org",
1587
1526
  "noCacheDefault": true,
1588
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1527
+ "required": true,
1528
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1589
1529
  "hasDynamicHelp": true,
1590
1530
  "multiple": false,
1591
1531
  "type": "option"
1592
1532
  },
1593
- "job-id": {
1533
+ "api-version": {
1594
1534
  "aliases": [
1595
- "jobid"
1535
+ "apiversion"
1596
1536
  ],
1597
- "char": "i",
1598
1537
  "deprecateAliases": true,
1599
- "name": "job-id",
1600
- "summary": "ID of the job you want to resume.",
1601
- "hasDynamicHelp": false,
1602
- "multiple": false,
1603
- "type": "option"
1604
- },
1605
- "use-most-recent": {
1606
- "exclusive": [
1607
- "job-id"
1608
- ],
1609
- "name": "use-most-recent",
1610
- "summary": "Use the ID of the most recently-run bulk job.",
1611
- "allowNo": false,
1612
- "type": "boolean"
1613
- },
1614
- "wait": {
1615
- "name": "wait",
1616
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1617
- "default": "5 minutes",
1618
- "hasDynamicHelp": true,
1619
- "multiple": false,
1620
- "type": "option"
1621
- },
1622
- "api-version": {
1623
1538
  "description": "Override the api version used for api requests made by this command",
1624
1539
  "name": "api-version",
1625
1540
  "hasDynamicHelp": false,
@@ -1635,33 +1550,118 @@
1635
1550
  "hasDynamicHelp": false,
1636
1551
  "multiple": false,
1637
1552
  "type": "option"
1553
+ },
1554
+ "query": {
1555
+ "char": "q",
1556
+ "name": "query",
1557
+ "required": true,
1558
+ "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
1559
+ "hasDynamicHelp": false,
1560
+ "multiple": true,
1561
+ "type": "option"
1562
+ },
1563
+ "plan": {
1564
+ "char": "p",
1565
+ "name": "plan",
1566
+ "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1567
+ "allowNo": false,
1568
+ "type": "boolean"
1569
+ },
1570
+ "prefix": {
1571
+ "char": "x",
1572
+ "name": "prefix",
1573
+ "summary": "Prefix of generated files.",
1574
+ "hasDynamicHelp": false,
1575
+ "multiple": false,
1576
+ "type": "option"
1577
+ },
1578
+ "output-dir": {
1579
+ "aliases": [
1580
+ "outputdir"
1581
+ ],
1582
+ "char": "d",
1583
+ "deprecateAliases": true,
1584
+ "name": "output-dir",
1585
+ "summary": "Directory in which to generate the JSON files; default is current directory.",
1586
+ "hasDynamicHelp": false,
1587
+ "multiple": false,
1588
+ "type": "option"
1638
1589
  }
1639
1590
  },
1640
1591
  "hasDynamicHelp": true,
1641
1592
  "hiddenAliases": [],
1642
- "id": "data:delete:resume",
1593
+ "id": "data:export:tree",
1643
1594
  "pluginAlias": "@salesforce/plugin-data",
1644
1595
  "pluginName": "@salesforce/plugin-data",
1645
1596
  "pluginType": "core",
1646
1597
  "strict": true,
1647
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1598
+ "summary": "Export data from an org into one or more JSON files.",
1648
1599
  "enableJsonFlag": true,
1649
1600
  "isESM": true,
1650
1601
  "relativePath": [
1651
1602
  "lib",
1652
1603
  "commands",
1653
1604
  "data",
1654
- "delete",
1655
- "resume.js"
1605
+ "export",
1606
+ "tree.js"
1607
+ ],
1608
+ "aliasPermutations": [
1609
+ "force:data:tree:export",
1610
+ "data:force:tree:export",
1611
+ "data:tree:force:export",
1612
+ "data:tree:export:force",
1613
+ "force:tree:data:export",
1614
+ "tree:force:data:export",
1615
+ "tree:data:force:export",
1616
+ "tree:data:export:force",
1617
+ "force:tree:export:data",
1618
+ "tree:force:export:data",
1619
+ "tree:export:force:data",
1620
+ "tree:export:data:force",
1621
+ "force:data:export:tree",
1622
+ "data:force:export:tree",
1623
+ "data:export:force:tree",
1624
+ "data:export:tree:force",
1625
+ "force:export:data:tree",
1626
+ "export:force:data:tree",
1627
+ "export:data:force:tree",
1628
+ "export:data:tree:force",
1629
+ "force:export:tree:data",
1630
+ "export:force:tree:data",
1631
+ "export:tree:force:data",
1632
+ "export:tree:data:force",
1633
+ "data:export:beta:tree",
1634
+ "export:data:beta:tree",
1635
+ "export:beta:data:tree",
1636
+ "export:beta:tree:data",
1637
+ "data:beta:export:tree",
1638
+ "beta:data:export:tree",
1639
+ "beta:export:data:tree",
1640
+ "beta:export:tree:data",
1641
+ "data:beta:tree:export",
1642
+ "beta:data:tree:export",
1643
+ "beta:tree:data:export",
1644
+ "beta:tree:export:data",
1645
+ "data:export:tree:beta",
1646
+ "export:data:tree:beta",
1647
+ "export:tree:data:beta",
1648
+ "export:tree:beta:data",
1649
+ "data:tree:export:beta",
1650
+ "tree:data:export:beta",
1651
+ "tree:export:data:beta",
1652
+ "tree:export:beta:data",
1653
+ "data:tree:beta:export",
1654
+ "tree:data:beta:export",
1655
+ "tree:beta:data:export",
1656
+ "tree:beta:export:data"
1656
1657
  ],
1657
- "aliasPermutations": [],
1658
1658
  "permutations": [
1659
- "data:delete:resume",
1660
- "delete:data:resume",
1661
- "delete:resume:data",
1662
- "data:resume:delete",
1663
- "resume:data:delete",
1664
- "resume:delete:data"
1659
+ "data:export:tree",
1660
+ "export:data:tree",
1661
+ "export:tree:data",
1662
+ "data:tree:export",
1663
+ "tree:data:export",
1664
+ "tree:export:data"
1665
1665
  ]
1666
1666
  },
1667
1667
  "data:get:record": {
@@ -3901,5 +3901,5 @@
3901
3901
  ]
3902
3902
  }
3903
3903
  },
3904
- "version": "3.13.4"
3904
+ "version": "3.13.5"
3905
3905
  }