5.21.2 • Published 2 days ago

@commercelayer/cli-plugin-resources v5.21.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

@commercelayer/cli-plugin-resources

Commerce Layer CLI Resources plugin

oclif Version Downloads/week License

Usage

$ cl-resources COMMAND

$ cl-resources (-v | version | --version) to check the version of the CLI you have installed.

$ cl-resources [COMMAND] (--help | -h) for detailed information about CLI commands.

To install as a Commerce Layer CLI plugin run the following command:

$ commercelayer plugins:install resources

Commands

cl-resources resources

List all the available Commerce Layer API resources.

USAGE
  $ cl-resources resources

OPTIONS
  -h, --help  show CLI help

EXAMPLES
  $ cl-resources resources
  $ cl-res resources
  $ commercelayer resources
  $ cl resources

See code: src/commands/resources/index.ts

cl-resources resources:args [RESOURCE]

Show all the saved command arguments.

USAGE
  $ cl-resources resources:args [RESOURCE]

ARGUMENTS
  RESOURCE  the resource type

OPTIONS
  -D, --delete       delete saved arguments associated to the alias
  -a, --alias=alias  the alias associated to saved command arguments

ALIASES
  $ cl-resources res:args

See code: src/commands/resources/args.ts

cl-resources resources:create RESOURCE

Create a new resource.

USAGE
  $ cl-resources resources:create RESOURCE

ARGUMENTS
  RESOURCE  the resource type

OPTIONS
  -D, --data=data                  the data file to use as request body
  -D, --doc                        shows the CLI command in a specific language
  -O, --object=object              define a resource object attribute
  -R, --raw                        print out the raw API response
  -a, --attribute=attribute        define a resource attribute
  -f, --fields=fields              comma separeted list of fields in the format [resource]=field1,field2...
  -i, --include=include            comma separated resources to include
  -j, --json                       convert output in standard JSON format
  -l, --lang=curl|node             show the CLI command in the specified language syntax
  -m, --metadata=metadata          define a metadata attribute or a set of metadata attributes
  -o, --organization=organization  (required) the slug of your organization
  -r, --relationship=relationship  define a relationship with another resource
  -u, --unformatted                print unformatted JSON output
  --curl                           show the equivalent cURL command of the CLI command
  --load-args=load-args            load previously saved command arguments
  --node                           show the equivalent Node SDK source code of the CLI command
  --save-args=save-args            save command data to file for future use

ALIASES
  $ cl-resources create
  $ cl-resources rc
  $ cl-resources res:create
  $ cl-resources post

EXAMPLES
  $ commercelayer resources:create customers -a email=user@test.com
  $ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
  $ cl create customers -a email=user@test.com -m meta_key="meta value"
  $ cl rc customers -D /path/to/data/file/data.json

See code: src/commands/resources/create.ts

cl-resources resources:delete RESOURCE [ID]

Delete an existing resource.

USAGE
  $ cl-resources resources:delete RESOURCE [ID]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

ALIASES
  $ cl-resources delete
  $ cl-resources rd
  $ cl-resources res:delete

EXAMPLES
  $ commercelayer resources:delete customers/<customerId>
  $ cl delete customers <customerId>

See code: src/commands/resources/delete.ts

cl-resources resources:doc RESOURCE

Open the default browser and show the online documentation for the resource.

USAGE
  $ cl-resources resources:doc RESOURCE

ARGUMENTS
  RESOURCE  the resource for which you want to access the online documentation

ALIASES
  $ cl-resources res:doc

EXAMPLES
  $ commercelayer rdoc customers
  $ cl res:doc cusatomers

See code: src/commands/resources/doc.ts

cl-resources resources:filters

Show a list of all available filter predicates.

USAGE
  $ cl-resources resources:filters

ALIASES
  $ cl-resources res:filters

EXAMPLES
  $ commercelayer resources:filters
  $ cl res:filters

See code: src/commands/resources/filters.ts

cl-resources resources:get RESOURCE [ID]

Retrieve a resource or list a set of resources.

USAGE
  $ cl-resources resources:get RESOURCE [ID]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

OPTIONS
  -D, --doc                        shows the CLI command in a specific language
  -R, --raw                        print out the raw API response
  -X, --save-path=save-path        save command output to file and create missing path directories
  -e, --extract=extract            extract subfields from object attributes
  -f, --fields=fields              comma separeted list of fields in the format [resource]=field1,field2...
  -i, --include=include            comma separated resources to include
  -j, --json                       convert output in standard JSON format
  -l, --lang=curl|node             show the CLI command in the specified language syntax
  -n, --pageSize=pageSize          number of elements per page
  -o, --organization=organization  (required) the slug of your organization
  -p, --page=page                  page number
  -s, --sort=sort                  defines results ordering
  -u, --unformatted                print unformatted JSON output
  -w, --where=where                comma separated list of query filters
  -x, --save=save                  save command output to file
  --curl                           show the equivalent cURL command of the CLI command
  --load-args=load-args            load previously saved command arguments
  --node                           show the equivalent Node SDK source code of the CLI command
  --save-args=save-args            save command data to file for future use

ALIASES
  $ cl-resources get
  $ cl-resources res:get

EXAMPLES
  $ commercelayer resources:get customers
  $ commercelayer res:get customers
  $ clayer res:get customers/<customerId>
  $ cl get customers <customerId>

See code: src/commands/resources/get.ts

cl-resources resources:list RESOURCE

Fetch a collection of resources.

USAGE
  $ cl-resources resources:list RESOURCE

ARGUMENTS
  RESOURCE  the resource type

OPTIONS
  -D, --doc                        shows the CLI command in a specific language
  -R, --raw                        print out the raw API response
  -X, --save-path=save-path        save command output to file and create missing path directories
  -e, --extract=extract            extract subfields from object attributes
  -f, --fields=fields              comma separeted list of fields in the format [resource]=field1,field2...
  -i, --include=include            comma separated resources to include
  -j, --json                       convert output in standard JSON format
  -l, --lang=curl|node             show the CLI command in the specified language syntax
  -n, --pageSize=pageSize          number of elements per page
  -o, --organization=organization  (required) the slug of your organization
  -p, --page=page                  page number
  -s, --sort=sort                  defines results ordering
  -u, --unformatted                print unformatted JSON output
  -w, --where=where                comma separated list of query filters
  -x, --save=save                  save command output to file
  --curl                           show the equivalent cURL command of the CLI command
  --load-args=load-args            load previously saved command arguments
  --node                           show the equivalent Node SDK source code of the CLI command
  --save-args=save-args            save command data to file for future use

ALIASES
  $ cl-resources list
  $ cl-resources rl
  $ cl-resources res:list

EXAMPLES
  $ commercelayer resources:list customers -f id,email -i customer_group -s updated_at
  $ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
  $ cl list -p 5 -n 10 -s -created_at --raw

See code: src/commands/resources/list.ts

cl-resources resources:retrieve RESOURCE [ID]

Fetch a single resource.

USAGE
  $ cl-resources resources:retrieve RESOURCE [ID]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

OPTIONS
  -D, --doc                        shows the CLI command in a specific language
  -R, --raw                        print out the raw API response
  -X, --save-path=save-path        save command output to file and create missing path directories
  -e, --extract=extract            extract subfields from object attributes
  -f, --fields=fields              comma separeted list of fields in the format [resource]=field1,field2...
  -i, --include=include            comma separated resources to include
  -j, --json                       convert output in standard JSON format
  -l, --lang=curl|node             show the CLI command in the specified language syntax
  -o, --organization=organization  (required) the slug of your organization
  -u, --unformatted                print unformatted JSON output
  -x, --save=save                  save command output to file
  --curl                           show the equivalent cURL command of the CLI command
  --load-args=load-args            load previously saved command arguments
  --node                           show the equivalent Node SDK source code of the CLI command
  --save-args=save-args            save command data to file for future use

ALIASES
  $ cl-resources retrieve
  $ cl-resources rr
  $ cl-resources res:retrieve

EXAMPLES
  $ commercelayer resources:retrieve customers/<customerId>
  $ commercelayer retrieve customers <customerId>
  $ cl res:retrieve customers <customerId>
  $ clayer rr customers/<customerId>

See code: src/commands/resources/retrieve.ts

cl-resources resources:update RESOURCE [ID]

Update an existing resource.

USAGE
  $ cl-resources resources:update RESOURCE [ID]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to update

OPTIONS
  -D, --data=data                          the data file to use as request body
  -D, --doc                                shows the CLI command in a specific language

  -M, --metadata-replace=metadata-replace  define a metadata attribute and replace every item already presente in the
                                           remote resource

  -O, --object=object                      define a resource object attribute

  -R, --raw                                print out the raw API response

  -a, --attribute=attribute                define a resource attribute

  -f, --fields=fields                      comma separeted list of fields in the format [resource]=field1,field2...

  -i, --include=include                    comma separated resources to include

  -j, --json                               convert output in standard JSON format

  -l, --lang=curl|node                     show the CLI command in the specified language syntax

  -m, --metadata=metadata                  define a metadata attribute and merge it with the metadata already present in
                                           the remote resource

  -o, --organization=organization          (required) the slug of your organization

  -r, --relationship=relationship          define a relationship with another resource

  -u, --unformatted                        print unformatted JSON output

  --curl                                   show the equivalent cURL command of the CLI command

  --load-args=load-args                    load previously saved command arguments

  --node                                   show the equivalent Node SDK source code of the CLI command

  --save-args=save-args                    save command data to file for future use

ALIASES
  $ cl-resources update
  $ cl-resources ru
  $ cl-resources res:update
  $ cl-resources patch

EXAMPLES
  $ commercelayer resources:update customers/<customerId> -a reference=referenceId
  $ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
  $ cl update customers/<customerId> -m meta_key="meta value"
  $ cl ru customers <customerId> -M mete_keu="metadata overwrite
  $ clayer update customers <customerId> -D /path/to/data/file/data.json

See code: src/commands/resources/update.ts

6.0.0-rc.5

2 days ago

6.0.0-rc.4

10 days ago

6.0.0-rc.3

10 days ago

6.0.0-rc.2

10 days ago

6.0.0-oclif3.15

13 days ago

6.0.0-rc.1

13 days ago

6.0.0-oclif3.11

14 days ago

6.0.0-oclif3.14

14 days ago

6.0.0-oclif3.8

2 months ago

6.0.0-oclif3.9

2 months ago

6.0.0-oclif3.7

2 months ago

5.21.2

2 months ago

6.0.0-oclif3.6

2 months ago

6.0.0-oclif3.5

2 months ago

6.0.0-oclif3.3

2 months ago

6.0.0-oclif3.4

2 months ago

6.0.0-oclif3.2

2 months ago

5.21.1

2 months ago

6.0.0-oclif3.1

2 months ago

5.21.0

3 months ago

5.20.6

4 months ago

5.20.5

4 months ago

5.20.4

5 months ago

5.20.3

5 months ago

5.20.2

5 months ago

5.20.1

5 months ago

5.17.5

10 months ago

5.17.4

10 months ago

5.17.3

10 months ago

5.17.2

10 months ago

5.17.1

10 months ago

5.17.0

10 months ago

5.20.0

5 months ago

5.18.3

7 months ago

5.18.2

7 months ago

5.18.1

7 months ago

5.18.0

8 months ago

5.19.0

5 months ago

5.16.2

10 months ago

5.16.1

10 months ago

5.16.0

11 months ago

5.15.0

11 months ago

5.14.0

11 months ago

5.13.1

12 months ago

5.12.0

1 year ago

5.13.0

1 year ago

5.10.2

1 year ago

5.10.1

1 year ago

5.10.0

1 year ago

5.8.0

1 year ago

5.7.3

1 year ago

5.7.2

2 years ago

5.7.1

2 years ago

5.7.0

2 years ago

5.5.4

2 years ago

5.6.2

2 years ago

5.6.1

2 years ago

5.6.0

2 years ago

5.5.3

2 years ago

5.5.2

2 years ago

5.5.1

2 years ago

5.5.0

2 years ago

5.3.3

2 years ago

5.3.2

2 years ago

5.3.1

2 years ago

5.3.0

2 years ago

5.4.0

2 years ago

5.3.6

2 years ago

5.3.5

2 years ago

5.3.4

2 years ago

5.2.4

2 years ago

5.2.3

2 years ago

5.2.2

2 years ago

5.2.1

2 years ago

5.2.0

2 years ago

3.2.2

2 years ago

3.2.1

2 years ago

3.6.2

2 years ago

3.6.1

2 years ago

3.6.0

2 years ago

3.2.3

2 years ago

4.4.0

2 years ago

4.0.1

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.5.0

2 years ago

4.3.5-beta.2

2 years ago

4.3.5-beta.1

2 years ago

4.3.2

2 years ago

4.3.1

2 years ago

4.3.4

2 years ago

4.3.3

2 years ago

4.3.0-beta.1

2 years ago

5.1.0

2 years ago

4.3.9

2 years ago

4.3.5

2 years ago

4.3.8

2 years ago

4.3.7

2 years ago

3.4.0

2 years ago

3.0.4

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.4.2

2 years ago

3.0.6

2 years ago

3.4.1

2 years ago

3.0.5

2 years ago

4.2.2

2 years ago

4.2.0

2 years ago

3.3.0

2 years ago

4.1.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.4.2

2 years ago

2.3.6

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.5

2 years ago

2.3.0

2 years ago

2.2.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.0-alpha.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1-beta.0

3 years ago

1.1.1

3 years ago

1.1.2-beta.0

3 years ago

1.1.0-beta.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-rc.10

3 years ago

0.9.10

3 years ago

0.9.11

3 years ago

1.0.0-rc.9

3 years ago

1.0.0-rc.7

3 years ago

1.0.0-rc.8

3 years ago

1.0.0-rc.5

3 years ago

1.0.0-rc.6

3 years ago

1.0.0-beta.11

3 years ago

1.0.0-beta.12

3 years ago

1.0.0-beta.10

3 years ago

1.0.0-rc.3

3 years ago

1.0.0-beta.19

3 years ago

1.0.0-rc.4

3 years ago

1.0.0-rc.1

3 years ago

1.0.0-beta.17

3 years ago

0.9.2

3 years ago

1.0.0-rc.2

3 years ago

1.0.0-beta.18

3 years ago

0.9.1

3 years ago

0.7.3

3 years ago

1.0.0-beta.15

3 years ago

1.0.0-rc.0

3 years ago

1.0.0-beta.16

3 years ago

1.0.0-beta.13

3 years ago

1.0.0-beta.14

3 years ago

0.9.8

3 years ago

0.9.7

3 years ago

0.9.9

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.10.3

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-beta.7

3 years ago

1.0.0-beta

3 years ago

1.0.0-beta.8

3 years ago

1.0.0-beta.9

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.7.2

3 years ago

0.6.20

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.9

3 years ago

0.6.8

3 years ago

0.6.10

3 years ago

0.6.12

3 years ago

0.6.11

3 years ago

0.6.18

3 years ago

0.6.17

3 years ago

0.6.19

3 years ago

0.6.14

3 years ago

0.6.13

3 years ago

0.6.16

3 years ago

0.6.15

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.5.3

3 years ago

0.6.4

3 years ago

0.6.1

3 years ago

0.4.3

3 years ago

0.4.1

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.1.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago