ch-api-client-typescript2 2.1.9
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/.gitattributes +2 -0
- package/.github/workflows/publish-npm.yml +49 -0
- package/README.md +22 -0
- package/lib/api.d.ts +21362 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +16565 -0
- package/lib/base.d.ts +56 -0
- package/lib/base.d.ts.map +1 -0
- package/lib/base.js +83 -0
- package/lib/common.d.ts +66 -0
- package/lib/common.d.ts.map +1 -0
- package/lib/common.js +234 -0
- package/lib/configuration.d.ts +84 -0
- package/lib/configuration.d.ts.map +1 -0
- package/lib/configuration.js +44 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +27 -0
- package/openapitools.json +7 -0
- package/package.json +29 -0
- package/src/.openapi-generator/FILES +9 -0
- package/src/.openapi-generator/VERSION +1 -0
- package/src/.openapi-generator-ignore +23 -0
- package/src/api.ts +28898 -0
- package/src/base.ts +71 -0
- package/src/common.ts +138 -0
- package/src/configuration.ts +101 -0
- package/src/git_push.sh +57 -0
- package/src/index.ts +18 -0
- package/tsconfig.json +71 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# This is a basic workflow to help you get started with Actions
|
|
2
|
+
|
|
3
|
+
name: Version Update
|
|
4
|
+
|
|
5
|
+
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
6
|
+
# events but only for the main branch
|
|
7
|
+
on:
|
|
8
|
+
repository_dispatch:
|
|
9
|
+
types:
|
|
10
|
+
- publish npm package
|
|
11
|
+
|
|
12
|
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
13
|
+
jobs:
|
|
14
|
+
# This workflow contains a single job called "build"
|
|
15
|
+
build:
|
|
16
|
+
# The type of runner that the job will run on
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
20
|
+
steps:
|
|
21
|
+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
22
|
+
- uses: actions/checkout@v2
|
|
23
|
+
- uses: actions/setup-node@v1
|
|
24
|
+
with:
|
|
25
|
+
node-version: 12
|
|
26
|
+
registry-url: https://registry.npmjs.org/
|
|
27
|
+
- run: npm ci
|
|
28
|
+
- name: NPM-Version
|
|
29
|
+
# You may pin to the exact commit or the version.
|
|
30
|
+
# uses: Reedyuk/NPM-Version@9b08a57f534ead28c49f7b57665fe9f6d048ff74
|
|
31
|
+
uses: Reedyuk/NPM-Version@1.0.1
|
|
32
|
+
with:
|
|
33
|
+
# This will be the version you want to set in the package.json file
|
|
34
|
+
version: ${{ github.event.client_payload.message.tag }}
|
|
35
|
+
# The location of the package.json file, defaults to current directory.
|
|
36
|
+
package: ./
|
|
37
|
+
- name: Echo payload
|
|
38
|
+
run: echo ${{ github.event.client_payload.message.tag }}
|
|
39
|
+
- name: Add & Commit
|
|
40
|
+
# You may pin to the exact commit or the version.
|
|
41
|
+
# uses: EndBug/add-and-commit@b5dec7ea7647ed6edf307ec828d3aeb6bca69f63
|
|
42
|
+
uses: EndBug/add-and-commit@v5.1.0
|
|
43
|
+
env:
|
|
44
|
+
# This is necessary in order to push a commit to the repo
|
|
45
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
|
|
46
|
+
- run: npm run-script build
|
|
47
|
+
- run: npm publish
|
|
48
|
+
env:
|
|
49
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ch-api-client-typescript2
|
|
2
|
+
|
|
3
|
+
usage:
|
|
4
|
+
|
|
5
|
+
import { CountriesApi, CountryItemViewModel } from './out/api'; import { Configuration } from './out/configuration';
|
|
6
|
+
|
|
7
|
+
const models :CountryItemViewModel[] = [];
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
const config = new Configuration({ basePath: 'https://api-int.icloudhospital.com/' })
|
|
11
|
+
let result = new CountriesApi(config).apiV1CountriesGet().then(d => console.log(d.data.items.map(t => t.name)))
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
!!! instal openapi-generator 4.3.1 npm install @openapitools/openapi-generator-cli
|
|
15
|
+
|
|
16
|
+
!!! to change openapi-generator version openapi-generator-cli version-manager list select appropriate version
|
|
17
|
+
|
|
18
|
+
!!! generate client sdk with following command openapi-generator-cli generate -g typescript-axios -o src -i https://api-int.icloudhospital.com/swagger/v1/swagger.json --type-mappings=DateTime=Date
|
|
19
|
+
|
|
20
|
+
!!! run build to compile an generate js files npm run build
|
|
21
|
+
|
|
22
|
+
!!! commit to main branch
|