chore(frontend): Generate TypeScript v2 API client (#8834)
* Add v2apis script in package.json * Generate typescript v2 api client. * Change api client codegen section in README Make it more clear: put the jar file in frontend folder. * Add v2 api codegen script in README. * Remove beta1 text to avoid confusion in README. * Format * Rename folder as apisv2beta1. Add apisv2beta1 in .eslintrc.yaml file * Change script from v2apis to apis:v2beta1 Remove unnecessary folder v2generated (move files to generated/apisv2beta1/ * Add the command for exporting jar file path to $PATH in README file.
This commit is contained in:
parent
e6e8600c7c
commit
a45d72d75d
|
@ -3,6 +3,7 @@ extends:
|
|||
ignorePatterns:
|
||||
- node_modules/
|
||||
- src/apis # these are generated api clients
|
||||
- src/apisv2beta1 # these are generated v2 api clients
|
||||
- '*.test.ts'
|
||||
- '*.test.tsx'
|
||||
- src/generated # proto generated definition
|
||||
|
|
|
@ -144,9 +144,13 @@ If you made any changes to protos (see backend/README), you'll need to
|
|||
regenerate the Typescript client library from swagger. We use
|
||||
swagger-codegen-cli@2.4.7, which you can get
|
||||
[here](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/).
|
||||
Make sure the jar file is somewhere on your path with the name
|
||||
swagger-codegen-cli.jar, then run `npm run apis`.
|
||||
|
||||
Make sure to add the jar file to $PATH with the name swagger-codegen-cli.jar, then run `npm run apis` for
|
||||
v1 api or `npm run apis:v2beta1` for v2 api.
|
||||
```
|
||||
// add jar file to $PATH
|
||||
JAR_PATH=<folder-path-to-jar-file>
|
||||
export PATH="$JAR_PATH:$PATH"
|
||||
```
|
||||
After code generation, you should run `npm run format` to format the output and avoid creating a large PR.
|
||||
|
||||
## MLMD components
|
||||
|
|
|
@ -54,6 +54,14 @@
|
|||
"apis:filter": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/swagger/filter.swagger.json -l typescript-fetch -o ./src/apis/filter -c ./swagger-config.json",
|
||||
"apis:visualization": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/swagger/visualization.swagger.json -l typescript-fetch -o ./src/apis/visualization -c ./swagger-config.json",
|
||||
"apis:auth": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/swagger/auth.swagger.json -l typescript-fetch -o ./server/src/generated/apis/auth -c ./swagger-config.json",
|
||||
"apis:v2beta1": "npm run apis:v2beta1:experiment && npm run apis:v2beta1:recurringrun && npm run apis:v2beta1:pipeline && npm run apis:v2beta1:run && npm run apis:v2beta1:filter && npm run apis:v2beta1:visualization && npm run apis:v2beta1:auth",
|
||||
"apis:v2beta1:experiment": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/experiment.swagger.json -l typescript-fetch -o ./src/apisv2beta1/experiment -c ./swagger-config.json",
|
||||
"apis:v2beta1:recurringrun": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/recurring_run.swagger.json -l typescript-fetch -o ./src/apisv2beta1/recurringrun -c ./swagger-config.json",
|
||||
"apis:v2beta1:pipeline": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/pipeline.swagger.json -l typescript-fetch -o ./src/apisv2beta1/pipeline -c ./swagger-config.json",
|
||||
"apis:v2beta1:run": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/run.swagger.json -l typescript-fetch -o ./src/apisv2beta1/run -c ./swagger-config.json",
|
||||
"apis:v2beta1:filter": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/filter.swagger.json -l typescript-fetch -o ./src/apisv2beta1/filter -c ./swagger-config.json",
|
||||
"apis:v2beta1:visualization": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/visualization.swagger.json -l typescript-fetch -o ./src/apisv2beta1/visualization -c ./swagger-config.json",
|
||||
"apis:v2beta1:auth": "java -jar swagger-codegen-cli.jar generate -i ../backend/api/v2beta1/swagger/auth.swagger.json -l typescript-fetch -o ./server/src/generated/apisv2beta1/auth -c ./swagger-config.json",
|
||||
"build:tailwind": "npx tailwindcss build -i src/tailwind.css -o src/build/tailwind.output.css",
|
||||
"prestart": "npm run build:tailwind",
|
||||
"prebuild": "npm run build:tailwind",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
|
@ -0,0 +1,319 @@
|
|||
/// <reference path="./custom.d.ts" />
|
||||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/auth.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as url from 'url';
|
||||
import * as portableFetch from 'portable-fetch';
|
||||
import { Configuration } from './configuration';
|
||||
|
||||
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ',',
|
||||
ssv: ' ',
|
||||
tsv: '\t',
|
||||
pipes: '|',
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchAPI
|
||||
*/
|
||||
export interface FetchAPI {
|
||||
(url: string, init?: any): Promise<Response>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchArgs
|
||||
*/
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration;
|
||||
|
||||
constructor(
|
||||
configuration?: Configuration,
|
||||
protected basePath: string = BASE_PATH,
|
||||
protected fetch: FetchAPI = portableFetch,
|
||||
) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: 'RequiredError';
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of resources in pipelines system.
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum AuthorizeRequestResources {
|
||||
UNASSIGNEDRESOURCES = <any>'UNASSIGNED_RESOURCES',
|
||||
VIEWERS = <any>'VIEWERS',
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of verbs that act on the resources.
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum AuthorizeRequestVerb {
|
||||
UNASSIGNEDVERB = <any>'UNASSIGNED_VERB',
|
||||
CREATE = <any>'CREATE',
|
||||
GET = <any>'GET',
|
||||
DELETE = <any>'DELETE',
|
||||
}
|
||||
|
||||
/**
|
||||
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
||||
* @export
|
||||
* @interface GooglerpcStatus
|
||||
*/
|
||||
export interface GooglerpcStatus {
|
||||
/**
|
||||
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
||||
* @type {number}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
code?: number;
|
||||
/**
|
||||
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
||||
* @type {string}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
||||
* @type {Array<ProtobufAny>}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
details?: Array<ProtobufAny>;
|
||||
}
|
||||
|
||||
/**
|
||||
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
|
||||
* @export
|
||||
* @interface ProtobufAny
|
||||
*/
|
||||
export interface ProtobufAny {
|
||||
/**
|
||||
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
|
||||
* @type {string}
|
||||
* @memberof ProtobufAny
|
||||
*/
|
||||
type_url?: string;
|
||||
/**
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
* @type {string}
|
||||
* @memberof ProtobufAny
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* AuthServiceApi - fetch parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const AuthServiceApiFetchParamCreator = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} [namespace]
|
||||
* @param {'UNASSIGNED_RESOURCES' | 'VIEWERS'} [resources]
|
||||
* @param {'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE'} [verb]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
authorize(
|
||||
namespace?: string,
|
||||
resources?: 'UNASSIGNED_RESOURCES' | 'VIEWERS',
|
||||
verb?: 'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE',
|
||||
options: any = {},
|
||||
): FetchArgs {
|
||||
const localVarPath = `/apis/v2beta1/auth`;
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue =
|
||||
typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey('authorization')
|
||||
: configuration.apiKey;
|
||||
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameter['namespace'] = namespace;
|
||||
}
|
||||
|
||||
if (resources !== undefined) {
|
||||
localVarQueryParameter['resources'] = resources;
|
||||
}
|
||||
|
||||
if (verb !== undefined) {
|
||||
localVarQueryParameter['verb'] = verb;
|
||||
}
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthServiceApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const AuthServiceApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} [namespace]
|
||||
* @param {'UNASSIGNED_RESOURCES' | 'VIEWERS'} [resources]
|
||||
* @param {'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE'} [verb]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
authorize(
|
||||
namespace?: string,
|
||||
resources?: 'UNASSIGNED_RESOURCES' | 'VIEWERS',
|
||||
verb?: 'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE',
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
|
||||
const localVarFetchArgs = AuthServiceApiFetchParamCreator(configuration).authorize(
|
||||
namespace,
|
||||
resources,
|
||||
verb,
|
||||
options,
|
||||
);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthServiceApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const AuthServiceApiFactory = function(
|
||||
configuration?: Configuration,
|
||||
fetch?: FetchAPI,
|
||||
basePath?: string,
|
||||
) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} [namespace]
|
||||
* @param {'UNASSIGNED_RESOURCES' | 'VIEWERS'} [resources]
|
||||
* @param {'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE'} [verb]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
authorize(
|
||||
namespace?: string,
|
||||
resources?: 'UNASSIGNED_RESOURCES' | 'VIEWERS',
|
||||
verb?: 'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE',
|
||||
options?: any,
|
||||
) {
|
||||
return AuthServiceApiFp(configuration).authorize(
|
||||
namespace,
|
||||
resources,
|
||||
verb,
|
||||
options,
|
||||
)(fetch, basePath);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthServiceApi - object-oriented interface
|
||||
* @export
|
||||
* @class AuthServiceApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class AuthServiceApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {string} [namespace]
|
||||
* @param {'UNASSIGNED_RESOURCES' | 'VIEWERS'} [resources]
|
||||
* @param {'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE'} [verb]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AuthServiceApi
|
||||
*/
|
||||
public authorize(
|
||||
namespace?: string,
|
||||
resources?: 'UNASSIGNED_RESOURCES' | 'VIEWERS',
|
||||
verb?: 'UNASSIGNED_VERB' | 'CREATE' | 'GET' | 'DELETE',
|
||||
options?: any,
|
||||
) {
|
||||
return AuthServiceApiFp(this.configuration).authorize(
|
||||
namespace,
|
||||
resources,
|
||||
verb,
|
||||
options,
|
||||
)(this.fetch, this.basePath);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/auth.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/auth.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
|
@ -0,0 +1,808 @@
|
|||
/// <reference path="./custom.d.ts" />
|
||||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/experiment.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as url from 'url';
|
||||
import * as portableFetch from 'portable-fetch';
|
||||
import { Configuration } from './configuration';
|
||||
|
||||
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ',',
|
||||
ssv: ' ',
|
||||
tsv: '\t',
|
||||
pipes: '|',
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchAPI
|
||||
*/
|
||||
export interface FetchAPI {
|
||||
(url: string, init?: any): Promise<Response>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchArgs
|
||||
*/
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration;
|
||||
|
||||
constructor(
|
||||
configuration?: Configuration,
|
||||
protected basePath: string = BASE_PATH,
|
||||
protected fetch: FetchAPI = portableFetch,
|
||||
) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: 'RequiredError';
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface V2beta1Experiment
|
||||
*/
|
||||
export interface V2beta1Experiment {
|
||||
/**
|
||||
* Output. Unique experiment ID. Generated by API server.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
experiment_id?: string;
|
||||
/**
|
||||
* Required input field. Unique experiment name provided by user.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
display_name?: string;
|
||||
/**
|
||||
* Optional input field. Describes the purpose of the experiment.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output. The time that the experiment was created.
|
||||
* @type {Date}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
* Optional input field. Specify the namespace this experiment belongs to.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
namespace?: string;
|
||||
/**
|
||||
* Output. Specifies whether this experiment is in archived or available state.
|
||||
* @type {V2beta1ExperimentStorageState}
|
||||
* @memberof V2beta1Experiment
|
||||
*/
|
||||
storage_state?: V2beta1ExperimentStorageState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes whether an entity is available or archived. - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used - AVAILABLE: Entity is available. - ARCHIVED: Entity is archived.
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum V2beta1ExperimentStorageState {
|
||||
STORAGESTATEUNSPECIFIED = <any>'STORAGE_STATE_UNSPECIFIED',
|
||||
AVAILABLE = <any>'AVAILABLE',
|
||||
ARCHIVED = <any>'ARCHIVED',
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface V2beta1ListExperimentsResponse
|
||||
*/
|
||||
export interface V2beta1ListExperimentsResponse {
|
||||
/**
|
||||
* A list of experiments returned.
|
||||
* @type {Array<V2beta1Experiment>}
|
||||
* @memberof V2beta1ListExperimentsResponse
|
||||
*/
|
||||
experiments?: Array<V2beta1Experiment>;
|
||||
/**
|
||||
* The number of experiments for the given query.
|
||||
* @type {number}
|
||||
* @memberof V2beta1ListExperimentsResponse
|
||||
*/
|
||||
total_size?: number;
|
||||
/**
|
||||
* The token to list the next page of experiments.
|
||||
* @type {string}
|
||||
* @memberof V2beta1ListExperimentsResponse
|
||||
*/
|
||||
next_page_token?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* ExperimentServiceApi - fetch parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ExperimentServiceApiFetchParamCreator = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Archives an experiment and the experiment's runs and recurring runs.
|
||||
* @param {string} experiment_id The ID of the experiment to be archived.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
archiveExperiment(experiment_id: string, options: any = {}): FetchArgs {
|
||||
// verify required parameter 'experiment_id' is not null or undefined
|
||||
if (experiment_id === null || experiment_id === undefined) {
|
||||
throw new RequiredError(
|
||||
'experiment_id',
|
||||
'Required parameter experiment_id was null or undefined when calling archiveExperiment.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}:archive`.replace(
|
||||
`{${'experiment_id'}}`,
|
||||
encodeURIComponent(String(experiment_id)),
|
||||
);
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Creates a new experiment.
|
||||
* @param {V2beta1Experiment} body The experiment to be created.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createExperiment(body: V2beta1Experiment, options: any = {}): FetchArgs {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError(
|
||||
'body',
|
||||
'Required parameter body was null or undefined when calling createExperiment.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/experiments`;
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
const needsSerialization =
|
||||
<any>'V2beta1Experiment' !== 'string' ||
|
||||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
|
||||
* @param {string} experiment_id The ID of the experiment to be deleted.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteExperiment(experiment_id: string, options: any = {}): FetchArgs {
|
||||
// verify required parameter 'experiment_id' is not null or undefined
|
||||
if (experiment_id === null || experiment_id === undefined) {
|
||||
throw new RequiredError(
|
||||
'experiment_id',
|
||||
'Required parameter experiment_id was null or undefined when calling deleteExperiment.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}`.replace(
|
||||
`{${'experiment_id'}}`,
|
||||
encodeURIComponent(String(experiment_id)),
|
||||
);
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds a specific experiment by ID.
|
||||
* @param {string} experiment_id The ID of the experiment to be retrieved.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getExperiment(experiment_id: string, options: any = {}): FetchArgs {
|
||||
// verify required parameter 'experiment_id' is not null or undefined
|
||||
if (experiment_id === null || experiment_id === undefined) {
|
||||
throw new RequiredError(
|
||||
'experiment_id',
|
||||
'Required parameter experiment_id was null or undefined when calling getExperiment.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}`.replace(
|
||||
`{${'experiment_id'}}`,
|
||||
encodeURIComponent(String(experiment_id)),
|
||||
);
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
|
||||
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
|
||||
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
|
||||
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
|
||||
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
|
||||
* @param {string} [namespace] Which namespace to filter the experiments on.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listExperiments(
|
||||
page_token?: string,
|
||||
page_size?: number,
|
||||
sort_by?: string,
|
||||
filter?: string,
|
||||
namespace?: string,
|
||||
options: any = {},
|
||||
): FetchArgs {
|
||||
const localVarPath = `/apis/v2beta1/experiments`;
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (page_token !== undefined) {
|
||||
localVarQueryParameter['page_token'] = page_token;
|
||||
}
|
||||
|
||||
if (page_size !== undefined) {
|
||||
localVarQueryParameter['page_size'] = page_size;
|
||||
}
|
||||
|
||||
if (sort_by !== undefined) {
|
||||
localVarQueryParameter['sort_by'] = sort_by;
|
||||
}
|
||||
|
||||
if (filter !== undefined) {
|
||||
localVarQueryParameter['filter'] = filter;
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameter['namespace'] = namespace;
|
||||
}
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
|
||||
* @param {string} experiment_id The ID of the experiment to be restored.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
unarchiveExperiment(experiment_id: string, options: any = {}): FetchArgs {
|
||||
// verify required parameter 'experiment_id' is not null or undefined
|
||||
if (experiment_id === null || experiment_id === undefined) {
|
||||
throw new RequiredError(
|
||||
'experiment_id',
|
||||
'Required parameter experiment_id was null or undefined when calling unarchiveExperiment.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}:unarchive`.replace(
|
||||
`{${'experiment_id'}}`,
|
||||
encodeURIComponent(String(experiment_id)),
|
||||
);
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ExperimentServiceApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ExperimentServiceApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Archives an experiment and the experiment's runs and recurring runs.
|
||||
* @param {string} experiment_id The ID of the experiment to be archived.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
archiveExperiment(
|
||||
experiment_id: string,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).archiveExperiment(experiment_id, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Creates a new experiment.
|
||||
* @param {V2beta1Experiment} body The experiment to be created.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createExperiment(
|
||||
body: V2beta1Experiment,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Experiment> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).createExperiment(body, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
|
||||
* @param {string} experiment_id The ID of the experiment to be deleted.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteExperiment(
|
||||
experiment_id: string,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).deleteExperiment(experiment_id, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds a specific experiment by ID.
|
||||
* @param {string} experiment_id The ID of the experiment to be retrieved.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getExperiment(
|
||||
experiment_id: string,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Experiment> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(configuration).getExperiment(
|
||||
experiment_id,
|
||||
options,
|
||||
);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
|
||||
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
|
||||
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
|
||||
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
|
||||
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
|
||||
* @param {string} [namespace] Which namespace to filter the experiments on.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listExperiments(
|
||||
page_token?: string,
|
||||
page_size?: number,
|
||||
sort_by?: string,
|
||||
filter?: string,
|
||||
namespace?: string,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1ListExperimentsResponse> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).listExperiments(page_token, page_size, sort_by, filter, namespace, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
|
||||
* @param {string} experiment_id The ID of the experiment to be restored.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
unarchiveExperiment(
|
||||
experiment_id: string,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
|
||||
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).unarchiveExperiment(experiment_id, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ExperimentServiceApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ExperimentServiceApiFactory = function(
|
||||
configuration?: Configuration,
|
||||
fetch?: FetchAPI,
|
||||
basePath?: string,
|
||||
) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Archives an experiment and the experiment's runs and recurring runs.
|
||||
* @param {string} experiment_id The ID of the experiment to be archived.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
archiveExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(configuration).archiveExperiment(experiment_id, options)(
|
||||
fetch,
|
||||
basePath,
|
||||
);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Creates a new experiment.
|
||||
* @param {V2beta1Experiment} body The experiment to be created.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createExperiment(body: V2beta1Experiment, options?: any) {
|
||||
return ExperimentServiceApiFp(configuration).createExperiment(body, options)(fetch, basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
|
||||
* @param {string} experiment_id The ID of the experiment to be deleted.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(configuration).deleteExperiment(experiment_id, options)(
|
||||
fetch,
|
||||
basePath,
|
||||
);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds a specific experiment by ID.
|
||||
* @param {string} experiment_id The ID of the experiment to be retrieved.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(configuration).getExperiment(experiment_id, options)(
|
||||
fetch,
|
||||
basePath,
|
||||
);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
|
||||
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
|
||||
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
|
||||
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
|
||||
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
|
||||
* @param {string} [namespace] Which namespace to filter the experiments on.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listExperiments(
|
||||
page_token?: string,
|
||||
page_size?: number,
|
||||
sort_by?: string,
|
||||
filter?: string,
|
||||
namespace?: string,
|
||||
options?: any,
|
||||
) {
|
||||
return ExperimentServiceApiFp(configuration).listExperiments(
|
||||
page_token,
|
||||
page_size,
|
||||
sort_by,
|
||||
filter,
|
||||
namespace,
|
||||
options,
|
||||
)(fetch, basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
|
||||
* @param {string} experiment_id The ID of the experiment to be restored.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
unarchiveExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(configuration).unarchiveExperiment(experiment_id, options)(
|
||||
fetch,
|
||||
basePath,
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ExperimentServiceApi - object-oriented interface
|
||||
* @export
|
||||
* @class ExperimentServiceApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ExperimentServiceApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Archives an experiment and the experiment's runs and recurring runs.
|
||||
* @param {string} experiment_id The ID of the experiment to be archived.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public archiveExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(this.configuration).archiveExperiment(experiment_id, options)(
|
||||
this.fetch,
|
||||
this.basePath,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Creates a new experiment.
|
||||
* @param {V2beta1Experiment} body The experiment to be created.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public createExperiment(body: V2beta1Experiment, options?: any) {
|
||||
return ExperimentServiceApiFp(this.configuration).createExperiment(body, options)(
|
||||
this.fetch,
|
||||
this.basePath,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
|
||||
* @param {string} experiment_id The ID of the experiment to be deleted.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public deleteExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(this.configuration).deleteExperiment(experiment_id, options)(
|
||||
this.fetch,
|
||||
this.basePath,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Finds a specific experiment by ID.
|
||||
* @param {string} experiment_id The ID of the experiment to be retrieved.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public getExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(this.configuration).getExperiment(experiment_id, options)(
|
||||
this.fetch,
|
||||
this.basePath,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
|
||||
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
|
||||
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
|
||||
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
|
||||
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
|
||||
* @param {string} [namespace] Which namespace to filter the experiments on.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public listExperiments(
|
||||
page_token?: string,
|
||||
page_size?: number,
|
||||
sort_by?: string,
|
||||
filter?: string,
|
||||
namespace?: string,
|
||||
options?: any,
|
||||
) {
|
||||
return ExperimentServiceApiFp(this.configuration).listExperiments(
|
||||
page_token,
|
||||
page_size,
|
||||
sort_by,
|
||||
filter,
|
||||
namespace,
|
||||
options,
|
||||
)(this.fetch, this.basePath);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
|
||||
* @param {string} experiment_id The ID of the experiment to be restored.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ExperimentServiceApi
|
||||
*/
|
||||
public unarchiveExperiment(experiment_id: string, options?: any) {
|
||||
return ExperimentServiceApiFp(this.configuration).unarchiveExperiment(experiment_id, options)(
|
||||
this.fetch,
|
||||
this.basePath,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/experiment.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/experiment.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
|
@ -0,0 +1,217 @@
|
|||
/// <reference path="./custom.d.ts" />
|
||||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/filter.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as url from 'url';
|
||||
import * as portableFetch from 'portable-fetch';
|
||||
import { Configuration } from './configuration';
|
||||
|
||||
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ',',
|
||||
ssv: ' ',
|
||||
tsv: '\t',
|
||||
pipes: '|',
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchAPI
|
||||
*/
|
||||
export interface FetchAPI {
|
||||
(url: string, init?: any): Promise<Response>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchArgs
|
||||
*/
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration;
|
||||
|
||||
constructor(
|
||||
configuration?: Configuration,
|
||||
protected basePath: string = BASE_PATH,
|
||||
protected fetch: FetchAPI = portableFetch,
|
||||
) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: 'RequiredError';
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List of integers.
|
||||
* @export
|
||||
* @interface PredicateIntValues
|
||||
*/
|
||||
export interface PredicateIntValues {
|
||||
/**
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @memberof PredicateIntValues
|
||||
*/
|
||||
values?: Array<number>;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of long integers.
|
||||
* @export
|
||||
* @interface PredicateLongValues
|
||||
*/
|
||||
export interface PredicateLongValues {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof PredicateLongValues
|
||||
*/
|
||||
values?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of strings.
|
||||
* @export
|
||||
* @interface PredicateStringValues
|
||||
*/
|
||||
export interface PredicateStringValues {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof PredicateStringValues
|
||||
*/
|
||||
values?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter is used to filter resources returned from a ListXXX request. Example filters: 1) Filter runs with status = 'Running' filter { predicate { key: \"status\" op: EQUALS string_value: \"Running\" } } 2) Filter runs that succeeded since Dec 1, 2018 filter { predicate { key: \"status\" op: EQUALS string_value: \"Succeeded\" } predicate { key: \"created_at\" op: GREATER_THAN timestamp_value { seconds: 1543651200 } } } 3) Filter runs with one of labels 'label_1' or 'label_2' filter { predicate { key: \"label\" op: IN string_values { value: 'label_1' value: 'label_2' } } }
|
||||
* @export
|
||||
* @interface V2beta1Filter
|
||||
*/
|
||||
export interface V2beta1Filter {
|
||||
/**
|
||||
* All predicates are AND-ed when this filter is applied.
|
||||
* @type {Array<V2beta1Predicate>}
|
||||
* @memberof V2beta1Filter
|
||||
*/
|
||||
predicates?: Array<V2beta1Predicate>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Predicate captures individual conditions that must be true for a resource being filtered.
|
||||
* @export
|
||||
* @interface V2beta1Predicate
|
||||
*/
|
||||
export interface V2beta1Predicate {
|
||||
/**
|
||||
*
|
||||
* @type {V2beta1PredicateOperation}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
operation?: V2beta1PredicateOperation;
|
||||
/**
|
||||
* Key for the operation (first argument).
|
||||
* @type {string}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
* Integer.
|
||||
* @type {number}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
int_value?: number;
|
||||
/**
|
||||
* Long integer.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
long_value?: string;
|
||||
/**
|
||||
* String.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
string_value?: string;
|
||||
/**
|
||||
* Timestamp values will be converted to Unix time (seconds since the epoch) prior to being used in a filtering operation.
|
||||
* @type {Date}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
timestamp_value?: Date;
|
||||
/**
|
||||
* Array values below are only meant to be used by the IN operator.
|
||||
* @type {PredicateIntValues}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
int_values?: PredicateIntValues;
|
||||
/**
|
||||
* List of long integers.
|
||||
* @type {PredicateLongValues}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
long_values?: PredicateLongValues;
|
||||
/**
|
||||
* List of strings.
|
||||
* @type {PredicateStringValues}
|
||||
* @memberof V2beta1Predicate
|
||||
*/
|
||||
string_values?: PredicateStringValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation is the operation to apply. - OPERATION_UNSPECIFIED: Default operation. This operation is not used. - EQUALS: Operation on scalar values. Only applies to one of |int_value|, |long_value|, |string_value| or |timestamp_value|. - NOT_EQUALS: Negated EQUALS. - GREATER_THAN: Greater than operation. - GREATER_THAN_EQUALS: Greater than or equals operation. - LESS_THAN: Less than operation. - LESS_THAN_EQUALS: Less than or equals operation - IN: Checks if the value is a member of a given array, which should be one of |int_values|, |long_values| or |string_values|. - IS_SUBSTRING: Checks if the value contains |string_value| as a substring match. Only applies to |string_value|.
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum V2beta1PredicateOperation {
|
||||
OPERATIONUNSPECIFIED = <any>'OPERATION_UNSPECIFIED',
|
||||
EQUALS = <any>'EQUALS',
|
||||
NOTEQUALS = <any>'NOT_EQUALS',
|
||||
GREATERTHAN = <any>'GREATER_THAN',
|
||||
GREATERTHANEQUALS = <any>'GREATER_THAN_EQUALS',
|
||||
LESSTHAN = <any>'LESS_THAN',
|
||||
LESSTHANEQUALS = <any>'LESS_THAN_EQUALS',
|
||||
IN = <any>'IN',
|
||||
ISSUBSTRING = <any>'IS_SUBSTRING',
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/filter.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/filter.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/pipeline.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/pipeline.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/recurring_run.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/recurring_run.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/run.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/run.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
|
@ -0,0 +1,3 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
|
@ -0,0 +1,23 @@
|
|||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
|
@ -0,0 +1 @@
|
|||
2.4.7
|
|
@ -0,0 +1,338 @@
|
|||
/// <reference path="./custom.d.ts" />
|
||||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/visualization.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as url from 'url';
|
||||
import * as portableFetch from 'portable-fetch';
|
||||
import { Configuration } from './configuration';
|
||||
|
||||
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ',',
|
||||
ssv: ' ',
|
||||
tsv: '\t',
|
||||
pipes: '|',
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchAPI
|
||||
*/
|
||||
export interface FetchAPI {
|
||||
(url: string, init?: any): Promise<Response>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FetchArgs
|
||||
*/
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration;
|
||||
|
||||
constructor(
|
||||
configuration?: Configuration,
|
||||
protected basePath: string = BASE_PATH,
|
||||
protected fetch: FetchAPI = portableFetch,
|
||||
) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: 'RequiredError';
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
||||
* @export
|
||||
* @interface GooglerpcStatus
|
||||
*/
|
||||
export interface GooglerpcStatus {
|
||||
/**
|
||||
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
||||
* @type {number}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
code?: number;
|
||||
/**
|
||||
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
||||
* @type {string}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
||||
* @type {Array<ProtobufAny>}
|
||||
* @memberof GooglerpcStatus
|
||||
*/
|
||||
details?: Array<ProtobufAny>;
|
||||
}
|
||||
|
||||
/**
|
||||
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
|
||||
* @export
|
||||
* @interface ProtobufAny
|
||||
*/
|
||||
export interface ProtobufAny {
|
||||
/**
|
||||
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
|
||||
* @type {string}
|
||||
* @memberof ProtobufAny
|
||||
*/
|
||||
type_url?: string;
|
||||
/**
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
* @type {string}
|
||||
* @memberof ProtobufAny
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface V2beta1Visualization
|
||||
*/
|
||||
export interface V2beta1Visualization {
|
||||
/**
|
||||
*
|
||||
* @type {V2beta1VisualizationType}
|
||||
* @memberof V2beta1Visualization
|
||||
*/
|
||||
type?: V2beta1VisualizationType;
|
||||
/**
|
||||
* Path pattern of input data to be used during generation of visualizations. This is required when creating the pipeline through CreateVisualization API.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Visualization
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
* Variables to be used during generation of a visualization. This should be provided as a JSON string. This is required when creating the pipeline through CreateVisualization API.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Visualization
|
||||
*/
|
||||
arguments?: string;
|
||||
/**
|
||||
* Output. Generated visualization html.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Visualization
|
||||
*/
|
||||
html?: string;
|
||||
/**
|
||||
* In case any error happens when generating visualizations, only visualization ID and the error message are returned. Client has the flexibility of choosing how to handle the error.
|
||||
* @type {string}
|
||||
* @memberof V2beta1Visualization
|
||||
*/
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of visualization to be generated. This is required when creating the pipeline through CreateVisualization API.
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum V2beta1VisualizationType {
|
||||
ROCCURVE = <any>'ROC_CURVE',
|
||||
TFDV = <any>'TFDV',
|
||||
TFMA = <any>'TFMA',
|
||||
TABLE = <any>'TABLE',
|
||||
CUSTOM = <any>'CUSTOM',
|
||||
}
|
||||
|
||||
/**
|
||||
* VisualizationServiceApi - fetch parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const VisualizationServiceApiFetchParamCreator = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} namespace
|
||||
* @param {V2beta1Visualization} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createVisualizationV1(
|
||||
namespace: string,
|
||||
body: V2beta1Visualization,
|
||||
options: any = {},
|
||||
): FetchArgs {
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new RequiredError(
|
||||
'namespace',
|
||||
'Required parameter namespace was null or undefined when calling createVisualizationV1.',
|
||||
);
|
||||
}
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError(
|
||||
'body',
|
||||
'Required parameter body was null or undefined when calling createVisualizationV1.',
|
||||
);
|
||||
}
|
||||
const localVarPath = `/apis/v2beta1/visualizations/{namespace}`.replace(
|
||||
`{${'namespace'}}`,
|
||||
encodeURIComponent(String(namespace)),
|
||||
);
|
||||
const localVarUrlObj = url.parse(localVarPath, true);
|
||||
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue =
|
||||
typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey('authorization')
|
||||
: configuration.apiKey;
|
||||
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
localVarUrlObj.query = Object.assign(
|
||||
{},
|
||||
localVarUrlObj.query,
|
||||
localVarQueryParameter,
|
||||
options.query,
|
||||
);
|
||||
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
||||
delete localVarUrlObj.search;
|
||||
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
||||
const needsSerialization =
|
||||
<any>'V2beta1Visualization' !== 'string' ||
|
||||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
||||
|
||||
return {
|
||||
url: url.format(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* VisualizationServiceApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const VisualizationServiceApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} namespace
|
||||
* @param {V2beta1Visualization} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createVisualizationV1(
|
||||
namespace: string,
|
||||
body: V2beta1Visualization,
|
||||
options?: any,
|
||||
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Visualization> {
|
||||
const localVarFetchArgs = VisualizationServiceApiFetchParamCreator(
|
||||
configuration,
|
||||
).createVisualizationV1(namespace, body, options);
|
||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw response;
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* VisualizationServiceApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const VisualizationServiceApiFactory = function(
|
||||
configuration?: Configuration,
|
||||
fetch?: FetchAPI,
|
||||
basePath?: string,
|
||||
) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} namespace
|
||||
* @param {V2beta1Visualization} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createVisualizationV1(namespace: string, body: V2beta1Visualization, options?: any) {
|
||||
return VisualizationServiceApiFp(configuration).createVisualizationV1(
|
||||
namespace,
|
||||
body,
|
||||
options,
|
||||
)(fetch, basePath);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* VisualizationServiceApi - object-oriented interface
|
||||
* @export
|
||||
* @class VisualizationServiceApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class VisualizationServiceApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {string} namespace
|
||||
* @param {V2beta1Visualization} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof VisualizationServiceApi
|
||||
*/
|
||||
public createVisualizationV1(namespace: string, body: V2beta1Visualization, options?: any) {
|
||||
return VisualizationServiceApiFp(this.configuration).createVisualizationV1(
|
||||
namespace,
|
||||
body,
|
||||
options,
|
||||
)(this.fetch, this.basePath);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/visualization.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | ((name: string, scopes?: string[]) => string);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
declare module 'portable-fetch';
|
||||
declare module 'url';
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,15 @@
|
|||
// tslint:disable
|
||||
/**
|
||||
* backend/api/v2beta1/visualization.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './configuration';
|
Loading…
Reference in New Issue