@salesforce/cli 2.60.6 → 2.60.8

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.
package/README.md CHANGED
@@ -24,7 +24,7 @@ $ npm install -g @salesforce/cli
24
24
  $ sf COMMAND
25
25
  running command...
26
26
  $ sf (--version|-v)
27
- @salesforce/cli/2.60.6 linux-x64 node-v20.17.0
27
+ @salesforce/cli/2.60.8 linux-x64 node-v20.17.0
28
28
  $ sf --help [COMMAND]
29
29
  USAGE
30
30
  $ sf COMMAND
@@ -849,7 +849,7 @@ _See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-ape
849
849
 
850
850
  ## `sf api request graphql`
851
851
 
852
- Execute GraphQL statements
852
+ Execute a GraphQL statement.
853
853
 
854
854
  ```
855
855
  USAGE
@@ -862,48 +862,47 @@ FLAGS
862
862
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the
863
863
  `target-org` configuration variable is already set.
864
864
  --api-version=<value> Override the api version used for api requests made by this command
865
- --body=file (required) File or content with GraphQL statement. Specify "-" to read from
866
- standard input.
865
+ --body=file (required) File or content with the GraphQL statement. Specify "-" to read
866
+ from standard input.
867
867
 
868
868
  GLOBAL FLAGS
869
869
  --flags-dir=<value> Import flag values from a directory.
870
870
  --json Format output as json.
871
871
 
872
872
  DESCRIPTION
873
- Execute GraphQL statements
874
-
875
- Run any valid GraphQL statement via the /graphql
876
- [API](https://developer.salesforce.com/docs/platform/graphql/guide/graphql-about.html)
877
-
878
- EXAMPLES
879
- - Runs the graphql query directly via the command line
880
- sf api request graphql --body "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } } } } } } }"
881
- - Runs a mutation to create an Account, with an `example.txt` file, containing
882
- mutation AccountExample{
883
- uiapi {
884
- AccountCreate(input: {
885
- Account: {
886
- Name: "Trailblazer Express"
887
- }
888
- }) {
889
- Record {
890
- Id
891
- Name {
892
- value
893
- }
894
- }
895
- }
896
- }
897
- }
898
- $ sf api request graphql --body example.txt
899
- will create a new account returning specified fields (Id, Name)
900
- ```
901
-
902
- _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.1/src/commands/api/request/graphql.ts)_
873
+ Execute a GraphQL statement.
874
+
875
+ Specify the GraphQL statement with the "--body" flag, either directly at the command line or with a file that contains
876
+ the statement. You can query Salesforce records using a "query" statement or use mutations to modify Salesforce
877
+ records.
878
+
879
+ This command uses the GraphQL API to query or modify Salesforce objects. For details about the API, and examples of
880
+ queries and mutations, see https://developer.salesforce.com/docs/platform/graphql/guide/graphql-about.html.
881
+
882
+ EXAMPLES
883
+ Execute a GraphQL query on the Account object by specifying the query directly to the "--body" flag; the command
884
+ uses your default org:
885
+
886
+ $ sf api request graphql --body "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } \
887
+ } } } } } }"
888
+
889
+ Read the GraphQL statement from a file called "example.txt" and execute it on an org with alias "my-org":
890
+
891
+ $ sf api request graphql --body example.txt --target-org my-org
892
+
893
+ Pipe the GraphQL statement that you want to execute from standard input to the command:
894
+ $ echo graphql | sf api request graphql --body -
895
+
896
+ Write the output of the command to a file called "output.txt" and include the HTTP response status and headers:
897
+
898
+ $ sf api request graphql --body example.txt --stream-to-file output.txt --include
899
+ ```
900
+
901
+ _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.2/src/commands/api/request/graphql.ts)_
903
902
 
904
903
  ## `sf api request rest ENDPOINT`
905
904
 
906
- Make an authenticated HTTP request to Salesforce REST API and print the response.
905
+ Make an authenticated HTTP request using the Salesforce REST API.
907
906
 
908
907
  ```
909
908
  USAGE
@@ -922,32 +921,51 @@ FLAGS
922
921
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the
923
922
  `target-org` configuration variable is already set.
924
923
  --api-version=<value> Override the api version used for api requests made by this command
925
- --body=file File to use as the body for the request. Specify "-" to read from standard
926
- input; specify "" for an empty body.
924
+ --body=file File or content for the body of the HTTP request. Specify "-" to read from
925
+ standard input or "" for an empty body.
927
926
 
928
927
  GLOBAL FLAGS
929
928
  --flags-dir=<value> Import flag values from a directory.
930
929
 
930
+ DESCRIPTION
931
+ Make an authenticated HTTP request using the Salesforce REST API.
932
+
933
+ When sending the HTTP request with the "--body" flag, you can specify the request directly at the command line or with
934
+ a file that contains the request.
935
+
936
+ For a full list of supported REST endpoints and resources, see
937
+ https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm.
938
+
931
939
  EXAMPLES
932
- - List information about limits in the org with alias "my-org":
933
- sf api request rest 'limits' --target-org my-org
934
- - List all endpoints
935
- sf api request rest '/'
936
- - Get the response in XML format by specifying the "Accept" HTTP header:
937
- sf api request rest 'limits' --target-org my-org --header 'Accept: application/xml'
938
- - POST to create an Account object
939
- sf api request rest 'sobjects/account' --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \"Boise\"}" --method POST
940
- - or with a file 'info.json' containing
941
- {
942
- "Name": "Demo",
943
- "ShippingCity": "Boise"
944
- }
945
- $ sf api request rest 'sobjects/account' --body info.json --method POST
946
- - Update object
947
- sf api request rest 'sobjects/account/<Account ID>' --body "{\"BillingCity\": \"San Francisco\"}" --method PATCH
948
- ```
949
-
950
- _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.1/src/commands/api/request/rest.ts)_
940
+ List information about limits in the org with alias "my-org":
941
+
942
+ $ sf api request rest 'limits' --target-org my-org
943
+
944
+ List all endpoints in your default org; write the output to a file called "output.txt" and include the HTTP response
945
+ status and headers:
946
+
947
+ $ sf api request rest '/' --stream-to-file output.txt --include
948
+
949
+ Get the response in XML format by specifying the "Accept" HTTP header:
950
+
951
+ $ sf api request rest 'limits' --header 'Accept: application/xml'
952
+
953
+ Create an account record using the POST method; specify the request details directly in the "--body" flag:
954
+
955
+ $ sf api request rest 'sobjects/account' --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \
956
+ \"Boise\"}" --method POST
957
+
958
+ Create an account record using the information in a file called "info.json":
959
+
960
+ $ sf api request rest 'sobjects/account' --body info.json --method POST
961
+
962
+ Update an account record using the PATCH method:
963
+
964
+ $ sf api request rest 'sobjects/account/<Account ID>' --body "{\"BillingCity\": \"San Francisco\"}" --method \
965
+ PATCH
966
+ ```
967
+
968
+ _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.2/src/commands/api/request/rest.ts)_
951
969
 
952
970
  ## `sf autocomplete [SHELL]`
953
971
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
- "version": "2.60.6",
3
+ "version": "2.60.8",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/cli",
9
- "version": "2.60.6",
9
+ "version": "2.60.8",
10
10
  "hasInstallScript": true,
11
11
  "license": "BSD-3-Clause",
12
12
  "dependencies": {
@@ -25,7 +25,7 @@
25
25
  "@salesforce/core": "^8.2.3",
26
26
  "@salesforce/kit": "^3.1.6",
27
27
  "@salesforce/plugin-apex": "3.4.10",
28
- "@salesforce/plugin-api": "1.2.1",
28
+ "@salesforce/plugin-api": "1.2.2",
29
29
  "@salesforce/plugin-auth": "3.6.59",
30
30
  "@salesforce/plugin-data": "3.6.5",
31
31
  "@salesforce/plugin-deploy-retrieve": "3.12.10",
@@ -4959,9 +4959,9 @@
4959
4959
  }
4960
4960
  },
4961
4961
  "node_modules/@salesforce/plugin-api": {
4962
- "version": "1.2.1",
4963
- "resolved": "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.1.tgz",
4964
- "integrity": "sha512-p9AMXmpnZfxqJ3zpwN3TZN1pmum3+Fldj21xpkCX8LQRxPgs4awSZks4H7qUJFwKKj7M5WoAgyXbr6SndnGorA==",
4962
+ "version": "1.2.2",
4963
+ "resolved": "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.2.tgz",
4964
+ "integrity": "sha512-DYcvSvK1J/C0oin9CZltk/UT4d9dOtRBztMxHVUJDR2VC5iJhlx+cjOs76V2/D+7g7Maon0lARYtY0JX+3FZnA==",
4965
4965
  "license": "BSD-3-Clause",
4966
4966
  "dependencies": {
4967
4967
  "@oclif/core": "^4",
package/oclif.lock CHANGED
@@ -2311,10 +2311,10 @@
2311
2311
  "@salesforce/sf-plugins-core" "^11.3.7"
2312
2312
  ansis "^3.3.1"
2313
2313
 
2314
- "@salesforce/plugin-api@1.2.1":
2315
- version "1.2.1"
2316
- resolved "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.1.tgz"
2317
- integrity sha512-p9AMXmpnZfxqJ3zpwN3TZN1pmum3+Fldj21xpkCX8LQRxPgs4awSZks4H7qUJFwKKj7M5WoAgyXbr6SndnGorA==
2314
+ "@salesforce/plugin-api@1.2.2":
2315
+ version "1.2.2"
2316
+ resolved "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.2.tgz"
2317
+ integrity sha512-DYcvSvK1J/C0oin9CZltk/UT4d9dOtRBztMxHVUJDR2VC5iJhlx+cjOs76V2/D+7g7Maon0lARYtY0JX+3FZnA==
2318
2318
  dependencies:
2319
2319
  "@oclif/core" "^4"
2320
2320
  "@salesforce/core" "^8.4.0"
@@ -5351,5 +5351,5 @@
5351
5351
  ]
5352
5352
  }
5353
5353
  },
5354
- "version": "2.60.6"
5354
+ "version": "2.60.8"
5355
5355
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
3
  "description": "The Salesforce CLI",
4
- "version": "2.60.6",
4
+ "version": "2.60.8",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "sf": "./bin/run.js",
@@ -154,7 +154,7 @@
154
154
  "@salesforce/core": "^8.2.3",
155
155
  "@salesforce/kit": "^3.1.6",
156
156
  "@salesforce/plugin-apex": "3.4.10",
157
- "@salesforce/plugin-api": "1.2.1",
157
+ "@salesforce/plugin-api": "1.2.2",
158
158
  "@salesforce/plugin-auth": "3.6.59",
159
159
  "@salesforce/plugin-data": "3.6.5",
160
160
  "@salesforce/plugin-deploy-retrieve": "3.12.10",