Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 207 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ USAGE
* [`csdx plugins:unlink [PLUGIN]`](#csdx-pluginsunlink-plugin)
* [`csdx plugins:update`](#csdx-pluginsupdate)
* [`csdx tokens`](#csdx-tokens)
* [`csdx tsgen`](#csdx-tsgen)
* [`csdx whoami`](#csdx-whoami)

## `csdx audit`
Expand Down Expand Up @@ -4165,6 +4166,44 @@ EXAMPLES
$ csdx auth:tokens
```

## `csdx tsgen`

generate TypeScript typings from a Stack

```
USAGE
$ csdx tsgen -a <value> -o <value> [-p <value>] [-d] [--branch <value>] [--include-system-fields]
[--api-type rest|graphql] [--namespace <value>]

FLAGS
-a, --token-alias=<value> (required) delivery token alias
-d, --[no-]doc include documentation comments
-o, --output=<value> (required) full path to output
-p, --prefix=<value> interface prefix, e.g. "I"
--api-type=<option> [default: rest] [Optional] Please enter an API type to generate the type definitions.
<options: rest|graphql>
--branch=<value> branch
--include-system-fields include system fields in generated types
--namespace=<value> [Optional]Please enter a namespace for the GraphQL API type to organize the generated
types.

DESCRIPTION
generate TypeScript typings from a Stack

EXAMPLES
$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts"

$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" -p "I"

$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --no-doc

$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql

$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql --namespace "GraphQL"
```

_See code: [contentstack-cli-tsgen](https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/blob/v3.0.1/src/commands/tsgen.ts)_

## `csdx whoami`

Display current users email address
Expand Down
10 changes: 6 additions & 4 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,26 @@
"@contentstack/cli-cm-bootstrap": "~1.13.0",
"@contentstack/cli-cm-branches": "~1.2.0",
"@contentstack/cli-cm-bulk-publish": "~1.7.1",
"@contentstack/cli-cm-export": "~1.14.1",
"@contentstack/cli-cm-clone": "~1.13.0",
"@contentstack/cli-cm-export": "~1.14.1",
"@contentstack/cli-cm-export-to-csv": "~1.7.3",
"@contentstack/cli-cm-import": "~1.19.3",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.1",
"@contentstack/cli-cm-migrate-rte": "~1.4.20",
"@contentstack/cli-cm-seed": "~1.10.0",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-config": "~1.9.0",
"@contentstack/cli-launch": "~1.3.1",
"@contentstack/cli-migration": "~1.6.4",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.18.4",
"@contentstack/cli-variants": "~1.1.4",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.1",
"@contentstack/management": "~1.18.4",
"@oclif/core": "^3.27.0",
"@oclif/plugin-help": "^5.2.20",
"@oclif/plugin-not-found": "^2.4.3",
"@oclif/plugin-plugins": "^5.4.22",
"chalk": "^4.1.2",
"contentstack-cli-tsgen": "^3.0.1",
"debug": "^4.4.0",
"figlet": "^1.8.0",
"inquirer": "8.2.6",
Expand Down Expand Up @@ -152,7 +153,8 @@
"@contentstack/cli-cm-branches",
"@contentstack/cli-launch",
"@contentstack/cli-audit",
"@contentstack/cli-cm-import-setup"
"@contentstack/cli-cm-import-setup",
"contentstack-cli-tsgen"
],
"hooks": {
"prerun": [
Expand Down
Loading
Loading