@cosmotech/api-ts 0.1.1 → 0.1.14

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/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Cosmo Tech Plaform API
3
3
  * Cosmo Tech Platform API
4
4
  *
5
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
5
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
6
6
  * Contact: platform@cosmotech.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
- import { AxiosInstance } from 'axios';
13
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
29
29
  */
30
30
  export interface RequestArgs {
31
31
  url: string;
32
- options: any;
32
+ options: AxiosRequestConfig;
33
33
  }
34
34
  /**
35
35
  *
package/dist/base.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Cosmo Tech Plaform API
6
6
  * Cosmo Tech Platform API
7
7
  *
8
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
8
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
9
9
  * Contact: platform@cosmotech.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Cosmo Tech Plaform API
3
3
  * Cosmo Tech Platform API
4
4
  *
5
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
5
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
6
6
  * Contact: platform@cosmotech.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
- import { AxiosInstance } from 'axios';
14
+ import { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/dist/common.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Cosmo Tech Plaform API
6
6
  * Cosmo Tech Platform API
7
7
  *
8
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
8
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
9
9
  * Contact: platform@cosmotech.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Cosmo Tech Plaform API
3
3
  * Cosmo Tech Platform API
4
4
  *
5
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
5
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
6
6
  * Contact: platform@cosmotech.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Cosmo Tech Plaform API
6
6
  * Cosmo Tech Platform API
7
7
  *
8
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
8
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
9
9
  * Contact: platform@cosmotech.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Cosmo Tech Plaform API
3
3
  * Cosmo Tech Platform API
4
4
  *
5
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
5
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
6
6
  * Contact: platform@cosmotech.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Cosmo Tech Plaform API
6
6
  * Cosmo Tech Platform API
7
7
  *
8
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
8
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
9
9
  * Contact: platform@cosmotech.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/git_push.sh CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
3
  #
4
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
5
 
6
6
  git_user_id=$1
7
7
  git_repo_id=$2
@@ -38,14 +38,14 @@ git add .
38
38
  git commit -m "$release_note"
39
39
 
40
40
  # Sets the new remote
41
- git_remote=`git remote`
41
+ git_remote=$(git remote)
42
42
  if [ "$git_remote" = "" ]; then # git remote not defined
43
43
 
44
44
  if [ "$GIT_TOKEN" = "" ]; then
45
45
  echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
46
  git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
47
  else
48
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
49
  fi
50
50
 
51
51
  fi
@@ -55,4 +55,3 @@ git pull origin master
55
55
  # Pushes (Forces) the changes in the local repository up to the remote repository
56
56
  echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
57
  git push origin master 2>&1 | grep -v 'To https'
58
-
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Cosmo Tech Plaform API
5
5
  * Cosmo Tech Platform API
6
6
  *
7
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
7
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
8
8
  * Contact: platform@cosmotech.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@cosmotech/api-ts",
3
+ "version": "0.0.13-SNAPSHOT",
4
+ "lockfileVersion": 1,
5
+ "requires": true,
6
+ "dependencies": {
7
+ "@types/node": {
8
+ "version": "12.20.48",
9
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.48.tgz",
10
+ "integrity": "sha512-4kxzqkrpwYtn6okJUcb2lfUu9ilnb3yhUOH6qX3nug8D2DupZ2drIkff2yJzYcNJVl3begnlcaBJ7tqiTTzjnQ==",
11
+ "dev": true
12
+ },
13
+ "axios": {
14
+ "version": "0.21.4",
15
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
16
+ "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
17
+ "requires": {
18
+ "follow-redirects": "^1.14.0"
19
+ }
20
+ },
21
+ "follow-redirects": {
22
+ "version": "1.14.9",
23
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
24
+ "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
25
+ },
26
+ "typescript": {
27
+ "version": "3.9.10",
28
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
29
+ "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
30
+ "dev": true
31
+ }
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmotech/api-ts",
3
- "version": "0.1.1",
3
+ "version": "0.1.14",
4
4
  "description": "OpenAPI client for @cosmotech/api-ts",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -15,10 +15,10 @@
15
15
  "typings": "./dist/index.d.ts",
16
16
  "scripts": {
17
17
  "build": "tsc --outDir dist/",
18
- "prepublishOnly": "npm run build"
18
+ "prepare": "npm run build"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "^0.21.1"
21
+ "axios": "^0.21.4"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^12.11.5",
@@ -2,7 +2,7 @@
2
2
  # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
3
  #
4
4
  # Export GIT_TOKEN for automatic login
5
- # Usage example: ./git_push.sh vcarluer Cosmo-Tech "minor update" "github.com"
5
+ # Usage example: ./git_push.sh slashme Cosmo-Tech cosmotech-api-java-client "minor update" "github.com"
6
6
  set -e
7
7
 
8
8
  git_user_id=$1
@@ -12,7 +12,7 @@ release_note=$4
12
12
  git_host=$5
13
13
 
14
14
  if [ "$git_host" = "" ]; then
15
- git_host="$GIT_HOST"
15
+ git_host="${GIT_HOST:-}"
16
16
  if [ "$git_host" = "" ]; then
17
17
  git_host="github.com"
18
18
  fi
@@ -20,49 +20,54 @@ if [ "$git_host" = "" ]; then
20
20
  fi
21
21
 
22
22
  if [ "$git_user_id" = "" ]; then
23
- git_user_id="$GIT_USER_ID"
23
+ git_user_id="${GIT_USER_ID:-}"
24
24
  echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
25
25
  fi
26
26
 
27
27
  if [ "$git_organization_id" = "" ]; then
28
- git_organization_id="$GIT_ORGANIZATION_ID"
28
+ git_organization_id="${GIT_ORGANIZATION_ID:-}"
29
29
  echo "[INFO] No command line input provided. Set \$git_organization_id to $git_organization_id"
30
30
  fi
31
31
 
32
32
  if [ "$git_repo_id" = "" ]; then
33
- git_repo_id="$GIT_REPO_ID"
33
+ git_repo_id="${GIT_REPO_ID:-}"
34
34
  echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
35
35
  fi
36
36
 
37
37
  if [ "$release_note" = "" ]; then
38
- release_note="$GIT_RELEASE_NOTE"
38
+ release_note="${GIT_RELEASE_NOTE:-}"
39
39
  if [ "$release_note" = "" ]; then
40
40
  release_note="Minor update"
41
41
  fi
42
42
  echo "[INFO] No command line input provided. Set \$release_note to $release_note"
43
43
  fi
44
44
 
45
+ CURRENT_SCRIPT_DIR=$(realpath "$(dirname "$0")")
46
+
45
47
  # Create the release directory
46
- mkdir -p ../../../release
48
+ WORKING_DIR=$(mktemp -d -t "${cosmotech-api-$3}-XXXXXXXXXX")
49
+ echo "WORKING_DIR: ${WORKING_DIR}"
47
50
 
48
51
  # Sets the new remote URI
49
52
  if [ "$GIT_TOKEN" = "" ]; then
50
53
  echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
51
- github_uri=https://${git_user_id}@${git_host}/${git_organization_id}/${git_repo_id}.git
54
+ github_uri="https://${git_user_id}@${git_host}/${git_organization_id}/${git_repo_id}.git"
52
55
  else
53
- github_uri=https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_organization_id}/${git_repo_id}.git
56
+ github_uri="https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_organization_id}/${git_repo_id}.git"
54
57
  fi
55
58
 
56
59
  # Clone remote repository
57
- pushd ../../../release
58
- git clone ${github_uri}
60
+ git clone "${github_uri}" "${WORKING_DIR}"
59
61
  # Delete all files to remove renamed or deleted files
60
- cd ${git_repo_id}
61
- rm -rf *
62
- popd
62
+ echo "Deleting everything under ${WORKING_DIR}..."
63
+ rm -rf "${WORKING_DIR:?}/*"
64
+
63
65
  # Adds the files in the local repository
64
- cp -r ../* ../../../release/${git_repo_id}
65
- pushd ../../../release/${git_repo_id}
66
+ GENERATED_SOURCES_DIR=$(realpath "${CURRENT_SCRIPT_DIR}/..")
67
+ echo "Copy everything from ${GENERATED_SOURCES_DIR} to ${WORKING_DIR}..."
68
+ cp -r "${GENERATED_SOURCES_DIR}"/* "${WORKING_DIR:?}"/
69
+
70
+ pushd "${WORKING_DIR}" || exit 1
66
71
 
67
72
  git status
68
73
 
@@ -79,13 +84,12 @@ if [[ $(git status --porcelain) ]]; then
79
84
  git commit -m "$release_note"
80
85
  fi
81
86
 
82
- # Pushes (Forces) the changes in the local repository up to the remote repository
87
+ # Pushes the changes in the local repository up to the remote repository
83
88
  echo "Git pushing to https://${git_host}/${git_organization_id}/${git_repo_id}.git"
89
+ git pull --rebase
84
90
  git push origin master 2>&1 | grep -v 'To https'
85
-
86
91
  fi
87
92
 
88
93
  popd
89
94
 
90
- # Cleaning release repository
91
- rm -rf ../../../release
95
+ rm -rf "${WORKING_DIR:?}" || exit 0