Compare commits
1 commit
developmen
...
remove-plu
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f8b92b5067 |
510 changed files with 80618 additions and 38734 deletions
91
.github/workflows/build-and-push.yaml
vendored
91
.github/workflows/build-and-push.yaml
vendored
|
@ -1,51 +1,58 @@
|
|||
name: ci
|
||||
#
|
||||
name: Create and publish a Docker image
|
||||
|
||||
# Configures this workflow to run every time a change is pushed.
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
#
|
||||
steps:
|
||||
-
|
||||
name: Repository meta
|
||||
id: repository
|
||||
run: |
|
||||
registry=${{ github.server_url }}
|
||||
registry=${registry##http*://}
|
||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||
echo "registry=${registry}"
|
||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||
echo "repository=${repository}"
|
||||
-
|
||||
name: Docker meta
|
||||
uses: docker/metadata-action@v5
|
||||
id: docker
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
-
|
||||
name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
with:
|
||||
registry: ${{ steps.repository.outputs.registry }}
|
||||
username: ${{ secrets.PACKAGES_USER }}
|
||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
buildkitd-flags: '--allow-insecure-entitlement network.host'
|
||||
driver-opts: network=host
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: ${{ github.sha }}
|
||||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
|
||||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
|
||||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
allow: network.host
|
||||
network: host
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.docker.outputs.tags }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v1
|
||||
with:
|
||||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
push-to-registry: true
|
||||
|
|
19
.github/workflows/pr.yaml
vendored
Normal file
19
.github/workflows/pr.yaml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, ready_for_review, synchronize]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Run tests
|
||||
run: |
|
||||
yarn install --frozen-lockfile --network-timeout 600000
|
||||
yarn tsc
|
|
@ -1 +0,0 @@
|
|||
nodeLinker: node-modules
|
75
Dockerfile
75
Dockerfile
|
@ -1,5 +1,5 @@
|
|||
# Stage 1 - Create yarn install skeleton layer
|
||||
FROM node:20.18.1 AS packages
|
||||
FROM node:18-bookworm-slim AS packages
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
|
@ -12,11 +12,21 @@ COPY plugins plugins
|
|||
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
|
||||
|
||||
# Stage 2 - Install dependencies and build packages
|
||||
FROM node:20.18.1 AS build
|
||||
FROM node:18-bookworm-slim AS build
|
||||
|
||||
# Required for arm64
|
||||
RUN apt update -y
|
||||
RUN apt install -y python3 make gcc build-essential bash
|
||||
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends python3 g++ build-essential git && \
|
||||
yarn config set python /usr/bin/python3
|
||||
|
||||
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
|
||||
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends libsqlite3-dev
|
||||
|
||||
USER node
|
||||
WORKDIR /app
|
||||
|
@ -24,7 +34,7 @@ WORKDIR /app
|
|||
COPY --from=packages --chown=node:node /app .
|
||||
|
||||
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
|
||||
yarn install --network-timeout 600000
|
||||
yarn install --frozen-lockfile --network-timeout 600000
|
||||
|
||||
COPY --chown=node:node . .
|
||||
|
||||
|
@ -38,33 +48,46 @@ RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \
|
|||
&& tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle
|
||||
|
||||
# Stage 3 - Build the actual backend image and install production dependencies
|
||||
FROM node:20.18.1
|
||||
FROM node:18-bookworm-slim
|
||||
|
||||
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
|
||||
# Install packages needed to get utility binaries
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends python3 python3-pip python3-venv g++ build-essential ca-certificates curl
|
||||
apt-get install -y --no-install-recommends python3 g++ build-essential && \
|
||||
yarn config set python /usr/bin/python3
|
||||
|
||||
RUN yarn config set python /usr/bin/python3
|
||||
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
|
||||
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends libsqlite3-dev
|
||||
|
||||
# Add kubectl for the kube apply plugin.
|
||||
# Add mkdocs for the TechDocs plugin.
|
||||
RUN if test "$(uname -m)" = "x86_64"; \
|
||||
then \
|
||||
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/amd64/kubectl; \
|
||||
fi
|
||||
RUN if test "$(uname -m)" != "x86_64"; \
|
||||
then \
|
||||
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/arm64/kubectl; \
|
||||
fi
|
||||
RUN chmod +x /usr/local/bin/kubectl
|
||||
# Add kubectl.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gpg
|
||||
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN pip3 install 'mkdocs-techdocs-core==1.4.2' 'mkdocs-awesome-pages-plugin==2.10.1'
|
||||
RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
|
||||
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends kubectl
|
||||
|
||||
# Add cnoe cli.
|
||||
RUN curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/cnoe_Linux_x86_64.tar.gz && \
|
||||
curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/checksums.txt && \
|
||||
sha256sum -c --strict --status --ignore-missing checksums.txt && \
|
||||
tar -xzf cnoe_Linux_x86_64.tar.gz && \
|
||||
mv cnoe /usr/bin/cnoe-cli && \
|
||||
chmod +x /usr/bin/cnoe-cli
|
||||
|
||||
COPY ./cnoe-wrapper.sh /usr/bin/cnoe
|
||||
RUN chmod +x /usr/bin/cnoe
|
||||
|
||||
# From here on we use the least-privileged `node` user to run the backend.
|
||||
USER node
|
||||
|
@ -80,7 +103,7 @@ WORKDIR /app
|
|||
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./
|
||||
|
||||
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
|
||||
yarn install --production --network-timeout 600000
|
||||
yarn install --frozen-lockfile --production --network-timeout 600000
|
||||
|
||||
# Copy the built packages from the build stage
|
||||
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./
|
||||
|
|
38
README.md
38
README.md
|
@ -1,25 +1,43 @@
|
|||
# EDP Backstage
|
||||
# CNOE Backstage
|
||||
|
||||
The EDP bespoke version of backstage.
|
||||
|
||||
With respect to the CNOE stack (where eDF originates from) it is comparable to https://github.com/cnoe-io/backstage-app
|
||||
|
||||
At the time writing CNOE-backstage-app is "version": "1.28.4"
|
||||
This repository contains code for the [Backstage](https://backstage.io) images used by the CNOE stacks.
|
||||
|
||||
## Container Images
|
||||
|
||||
Container images are pushed to the Cefor Container Registry and available [here](https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/-/packages/container/backstage-edp/).
|
||||
Container images are pushed to the GitHub Container Registry and available [here](https://github.com/cnoe-io/backstage-app/pkgs/container/backstage-app).
|
||||
|
||||
|
||||
## Local Development
|
||||
|
||||
Use of [**edpbuilder**](https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW/edpbuilder.git) is recommended for local setup.
|
||||
Use of [**idpbuilder**](https://github.com/cnoe-io/idpbuilder) is recommended for local setup.
|
||||
See [the instructions](https://github.com/cnoe-io/idpbuilder?tab=readme-ov-file#getting-started) in the idpbuilder repository for details.
|
||||
|
||||
### Create your local cluster
|
||||
|
||||
Once edpbuilder is installed on your computer, create a stack that you are interested in. For example:
|
||||
Once idpbuilder is installed on your computer, create a stack that you are interested in. For example:
|
||||
|
||||
> Hint: From here on this is the old CNOE README .... no guarantee that this works as described!
|
||||
```bash
|
||||
./idpbuilder create -p https://github.com/cnoe-io/stacks//ref-implementation
|
||||
```
|
||||
|
||||
Wait for ArgoCD applications to be healthy:
|
||||
|
||||
```bash
|
||||
$ kubectl get applications -A
|
||||
|
||||
NAMESPACE NAME SYNC STATUS HEALTH STATUS
|
||||
argocd argo-workflows Synced Healthy
|
||||
argocd argocd Synced Healthy
|
||||
argocd backstage Synced Healthy
|
||||
argocd backstage-templates Synced Healthy
|
||||
argocd coredns Synced Healthy
|
||||
argocd external-secrets Synced Healthy
|
||||
argocd gitea Synced Healthy
|
||||
argocd keycloak Synced Healthy
|
||||
argocd metric-server Synced Healthy
|
||||
argocd nginx Synced Healthy
|
||||
argocd spark-operator Synced Healthy
|
||||
```
|
||||
|
||||
### Update Backstage application config
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ auth:
|
|||
session:
|
||||
secret: abcdfkjalskdfjkla
|
||||
providers:
|
||||
guest: {}
|
||||
keycloak-oidc:
|
||||
development:
|
||||
metadataUrl: https://cnoe.localtest.me:8443/keycloak/realms/cnoe/.well-known/openid-configuration
|
||||
|
@ -132,4 +131,4 @@ argocd:
|
|||
# replace with your argocd password e.g. kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
|
||||
password: ${ARGOCD_ADMIN_PASSWORD}
|
||||
argoWorkflows:
|
||||
baseUrl: https://cnoe.localtest.me:8443/argo-workflows
|
||||
baseUrl: https://cnoe.localtest.me:8443/argo-workflows
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.36.1"
|
||||
"version": "1.28.4"
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/cli": "^0.26.10",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@spotify/prettier-config": "^12.0.0",
|
||||
|
|
|
@ -16,31 +16,35 @@
|
|||
"dependencies": {
|
||||
"@backstage-community/plugin-github-actions": "^0.6.16",
|
||||
"@backstage-community/plugin-tech-radar": "^0.7.4",
|
||||
"@backstage/app-defaults": "^1.5.17",
|
||||
"@backstage/catalog-model": "^1.7.3",
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/core-app-api": "^1.15.5",
|
||||
"@backstage/core-components": "^0.16.4",
|
||||
"@backstage/core-plugin-api": "^1.10.4",
|
||||
"@backstage/integration-react": "^1.2.4",
|
||||
"@backstage/plugin-api-docs": "^0.12.4",
|
||||
"@backstage/plugin-catalog": "^1.27.0",
|
||||
"@backstage/plugin-catalog-common": "^1.1.3",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.16",
|
||||
"@backstage/plugin-catalog-import": "^0.12.10",
|
||||
"@backstage/plugin-catalog-react": "^1.15.2",
|
||||
"@backstage/plugin-home": "^0.8.5",
|
||||
"@backstage/plugin-kubernetes": "^0.12.4",
|
||||
"@backstage/plugin-org": "^0.6.36",
|
||||
"@backstage/plugin-permission-react": "^0.4.31",
|
||||
"@backstage/plugin-scaffolder": "^1.28.0",
|
||||
"@backstage/plugin-search": "^1.4.23",
|
||||
"@backstage/plugin-search-react": "^1.8.6",
|
||||
"@backstage/plugin-techdocs": "^1.12.3",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.21",
|
||||
"@backstage/plugin-techdocs-react": "^1.2.14",
|
||||
"@backstage/plugin-user-settings": "^0.8.19",
|
||||
"@backstage/theme": "^0.6.4",
|
||||
"@backstage/app-defaults": "^1.5.7",
|
||||
"@backstage/catalog-model": "^1.5.0",
|
||||
"@backstage/cli": "^0.26.10",
|
||||
"@backstage/core-app-api": "^1.13.0",
|
||||
"@backstage/core-components": "^0.14.8",
|
||||
"@backstage/core-plugin-api": "^1.9.3",
|
||||
"@backstage/integration-react": "^1.1.28",
|
||||
"@backstage/plugin-api-docs": "^0.11.6",
|
||||
"@backstage/plugin-catalog": "^1.21.0",
|
||||
"@backstage/plugin-catalog-common": "^1.0.24",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.6",
|
||||
"@backstage/plugin-catalog-import": "^0.12.0",
|
||||
"@backstage/plugin-catalog-react": "^1.12.1",
|
||||
"@backstage/plugin-home": "^0.7.6",
|
||||
"@backstage/plugin-kubernetes": "^0.11.11",
|
||||
"@backstage/plugin-org": "^0.6.26",
|
||||
"@backstage/plugin-permission-react": "^0.4.23",
|
||||
"@backstage/plugin-scaffolder": "^1.22.0",
|
||||
"@backstage/plugin-search": "^1.4.13",
|
||||
"@backstage/plugin-search-react": "^1.7.12",
|
||||
"@backstage/plugin-techdocs": "^1.10.6",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.11",
|
||||
"@backstage/plugin-techdocs-react": "^1.2.5",
|
||||
"@backstage/plugin-user-settings": "^0.8.8",
|
||||
"@backstage/theme": "^0.5.6",
|
||||
"@internal/plugin-apache-spark": "^0.1.0",
|
||||
"@internal/plugin-argo-workflows": "^0.1.0",
|
||||
"@internal/plugin-cnoe-ui": "^0.1.0",
|
||||
"@internal/plugin-terraform": "^0.1.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@roadiehq/backstage-plugin-argo-cd": "^2.5.1",
|
||||
|
@ -52,7 +56,7 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.5",
|
||||
"@backstage/test-utils": "^1.5.7",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -33,7 +33,19 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
|
|||
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
|
||||
import { RequirePermission } from '@backstage/plugin-permission-react';
|
||||
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
|
||||
import LightIcon from '@material-ui/icons/WbSunny';
|
||||
import {
|
||||
CNOEHomepage,
|
||||
cnoeLightTheme,
|
||||
cnoeDarkTheme,
|
||||
} from '@internal/plugin-cnoe-ui';
|
||||
import {configApiRef, useApi} from "@backstage/core-plugin-api";
|
||||
import { ArgoWorkflowsPage } from '@internal/plugin-argo-workflows';
|
||||
import { ApacheSparkPage } from '@internal/plugin-apache-spark';
|
||||
import {
|
||||
UnifiedThemeProvider
|
||||
} from "@backstage/theme";
|
||||
import { TerraformPluginPage } from '@internal/plugin-terraform';
|
||||
|
||||
const app = createApp({
|
||||
apis,
|
||||
|
@ -72,12 +84,33 @@ const app = createApp({
|
|||
bind(orgPlugin.externalRoutes, {
|
||||
catalogIndex: catalogPlugin.routes.catalogIndex,
|
||||
});
|
||||
}
|
||||
},
|
||||
themes: [
|
||||
{
|
||||
id: 'cnoe-light-theme',
|
||||
title: 'Light Theme',
|
||||
variant: 'light',
|
||||
icon: <LightIcon />,
|
||||
Provider: ({ children }) => (
|
||||
<UnifiedThemeProvider theme={cnoeLightTheme} children={children} />
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'cnoe-dark-theme',
|
||||
title: 'Dark Theme',
|
||||
variant: 'dark',
|
||||
icon: <LightIcon />,
|
||||
Provider: ({ children }) => (
|
||||
<UnifiedThemeProvider theme={cnoeDarkTheme} children={children} />
|
||||
),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Route path="/" element={<Navigate to="home" />} />
|
||||
<Route path="/home" element={<CNOEHomepage />} />
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
<Route
|
||||
path="/catalog/:namespace/:kind/:name"
|
||||
|
@ -113,6 +146,9 @@ const routes = (
|
|||
</Route>
|
||||
<Route path="/settings" element={<UserSettingsPage />} />
|
||||
<Route path="/catalog-graph" element={<CatalogGraphPage />} />
|
||||
<Route path="/argo-workflows" element={<ArgoWorkflowsPage />} />
|
||||
<Route path="/apache-spark" element={<ApacheSparkPage />} />
|
||||
<Route path="/terraform" element={<TerraformPluginPage />} />
|
||||
</FlatRoutes>
|
||||
);
|
||||
|
||||
|
@ -125,3 +161,6 @@ export default app.createRoot(
|
|||
</AppRouter>
|
||||
</>,
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import ExtensionIcon from '@material-ui/icons/Extension';
|
|||
import MapIcon from '@material-ui/icons/MyLocation';
|
||||
import LibraryBooks from '@material-ui/icons/LibraryBooks';
|
||||
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
||||
import {LogoFull, LogoIcon} from '@internal/plugin-cnoe-ui';
|
||||
import {
|
||||
Settings as SidebarSettings,
|
||||
UserSettingsSignInAvatar,
|
||||
|
@ -19,6 +20,7 @@ import {
|
|||
SidebarPage,
|
||||
SidebarScrollWrapper,
|
||||
SidebarSpace,
|
||||
useSidebarOpenState,
|
||||
Link,
|
||||
} from '@backstage/core-components';
|
||||
import MenuIcon from '@material-ui/icons/Menu';
|
||||
|
@ -41,10 +43,12 @@ const useSidebarLogoStyles = makeStyles({
|
|||
|
||||
const SidebarLogo = () => {
|
||||
const classes = useSidebarLogoStyles();
|
||||
const { isOpen } = useSidebarOpenState();
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<Link to="/" underline="none" className={classes.link} aria-label="Home">
|
||||
{isOpen ? <LogoFull /> : <LogoIcon />}
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -10,8 +10,11 @@ import {
|
|||
} from '@backstage/plugin-api-docs';
|
||||
import {
|
||||
EntityAboutCard,
|
||||
EntityDependsOnComponentsCard,
|
||||
EntityDependsOnResourcesCard,
|
||||
EntityHasComponentsCard,
|
||||
EntityHasResourcesCard,
|
||||
EntityHasSubcomponentsCard,
|
||||
EntityHasSystemsCard,
|
||||
EntityLayout,
|
||||
EntityLinksCard,
|
||||
|
@ -25,6 +28,10 @@ import {
|
|||
hasRelationWarnings,
|
||||
EntityRelationWarning,
|
||||
} from '@backstage/plugin-catalog';
|
||||
import {
|
||||
isGithubActionsAvailable,
|
||||
EntityGithubActionsContent,
|
||||
} from '@backstage-community/plugin-github-actions';
|
||||
import {
|
||||
EntityUserProfileCard,
|
||||
EntityGroupProfileCard,
|
||||
|
@ -51,13 +58,20 @@ import {
|
|||
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
|
||||
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
|
||||
|
||||
import { EntityKubernetesContent, isKubernetesAvailable } from '@backstage/plugin-kubernetes';
|
||||
import { EntityKubernetesContent } from '@backstage/plugin-kubernetes';
|
||||
|
||||
import {
|
||||
EntityArgoCDOverviewCard,
|
||||
isArgocdAvailable
|
||||
} from '@roadiehq/backstage-plugin-argo-cd';
|
||||
|
||||
import {
|
||||
EntityArgoWorkflowsOverviewCard, EntityArgoWorkflowsTemplateOverviewCard,
|
||||
isArgoWorkflowsAvailable,
|
||||
} from '@internal/plugin-argo-workflows';
|
||||
import {ApacheSparkPage, isApacheSparkAvailable} from "@internal/plugin-apache-spark";
|
||||
import { isTerraformAvailable, TerraformPluginPage } from '@internal/plugin-terraform';
|
||||
|
||||
const techdocsContent = (
|
||||
<EntityTechdocsContent>
|
||||
<TechDocsAddons>
|
||||
|
@ -67,7 +81,13 @@ const techdocsContent = (
|
|||
);
|
||||
|
||||
const cicdContent = (
|
||||
// This is an example of how you can implement your company's logic in entity page.
|
||||
// You can for example enforce that all components of type 'service' should use GitHubActions
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isGithubActionsAvailable}>
|
||||
<EntityGithubActionsContent />
|
||||
</EntitySwitch.Case>
|
||||
|
||||
<EntitySwitch.Case>
|
||||
<EmptyState
|
||||
title="No CI/CD available for this entity"
|
||||
|
@ -128,12 +148,34 @@ const overviewContent = (
|
|||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={e => isArgoWorkflowsAvailable(e)}>
|
||||
<Grid item md={6}>
|
||||
<EntityArgoWorkflowsOverviewCard />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<EntityArgoWorkflowsTemplateOverviewCard />
|
||||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={e => isTerraformAvailable(e)}>
|
||||
<Grid item md={6}>
|
||||
<TerraformPluginPage />
|
||||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityCatalogGraphCard variant="gridItem" height={400} />
|
||||
</Grid>
|
||||
|
||||
<Grid item md={4} xs={12}>
|
||||
<EntityLinksCard />
|
||||
</Grid>
|
||||
<Grid item md={8} xs={12}>
|
||||
<EntityHasSubcomponentsCard variant="gridItem" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
);
|
||||
|
||||
|
@ -147,10 +189,14 @@ const serviceEntityPage = (
|
|||
{cicdContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/kubernetes" title="Kubernetes" if={e => isKubernetesAvailable(e)}>
|
||||
<EntityLayout.Route path="/kubernetes" title="Kubernetes">
|
||||
<EntityKubernetesContent refreshIntervalMs={30000} />
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/apache-spark" title="Spark" if={isApacheSparkAvailable}>
|
||||
<ApacheSparkPage />
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/api" title="API">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
|
@ -162,6 +208,17 @@ const serviceEntityPage = (
|
|||
</Grid>
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/dependencies" title="Dependencies">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
<EntityDependsOnComponentsCard variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<EntityDependsOnResourcesCard variant="gridItem" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/docs" title="Docs">
|
||||
{techdocsContent}
|
||||
</EntityLayout.Route>
|
||||
|
@ -178,6 +235,17 @@ const websiteEntityPage = (
|
|||
{cicdContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/dependencies" title="Dependencies">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
<EntityDependsOnComponentsCard variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<EntityDependsOnResourcesCard variant="gridItem" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/docs" title="Docs">
|
||||
{techdocsContent}
|
||||
</EntityLayout.Route>
|
||||
|
@ -228,6 +296,9 @@ const apiPage = (
|
|||
<Grid item md={6} xs={12}>
|
||||
<EntityCatalogGraphCard variant="gridItem" height={400} />
|
||||
</Grid>
|
||||
<Grid item md={4} xs={12}>
|
||||
<EntityLinksCard />
|
||||
</Grid>
|
||||
<Grid container item md={12}>
|
||||
<Grid item md={6}>
|
||||
<EntityProvidingComponentsCard />
|
||||
|
|
|
@ -16,41 +16,40 @@
|
|||
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.25.0",
|
||||
"@backstage/backend-defaults": "^0.8.1",
|
||||
"@backstage/backend-plugin-api": "^1.2.0",
|
||||
"@backstage/backend-tasks": "^0.6.1",
|
||||
"@backstage/catalog-client": "^1.9.1",
|
||||
"@backstage/catalog-model": "^1.7.3",
|
||||
"@backstage/config": "^1.3.2",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/integration": "^1.16.1",
|
||||
"@backstage/plugin-app-backend": "^0.4.5",
|
||||
"@backstage/plugin-auth-backend": "^0.24.3",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.5",
|
||||
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.4.0",
|
||||
"@backstage/plugin-auth-node": "^0.6.0",
|
||||
"@backstage/plugin-catalog-backend": "^1.31.0",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.5",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.19.3",
|
||||
"@backstage/plugin-permission-common": "^0.8.4",
|
||||
"@backstage/plugin-permission-node": "^0.8.8",
|
||||
"@backstage/plugin-proxy-backend": "^0.5.11",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.30.0",
|
||||
"@backstage/plugin-scaffolder-backend-module-gitea": "^0.2.6",
|
||||
"@backstage/plugin-scaffolder-backend-module-github": "^0.6.0",
|
||||
"@backstage/plugin-scaffolder-node": "^0.7.0",
|
||||
"@backstage/plugin-search-backend": "^1.8.2",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.1",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.5.41",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.3.6",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.8",
|
||||
"@backstage/plugin-techdocs-backend": "^1.11.6",
|
||||
"@backstage/types": "^1.2.1",
|
||||
"@backstage/backend-common": "^0.23.2",
|
||||
"@backstage/backend-defaults": "^0.4.0",
|
||||
"@backstage/backend-plugin-api": "^0.7.0",
|
||||
"@backstage/backend-tasks": "^0.5.26",
|
||||
"@backstage/catalog-client": "^1.6.5",
|
||||
"@backstage/catalog-model": "^1.5.0",
|
||||
"@backstage/config": "^1.2.0",
|
||||
"@backstage/errors": "^1.2.4",
|
||||
"@backstage/integration": "^1.12.0",
|
||||
"@backstage/plugin-app-backend": "^0.3.70",
|
||||
"@backstage/plugin-auth-backend": "^0.22.8",
|
||||
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.2.2",
|
||||
"@backstage/plugin-auth-node": "^0.4.16",
|
||||
"@backstage/plugin-catalog-backend": "^1.23.2",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.19",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.18.2",
|
||||
"@backstage/plugin-permission-common": "^0.8.0",
|
||||
"@backstage/plugin-permission-node": "^0.8.0",
|
||||
"@backstage/plugin-proxy-backend": "^0.5.2",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.22.11",
|
||||
"@backstage/plugin-scaffolder-backend-module-gitea": "^0.1.11",
|
||||
"@backstage/plugin-scaffolder-backend-module-github": "^0.4.0",
|
||||
"@backstage/plugin-scaffolder-node": "^0.4.7",
|
||||
"@backstage/plugin-search-backend": "^1.5.13",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.1.27",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.5.31",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.1.26",
|
||||
"@backstage/plugin-search-backend-node": "^1.2.26",
|
||||
"@backstage/plugin-techdocs-backend": "^1.10.8",
|
||||
"@backstage/types": "^1.1.1",
|
||||
"@internal/backstage-plugin-terraform-backend": "^0.1.0",
|
||||
"@kubernetes/client-node": "~0.20.0",
|
||||
"@roadiehq/backstage-plugin-argo-cd-backend": "3.1.0",
|
||||
"@roadiehq/scaffolder-backend-module-http-request": "^4.3.5",
|
||||
"@roadiehq/scaffolder-backend-module-utils": "3.0.0",
|
||||
"@roadiehq/backstage-plugin-argo-cd-backend": "3.0.2",
|
||||
"@roadiehq/scaffolder-backend-module-utils": "^1.17.0",
|
||||
"app": "link:../app",
|
||||
"better-sqlite3": "^9.0.0",
|
||||
"dockerode": "^3.3.1",
|
||||
|
@ -62,7 +61,7 @@
|
|||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/cli": "^0.26.10",
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
|
|
@ -1,45 +1,36 @@
|
|||
import { createBackend } from '@backstage/backend-defaults';
|
||||
import { cnoeScaffolderActions } from './plugins/scaffolder';
|
||||
import { authModuleKeycloakOIDCProvider } from './plugins/auth';
|
||||
import { cnoeScaffolderActions } from './plugins/scaffolder';
|
||||
import { legacyPlugin } from '@backstage/backend-common';
|
||||
|
||||
const backend = createBackend();
|
||||
|
||||
// core plugins
|
||||
backend.add(import('@backstage/plugin-app-backend'));
|
||||
backend.add(import('@backstage/plugin-catalog-backend'));
|
||||
backend.add(import('@backstage/plugin-proxy-backend'));
|
||||
backend.add(import('@backstage/plugin-app-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-catalog-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-proxy-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-techdocs-backend/alpha'));
|
||||
|
||||
// auth plugins
|
||||
backend.add(import('@backstage/plugin-auth-backend'));
|
||||
backend.add(import('@backstage/plugin-auth-backend-module-guest-provider'));
|
||||
|
||||
// scaffolder plugins
|
||||
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
|
||||
backend.add(
|
||||
import('@backstage/plugin-catalog-backend-module-scaffolder-entity-model'),
|
||||
);
|
||||
backend.add(import('@backstage/plugin-scaffolder-backend-module-github'));
|
||||
|
||||
// search plugins
|
||||
backend.add(import('@backstage/plugin-search-backend/alpha'));
|
||||
|
||||
backend.add(import('@backstage/plugin-search-backend-module-catalog'));
|
||||
backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha'));
|
||||
backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha'));
|
||||
|
||||
// other @backstage plugins
|
||||
backend.add(import('@backstage/plugin-kubernetes-backend'));
|
||||
|
||||
backend.add(import('@backstage/plugin-kubernetes-backend/alpha'));
|
||||
// non-core plugins
|
||||
// roadie plugins
|
||||
backend.add(import('@roadiehq/scaffolder-backend-module-utils/new-backend'));
|
||||
backend.add(import('./plugins/argocd_index'));
|
||||
|
||||
backend.add(
|
||||
import('@roadiehq/scaffolder-backend-module-http-request/new-backend'),
|
||||
);
|
||||
|
||||
backend.add(legacyPlugin('argocd', import('./plugins/argocd')));
|
||||
// cnoe plugins
|
||||
backend.add(authModuleKeycloakOIDCProvider);
|
||||
backend.add(cnoeScaffolderActions);
|
||||
backend.add(import('@internal/backstage-plugin-terraform-backend'));
|
||||
|
||||
backend.start();
|
||||
backend.start();
|
||||
|
|
|
@ -2,55 +2,18 @@ import { Config } from '@backstage/config';
|
|||
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
|
||||
import { examples } from './gitea-actions';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
import { ArgoService } from '@roadiehq/backstage-plugin-argo-cd-backend';
|
||||
|
||||
import { createRouter } from '@roadiehq/backstage-plugin-argo-cd-backend';
|
||||
//import { PluginEnvironment } from '../types';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
|
||||
/*export default async function createPlugin({
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
}: PluginEnvironment) {
|
||||
return await createRouter({ logger, config });
|
||||
}*/
|
||||
|
||||
import { loggerToWinstonLogger } from '@backstage/backend-common';
|
||||
|
||||
import {
|
||||
coreServices,
|
||||
createBackendPlugin,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
|
||||
export const argocdPlugin = createBackendPlugin({
|
||||
pluginId: 'argocd',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
logger: coreServices.logger,
|
||||
config: coreServices.rootConfig,
|
||||
reader: coreServices.urlReader,
|
||||
discovery: coreServices.discovery,
|
||||
auth: coreServices.auth,
|
||||
//tokenManager: coreServices.tokenManager,
|
||||
httpRouter: coreServices.httpRouter,
|
||||
},
|
||||
async init({
|
||||
logger,
|
||||
config,
|
||||
httpRouter,
|
||||
}) {
|
||||
httpRouter.use(
|
||||
await createRouter({
|
||||
logger: loggerToWinstonLogger(logger),
|
||||
config,
|
||||
}),
|
||||
);
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
export function createArgoCDApp(options: { config: Config; logger: Logger }) {
|
||||
const { config, logger } = options;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export { argocdPlugin as default } from './argocd';
|
|
@ -5,8 +5,9 @@ import {
|
|||
PluginDatabaseManager,
|
||||
PluginEndpointDiscovery,
|
||||
TokenManager,
|
||||
} from '@backstage/backend-common/dist'; //TODO: deprecated
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks/dist';
|
||||
UrlReader,
|
||||
} from '@backstage/backend-common';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
|
||||
import { IdentityApi } from '@backstage/plugin-auth-node';
|
||||
|
||||
|
@ -15,6 +16,7 @@ export type PluginEnvironment = {
|
|||
database: PluginDatabaseManager;
|
||||
cache: PluginCacheManager;
|
||||
config: Config;
|
||||
reader: UrlReader;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
tokenManager: TokenManager;
|
||||
scheduler: PluginTaskScheduler;
|
||||
|
|
1
plugins/apache-spark/.eslintrc.js
Normal file
1
plugins/apache-spark/.eslintrc.js
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
13
plugins/apache-spark/README.md
Normal file
13
plugins/apache-spark/README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# apache-spark
|
||||
|
||||
Welcome to the apache-spark plugin!
|
||||
|
||||
_This plugin was created through the Backstage CLI_
|
||||
|
||||
## Getting started
|
||||
|
||||
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/apache-spark](http://localhost:3000/apache-spark).
|
||||
|
||||
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
|
||||
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
|
||||
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
|
12
plugins/apache-spark/dev/index.tsx
Normal file
12
plugins/apache-spark/dev/index.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { apacheSparkPlugin, ApacheSparkPage } from '../src/plugin';
|
||||
|
||||
createDevApp()
|
||||
.registerPlugin(apacheSparkPlugin)
|
||||
.addPage({
|
||||
element: <ApacheSparkPage />,
|
||||
title: 'Root Page',
|
||||
path: '/apache-spark'
|
||||
})
|
||||
.render();
|
51
plugins/apache-spark/package.json
Normal file
51
plugins/apache-spark/package.json
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "@internal/plugin-apache-spark",
|
||||
"version": "0.1.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"private": true,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "frontend-plugin"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"clean": "backstage-cli package clean",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
"postpack": "backstage-cli package postpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.14.8",
|
||||
"@backstage/core-plugin-api": "^1.9.3",
|
||||
"@backstage/theme": "^0.5.6",
|
||||
"@material-ui/core": "^4.9.13",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.61",
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.26.10",
|
||||
"@backstage/core-app-api": "^1.13.0",
|
||||
"@backstage/dev-utils": "^1.0.34",
|
||||
"@backstage/test-utils": "^1.5.7",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"msw": "^1.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
}
|
113
plugins/apache-spark/src/api/index.test.ts
Normal file
113
plugins/apache-spark/src/api/index.test.ts
Normal file
|
@ -0,0 +1,113 @@
|
|||
// import { ApacheSparkClient } from './index';
|
||||
// import { ApacheSpark } from './model';
|
||||
//
|
||||
// const mockKubernetesApi = {
|
||||
// proxy: jest.fn(),
|
||||
// getClusters: jest.fn(),
|
||||
// getObjectsByEntity: jest.fn(),
|
||||
// getWorkloadsByEntity: jest.fn(),
|
||||
// getCustomObjectsByEntity: jest.fn(),
|
||||
// };
|
||||
//
|
||||
// describe('ApacheSparkClient', () => {
|
||||
// let apacheSparkClient: ApacheSparkClient;
|
||||
//
|
||||
// beforeEach(() => {
|
||||
// apacheSparkClient = new ApacheSparkClient(mockKubernetesApi);
|
||||
// });
|
||||
//
|
||||
// afterEach(() => {
|
||||
// jest.clearAllMocks();
|
||||
// });
|
||||
//
|
||||
// it('should fetch Spark application logs', async () => {
|
||||
// mockKubernetesApi.proxy.mockResolvedValue({
|
||||
// ok: true,
|
||||
// text: () => {
|
||||
// return 'logs';
|
||||
// },
|
||||
// });
|
||||
// const logs = await apacheSparkClient.getLogs(
|
||||
// 'cluster1',
|
||||
// 'spark-namespace',
|
||||
// 'spark-pod-name',
|
||||
// 'abc',
|
||||
// );
|
||||
// expect(logs).toEqual('logs');
|
||||
// expect(mockKubernetesApi.proxy).toHaveBeenCalledWith({
|
||||
// clusterName: 'cluster1',
|
||||
// path: '/api/v1/namespaces/spark-namespace/pods/spark-pod-name/log?tailLines=1000&container=abc',
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// it('should throw error if Spark application logs are not fetched', async () => {
|
||||
// mockKubernetesApi.proxy.mockResolvedValueOnce({
|
||||
// status: 500,
|
||||
// statusText: 'Internal Server Error',
|
||||
// ok: false,
|
||||
// text: () => {
|
||||
// return 'oh noes';
|
||||
// },
|
||||
// });
|
||||
//
|
||||
// await expect(
|
||||
// apacheSparkClient.getLogs(
|
||||
// 'spark-app-name',
|
||||
// 'spark-namespace',
|
||||
// 'spark-pod-name',
|
||||
// 'abc',
|
||||
// ),
|
||||
// ).rejects.toEqual(
|
||||
// 'failed to fetch logs: 500, Internal Server Error, oh noes',
|
||||
// );
|
||||
// });
|
||||
//
|
||||
// // test getSparkApp method
|
||||
// it('should fetch Spark application', async () => {
|
||||
// // @ts-ignore
|
||||
// const mockResponse: ApacheSpark = {
|
||||
// apiVersion: 'sparkoperator.k8s.io/v1beta2',
|
||||
// kind: 'SparkApplication',
|
||||
// metadata: {
|
||||
// name: 'spark-app-name',
|
||||
// namespace: 'spark-namespace',
|
||||
// labels: {
|
||||
// app: 'spark-app-name',
|
||||
// },
|
||||
// creationTimestamp: '2021-01-01T00:00:00Z',
|
||||
// },
|
||||
// spec: {
|
||||
// image: 'abc',
|
||||
// mainApplicationFile: 'main.py',
|
||||
// mode: 'cluster',
|
||||
// sparkVersion: 'v3.1.1.',
|
||||
// type: 'Python',
|
||||
// driver: {
|
||||
// cores: 1,
|
||||
// },
|
||||
// executor: {
|
||||
// cores: 1,
|
||||
// },
|
||||
// },
|
||||
// status: {
|
||||
// applicationState: {
|
||||
// state: 'RUNNING',
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
//
|
||||
// mockKubernetesApi.proxy.mockResolvedValue({
|
||||
// ok: true,
|
||||
// text: () => {
|
||||
// return JSON.stringify(mockResponse);
|
||||
// },
|
||||
// });
|
||||
//
|
||||
// const application = await apacheSparkClient.getSparkApp(
|
||||
// 'spark-app-name',
|
||||
// 'spark-namespace',
|
||||
// 'abc',
|
||||
// );
|
||||
// expect(application).toEqual(mockResponse);
|
||||
// });
|
||||
// });
|
176
plugins/apache-spark/src/api/index.ts
Normal file
176
plugins/apache-spark/src/api/index.ts
Normal file
|
@ -0,0 +1,176 @@
|
|||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApacheSpark, ApacheSparkList, Pod } from './model';
|
||||
import { KubernetesApi } from '@backstage/plugin-kubernetes';
|
||||
|
||||
export const apacheSparkApiRef = createApiRef<ApacheSparkApi>({
|
||||
id: 'plugin.apachespark',
|
||||
});
|
||||
|
||||
const API_VERSION = 'sparkoperator.k8s.io/v1beta2';
|
||||
const SPARK_APP_PLURAL = 'sparkapplications';
|
||||
const K8s_API_TIMEOUT = 'timeoutSeconds';
|
||||
|
||||
export interface ApacheSparkApi {
|
||||
getSparkApps(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
labels: string | undefined,
|
||||
): Promise<ApacheSparkList>;
|
||||
|
||||
getSparkApp(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
name: string,
|
||||
): Promise<ApacheSpark>;
|
||||
|
||||
getLogs(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
podName: string,
|
||||
containerName?: string | undefined,
|
||||
tailLine?: number,
|
||||
): Promise<string>;
|
||||
|
||||
getContainers(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
podName: string,
|
||||
): Promise<string[]>;
|
||||
}
|
||||
|
||||
export class ApacheSparkClient implements ApacheSparkApi {
|
||||
private kubernetesApi: KubernetesApi;
|
||||
constructor(kubernetesApi: KubernetesApi) {
|
||||
this.kubernetesApi = kubernetesApi;
|
||||
}
|
||||
async getSparkApps(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
labels: string | undefined,
|
||||
): Promise<ApacheSparkList> {
|
||||
const ns = namespace !== undefined ? namespace : 'default';
|
||||
const path = `/apis/${API_VERSION}/namespaces/${ns}/${SPARK_APP_PLURAL}`;
|
||||
const query = new URLSearchParams({
|
||||
[K8s_API_TIMEOUT]: '30',
|
||||
});
|
||||
if (labels) {
|
||||
query.set('labelSelector', labels);
|
||||
}
|
||||
const resp = await this.kubernetesApi.proxy({
|
||||
clusterName:
|
||||
clusterName !== undefined ? clusterName : await this.getFirstCluster(),
|
||||
path: `${path}?${query.toString()}`,
|
||||
});
|
||||
|
||||
if (!resp.ok) {
|
||||
return Promise.reject(
|
||||
`failed to fetch resources: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`,
|
||||
);
|
||||
}
|
||||
const out = JSON.parse(await resp.text());
|
||||
this.removeManagedField(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
async getSparkApp(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
name: string,
|
||||
): Promise<ApacheSpark> {
|
||||
const ns = namespace !== undefined ? namespace : 'default';
|
||||
const path = `/apis/${API_VERSION}/namespaces/${ns}/${SPARK_APP_PLURAL}/${name}`;
|
||||
const resp = await this.kubernetesApi.proxy({
|
||||
clusterName:
|
||||
clusterName !== undefined ? clusterName : await this.getFirstCluster(),
|
||||
path: `${path}`,
|
||||
});
|
||||
if (!resp.ok) {
|
||||
return Promise.reject(
|
||||
`failed to fetch resources: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`,
|
||||
);
|
||||
}
|
||||
const out = JSON.parse(await resp.text());
|
||||
this.removeManagedField(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
async getLogs(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
podName: string,
|
||||
containerName: string | undefined,
|
||||
tailLine: number = 1000,
|
||||
): Promise<string> {
|
||||
const ns = namespace !== undefined ? namespace : 'default';
|
||||
const path = `/api/v1/namespaces/${ns}/pods/${podName}/log`;
|
||||
const query = new URLSearchParams({
|
||||
tailLines: tailLine.toString(),
|
||||
});
|
||||
if (containerName) {
|
||||
query.set('container', containerName);
|
||||
}
|
||||
|
||||
const resp = await this.kubernetesApi.proxy({
|
||||
clusterName:
|
||||
clusterName !== undefined ? clusterName : await this.getFirstCluster(),
|
||||
path: `${path}?${query.toString()}`,
|
||||
});
|
||||
if (!resp.ok) {
|
||||
return Promise.reject(
|
||||
`failed to fetch logs: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`,
|
||||
);
|
||||
}
|
||||
return resp.text();
|
||||
}
|
||||
|
||||
async getContainers(
|
||||
clusterName: string | undefined,
|
||||
namespace: string | undefined,
|
||||
podName: string,
|
||||
): Promise<string[]> {
|
||||
const ns = namespace !== undefined ? namespace : 'default';
|
||||
const path = `/api/v1/namespaces/${ns}/pods/${podName}`;
|
||||
const query = new URLSearchParams({
|
||||
[K8s_API_TIMEOUT]: '30',
|
||||
});
|
||||
const resp = await this.kubernetesApi.proxy({
|
||||
clusterName:
|
||||
clusterName !== undefined ? clusterName : await this.getFirstCluster(),
|
||||
path: `${path}?${query.toString()}`,
|
||||
});
|
||||
if (!resp.ok) {
|
||||
throw new Error(
|
||||
`failed to fetch logs: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`,
|
||||
);
|
||||
}
|
||||
const pod = JSON.parse(await resp.text()) as Pod;
|
||||
return pod.spec.containers.map(c => c.name);
|
||||
}
|
||||
|
||||
async getFirstCluster(): Promise<string> {
|
||||
const clusters = await this.kubernetesApi.getClusters();
|
||||
if (clusters.length > 0) {
|
||||
return Promise.resolve(clusters[0].name);
|
||||
}
|
||||
return Promise.reject('no clusters found in configuration');
|
||||
}
|
||||
|
||||
removeManagedField(spark: any) {
|
||||
if (spark.metadata?.hasOwnProperty('managedFields')) {
|
||||
delete spark.metadata.managedFields;
|
||||
}
|
||||
if (spark.items) {
|
||||
for (const i of spark.items) {
|
||||
this.removeManagedField(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
100
plugins/apache-spark/src/api/model.ts
Normal file
100
plugins/apache-spark/src/api/model.ts
Normal file
|
@ -0,0 +1,100 @@
|
|||
export type Metadata = {
|
||||
name: string;
|
||||
namespace?: string;
|
||||
labels?: Record<string, string>;
|
||||
annotations?: Record<string, string>;
|
||||
creationTimestamp: string;
|
||||
managedFields?: any;
|
||||
};
|
||||
|
||||
export type Spec = {
|
||||
arguments?: string[];
|
||||
batchScheduler?: string;
|
||||
driver: {
|
||||
coreLimit?: string;
|
||||
coreRequest?: string;
|
||||
cores?: number;
|
||||
gpu?: {
|
||||
name: string;
|
||||
quantity: number;
|
||||
};
|
||||
labels?: Record<string, string>;
|
||||
memory?: string;
|
||||
memoryOverhead?: string;
|
||||
podName?: string;
|
||||
schedulerName?: string;
|
||||
serviceAccount?: string;
|
||||
};
|
||||
executor: {
|
||||
coreLimit?: string;
|
||||
coreRequest?: string;
|
||||
cores?: number;
|
||||
gpu?: {
|
||||
name: string;
|
||||
quantity: number;
|
||||
};
|
||||
instances?: number;
|
||||
labels?: Record<string, string>;
|
||||
memory?: string;
|
||||
memoryOverhead?: string;
|
||||
schedulerName?: string;
|
||||
serviceAccount?: string;
|
||||
};
|
||||
image: string;
|
||||
mainClass?: string;
|
||||
mainApplicationFile?: string;
|
||||
mode: string;
|
||||
pythonVersion?: string;
|
||||
sparkVersion: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type Status = {
|
||||
applicationState: {
|
||||
errorMessage?: string;
|
||||
state: string;
|
||||
};
|
||||
driverInfo?: {
|
||||
podName: string;
|
||||
webUIAddress: string;
|
||||
webUIIngressAddress: string;
|
||||
webUIIngressName: string;
|
||||
webUIPort: string;
|
||||
webUIServiceName: string;
|
||||
};
|
||||
executionAttempts?: number;
|
||||
executorState?: { [key: string]: string };
|
||||
lastSubmissionAttemptTime?: string;
|
||||
sparkApplicationId?: string;
|
||||
submissionAttempts?: number;
|
||||
submissionID?: string;
|
||||
terminationTime?: string;
|
||||
};
|
||||
|
||||
export type ApacheSpark = {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
metadata: Metadata;
|
||||
spec: Spec;
|
||||
status: Status;
|
||||
};
|
||||
|
||||
export type ApacheSparkList = {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
items?: ApacheSpark[];
|
||||
};
|
||||
|
||||
export type Pod = {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
metadata: Metadata;
|
||||
spec: PodSpec;
|
||||
};
|
||||
|
||||
export type PodSpec = {
|
||||
containers: {
|
||||
image: string;
|
||||
name: string;
|
||||
}[];
|
||||
};
|
|
@ -0,0 +1,83 @@
|
|||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { ApacheSpark } from '../../api/model';
|
||||
import { ApacheSparkDriverLogs } from './ApacheSparkLogs';
|
||||
import {
|
||||
APACHE_SPARK_LABEL_SELECTOR_ANNOTATION,
|
||||
CLUSTER_NAME_ANNOTATION,
|
||||
K8S_NAMESPACE_ANNOTATION,
|
||||
} from '../../consts';
|
||||
|
||||
jest.mock('@backstage/core-plugin-api');
|
||||
jest.mock('react-use/lib/useAsync');
|
||||
jest.mock('@backstage/plugin-catalog-react');
|
||||
|
||||
jest.mock('@backstage/core-components', () => ({
|
||||
LogViewer: (props: { text: string }) => {
|
||||
return <div>{props.text}</div>;
|
||||
},
|
||||
}));
|
||||
|
||||
describe('ApacheSparkDriverLogs', () => {
|
||||
const mockUseApi = useApi as jest.MockedFunction<typeof useApi>;
|
||||
const mockUseAsync = useAsync as jest.MockedFunction<typeof useAsync>;
|
||||
const mockUseEntity = useEntity as jest.MockedFunction<typeof useEntity>;
|
||||
const mockGetLogs = jest.fn();
|
||||
const mockSparkApp = {
|
||||
status: {
|
||||
driverInfo: {
|
||||
podName: 'test-pod',
|
||||
},
|
||||
},
|
||||
} as ApacheSpark;
|
||||
|
||||
beforeEach(() => {
|
||||
mockUseApi.mockReturnValue({
|
||||
getLogs: mockGetLogs,
|
||||
});
|
||||
mockUseEntity.mockReturnValue({
|
||||
entity: {
|
||||
apiVersion: 'version',
|
||||
kind: 'kind',
|
||||
metadata: {
|
||||
name: 'name',
|
||||
namespace: 'ns1',
|
||||
annotations: {
|
||||
[K8S_NAMESPACE_ANNOTATION]: 'k8s-ns',
|
||||
[CLUSTER_NAME_ANNOTATION]: 'my-cluster',
|
||||
[APACHE_SPARK_LABEL_SELECTOR_ANNOTATION]: 'env=test',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it('should render error message if there is an error', () => {
|
||||
mockUseAsync.mockReturnValue({
|
||||
value: undefined,
|
||||
loading: false,
|
||||
error: new Error('Test error'),
|
||||
});
|
||||
|
||||
render(<ApacheSparkDriverLogs sparkApp={mockSparkApp} />);
|
||||
expect(screen.getByText('Error: Test error')).toBeInTheDocument();
|
||||
expect(screen.getByRole('alert')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render the log viewer with the fetched logs', async () => {
|
||||
mockUseAsync.mockReturnValue({
|
||||
value: 'test logs',
|
||||
loading: false,
|
||||
error: undefined,
|
||||
});
|
||||
render(<ApacheSparkDriverLogs sparkApp={mockSparkApp} />);
|
||||
expect(screen.getByText('test logs')).toBeInTheDocument();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,100 @@
|
|||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { apacheSparkApiRef } from '../../api';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { ApacheSpark } from '../../api/model';
|
||||
import {
|
||||
LogViewer,
|
||||
Progress,
|
||||
Select,
|
||||
SelectedItems,
|
||||
SelectItem,
|
||||
} from '@backstage/core-components';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
import { getAnnotationValues } from '../utils';
|
||||
|
||||
export const ApacheSparkDriverLogs = (props: { sparkApp: ApacheSpark }) => {
|
||||
const apiClient = useApi(apacheSparkApiRef);
|
||||
const { entity } = useEntity();
|
||||
const { ns, clusterName } = getAnnotationValues(entity);
|
||||
|
||||
const { value, loading, error } = useAsync(async (): Promise<string> => {
|
||||
return await apiClient.getLogs(
|
||||
clusterName,
|
||||
ns,
|
||||
props.sparkApp.status.driverInfo?.podName!,
|
||||
'spark-kubernetes-driver',
|
||||
);
|
||||
}, [props]);
|
||||
if (loading) {
|
||||
return <Progress />;
|
||||
} else if (error) {
|
||||
return <Alert severity="error">{`${error}`}</Alert>;
|
||||
}
|
||||
return <LogViewer text={value!} />;
|
||||
};
|
||||
|
||||
const ExecutorLogs = (props: { name: string }) => {
|
||||
const apiClient = useApi(apacheSparkApiRef);
|
||||
const { entity } = useEntity();
|
||||
const [logs, setLogs] = useState('');
|
||||
const { ns, clusterName } = getAnnotationValues(entity);
|
||||
|
||||
useEffect(() => {
|
||||
async function getLogs() {
|
||||
try {
|
||||
const val = await apiClient.getLogs(
|
||||
clusterName,
|
||||
ns,
|
||||
props.name,
|
||||
'spark-kubernetes-executor',
|
||||
);
|
||||
setLogs(val);
|
||||
} catch (e) {
|
||||
if (typeof e === 'string') {
|
||||
setLogs(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props.name !== '') {
|
||||
getLogs();
|
||||
}
|
||||
}, [apiClient, clusterName, ns, props]);
|
||||
|
||||
return <LogViewer text={logs!} />;
|
||||
};
|
||||
|
||||
export const ApacheSparkExecutorLogs = (props: { sparkApp: ApacheSpark }) => {
|
||||
const [selected, setSelected] = useState('');
|
||||
if (props.sparkApp.status.applicationState.state !== 'RUNNING') {
|
||||
return (
|
||||
<Alert severity="info">
|
||||
Executor logs are only available for Spark Applications in RUNNING state
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
const executors: SelectItem[] = [{ label: '', value: '' }];
|
||||
for (const key in props.sparkApp.status.executorState) {
|
||||
if (props.sparkApp.status.executorState.hasOwnProperty(key)) {
|
||||
executors.push({ label: key, value: key });
|
||||
}
|
||||
}
|
||||
|
||||
const handleChange = (item: SelectedItems) => {
|
||||
if (typeof item === 'string' && item !== '') {
|
||||
setSelected(item);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Select
|
||||
placeholder="Select One"
|
||||
label="Select a executor"
|
||||
items={executors}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<ExecutorLogs name={selected} key={selected} />
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,145 @@
|
|||
import {
|
||||
Progress,
|
||||
StatusError,
|
||||
StatusOK,
|
||||
StatusPending,
|
||||
StatusRunning,
|
||||
Table,
|
||||
TableColumn,
|
||||
} from '@backstage/core-components';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { apacheSparkApiRef } from '../../api';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { ApacheSpark, ApacheSparkList } from '../../api/model';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import { createStyles, Drawer, makeStyles, Theme } from '@material-ui/core';
|
||||
import { DrawerContent } from '../DetailedDrawer/DetailedDrawer';
|
||||
import { getAnnotationValues } from '../utils';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
|
||||
type TableData = {
|
||||
id: string;
|
||||
name: string;
|
||||
namespace: string;
|
||||
applicationState?: string;
|
||||
startedAt?: string;
|
||||
finishedAt?: string;
|
||||
raw: ApacheSpark;
|
||||
};
|
||||
|
||||
const columns: TableColumn<TableData>[] = [
|
||||
{
|
||||
title: 'Name',
|
||||
field: 'name',
|
||||
},
|
||||
{ title: 'Namespace', field: 'namespace', type: 'string' },
|
||||
{
|
||||
title: 'Application State',
|
||||
field: 'applicationState',
|
||||
},
|
||||
{
|
||||
title: 'StartTime',
|
||||
field: 'startedAt',
|
||||
type: 'datetime',
|
||||
defaultSort: 'desc',
|
||||
},
|
||||
{ title: 'EndTime', field: 'finishedAt', type: 'datetime' },
|
||||
];
|
||||
|
||||
const useDrawerStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
paper: {
|
||||
width: '60%',
|
||||
padding: theme.spacing(2.5),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
export const ApacheSparkOverviewTable = () => {
|
||||
const apiClient = useApi(apacheSparkApiRef);
|
||||
const [columnData, setColumnData] = useState([] as TableData[]);
|
||||
const [isOpen, toggleDrawer] = useState(false);
|
||||
const [drawerData, setDrawerData] = useState({} as ApacheSpark);
|
||||
const classes = useDrawerStyles();
|
||||
const { entity } = useEntity();
|
||||
const { ns, clusterName, labelSelector } = getAnnotationValues(entity);
|
||||
|
||||
const { value, loading, error } = useAsync(
|
||||
async (): Promise<ApacheSparkList> => {
|
||||
return await apiClient.getSparkApps(clusterName, ns, labelSelector);
|
||||
},
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const data = value?.items?.map(val => {
|
||||
let state = {};
|
||||
switch (val.status?.applicationState.state) {
|
||||
case 'RUNNING':
|
||||
state = <StatusRunning>Running</StatusRunning>;
|
||||
break;
|
||||
case 'COMPLETED':
|
||||
state = <StatusOK>COMPLETED</StatusOK>;
|
||||
break;
|
||||
case 'FAILED':
|
||||
state = <StatusError>FAILED</StatusError>;
|
||||
break;
|
||||
default:
|
||||
state = (
|
||||
<StatusPending>
|
||||
'${val.status.applicationState.state}'
|
||||
</StatusPending>
|
||||
);
|
||||
break;
|
||||
}
|
||||
return {
|
||||
id: `${val.metadata.namespace}/${val.metadata.name}`,
|
||||
raw: val,
|
||||
name: val.metadata.name,
|
||||
namespace: val.metadata.namespace,
|
||||
applicationState: state,
|
||||
startedAt: val.metadata.creationTimestamp,
|
||||
finishedAt: val.status?.terminationTime,
|
||||
} as TableData;
|
||||
});
|
||||
if (data && data.length > 0) {
|
||||
setColumnData(data);
|
||||
}
|
||||
}, [value]);
|
||||
if (loading) {
|
||||
return <Progress />;
|
||||
} else if (error) {
|
||||
return <Alert severity="error">{`${error}`}</Alert>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Table
|
||||
options={{
|
||||
padding: 'dense',
|
||||
paging: true,
|
||||
search: true,
|
||||
sorting: true,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: [5, 10, 20, 50],
|
||||
}}
|
||||
onRowClick={(_event, rowData: TableData | undefined) => {
|
||||
setDrawerData(rowData?.raw!);
|
||||
toggleDrawer(true);
|
||||
}}
|
||||
columns={columns}
|
||||
data={columnData}
|
||||
/>
|
||||
<Drawer
|
||||
classes={{
|
||||
paper: classes.paper,
|
||||
}}
|
||||
anchor="right"
|
||||
open={isOpen}
|
||||
onClose={() => toggleDrawer(false)}
|
||||
>
|
||||
<DrawerContent toggleDrawer={toggleDrawer} apacheSpark={drawerData} />
|
||||
</Drawer>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,111 @@
|
|||
import { ApacheSpark } from '../../api/model';
|
||||
import {
|
||||
createStyles,
|
||||
IconButton,
|
||||
makeStyles,
|
||||
Theme,
|
||||
Typography,
|
||||
} from '@material-ui/core';
|
||||
import Close from '@material-ui/icons/Close';
|
||||
import React from 'react';
|
||||
import { stringify } from 'yaml';
|
||||
import { CopyTextButton, TabbedLayout } from '@backstage/core-components';
|
||||
import {
|
||||
ApacheSparkDriverLogs,
|
||||
ApacheSparkExecutorLogs,
|
||||
} from '../ApacheSparkLogs/ApacheSparkLogs';
|
||||
import { DrawerOverview } from './DrawerOverview';
|
||||
|
||||
const useDrawerContentStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
header: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
icon: {
|
||||
fontSize: 20,
|
||||
},
|
||||
content: {
|
||||
height: '80%',
|
||||
backgroundColor: '#EEEEEE',
|
||||
overflow: 'scroll',
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
},
|
||||
logs: {
|
||||
height: 500,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
flexShrink: 0,
|
||||
},
|
||||
logs2: {
|
||||
height: 600,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
},
|
||||
secondaryAction: {
|
||||
marginLeft: theme.spacing(2.5),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
export const DrawerContent = ({
|
||||
toggleDrawer,
|
||||
apacheSpark,
|
||||
}: {
|
||||
toggleDrawer: (isOpen: boolean) => void;
|
||||
apacheSpark: ApacheSpark;
|
||||
}) => {
|
||||
const classes = useDrawerContentStyles();
|
||||
const yamlString = stringify(apacheSpark);
|
||||
return (
|
||||
<TabbedLayout>
|
||||
<TabbedLayout.Route path="/" title="Overview">
|
||||
<>
|
||||
<div>
|
||||
<DrawerOverview sparkApp={apacheSpark} />
|
||||
</div>
|
||||
</>
|
||||
</TabbedLayout.Route>
|
||||
<TabbedLayout.Route path="/manifests" title="Manifest">
|
||||
<>
|
||||
<div className={classes.header}>
|
||||
<Typography variant="h6">{apacheSpark.metadata.name}</Typography>
|
||||
<IconButton
|
||||
key="dismiss"
|
||||
title="Close"
|
||||
onClick={() => toggleDrawer(false)}
|
||||
color="inherit"
|
||||
>
|
||||
<Close className={classes.icon} />
|
||||
</IconButton>
|
||||
</div>
|
||||
<div className={classes.content}>
|
||||
<CopyTextButton text={yamlString} tooltipText="Copy" />
|
||||
<pre>{yamlString}</pre>
|
||||
</div>
|
||||
</>
|
||||
</TabbedLayout.Route>
|
||||
<TabbedLayout.Route path="/live-logs" title="Live logs">
|
||||
<>
|
||||
<div className={classes.logs2}>
|
||||
<div className={classes.logs}>
|
||||
<Typography variant="h6">
|
||||
Driver Log for {apacheSpark.metadata.name}
|
||||
</Typography>
|
||||
<ApacheSparkDriverLogs sparkApp={apacheSpark} />
|
||||
</div>
|
||||
</div>
|
||||
<div className={classes.logs2}>
|
||||
<div className={classes.logs}>
|
||||
<Typography variant="h6">
|
||||
Executor Logs for {apacheSpark.metadata.name}
|
||||
</Typography>
|
||||
<ApacheSparkExecutorLogs sparkApp={apacheSpark} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</TabbedLayout.Route>
|
||||
</TabbedLayout>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,103 @@
|
|||
import { createStyles, makeStyles } from '@material-ui/core';
|
||||
import { ApacheSpark } from '../../api/model';
|
||||
import {
|
||||
InfoCard,
|
||||
StatusError,
|
||||
StatusOK,
|
||||
StatusPending,
|
||||
StatusRunning,
|
||||
StructuredMetadataTable,
|
||||
} from '@backstage/core-components';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles(() =>
|
||||
createStyles({
|
||||
content: {
|
||||
justifyContent: 'space-between',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
padding: '5px',
|
||||
gap: '30px',
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
type generateMetadataOutput = {
|
||||
app: { [key: string]: any };
|
||||
driver: { [key: string]: any };
|
||||
executor: { [key: string]: any };
|
||||
};
|
||||
|
||||
function generateMetadata(sparkApp: ApacheSpark): generateMetadataOutput {
|
||||
const out = {} as generateMetadataOutput;
|
||||
const executor: { [key: string]: any } = {};
|
||||
const app: { [key: string]: any } = {
|
||||
name: sparkApp.metadata.name,
|
||||
namespace: sparkApp.metadata.namespace,
|
||||
status: renderState(sparkApp.status.applicationState.state),
|
||||
image: sparkApp.spec.image,
|
||||
mode: sparkApp.spec.mode,
|
||||
};
|
||||
if (sparkApp.status.applicationState.errorMessage)
|
||||
app['error Message'] = sparkApp.status.applicationState.errorMessage;
|
||||
|
||||
for (const key in sparkApp.status.executorState) {
|
||||
if (sparkApp.status.executorState.hasOwnProperty(key)) {
|
||||
executor[`${key}`] = renderState(sparkApp.status.executorState[key]);
|
||||
}
|
||||
}
|
||||
out.app = app;
|
||||
out.driver = sparkApp.status.driverInfo ? sparkApp.status.driverInfo : {};
|
||||
out.executor = executor;
|
||||
return out;
|
||||
}
|
||||
|
||||
function renderState(state: string): JSX.Element {
|
||||
switch (state) {
|
||||
case 'RUNNING':
|
||||
return <StatusRunning>{state}</StatusRunning>;
|
||||
case 'COMPLETED':
|
||||
return <StatusOK>{state}</StatusOK>;
|
||||
case 'SUBMITTED':
|
||||
case 'PENDING_RERUN':
|
||||
return <StatusPending>{state}</StatusPending>;
|
||||
case 'FAILED':
|
||||
case 'SUBMISSION_FAILED':
|
||||
return <StatusError>{state}</StatusError>;
|
||||
default:
|
||||
return <StatusPending>{state}</StatusPending>;
|
||||
}
|
||||
}
|
||||
|
||||
const upperCaseFirstChar = (s: string) => {
|
||||
if (s.length > 0) {
|
||||
return `${s.charAt(0).toUpperCase()}${s.slice(1)}`;
|
||||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
export const DrawerOverview = (props: { sparkApp: ApacheSpark }) => {
|
||||
const data = generateMetadata(props.sparkApp)
|
||||
return (
|
||||
<div className={useStyles().content}>
|
||||
<InfoCard title="Apache Spark Application">
|
||||
<StructuredMetadataTable
|
||||
metadata={data.app}
|
||||
options={{ titleFormat: upperCaseFirstChar }}
|
||||
/>
|
||||
</InfoCard>
|
||||
<InfoCard title="Driver">
|
||||
<StructuredMetadataTable
|
||||
metadata={data.driver}
|
||||
options={{ titleFormat: upperCaseFirstChar }}
|
||||
/>
|
||||
</InfoCard>
|
||||
<InfoCard title="Executors">
|
||||
<StructuredMetadataTable
|
||||
metadata={data.executor}
|
||||
options={{ titleFormat: upperCaseFirstChar }}
|
||||
/>
|
||||
</InfoCard>
|
||||
</div>
|
||||
);
|
||||
};
|
14
plugins/apache-spark/src/components/Overview/Overview.tsx
Normal file
14
plugins/apache-spark/src/components/Overview/Overview.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Content, Header, HeaderLabel, Page } from '@backstage/core-components';
|
||||
import { ApacheSparkOverviewTable } from '../ApacheSparkOverviewTable/ApacheSparkOverviewTable';
|
||||
import React from 'react';
|
||||
|
||||
export const ApacheSparkOverviewPage = () => (
|
||||
<Page themeId="tool">
|
||||
<Header title="Apache Spark">
|
||||
<HeaderLabel label="Lifecycle" value="Alpha" />
|
||||
</Header>
|
||||
<Content>
|
||||
<ApacheSparkOverviewTable />
|
||||
</Content>
|
||||
</Page>
|
||||
);
|
1
plugins/apache-spark/src/components/Overview/index.ts
Normal file
1
plugins/apache-spark/src/components/Overview/index.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export * from './Overview';
|
26
plugins/apache-spark/src/components/utils.ts
Normal file
26
plugins/apache-spark/src/components/utils.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import {Entity} from '@backstage/catalog-model';
|
||||
import {
|
||||
APACHE_SPARK_LABEL_SELECTOR_ANNOTATION,
|
||||
CLUSTER_NAME_ANNOTATION,
|
||||
K8S_NAMESPACE_ANNOTATION,
|
||||
} from '../consts';
|
||||
|
||||
export type getAnnotationValuesOutput = {
|
||||
ns: string;
|
||||
clusterName?: string;
|
||||
labelSelector?: string;
|
||||
};
|
||||
|
||||
export function getAnnotationValues(entity: Entity): getAnnotationValuesOutput {
|
||||
const ns =
|
||||
entity.metadata.annotations?.[K8S_NAMESPACE_ANNOTATION] !== undefined
|
||||
? entity.metadata.annotations?.[K8S_NAMESPACE_ANNOTATION]
|
||||
: 'default';
|
||||
const clusterName = entity.metadata.annotations?.[CLUSTER_NAME_ANNOTATION];
|
||||
const labelSelector = entity.metadata?.annotations?.[APACHE_SPARK_LABEL_SELECTOR_ANNOTATION]
|
||||
return {
|
||||
ns: ns,
|
||||
clusterName: clusterName,
|
||||
labelSelector: labelSelector,
|
||||
};
|
||||
}
|
4
plugins/apache-spark/src/consts.ts
Normal file
4
plugins/apache-spark/src/consts.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export const APACHE_SPARK_LABEL_SELECTOR_ANNOTATION =
|
||||
'apache-spark.cnoe.io/label-selector';
|
||||
export const CLUSTER_NAME_ANNOTATION = 'apache-spark.cnoe.io/cluster-name';
|
||||
export const K8S_NAMESPACE_ANNOTATION = 'backstage.io/kubernetes-namespace';
|
1
plugins/apache-spark/src/index.ts
Normal file
1
plugins/apache-spark/src/index.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export {apacheSparkPlugin, ApacheSparkPage, isApacheSparkAvailable} from './plugin';
|
7
plugins/apache-spark/src/plugin.test.ts
Normal file
7
plugins/apache-spark/src/plugin.test.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
// import { apacheSparkPlugin } from './plugin';
|
||||
//
|
||||
// describe('apache-spark', () => {
|
||||
// it('should export plugin', () => {
|
||||
// expect(apacheSparkPlugin).toBeDefined();
|
||||
// });
|
||||
// });
|
42
plugins/apache-spark/src/plugin.ts
Normal file
42
plugins/apache-spark/src/plugin.ts
Normal file
|
@ -0,0 +1,42 @@
|
|||
import {
|
||||
createApiFactory,
|
||||
createPlugin,
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
import {rootRouteRef} from './routes';
|
||||
import {apacheSparkApiRef, ApacheSparkClient} from './api';
|
||||
import {kubernetesApiRef} from '@backstage/plugin-kubernetes';
|
||||
import {Entity} from '@backstage/catalog-model';
|
||||
|
||||
import {
|
||||
APACHE_SPARK_LABEL_SELECTOR_ANNOTATION,
|
||||
} from './consts';
|
||||
|
||||
export const isApacheSparkAvailable = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[APACHE_SPARK_LABEL_SELECTOR_ANNOTATION]);
|
||||
|
||||
export const apacheSparkPlugin = createPlugin({
|
||||
id: 'apache-spark',
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
},
|
||||
apis: [
|
||||
createApiFactory({
|
||||
api: apacheSparkApiRef,
|
||||
deps: {
|
||||
kubernetesApi: kubernetesApiRef,
|
||||
},
|
||||
factory: ({kubernetesApi}) => new ApacheSparkClient(kubernetesApi),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
export const ApacheSparkPage = apacheSparkPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'ApacheSparkPage',
|
||||
component: () =>
|
||||
import('./components/Overview').then(m => m.ApacheSparkOverviewPage),
|
||||
mountPoint: rootRouteRef,
|
||||
}),
|
||||
);
|
5
plugins/apache-spark/src/routes.ts
Normal file
5
plugins/apache-spark/src/routes.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { createRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
export const rootRouteRef = createRouteRef({
|
||||
id: 'apache-spark',
|
||||
});
|
2
plugins/apache-spark/src/setupTests.ts
Normal file
2
plugins/apache-spark/src/setupTests.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
import '@testing-library/jest-dom';
|
||||
import 'cross-fetch/polyfill';
|
1
plugins/argo-workflows/.eslintrc.js
Normal file
1
plugins/argo-workflows/.eslintrc.js
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
13
plugins/argo-workflows/README.md
Normal file
13
plugins/argo-workflows/README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# argo-workflows
|
||||
|
||||
Welcome to the argo-workflows plugin!
|
||||
|
||||
_This plugin was created through the Backstage CLI_
|
||||
|
||||
## Getting started
|
||||
|
||||
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/argo-workflows](http://localhost:3000/argo-workflows).
|
||||
|
||||
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
|
||||
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
|
||||
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
|
12
plugins/argo-workflows/config.d.ts
vendored
Normal file
12
plugins/argo-workflows/config.d.ts
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
export interface Config {
|
||||
/** Optional configurations for the Argo Workflows plugin
|
||||
* @visibility frontend
|
||||
*/
|
||||
argoWorkflows?: {
|
||||
/**
|
||||
* The base url of the Argo Workflows installation.
|
||||
* @visibility frontend
|
||||
*/
|
||||
baseUrl: string;
|
||||
};
|
||||
}
|
12
plugins/argo-workflows/dev/index.tsx
Normal file
12
plugins/argo-workflows/dev/index.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { argoWorkflowsPlugin, ArgoWorkflowsPage } from '../src/plugin';
|
||||
|
||||
createDevApp()
|
||||
.registerPlugin(argoWorkflowsPlugin)
|
||||
.addPage({
|
||||
element: <ArgoWorkflowsPage />,
|
||||
title: 'Root Page',
|
||||
path: '/argo-workflows'
|
||||
})
|
||||
.render();
|
53
plugins/argo-workflows/package.json
Normal file
53
plugins/argo-workflows/package.json
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "@internal/plugin-argo-workflows",
|
||||
"version": "0.1.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"private": true,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "frontend-plugin"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"clean": "backstage-cli package clean",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
"postpack": "backstage-cli package postpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.14.8",
|
||||
"@backstage/core-plugin-api": "^1.9.3",
|
||||
"@backstage/theme": "^0.5.6",
|
||||
"@material-ui/core": "^4.9.13",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.61",
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.26.10",
|
||||
"@backstage/core-app-api": "^1.13.0",
|
||||
"@backstage/dev-utils": "^1.0.34",
|
||||
"@backstage/test-utils": "^1.5.7",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"msw": "^1.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"config.d.ts"
|
||||
],
|
||||
"configSchema": "config.d.ts"
|
||||
}
|
116
plugins/argo-workflows/src/api/ArgoWorkflows.test.ts
Normal file
116
plugins/argo-workflows/src/api/ArgoWorkflows.test.ts
Normal file
|
@ -0,0 +1,116 @@
|
|||
// import { DiscoveryApi } from "@backstage/core-plugin-api";
|
||||
// import { ArgoWorkflows } from "./ArgoWorkflows";
|
||||
// import { KubernetesApi } from "@backstage/plugin-kubernetes";
|
||||
// import { MockFetchApi } from "@backstage/test-utils";
|
||||
// import { FrontendHostDiscovery } from "@backstage/core-app-api";
|
||||
// import { UserIdentity } from "@backstage/core-components";
|
||||
// import { inProgress } from "../test-data/testResponse";
|
||||
//
|
||||
// describe("ArgoWorkflowsClient", () => {
|
||||
// const mockDiscoveryApi: jest.Mocked<DiscoveryApi> = {
|
||||
// getBaseUrl: jest.fn().mockImplementation((id) => {
|
||||
// return Promise.resolve(`https://backstage.io/${id}`);
|
||||
// }),
|
||||
// };
|
||||
// const noopFetchApi = new MockFetchApi({ baseImplementation: "none" });
|
||||
//
|
||||
// const mockKClient: jest.Mocked<KubernetesApi> = {
|
||||
// getObjectsByEntity: jest.fn(),
|
||||
// getClusters: jest.fn(),
|
||||
// getWorkloadsByEntity: jest.fn(),
|
||||
// getCustomObjectsByEntity: jest.fn(),
|
||||
// proxy: jest.fn(),
|
||||
// };
|
||||
//
|
||||
// beforeAll(() => {
|
||||
// jest
|
||||
// .spyOn(FrontendHostDiscovery.prototype, "getBaseUrl")
|
||||
// .mockImplementation((id) => {
|
||||
// return Promise.resolve(`https://backstage.io/${id}`);
|
||||
// });
|
||||
// jest
|
||||
// .spyOn(UserIdentity.prototype, "getCredentials")
|
||||
// .mockImplementation(() => {
|
||||
// return Promise.resolve({ token: "abc" });
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// afterEach(() => {
|
||||
// jest.clearAllMocks();
|
||||
// });
|
||||
//
|
||||
// it("can fetch from k8s", async () => {
|
||||
// mockKClient.proxy.mockResolvedValue({
|
||||
// status: 200,
|
||||
// ok: true,
|
||||
// text: async () => JSON.stringify(inProgress),
|
||||
// } as Response);
|
||||
//
|
||||
// const a = new ArgoWorkflows(mockDiscoveryApi, mockKClient, noopFetchApi);
|
||||
// const spy = jest.spyOn(mockKClient, "proxy");
|
||||
// const resp = await a.getWorkflowsFromK8s("abc", "default", "my=env");
|
||||
// expect(resp.items.length).toBe(1);
|
||||
// expect(spy).toHaveBeenCalledWith({
|
||||
// clusterName: "abc",
|
||||
// path: "/apis/argoproj.io/v1alpha1/namespaces/default/workflows?timeoutSeconds=30&labelSelector=my%3Denv",
|
||||
// });
|
||||
// });
|
||||
// it("can fetch from default k8s cluster", async () => {
|
||||
// mockKClient.proxy.mockResolvedValue({
|
||||
// status: 200,
|
||||
// ok: true,
|
||||
// text: async () => JSON.stringify(inProgress),
|
||||
// } as Response);
|
||||
// mockKClient.getClusters.mockResolvedValue([
|
||||
// {
|
||||
// name: "cluster-1",
|
||||
// authProvider: "provider-1",
|
||||
// },
|
||||
// ]);
|
||||
//
|
||||
// const a = new ArgoWorkflows(mockDiscoveryApi, mockKClient, noopFetchApi);
|
||||
// const spy = jest.spyOn(a, "getFirstCluster");
|
||||
// const resp = await a.getWorkflowsFromK8s(undefined, "default", "my=env");
|
||||
// expect(resp.items.length).toBe(1);
|
||||
// expect(spy).toHaveBeenCalled();
|
||||
// });
|
||||
// it("rejects when non-ok status returned", async () => {
|
||||
// mockKClient.proxy.mockResolvedValue({
|
||||
// status: 500,
|
||||
// ok: false,
|
||||
// statusText: "something went wrong",
|
||||
// text: async () => "oh no",
|
||||
// } as Response);
|
||||
//
|
||||
// const a = new ArgoWorkflows(mockDiscoveryApi, mockKClient, noopFetchApi);
|
||||
// await expect(
|
||||
// a.getWorkflowsFromK8s("abc", "default", "not used")
|
||||
// ).rejects.toEqual(
|
||||
// "failed to fetch resources: 500, something went wrong, oh no"
|
||||
// );
|
||||
// });
|
||||
// it("can get workflow from proxy", async () => {
|
||||
// const impl = jest.fn().mockResolvedValue({
|
||||
// status: 200,
|
||||
// ok: true,
|
||||
// text: async () => JSON.stringify(inProgress),
|
||||
// });
|
||||
// const fetchApi = new MockFetchApi({ baseImplementation: impl });
|
||||
// const a = new ArgoWorkflows(mockDiscoveryApi, mockKClient, fetchApi);
|
||||
// const resp = await a.getWorkflowsFromProxy("default", "my=env");
|
||||
// expect(resp.items.length).toBe(1);
|
||||
// });
|
||||
// it("rejects when error is returned", async () => {
|
||||
// const impl = jest.fn().mockResolvedValue({
|
||||
// status: 500,
|
||||
// ok: false,
|
||||
// statusText: "something went wrong",
|
||||
// text: async () => "oh no",
|
||||
// });
|
||||
// const fetchApi = new MockFetchApi({ baseImplementation: impl });
|
||||
// const a = new ArgoWorkflows(mockDiscoveryApi, mockKClient, fetchApi);
|
||||
// await expect(a.getWorkflowsFromProxy("default", "my=env")).rejects.toEqual(
|
||||
// "failed to fetch resources: 500, something went wrong, oh no"
|
||||
// );
|
||||
// });
|
||||
// });
|
141
plugins/argo-workflows/src/api/ArgoWorkflows.ts
Normal file
141
plugins/argo-workflows/src/api/ArgoWorkflows.ts
Normal file
|
@ -0,0 +1,141 @@
|
|||
import { DiscoveryApi, FetchApi } from "@backstage/core-plugin-api";
|
||||
import { KubernetesApi } from "@backstage/plugin-kubernetes";
|
||||
import {
|
||||
IoArgoprojWorkflowV1alpha1WorkflowList,
|
||||
IoArgoprojWorkflowV1alpha1WorkflowTemplateList,
|
||||
} from "./generated/api";
|
||||
import { ArgoWorkflowsApi } from "./index";
|
||||
|
||||
const API_VERSION = "argoproj.io/v1alpha1";
|
||||
const WORKFLOW_PLURAL = "workflows";
|
||||
const DEFAULT_WORKFLOW_PROXY = "/argo-workflows/api";
|
||||
const API_LABEL_SELECTOR = "listOptions.labelSelector";
|
||||
const API_TIMEOUT = "listOptions.timeoutSeconds";
|
||||
const K8s_API_TIMEOUT = "timeoutSeconds";
|
||||
|
||||
export class ArgoWorkflows implements ArgoWorkflowsApi {
|
||||
private discoveryApi: DiscoveryApi;
|
||||
private kubernetesApi: KubernetesApi;
|
||||
private fetchApi: FetchApi;
|
||||
|
||||
constructor(
|
||||
discoveryApi: DiscoveryApi,
|
||||
kubernetesApi: KubernetesApi,
|
||||
fetchApi: FetchApi
|
||||
) {
|
||||
this.discoveryApi = discoveryApi;
|
||||
this.kubernetesApi = kubernetesApi;
|
||||
this.fetchApi = fetchApi;
|
||||
}
|
||||
|
||||
async getWorkflowsFromK8s(
|
||||
clusterName: string | undefined,
|
||||
namespace: string,
|
||||
labels: string | undefined
|
||||
): Promise<IoArgoprojWorkflowV1alpha1WorkflowList> {
|
||||
const ns = namespace !== undefined ? namespace : "default";
|
||||
const path = `/apis/${API_VERSION}/namespaces/${ns}/${WORKFLOW_PLURAL}`;
|
||||
const query = new URLSearchParams({
|
||||
[K8s_API_TIMEOUT]: "30",
|
||||
});
|
||||
if (labels) {
|
||||
query.set("labelSelector", labels);
|
||||
}
|
||||
// need limits and pagination
|
||||
const resp = await this.kubernetesApi.proxy({
|
||||
clusterName:
|
||||
clusterName !== undefined ? clusterName : await this.getFirstCluster(),
|
||||
path: `${path}?${query.toString()}`,
|
||||
});
|
||||
|
||||
if (!resp.ok) {
|
||||
return Promise.reject(
|
||||
`failed to fetch resources: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`
|
||||
);
|
||||
}
|
||||
// need validation
|
||||
return JSON.parse(
|
||||
await resp.text()
|
||||
) as IoArgoprojWorkflowV1alpha1WorkflowList;
|
||||
}
|
||||
|
||||
getWorkflows(
|
||||
clusterName: string | undefined,
|
||||
namespace: string,
|
||||
labels: string | undefined
|
||||
): Promise<IoArgoprojWorkflowV1alpha1WorkflowList> {
|
||||
if (clusterName) {
|
||||
return this.getWorkflowsFromK8s(clusterName, namespace, labels);
|
||||
}
|
||||
return this.getWorkflowsFromProxy(namespace, labels);
|
||||
}
|
||||
|
||||
async getWorkflowTemplates(
|
||||
clusterName: string | undefined,
|
||||
namespace: string,
|
||||
labels: string | undefined
|
||||
): Promise<IoArgoprojWorkflowV1alpha1WorkflowTemplateList> {
|
||||
if (clusterName) {
|
||||
return Promise.reject("t");
|
||||
}
|
||||
return this.getWorkflowTemplatesFromProxy(namespace, labels);
|
||||
}
|
||||
|
||||
async getWorkflowsFromProxy(
|
||||
namespace: string,
|
||||
labels: string | undefined
|
||||
): Promise<IoArgoprojWorkflowV1alpha1WorkflowList> {
|
||||
const path = `/api/v1/workflows/${namespace}`;
|
||||
const resp = await this.fetchFromPath(path, labels);
|
||||
return await checkAndReturn<IoArgoprojWorkflowV1alpha1WorkflowTemplateList>(
|
||||
resp
|
||||
);
|
||||
}
|
||||
|
||||
async getWorkflowTemplatesFromProxy(
|
||||
namespace: string,
|
||||
labels: string | undefined
|
||||
): Promise<IoArgoprojWorkflowV1alpha1WorkflowTemplateList> {
|
||||
const path = `/api/v1/workflow-templates/${namespace}`;
|
||||
|
||||
const resp = await this.fetchFromPath(path, labels);
|
||||
return await checkAndReturn<IoArgoprojWorkflowV1alpha1WorkflowTemplateList>(
|
||||
resp
|
||||
);
|
||||
}
|
||||
|
||||
async getFirstCluster(): Promise<string> {
|
||||
const clusters = await this.kubernetesApi.getClusters();
|
||||
if (clusters.length > 0) {
|
||||
return Promise.resolve(clusters[0].name);
|
||||
}
|
||||
return Promise.reject("no clusters found in configuration");
|
||||
}
|
||||
|
||||
async fetchFromPath(
|
||||
path: string,
|
||||
labels: string | undefined
|
||||
): Promise<Response> {
|
||||
const proxyUrl = await this.discoveryApi.getBaseUrl("proxy");
|
||||
const url = `${proxyUrl}${DEFAULT_WORKFLOW_PROXY}${path}`;
|
||||
const query = new URLSearchParams({ [API_TIMEOUT]: "30" });
|
||||
if (labels) {
|
||||
query.set(API_LABEL_SELECTOR, labels);
|
||||
}
|
||||
return this.fetchApi.fetch(`${url}?${query.toString()}`, {});
|
||||
}
|
||||
}
|
||||
|
||||
async function checkAndReturn<T>(resp: Response): Promise<T> {
|
||||
if (!resp.ok) {
|
||||
return Promise.reject(
|
||||
`failed to fetch resources: ${resp.status}, ${
|
||||
resp.statusText
|
||||
}, ${await resp.text()}`
|
||||
);
|
||||
}
|
||||
// need validation
|
||||
return Promise.resolve(JSON.parse(await resp.text()) as T);
|
||||
}
|
4
plugins/argo-workflows/src/api/generated/.gitignore
vendored
Normal file
4
plugins/argo-workflows/src/api/generated/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
|
@ -0,0 +1,23 @@
|
|||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# 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 OpenAPI Generator 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,397 @@
|
|||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
api.ts
|
||||
api/apis.ts
|
||||
api/archivedWorkflowServiceApi.ts
|
||||
api/artifactServiceApi.ts
|
||||
api/clusterWorkflowTemplateServiceApi.ts
|
||||
api/cronWorkflowServiceApi.ts
|
||||
api/eventServiceApi.ts
|
||||
api/eventSourceServiceApi.ts
|
||||
api/infoServiceApi.ts
|
||||
api/sensorServiceApi.ts
|
||||
api/workflowServiceApi.ts
|
||||
api/workflowTemplateServiceApi.ts
|
||||
git_push.sh
|
||||
model/eventsourceCreateEventSourceRequest.ts
|
||||
model/eventsourceEventSourceWatchEvent.ts
|
||||
model/eventsourceLogEntry.ts
|
||||
model/eventsourceUpdateEventSourceRequest.ts
|
||||
model/googleProtobufAny.ts
|
||||
model/grpcGatewayRuntimeError.ts
|
||||
model/grpcGatewayRuntimeStreamError.ts
|
||||
model/ioArgoprojEventsV1alpha1AMQPConsumeConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1AMQPEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1AMQPExchangeDeclareConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1AMQPQueueBindConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1AMQPQueueDeclareConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1AWSLambdaTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1Amount.ts
|
||||
model/ioArgoprojEventsV1alpha1ArgoWorkflowTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1ArtifactLocation.ts
|
||||
model/ioArgoprojEventsV1alpha1AzureEventHubsTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1AzureEventsHubEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1Backoff.ts
|
||||
model/ioArgoprojEventsV1alpha1BasicAuth.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketAuth.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketBasicAuth.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketRepository.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketServerEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1BitbucketServerRepository.ts
|
||||
model/ioArgoprojEventsV1alpha1CalendarEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1CatchupConfiguration.ts
|
||||
model/ioArgoprojEventsV1alpha1Condition.ts
|
||||
model/ioArgoprojEventsV1alpha1ConditionsResetByTime.ts
|
||||
model/ioArgoprojEventsV1alpha1ConditionsResetCriteria.ts
|
||||
model/ioArgoprojEventsV1alpha1ConfigMapPersistence.ts
|
||||
model/ioArgoprojEventsV1alpha1CustomTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1DataFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1EmitterEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1EventContext.ts
|
||||
model/ioArgoprojEventsV1alpha1EventDependency.ts
|
||||
model/ioArgoprojEventsV1alpha1EventDependencyFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1EventDependencyTransformer.ts
|
||||
model/ioArgoprojEventsV1alpha1EventPersistence.ts
|
||||
model/ioArgoprojEventsV1alpha1EventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1EventSourceFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1EventSourceList.ts
|
||||
model/ioArgoprojEventsV1alpha1EventSourceSpec.ts
|
||||
model/ioArgoprojEventsV1alpha1EventSourceStatus.ts
|
||||
model/ioArgoprojEventsV1alpha1ExprFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1FileArtifact.ts
|
||||
model/ioArgoprojEventsV1alpha1FileEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1GenericEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1GitArtifact.ts
|
||||
model/ioArgoprojEventsV1alpha1GitCreds.ts
|
||||
model/ioArgoprojEventsV1alpha1GitRemoteConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1GithubAppCreds.ts
|
||||
model/ioArgoprojEventsV1alpha1GithubEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1GitlabEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1HDFSEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1HTTPTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1Int64OrString.ts
|
||||
model/ioArgoprojEventsV1alpha1K8SResourcePolicy.ts
|
||||
model/ioArgoprojEventsV1alpha1KafkaConsumerGroup.ts
|
||||
model/ioArgoprojEventsV1alpha1KafkaEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1KafkaTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1LogTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1MQTTEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1Metadata.ts
|
||||
model/ioArgoprojEventsV1alpha1NATSAuth.ts
|
||||
model/ioArgoprojEventsV1alpha1NATSEventsSource.ts
|
||||
model/ioArgoprojEventsV1alpha1NATSTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1NSQEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1OpenWhiskTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1OwnedRepositories.ts
|
||||
model/ioArgoprojEventsV1alpha1PayloadField.ts
|
||||
model/ioArgoprojEventsV1alpha1PubSubEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1PulsarEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1PulsarTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1RateLimit.ts
|
||||
model/ioArgoprojEventsV1alpha1RedisEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1RedisStreamEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1Resource.ts
|
||||
model/ioArgoprojEventsV1alpha1ResourceEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1ResourceFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1S3Artifact.ts
|
||||
model/ioArgoprojEventsV1alpha1S3Bucket.ts
|
||||
model/ioArgoprojEventsV1alpha1S3Filter.ts
|
||||
model/ioArgoprojEventsV1alpha1SASLConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1SNSEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1SQSEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1SecureHeader.ts
|
||||
model/ioArgoprojEventsV1alpha1Selector.ts
|
||||
model/ioArgoprojEventsV1alpha1Sensor.ts
|
||||
model/ioArgoprojEventsV1alpha1SensorList.ts
|
||||
model/ioArgoprojEventsV1alpha1SensorSpec.ts
|
||||
model/ioArgoprojEventsV1alpha1SensorStatus.ts
|
||||
model/ioArgoprojEventsV1alpha1Service.ts
|
||||
model/ioArgoprojEventsV1alpha1SlackEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1SlackTrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1StandardK8STrigger.ts
|
||||
model/ioArgoprojEventsV1alpha1Status.ts
|
||||
model/ioArgoprojEventsV1alpha1StatusPolicy.ts
|
||||
model/ioArgoprojEventsV1alpha1StorageGridEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1StorageGridFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1StripeEventSource.ts
|
||||
model/ioArgoprojEventsV1alpha1TLSConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1Template.ts
|
||||
model/ioArgoprojEventsV1alpha1TimeFilter.ts
|
||||
model/ioArgoprojEventsV1alpha1Trigger.ts
|
||||
model/ioArgoprojEventsV1alpha1TriggerParameter.ts
|
||||
model/ioArgoprojEventsV1alpha1TriggerParameterSource.ts
|
||||
model/ioArgoprojEventsV1alpha1TriggerPolicy.ts
|
||||
model/ioArgoprojEventsV1alpha1TriggerTemplate.ts
|
||||
model/ioArgoprojEventsV1alpha1URLArtifact.ts
|
||||
model/ioArgoprojEventsV1alpha1ValueFromSource.ts
|
||||
model/ioArgoprojEventsV1alpha1WatchPathConfig.ts
|
||||
model/ioArgoprojEventsV1alpha1WebhookContext.ts
|
||||
model/ioArgoprojEventsV1alpha1WebhookEventSource.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArchiveStrategy.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Arguments.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtGCStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Artifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactGC.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactGCSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactGCStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactLocation.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactNodeSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactPaths.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactRepositoryRef.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactRepositoryRefStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactResult.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactResultNodeStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactoryArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ArtifactoryArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1AzureArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1AzureArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Backoff.ts
|
||||
model/ioArgoprojWorkflowV1alpha1BasicAuth.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Cache.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClientCertAuth.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CollectEventRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Column.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Condition.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ContainerNode.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ContainerSetRetryStrategy.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ContainerSetTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ContinueOn.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Counter.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CreateCronWorkflowRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CreateS3BucketOptions.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflow.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflowList.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflowResumeRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflowSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflowStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1CronWorkflowSuspendRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1DAGTask.ts
|
||||
model/ioArgoprojWorkflowV1alpha1DAGTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Data.ts
|
||||
model/ioArgoprojWorkflowV1alpha1DataSource.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Event.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ExecutorConfig.ts
|
||||
model/ioArgoprojWorkflowV1alpha1GCSArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1GCSArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Gauge.ts
|
||||
model/ioArgoprojWorkflowV1alpha1GetUserInfoResponse.ts
|
||||
model/ioArgoprojWorkflowV1alpha1GitArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HDFSArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HDFSArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTP.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTPArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTPAuth.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTPBodySource.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTPHeader.ts
|
||||
model/ioArgoprojWorkflowV1alpha1HTTPHeaderSource.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Header.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Histogram.ts
|
||||
model/ioArgoprojWorkflowV1alpha1InfoResponse.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Inputs.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LabelKeys.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LabelValueFrom.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LabelValues.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LifecycleHook.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Link.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LintCronWorkflowRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1LogEntry.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ManifestFrom.ts
|
||||
model/ioArgoprojWorkflowV1alpha1MemoizationStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Memoize.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Metadata.ts
|
||||
model/ioArgoprojWorkflowV1alpha1MetricLabel.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Metrics.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Mutex.ts
|
||||
model/ioArgoprojWorkflowV1alpha1MutexHolding.ts
|
||||
model/ioArgoprojWorkflowV1alpha1MutexStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1NodeResult.ts
|
||||
model/ioArgoprojWorkflowV1alpha1NodeStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1NodeSynchronizationStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1OAuth2Auth.ts
|
||||
model/ioArgoprojWorkflowV1alpha1OAuth2EndpointParam.ts
|
||||
model/ioArgoprojWorkflowV1alpha1OSSArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1OSSArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1OSSLifecycleRule.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Outputs.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Parameter.ts
|
||||
model/ioArgoprojWorkflowV1alpha1PodGC.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Prometheus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1RawArtifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ResourceTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ResubmitArchivedWorkflowRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1RetryAffinity.ts
|
||||
model/ioArgoprojWorkflowV1alpha1RetryArchivedWorkflowRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1RetryStrategy.ts
|
||||
model/ioArgoprojWorkflowV1alpha1S3Artifact.ts
|
||||
model/ioArgoprojWorkflowV1alpha1S3ArtifactRepository.ts
|
||||
model/ioArgoprojWorkflowV1alpha1S3EncryptionOptions.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ScriptTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SemaphoreHolding.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SemaphoreRef.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SemaphoreStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Sequence.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Submit.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SubmitOpts.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SuspendTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Synchronization.ts
|
||||
model/ioArgoprojWorkflowV1alpha1SynchronizationStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1TTLStrategy.ts
|
||||
model/ioArgoprojWorkflowV1alpha1TarStrategy.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Template.ts
|
||||
model/ioArgoprojWorkflowV1alpha1TemplateRef.ts
|
||||
model/ioArgoprojWorkflowV1alpha1TransformationStep.ts
|
||||
model/ioArgoprojWorkflowV1alpha1UpdateCronWorkflowRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1UserContainer.ts
|
||||
model/ioArgoprojWorkflowV1alpha1ValueFrom.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Version.ts
|
||||
model/ioArgoprojWorkflowV1alpha1VolumeClaimGC.ts
|
||||
model/ioArgoprojWorkflowV1alpha1Workflow.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowCreateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowEventBinding.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowEventBindingList.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowEventBindingSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowLevelArtifactGC.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowLintRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowList.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowMetadata.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowResubmitRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowResumeRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowRetryRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowSetRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowStep.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowStopRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowSubmitRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowSuspendRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTaskSetSpec.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTaskSetStatus.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplate.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplateCreateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplateLintRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplateList.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplateRef.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTemplateUpdateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowTerminateRequest.ts
|
||||
model/ioArgoprojWorkflowV1alpha1WorkflowWatchEvent.ts
|
||||
model/ioK8sApiCoreV1AWSElasticBlockStoreVolumeSource.ts
|
||||
model/ioK8sApiCoreV1Affinity.ts
|
||||
model/ioK8sApiCoreV1AzureDiskVolumeSource.ts
|
||||
model/ioK8sApiCoreV1AzureFileVolumeSource.ts
|
||||
model/ioK8sApiCoreV1CSIVolumeSource.ts
|
||||
model/ioK8sApiCoreV1Capabilities.ts
|
||||
model/ioK8sApiCoreV1CephFSVolumeSource.ts
|
||||
model/ioK8sApiCoreV1CinderVolumeSource.ts
|
||||
model/ioK8sApiCoreV1ConfigMapEnvSource.ts
|
||||
model/ioK8sApiCoreV1ConfigMapKeySelector.ts
|
||||
model/ioK8sApiCoreV1ConfigMapProjection.ts
|
||||
model/ioK8sApiCoreV1ConfigMapVolumeSource.ts
|
||||
model/ioK8sApiCoreV1Container.ts
|
||||
model/ioK8sApiCoreV1ContainerPort.ts
|
||||
model/ioK8sApiCoreV1DownwardAPIProjection.ts
|
||||
model/ioK8sApiCoreV1DownwardAPIVolumeFile.ts
|
||||
model/ioK8sApiCoreV1DownwardAPIVolumeSource.ts
|
||||
model/ioK8sApiCoreV1EmptyDirVolumeSource.ts
|
||||
model/ioK8sApiCoreV1EnvFromSource.ts
|
||||
model/ioK8sApiCoreV1EnvVar.ts
|
||||
model/ioK8sApiCoreV1EnvVarSource.ts
|
||||
model/ioK8sApiCoreV1EphemeralVolumeSource.ts
|
||||
model/ioK8sApiCoreV1Event.ts
|
||||
model/ioK8sApiCoreV1EventSeries.ts
|
||||
model/ioK8sApiCoreV1EventSource.ts
|
||||
model/ioK8sApiCoreV1ExecAction.ts
|
||||
model/ioK8sApiCoreV1FCVolumeSource.ts
|
||||
model/ioK8sApiCoreV1FlexVolumeSource.ts
|
||||
model/ioK8sApiCoreV1FlockerVolumeSource.ts
|
||||
model/ioK8sApiCoreV1GCEPersistentDiskVolumeSource.ts
|
||||
model/ioK8sApiCoreV1GRPCAction.ts
|
||||
model/ioK8sApiCoreV1GitRepoVolumeSource.ts
|
||||
model/ioK8sApiCoreV1GlusterfsVolumeSource.ts
|
||||
model/ioK8sApiCoreV1HTTPGetAction.ts
|
||||
model/ioK8sApiCoreV1HTTPHeader.ts
|
||||
model/ioK8sApiCoreV1HostAlias.ts
|
||||
model/ioK8sApiCoreV1HostPathVolumeSource.ts
|
||||
model/ioK8sApiCoreV1ISCSIVolumeSource.ts
|
||||
model/ioK8sApiCoreV1KeyToPath.ts
|
||||
model/ioK8sApiCoreV1Lifecycle.ts
|
||||
model/ioK8sApiCoreV1LifecycleHandler.ts
|
||||
model/ioK8sApiCoreV1LocalObjectReference.ts
|
||||
model/ioK8sApiCoreV1NFSVolumeSource.ts
|
||||
model/ioK8sApiCoreV1NodeAffinity.ts
|
||||
model/ioK8sApiCoreV1NodeSelector.ts
|
||||
model/ioK8sApiCoreV1NodeSelectorRequirement.ts
|
||||
model/ioK8sApiCoreV1NodeSelectorTerm.ts
|
||||
model/ioK8sApiCoreV1ObjectFieldSelector.ts
|
||||
model/ioK8sApiCoreV1ObjectReference.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaim.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaimCondition.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaimSpec.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaimStatus.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaimTemplate.ts
|
||||
model/ioK8sApiCoreV1PersistentVolumeClaimVolumeSource.ts
|
||||
model/ioK8sApiCoreV1PhotonPersistentDiskVolumeSource.ts
|
||||
model/ioK8sApiCoreV1PodAffinity.ts
|
||||
model/ioK8sApiCoreV1PodAffinityTerm.ts
|
||||
model/ioK8sApiCoreV1PodAntiAffinity.ts
|
||||
model/ioK8sApiCoreV1PodDNSConfig.ts
|
||||
model/ioK8sApiCoreV1PodDNSConfigOption.ts
|
||||
model/ioK8sApiCoreV1PodSecurityContext.ts
|
||||
model/ioK8sApiCoreV1PortworxVolumeSource.ts
|
||||
model/ioK8sApiCoreV1PreferredSchedulingTerm.ts
|
||||
model/ioK8sApiCoreV1Probe.ts
|
||||
model/ioK8sApiCoreV1ProjectedVolumeSource.ts
|
||||
model/ioK8sApiCoreV1QuobyteVolumeSource.ts
|
||||
model/ioK8sApiCoreV1RBDVolumeSource.ts
|
||||
model/ioK8sApiCoreV1ResourceFieldSelector.ts
|
||||
model/ioK8sApiCoreV1ResourceRequirements.ts
|
||||
model/ioK8sApiCoreV1SELinuxOptions.ts
|
||||
model/ioK8sApiCoreV1ScaleIOVolumeSource.ts
|
||||
model/ioK8sApiCoreV1SeccompProfile.ts
|
||||
model/ioK8sApiCoreV1SecretEnvSource.ts
|
||||
model/ioK8sApiCoreV1SecretKeySelector.ts
|
||||
model/ioK8sApiCoreV1SecretProjection.ts
|
||||
model/ioK8sApiCoreV1SecretVolumeSource.ts
|
||||
model/ioK8sApiCoreV1SecurityContext.ts
|
||||
model/ioK8sApiCoreV1ServiceAccountTokenProjection.ts
|
||||
model/ioK8sApiCoreV1ServicePort.ts
|
||||
model/ioK8sApiCoreV1StorageOSVolumeSource.ts
|
||||
model/ioK8sApiCoreV1Sysctl.ts
|
||||
model/ioK8sApiCoreV1TCPSocketAction.ts
|
||||
model/ioK8sApiCoreV1Toleration.ts
|
||||
model/ioK8sApiCoreV1TypedLocalObjectReference.ts
|
||||
model/ioK8sApiCoreV1Volume.ts
|
||||
model/ioK8sApiCoreV1VolumeDevice.ts
|
||||
model/ioK8sApiCoreV1VolumeMount.ts
|
||||
model/ioK8sApiCoreV1VolumeProjection.ts
|
||||
model/ioK8sApiCoreV1VsphereVirtualDiskVolumeSource.ts
|
||||
model/ioK8sApiCoreV1WeightedPodAffinityTerm.ts
|
||||
model/ioK8sApiCoreV1WindowsSecurityContextOptions.ts
|
||||
model/ioK8sApiPolicyV1PodDisruptionBudgetSpec.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1CreateOptions.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1GroupVersionResource.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1LabelSelector.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1LabelSelectorRequirement.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1ListMeta.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1ManagedFieldsEntry.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1ObjectMeta.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1OwnerReference.ts
|
||||
model/ioK8sApimachineryPkgApisMetaV1StatusCause.ts
|
||||
model/models.ts
|
||||
model/sensorCreateSensorRequest.ts
|
||||
model/sensorLogEntry.ts
|
||||
model/sensorSensorWatchEvent.ts
|
||||
model/sensorUpdateSensorRequest.ts
|
||||
model/streamResultOfEventsourceEventSourceWatchEvent.ts
|
||||
model/streamResultOfEventsourceLogEntry.ts
|
||||
model/streamResultOfIoArgoprojWorkflowV1alpha1LogEntry.ts
|
||||
model/streamResultOfIoArgoprojWorkflowV1alpha1WorkflowWatchEvent.ts
|
||||
model/streamResultOfIoK8sApiCoreV1Event.ts
|
||||
model/streamResultOfSensorLogEntry.ts
|
||||
model/streamResultOfSensorSensorWatchEvent.ts
|
|
@ -0,0 +1 @@
|
|||
6.6.0
|
3
plugins/argo-workflows/src/api/generated/api.ts
Normal file
3
plugins/argo-workflows/src/api/generated/api.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
// This is the entrypoint for the package
|
||||
export * from './api/apis';
|
||||
export * from './model/models';
|
33
plugins/argo-workflows/src/api/generated/api/apis.ts
Normal file
33
plugins/argo-workflows/src/api/generated/api/apis.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
// @ts-nocheck
|
||||
export * from './archivedWorkflowServiceApi';
|
||||
import { ArchivedWorkflowServiceApi } from './archivedWorkflowServiceApi';
|
||||
export * from './artifactServiceApi';
|
||||
import { ArtifactServiceApi } from './artifactServiceApi';
|
||||
export * from './clusterWorkflowTemplateServiceApi';
|
||||
import { ClusterWorkflowTemplateServiceApi } from './clusterWorkflowTemplateServiceApi';
|
||||
export * from './cronWorkflowServiceApi';
|
||||
import { CronWorkflowServiceApi } from './cronWorkflowServiceApi';
|
||||
export * from './eventServiceApi';
|
||||
import { EventServiceApi } from './eventServiceApi';
|
||||
export * from './eventSourceServiceApi';
|
||||
import { EventSourceServiceApi } from './eventSourceServiceApi';
|
||||
export * from './infoServiceApi';
|
||||
import { InfoServiceApi } from './infoServiceApi';
|
||||
export * from './sensorServiceApi';
|
||||
import { SensorServiceApi } from './sensorServiceApi';
|
||||
export * from './workflowServiceApi';
|
||||
import { WorkflowServiceApi } from './workflowServiceApi';
|
||||
export * from './workflowTemplateServiceApi';
|
||||
import { WorkflowTemplateServiceApi } from './workflowTemplateServiceApi';
|
||||
import * as http from 'http';
|
||||
|
||||
export class HttpError extends Error {
|
||||
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
|
||||
super('HTTP request failed');
|
||||
this.name = 'HttpError';
|
||||
}
|
||||
}
|
||||
|
||||
export { RequestFile } from '../model/models';
|
||||
|
||||
export const APIS = [ArchivedWorkflowServiceApi, ArtifactServiceApi, ClusterWorkflowTemplateServiceApi, CronWorkflowServiceApi, EventServiceApi, EventSourceServiceApi, InfoServiceApi, SensorServiceApi, WorkflowServiceApi, WorkflowTemplateServiceApi];
|
|
@ -0,0 +1,714 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1LabelKeys } from '../model/ioArgoprojWorkflowV1alpha1LabelKeys';
|
||||
import { IoArgoprojWorkflowV1alpha1LabelValues } from '../model/ioArgoprojWorkflowV1alpha1LabelValues';
|
||||
import { IoArgoprojWorkflowV1alpha1ResubmitArchivedWorkflowRequest } from '../model/ioArgoprojWorkflowV1alpha1ResubmitArchivedWorkflowRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1RetryArchivedWorkflowRequest } from '../model/ioArgoprojWorkflowV1alpha1RetryArchivedWorkflowRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1Workflow } from '../model/ioArgoprojWorkflowV1alpha1Workflow';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowList } from '../model/ioArgoprojWorkflowV1alpha1WorkflowList';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ArchivedWorkflowServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class ArchivedWorkflowServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ArchivedWorkflowServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ArchivedWorkflowServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uid
|
||||
* @param namespace
|
||||
*/
|
||||
public async archivedWorkflowServiceDeleteArchivedWorkflow (uid: string, namespace?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows/{uid}'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling archivedWorkflowServiceDeleteArchivedWorkflow.');
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameters['namespace'] = ObjectSerializer.serialize(namespace, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param uid
|
||||
* @param namespace
|
||||
* @param name
|
||||
*/
|
||||
public async archivedWorkflowServiceGetArchivedWorkflow (uid: string, namespace?: string, name?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows/{uid}'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling archivedWorkflowServiceGetArchivedWorkflow.');
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameters['namespace'] = ObjectSerializer.serialize(namespace, "string");
|
||||
}
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1Workflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
*/
|
||||
public async archivedWorkflowServiceListArchivedWorkflowLabelKeys (namespace?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1LabelKeys; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows-label-keys';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameters['namespace'] = ObjectSerializer.serialize(namespace, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1LabelKeys; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1LabelKeys");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
* @param namespace
|
||||
*/
|
||||
public async archivedWorkflowServiceListArchivedWorkflowLabelValues (listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, namespace?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1LabelValues; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows-label-values';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameters['namespace'] = ObjectSerializer.serialize(namespace, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1LabelValues; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1LabelValues");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
* @param namePrefix
|
||||
* @param namespace
|
||||
*/
|
||||
public async archivedWorkflowServiceListArchivedWorkflows (listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, namePrefix?: string, namespace?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
if (namePrefix !== undefined) {
|
||||
localVarQueryParameters['namePrefix'] = ObjectSerializer.serialize(namePrefix, "string");
|
||||
}
|
||||
|
||||
if (namespace !== undefined) {
|
||||
localVarQueryParameters['namespace'] = ObjectSerializer.serialize(namespace, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param uid
|
||||
* @param body
|
||||
*/
|
||||
public async archivedWorkflowServiceResubmitArchivedWorkflow (uid: string, body: IoArgoprojWorkflowV1alpha1ResubmitArchivedWorkflowRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows/{uid}/resubmit'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling archivedWorkflowServiceResubmitArchivedWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling archivedWorkflowServiceResubmitArchivedWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1ResubmitArchivedWorkflowRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1Workflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param uid
|
||||
* @param body
|
||||
*/
|
||||
public async archivedWorkflowServiceRetryArchivedWorkflow (uid: string, body: IoArgoprojWorkflowV1alpha1RetryArchivedWorkflowRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/archived-workflows/{uid}/retry'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling archivedWorkflowServiceRetryArchivedWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling archivedWorkflowServiceRetryArchivedWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1RetryArchivedWorkflowRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Workflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1Workflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,558 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ArtifactServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class ArtifactServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ArtifactServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ArtifactServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get an artifact.
|
||||
* @param namespace
|
||||
* @param idDiscriminator
|
||||
* @param id
|
||||
* @param nodeId
|
||||
* @param artifactName
|
||||
* @param artifactDiscriminator
|
||||
*/
|
||||
public async artifactServiceGetArtifactFile (namespace: string, idDiscriminator: 'workflow' | 'archived-workflows ', id: string, nodeId: string, artifactName: string, artifactDiscriminator: 'outputs', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/artifact-files/{namespace}/{idDiscriminator}/{id}/{nodeId}/{artifactDiscriminator}/{artifactName}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'idDiscriminator' + '}', encodeURIComponent(String(idDiscriminator)))
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
||||
.replace('{' + 'nodeId' + '}', encodeURIComponent(String(nodeId)))
|
||||
.replace('{' + 'artifactName' + '}', encodeURIComponent(String(artifactName)))
|
||||
.replace('{' + 'artifactDiscriminator' + '}', encodeURIComponent(String(artifactDiscriminator)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
// verify required parameter 'idDiscriminator' is not null or undefined
|
||||
if (idDiscriminator === null || idDiscriminator === undefined) {
|
||||
throw new Error('Required parameter idDiscriminator was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
// verify required parameter 'nodeId' is not null or undefined
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
throw new Error('Required parameter nodeId was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactName' is not null or undefined
|
||||
if (artifactName === null || artifactName === undefined) {
|
||||
throw new Error('Required parameter artifactName was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactDiscriminator' is not null or undefined
|
||||
if (artifactDiscriminator === null || artifactDiscriminator === undefined) {
|
||||
throw new Error('Required parameter artifactDiscriminator was null or undefined when calling artifactServiceGetArtifactFile.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get an input artifact.
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param nodeId
|
||||
* @param artifactName
|
||||
*/
|
||||
public async artifactServiceGetInputArtifact (namespace: string, name: string, nodeId: string, artifactName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/input-artifacts/{namespace}/{name}/{nodeId}/{artifactName}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
|
||||
.replace('{' + 'nodeId' + '}', encodeURIComponent(String(nodeId)))
|
||||
.replace('{' + 'artifactName' + '}', encodeURIComponent(String(artifactName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling artifactServiceGetInputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling artifactServiceGetInputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'nodeId' is not null or undefined
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
throw new Error('Required parameter nodeId was null or undefined when calling artifactServiceGetInputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactName' is not null or undefined
|
||||
if (artifactName === null || artifactName === undefined) {
|
||||
throw new Error('Required parameter artifactName was null or undefined when calling artifactServiceGetInputArtifact.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get an input artifact by UID.
|
||||
* @param uid
|
||||
* @param nodeId
|
||||
* @param artifactName
|
||||
*/
|
||||
public async artifactServiceGetInputArtifactByUID (uid: string, nodeId: string, artifactName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/input-artifacts-by-uid/{uid}/{nodeId}/{artifactName}'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)))
|
||||
.replace('{' + 'nodeId' + '}', encodeURIComponent(String(nodeId)))
|
||||
.replace('{' + 'artifactName' + '}', encodeURIComponent(String(artifactName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling artifactServiceGetInputArtifactByUID.');
|
||||
}
|
||||
|
||||
// verify required parameter 'nodeId' is not null or undefined
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
throw new Error('Required parameter nodeId was null or undefined when calling artifactServiceGetInputArtifactByUID.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactName' is not null or undefined
|
||||
if (artifactName === null || artifactName === undefined) {
|
||||
throw new Error('Required parameter artifactName was null or undefined when calling artifactServiceGetInputArtifactByUID.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get an output artifact.
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param nodeId
|
||||
* @param artifactName
|
||||
*/
|
||||
public async artifactServiceGetOutputArtifact (namespace: string, name: string, nodeId: string, artifactName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/artifacts/{namespace}/{name}/{nodeId}/{artifactName}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
|
||||
.replace('{' + 'nodeId' + '}', encodeURIComponent(String(nodeId)))
|
||||
.replace('{' + 'artifactName' + '}', encodeURIComponent(String(artifactName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling artifactServiceGetOutputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling artifactServiceGetOutputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'nodeId' is not null or undefined
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
throw new Error('Required parameter nodeId was null or undefined when calling artifactServiceGetOutputArtifact.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactName' is not null or undefined
|
||||
if (artifactName === null || artifactName === undefined) {
|
||||
throw new Error('Required parameter artifactName was null or undefined when calling artifactServiceGetOutputArtifact.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get an output artifact by UID.
|
||||
* @param uid
|
||||
* @param nodeId
|
||||
* @param artifactName
|
||||
*/
|
||||
public async artifactServiceGetOutputArtifactByUID (uid: string, nodeId: string, artifactName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/artifacts-by-uid/{uid}/{nodeId}/{artifactName}'
|
||||
.replace('{' + 'uid' + '}', encodeURIComponent(String(uid)))
|
||||
.replace('{' + 'nodeId' + '}', encodeURIComponent(String(nodeId)))
|
||||
.replace('{' + 'artifactName' + '}', encodeURIComponent(String(artifactName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'uid' is not null or undefined
|
||||
if (uid === null || uid === undefined) {
|
||||
throw new Error('Required parameter uid was null or undefined when calling artifactServiceGetOutputArtifactByUID.');
|
||||
}
|
||||
|
||||
// verify required parameter 'nodeId' is not null or undefined
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
throw new Error('Required parameter nodeId was null or undefined when calling artifactServiceGetOutputArtifactByUID.');
|
||||
}
|
||||
|
||||
// verify required parameter 'artifactName' is not null or undefined
|
||||
if (artifactName === null || artifactName === undefined) {
|
||||
throw new Error('Required parameter artifactName was null or undefined when calling artifactServiceGetOutputArtifactByUID.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,604 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate } from '../model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplate';
|
||||
import { IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest } from '../model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest } from '../model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList } from '../model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList';
|
||||
import { IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest } from '../model/ioArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ClusterWorkflowTemplateServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class ClusterWorkflowTemplateServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ClusterWorkflowTemplateServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ClusterWorkflowTemplateServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceCreateClusterWorkflowTemplate (body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling clusterWorkflowTemplateServiceCreateClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
* @param deleteOptionsGracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. +optional.
|
||||
* @param deleteOptionsPreconditionsUid Specifies the target UID. +optional.
|
||||
* @param deleteOptionsPreconditionsResourceVersion Specifies the target ResourceVersion +optional.
|
||||
* @param deleteOptionsOrphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. +optional.
|
||||
* @param deleteOptionsPropagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. +optional.
|
||||
* @param deleteOptionsDryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed +optional.
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceDeleteClusterWorkflowTemplate (name: string, deleteOptionsGracePeriodSeconds?: string, deleteOptionsPreconditionsUid?: string, deleteOptionsPreconditionsResourceVersion?: string, deleteOptionsOrphanDependents?: boolean, deleteOptionsPropagationPolicy?: string, deleteOptionsDryRun?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling clusterWorkflowTemplateServiceDeleteClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
if (deleteOptionsGracePeriodSeconds !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.gracePeriodSeconds'] = ObjectSerializer.serialize(deleteOptionsGracePeriodSeconds, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsUid !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.uid'] = ObjectSerializer.serialize(deleteOptionsPreconditionsUid, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.resourceVersion'] = ObjectSerializer.serialize(deleteOptionsPreconditionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsOrphanDependents !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.orphanDependents'] = ObjectSerializer.serialize(deleteOptionsOrphanDependents, "boolean");
|
||||
}
|
||||
|
||||
if (deleteOptionsPropagationPolicy !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.propagationPolicy'] = ObjectSerializer.serialize(deleteOptionsPropagationPolicy, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsDryRun !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.dryRun'] = ObjectSerializer.serialize(deleteOptionsDryRun, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
* @param getOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceGetClusterWorkflowTemplate (name: string, getOptionsResourceVersion?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling clusterWorkflowTemplateServiceGetClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
if (getOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['getOptions.resourceVersion'] = ObjectSerializer.serialize(getOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceLintClusterWorkflowTemplate (body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates/lint';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling clusterWorkflowTemplateServiceLintClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceListClusterWorkflowTemplates (listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name DEPRECATED: This field is ignored.
|
||||
* @param body
|
||||
*/
|
||||
public async clusterWorkflowTemplateServiceUpdateClusterWorkflowTemplate (name: string, body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cluster-workflow-templates/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling clusterWorkflowTemplateServiceUpdateClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling clusterWorkflowTemplateServiceUpdateClusterWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,818 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1CreateCronWorkflowRequest } from '../model/ioArgoprojWorkflowV1alpha1CreateCronWorkflowRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1CronWorkflow } from '../model/ioArgoprojWorkflowV1alpha1CronWorkflow';
|
||||
import { IoArgoprojWorkflowV1alpha1CronWorkflowList } from '../model/ioArgoprojWorkflowV1alpha1CronWorkflowList';
|
||||
import { IoArgoprojWorkflowV1alpha1CronWorkflowResumeRequest } from '../model/ioArgoprojWorkflowV1alpha1CronWorkflowResumeRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1CronWorkflowSuspendRequest } from '../model/ioArgoprojWorkflowV1alpha1CronWorkflowSuspendRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1LintCronWorkflowRequest } from '../model/ioArgoprojWorkflowV1alpha1LintCronWorkflowRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1UpdateCronWorkflowRequest } from '../model/ioArgoprojWorkflowV1alpha1UpdateCronWorkflowRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum CronWorkflowServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class CronWorkflowServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: CronWorkflowServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[CronWorkflowServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async cronWorkflowServiceCreateCronWorkflow (namespace: string, body: IoArgoprojWorkflowV1alpha1CreateCronWorkflowRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceCreateCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling cronWorkflowServiceCreateCronWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1CreateCronWorkflowRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param deleteOptionsGracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. +optional.
|
||||
* @param deleteOptionsPreconditionsUid Specifies the target UID. +optional.
|
||||
* @param deleteOptionsPreconditionsResourceVersion Specifies the target ResourceVersion +optional.
|
||||
* @param deleteOptionsOrphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. +optional.
|
||||
* @param deleteOptionsPropagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. +optional.
|
||||
* @param deleteOptionsDryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed +optional.
|
||||
*/
|
||||
public async cronWorkflowServiceDeleteCronWorkflow (namespace: string, name: string, deleteOptionsGracePeriodSeconds?: string, deleteOptionsPreconditionsUid?: string, deleteOptionsPreconditionsResourceVersion?: string, deleteOptionsOrphanDependents?: boolean, deleteOptionsPropagationPolicy?: string, deleteOptionsDryRun?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceDeleteCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling cronWorkflowServiceDeleteCronWorkflow.');
|
||||
}
|
||||
|
||||
if (deleteOptionsGracePeriodSeconds !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.gracePeriodSeconds'] = ObjectSerializer.serialize(deleteOptionsGracePeriodSeconds, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsUid !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.uid'] = ObjectSerializer.serialize(deleteOptionsPreconditionsUid, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.resourceVersion'] = ObjectSerializer.serialize(deleteOptionsPreconditionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsOrphanDependents !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.orphanDependents'] = ObjectSerializer.serialize(deleteOptionsOrphanDependents, "boolean");
|
||||
}
|
||||
|
||||
if (deleteOptionsPropagationPolicy !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.propagationPolicy'] = ObjectSerializer.serialize(deleteOptionsPropagationPolicy, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsDryRun !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.dryRun'] = ObjectSerializer.serialize(deleteOptionsDryRun, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param getOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
*/
|
||||
public async cronWorkflowServiceGetCronWorkflow (namespace: string, name: string, getOptionsResourceVersion?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceGetCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling cronWorkflowServiceGetCronWorkflow.');
|
||||
}
|
||||
|
||||
if (getOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['getOptions.resourceVersion'] = ObjectSerializer.serialize(getOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async cronWorkflowServiceLintCronWorkflow (namespace: string, body: IoArgoprojWorkflowV1alpha1LintCronWorkflowRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/lint'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceLintCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling cronWorkflowServiceLintCronWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1LintCronWorkflowRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async cronWorkflowServiceListCronWorkflows (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflowList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceListCronWorkflows.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflowList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflowList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param body
|
||||
*/
|
||||
public async cronWorkflowServiceResumeCronWorkflow (namespace: string, name: string, body: IoArgoprojWorkflowV1alpha1CronWorkflowResumeRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/{name}/resume'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceResumeCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling cronWorkflowServiceResumeCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling cronWorkflowServiceResumeCronWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflowResumeRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param body
|
||||
*/
|
||||
public async cronWorkflowServiceSuspendCronWorkflow (namespace: string, name: string, body: IoArgoprojWorkflowV1alpha1CronWorkflowSuspendRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/{name}/suspend'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceSuspendCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling cronWorkflowServiceSuspendCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling cronWorkflowServiceSuspendCronWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflowSuspendRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name DEPRECATED: This field is ignored.
|
||||
* @param body
|
||||
*/
|
||||
public async cronWorkflowServiceUpdateCronWorkflow (namespace: string, name: string, body: IoArgoprojWorkflowV1alpha1UpdateCronWorkflowRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/cron-workflows/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling cronWorkflowServiceUpdateCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling cronWorkflowServiceUpdateCronWorkflow.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling cronWorkflowServiceUpdateCronWorkflow.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1UpdateCronWorkflowRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1CronWorkflow; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1CronWorkflow");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
295
plugins/argo-workflows/src/api/generated/api/eventServiceApi.ts
Normal file
295
plugins/argo-workflows/src/api/generated/api/eventServiceApi.ts
Normal file
|
@ -0,0 +1,295 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowEventBindingList } from '../model/ioArgoprojWorkflowV1alpha1WorkflowEventBindingList';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum EventServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class EventServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: EventServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[EventServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async eventServiceListWorkflowEventBindings (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowEventBindingList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-event-bindings/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventServiceListWorkflowEventBindings.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowEventBindingList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowEventBindingList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace The namespace for the io.argoproj.workflow.v1alpha1. This can be empty if the client has cluster scoped permissions. If empty, then the event is \"broadcast\" to workflow event binding in all namespaces.
|
||||
* @param discriminator Optional discriminator for the io.argoproj.workflow.v1alpha1. This should almost always be empty. Used for edge-cases where the event payload alone is not provide enough information to discriminate the event. This MUST NOT be used as security mechanism, e.g. to allow two clients to use the same access token, or to support webhooks on unsecured server. Instead, use access tokens. This is made available as `discriminator` in the event binding selector (`/spec/event/selector)`
|
||||
* @param body The event itself can be any data.
|
||||
*/
|
||||
public async eventServiceReceiveEvent (namespace: string, discriminator: string, body: object, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/events/{namespace}/{discriminator}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'discriminator' + '}', encodeURIComponent(String(discriminator)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventServiceReceiveEvent.');
|
||||
}
|
||||
|
||||
// verify required parameter 'discriminator' is not null or undefined
|
||||
if (discriminator === null || discriminator === undefined) {
|
||||
throw new Error('Required parameter discriminator was null or undefined when calling eventServiceReceiveEvent.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling eventServiceReceiveEvent.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "object")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,821 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { EventsourceCreateEventSourceRequest } from '../model/eventsourceCreateEventSourceRequest';
|
||||
import { EventsourceUpdateEventSourceRequest } from '../model/eventsourceUpdateEventSourceRequest';
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojEventsV1alpha1EventSource } from '../model/ioArgoprojEventsV1alpha1EventSource';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceList } from '../model/ioArgoprojEventsV1alpha1EventSourceList';
|
||||
import { StreamResultOfEventsourceEventSourceWatchEvent } from '../model/streamResultOfEventsourceEventSourceWatchEvent';
|
||||
import { StreamResultOfEventsourceLogEntry } from '../model/streamResultOfEventsourceLogEntry';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum EventSourceServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class EventSourceServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: EventSourceServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[EventSourceServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async eventSourceServiceCreateEventSource (namespace: string, body: EventsourceCreateEventSourceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/event-sources/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceCreateEventSource.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling eventSourceServiceCreateEventSource.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "EventsourceCreateEventSourceRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1EventSource");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param deleteOptionsGracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. +optional.
|
||||
* @param deleteOptionsPreconditionsUid Specifies the target UID. +optional.
|
||||
* @param deleteOptionsPreconditionsResourceVersion Specifies the target ResourceVersion +optional.
|
||||
* @param deleteOptionsOrphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. +optional.
|
||||
* @param deleteOptionsPropagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. +optional.
|
||||
* @param deleteOptionsDryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed +optional.
|
||||
*/
|
||||
public async eventSourceServiceDeleteEventSource (namespace: string, name: string, deleteOptionsGracePeriodSeconds?: string, deleteOptionsPreconditionsUid?: string, deleteOptionsPreconditionsResourceVersion?: string, deleteOptionsOrphanDependents?: boolean, deleteOptionsPropagationPolicy?: string, deleteOptionsDryRun?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/event-sources/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceDeleteEventSource.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling eventSourceServiceDeleteEventSource.');
|
||||
}
|
||||
|
||||
if (deleteOptionsGracePeriodSeconds !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.gracePeriodSeconds'] = ObjectSerializer.serialize(deleteOptionsGracePeriodSeconds, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsUid !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.uid'] = ObjectSerializer.serialize(deleteOptionsPreconditionsUid, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.resourceVersion'] = ObjectSerializer.serialize(deleteOptionsPreconditionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsOrphanDependents !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.orphanDependents'] = ObjectSerializer.serialize(deleteOptionsOrphanDependents, "boolean");
|
||||
}
|
||||
|
||||
if (deleteOptionsPropagationPolicy !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.propagationPolicy'] = ObjectSerializer.serialize(deleteOptionsPropagationPolicy, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsDryRun !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.dryRun'] = ObjectSerializer.serialize(deleteOptionsDryRun, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name optional - only return entries for this event source.
|
||||
* @param eventSourceType optional - only return entries for this event source type (e.g. `webhook`).
|
||||
* @param eventName optional - only return entries for this event name (e.g. `example`).
|
||||
* @param grep optional - only return entries where `msg` matches this regular expression.
|
||||
* @param podLogOptionsContainer The container for which to stream logs. Defaults to only container if there is one container in the pod. +optional.
|
||||
* @param podLogOptionsFollow Follow the log stream of the pod. Defaults to false. +optional.
|
||||
* @param podLogOptionsPrevious Return previous terminated container logs. Defaults to false. +optional.
|
||||
* @param podLogOptionsSinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. +optional.
|
||||
* @param podLogOptionsSinceTimeSeconds Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
|
||||
* @param podLogOptionsSinceTimeNanos Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
|
||||
* @param podLogOptionsTimestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. +optional.
|
||||
* @param podLogOptionsTailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime +optional.
|
||||
* @param podLogOptionsLimitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. +optional.
|
||||
* @param podLogOptionsInsecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). +optional.
|
||||
*/
|
||||
public async eventSourceServiceEventSourcesLogs (namespace: string, name?: string, eventSourceType?: string, eventName?: string, grep?: string, podLogOptionsContainer?: string, podLogOptionsFollow?: boolean, podLogOptionsPrevious?: boolean, podLogOptionsSinceSeconds?: string, podLogOptionsSinceTimeSeconds?: string, podLogOptionsSinceTimeNanos?: number, podLogOptionsTimestamps?: boolean, podLogOptionsTailLines?: string, podLogOptionsLimitBytes?: string, podLogOptionsInsecureSkipTLSVerifyBackend?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StreamResultOfEventsourceLogEntry; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/stream/event-sources/{namespace}/logs'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceEventSourcesLogs.');
|
||||
}
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (eventSourceType !== undefined) {
|
||||
localVarQueryParameters['eventSourceType'] = ObjectSerializer.serialize(eventSourceType, "string");
|
||||
}
|
||||
|
||||
if (eventName !== undefined) {
|
||||
localVarQueryParameters['eventName'] = ObjectSerializer.serialize(eventName, "string");
|
||||
}
|
||||
|
||||
if (grep !== undefined) {
|
||||
localVarQueryParameters['grep'] = ObjectSerializer.serialize(grep, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsContainer !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.container'] = ObjectSerializer.serialize(podLogOptionsContainer, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsFollow !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.follow'] = ObjectSerializer.serialize(podLogOptionsFollow, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsPrevious !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.previous'] = ObjectSerializer.serialize(podLogOptionsPrevious, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceSeconds !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceSeconds'] = ObjectSerializer.serialize(podLogOptionsSinceSeconds, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceTimeSeconds !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceTime.seconds'] = ObjectSerializer.serialize(podLogOptionsSinceTimeSeconds, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceTimeNanos !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceTime.nanos'] = ObjectSerializer.serialize(podLogOptionsSinceTimeNanos, "number");
|
||||
}
|
||||
|
||||
if (podLogOptionsTimestamps !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.timestamps'] = ObjectSerializer.serialize(podLogOptionsTimestamps, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsTailLines !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.tailLines'] = ObjectSerializer.serialize(podLogOptionsTailLines, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsLimitBytes !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.limitBytes'] = ObjectSerializer.serialize(podLogOptionsLimitBytes, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsInsecureSkipTLSVerifyBackend !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.insecureSkipTLSVerifyBackend'] = ObjectSerializer.serialize(podLogOptionsInsecureSkipTLSVerifyBackend, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StreamResultOfEventsourceLogEntry; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StreamResultOfEventsourceLogEntry");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
*/
|
||||
public async eventSourceServiceGetEventSource (namespace: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/event-sources/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceGetEventSource.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling eventSourceServiceGetEventSource.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1EventSource");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async eventSourceServiceListEventSources (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSourceList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/event-sources/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceListEventSources.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSourceList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1EventSourceList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param body
|
||||
*/
|
||||
public async eventSourceServiceUpdateEventSource (namespace: string, name: string, body: EventsourceUpdateEventSourceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/event-sources/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceUpdateEventSource.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling eventSourceServiceUpdateEventSource.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling eventSourceServiceUpdateEventSource.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "EventsourceUpdateEventSourceRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1EventSource; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1EventSource");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async eventSourceServiceWatchEventSources (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StreamResultOfEventsourceEventSourceWatchEvent; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/stream/event-sources/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling eventSourceServiceWatchEventSources.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StreamResultOfEventsourceEventSourceWatchEvent; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StreamResultOfEventsourceEventSourceWatchEvent");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
360
plugins/argo-workflows/src/api/generated/api/infoServiceApi.ts
Normal file
360
plugins/argo-workflows/src/api/generated/api/infoServiceApi.ts
Normal file
|
@ -0,0 +1,360 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1CollectEventRequest } from '../model/ioArgoprojWorkflowV1alpha1CollectEventRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1GetUserInfoResponse } from '../model/ioArgoprojWorkflowV1alpha1GetUserInfoResponse';
|
||||
import { IoArgoprojWorkflowV1alpha1InfoResponse } from '../model/ioArgoprojWorkflowV1alpha1InfoResponse';
|
||||
import { IoArgoprojWorkflowV1alpha1Version } from '../model/ioArgoprojWorkflowV1alpha1Version';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum InfoServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class InfoServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: InfoServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[InfoServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async infoServiceCollectEvent (body: IoArgoprojWorkflowV1alpha1CollectEventRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/tracking/event';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling infoServiceCollectEvent.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1CollectEventRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public async infoServiceGetInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1InfoResponse; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/info';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1InfoResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1InfoResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public async infoServiceGetUserInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1GetUserInfoResponse; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/userinfo';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1GetUserInfoResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1GetUserInfoResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public async infoServiceGetVersion (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Version; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/version';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1Version; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1Version");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
821
plugins/argo-workflows/src/api/generated/api/sensorServiceApi.ts
Normal file
821
plugins/argo-workflows/src/api/generated/api/sensorServiceApi.ts
Normal file
|
@ -0,0 +1,821 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojEventsV1alpha1Sensor } from '../model/ioArgoprojEventsV1alpha1Sensor';
|
||||
import { IoArgoprojEventsV1alpha1SensorList } from '../model/ioArgoprojEventsV1alpha1SensorList';
|
||||
import { SensorCreateSensorRequest } from '../model/sensorCreateSensorRequest';
|
||||
import { SensorUpdateSensorRequest } from '../model/sensorUpdateSensorRequest';
|
||||
import { StreamResultOfSensorLogEntry } from '../model/streamResultOfSensorLogEntry';
|
||||
import { StreamResultOfSensorSensorWatchEvent } from '../model/streamResultOfSensorSensorWatchEvent';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum SensorServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class SensorServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: SensorServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[SensorServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async sensorServiceCreateSensor (namespace: string, body: SensorCreateSensorRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/sensors/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceCreateSensor.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling sensorServiceCreateSensor.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "SensorCreateSensorRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1Sensor");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param deleteOptionsGracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. +optional.
|
||||
* @param deleteOptionsPreconditionsUid Specifies the target UID. +optional.
|
||||
* @param deleteOptionsPreconditionsResourceVersion Specifies the target ResourceVersion +optional.
|
||||
* @param deleteOptionsOrphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. +optional.
|
||||
* @param deleteOptionsPropagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. +optional.
|
||||
* @param deleteOptionsDryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed +optional.
|
||||
*/
|
||||
public async sensorServiceDeleteSensor (namespace: string, name: string, deleteOptionsGracePeriodSeconds?: string, deleteOptionsPreconditionsUid?: string, deleteOptionsPreconditionsResourceVersion?: string, deleteOptionsOrphanDependents?: boolean, deleteOptionsPropagationPolicy?: string, deleteOptionsDryRun?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/sensors/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceDeleteSensor.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling sensorServiceDeleteSensor.');
|
||||
}
|
||||
|
||||
if (deleteOptionsGracePeriodSeconds !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.gracePeriodSeconds'] = ObjectSerializer.serialize(deleteOptionsGracePeriodSeconds, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsUid !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.uid'] = ObjectSerializer.serialize(deleteOptionsPreconditionsUid, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.resourceVersion'] = ObjectSerializer.serialize(deleteOptionsPreconditionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsOrphanDependents !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.orphanDependents'] = ObjectSerializer.serialize(deleteOptionsOrphanDependents, "boolean");
|
||||
}
|
||||
|
||||
if (deleteOptionsPropagationPolicy !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.propagationPolicy'] = ObjectSerializer.serialize(deleteOptionsPropagationPolicy, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsDryRun !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.dryRun'] = ObjectSerializer.serialize(deleteOptionsDryRun, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param getOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
*/
|
||||
public async sensorServiceGetSensor (namespace: string, name: string, getOptionsResourceVersion?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/sensors/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceGetSensor.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling sensorServiceGetSensor.');
|
||||
}
|
||||
|
||||
if (getOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['getOptions.resourceVersion'] = ObjectSerializer.serialize(getOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1Sensor");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async sensorServiceListSensors (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1SensorList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/sensors/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceListSensors.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1SensorList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1SensorList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name optional - only return entries for this sensor name.
|
||||
* @param triggerName optional - only return entries for this trigger.
|
||||
* @param grep option - only return entries where `msg` contains this regular expressions.
|
||||
* @param podLogOptionsContainer The container for which to stream logs. Defaults to only container if there is one container in the pod. +optional.
|
||||
* @param podLogOptionsFollow Follow the log stream of the pod. Defaults to false. +optional.
|
||||
* @param podLogOptionsPrevious Return previous terminated container logs. Defaults to false. +optional.
|
||||
* @param podLogOptionsSinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. +optional.
|
||||
* @param podLogOptionsSinceTimeSeconds Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
|
||||
* @param podLogOptionsSinceTimeNanos Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
|
||||
* @param podLogOptionsTimestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. +optional.
|
||||
* @param podLogOptionsTailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime +optional.
|
||||
* @param podLogOptionsLimitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. +optional.
|
||||
* @param podLogOptionsInsecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). +optional.
|
||||
*/
|
||||
public async sensorServiceSensorsLogs (namespace: string, name?: string, triggerName?: string, grep?: string, podLogOptionsContainer?: string, podLogOptionsFollow?: boolean, podLogOptionsPrevious?: boolean, podLogOptionsSinceSeconds?: string, podLogOptionsSinceTimeSeconds?: string, podLogOptionsSinceTimeNanos?: number, podLogOptionsTimestamps?: boolean, podLogOptionsTailLines?: string, podLogOptionsLimitBytes?: string, podLogOptionsInsecureSkipTLSVerifyBackend?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StreamResultOfSensorLogEntry; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/stream/sensors/{namespace}/logs'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceSensorsLogs.');
|
||||
}
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (triggerName !== undefined) {
|
||||
localVarQueryParameters['triggerName'] = ObjectSerializer.serialize(triggerName, "string");
|
||||
}
|
||||
|
||||
if (grep !== undefined) {
|
||||
localVarQueryParameters['grep'] = ObjectSerializer.serialize(grep, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsContainer !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.container'] = ObjectSerializer.serialize(podLogOptionsContainer, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsFollow !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.follow'] = ObjectSerializer.serialize(podLogOptionsFollow, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsPrevious !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.previous'] = ObjectSerializer.serialize(podLogOptionsPrevious, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceSeconds !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceSeconds'] = ObjectSerializer.serialize(podLogOptionsSinceSeconds, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceTimeSeconds !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceTime.seconds'] = ObjectSerializer.serialize(podLogOptionsSinceTimeSeconds, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsSinceTimeNanos !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.sinceTime.nanos'] = ObjectSerializer.serialize(podLogOptionsSinceTimeNanos, "number");
|
||||
}
|
||||
|
||||
if (podLogOptionsTimestamps !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.timestamps'] = ObjectSerializer.serialize(podLogOptionsTimestamps, "boolean");
|
||||
}
|
||||
|
||||
if (podLogOptionsTailLines !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.tailLines'] = ObjectSerializer.serialize(podLogOptionsTailLines, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsLimitBytes !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.limitBytes'] = ObjectSerializer.serialize(podLogOptionsLimitBytes, "string");
|
||||
}
|
||||
|
||||
if (podLogOptionsInsecureSkipTLSVerifyBackend !== undefined) {
|
||||
localVarQueryParameters['podLogOptions.insecureSkipTLSVerifyBackend'] = ObjectSerializer.serialize(podLogOptionsInsecureSkipTLSVerifyBackend, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StreamResultOfSensorLogEntry; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StreamResultOfSensorLogEntry");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param body
|
||||
*/
|
||||
public async sensorServiceUpdateSensor (namespace: string, name: string, body: SensorUpdateSensorRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/sensors/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceUpdateSensor.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling sensorServiceUpdateSensor.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling sensorServiceUpdateSensor.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "SensorUpdateSensorRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojEventsV1alpha1Sensor; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojEventsV1alpha1Sensor");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async sensorServiceWatchSensors (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StreamResultOfSensorSensorWatchEvent; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/stream/sensors/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling sensorServiceWatchSensors.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StreamResultOfSensorSensorWatchEvent; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StreamResultOfSensorSensorWatchEvent");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1785
plugins/argo-workflows/src/api/generated/api/workflowServiceApi.ts
Normal file
1785
plugins/argo-workflows/src/api/generated/api/workflowServiceApi.ts
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,646 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GrpcGatewayRuntimeError } from '../model/grpcGatewayRuntimeError';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowTemplate } from '../model/ioArgoprojWorkflowV1alpha1WorkflowTemplate';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowTemplateCreateRequest } from '../model/ioArgoprojWorkflowV1alpha1WorkflowTemplateCreateRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowTemplateLintRequest } from '../model/ioArgoprojWorkflowV1alpha1WorkflowTemplateLintRequest';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowTemplateList } from '../model/ioArgoprojWorkflowV1alpha1WorkflowTemplateList';
|
||||
import { IoArgoprojWorkflowV1alpha1WorkflowTemplateUpdateRequest } from '../model/ioArgoprojWorkflowV1alpha1WorkflowTemplateUpdateRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost:2746';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum WorkflowTemplateServiceApiApiKeys {
|
||||
BearerToken,
|
||||
}
|
||||
|
||||
export class WorkflowTemplateServiceApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'BearerToken': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: WorkflowTemplateServiceApiApiKeys, value: string) {
|
||||
(this.authentications as any)[WorkflowTemplateServiceApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async workflowTemplateServiceCreateWorkflowTemplate (namespace: string, body: IoArgoprojWorkflowV1alpha1WorkflowTemplateCreateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceCreateWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling workflowTemplateServiceCreateWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplateCreateRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param deleteOptionsGracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. +optional.
|
||||
* @param deleteOptionsPreconditionsUid Specifies the target UID. +optional.
|
||||
* @param deleteOptionsPreconditionsResourceVersion Specifies the target ResourceVersion +optional.
|
||||
* @param deleteOptionsOrphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. +optional.
|
||||
* @param deleteOptionsPropagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. +optional.
|
||||
* @param deleteOptionsDryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed +optional.
|
||||
*/
|
||||
public async workflowTemplateServiceDeleteWorkflowTemplate (namespace: string, name: string, deleteOptionsGracePeriodSeconds?: string, deleteOptionsPreconditionsUid?: string, deleteOptionsPreconditionsResourceVersion?: string, deleteOptionsOrphanDependents?: boolean, deleteOptionsPropagationPolicy?: string, deleteOptionsDryRun?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceDeleteWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling workflowTemplateServiceDeleteWorkflowTemplate.');
|
||||
}
|
||||
|
||||
if (deleteOptionsGracePeriodSeconds !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.gracePeriodSeconds'] = ObjectSerializer.serialize(deleteOptionsGracePeriodSeconds, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsUid !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.uid'] = ObjectSerializer.serialize(deleteOptionsPreconditionsUid, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsPreconditionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.preconditions.resourceVersion'] = ObjectSerializer.serialize(deleteOptionsPreconditionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsOrphanDependents !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.orphanDependents'] = ObjectSerializer.serialize(deleteOptionsOrphanDependents, "boolean");
|
||||
}
|
||||
|
||||
if (deleteOptionsPropagationPolicy !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.propagationPolicy'] = ObjectSerializer.serialize(deleteOptionsPropagationPolicy, "string");
|
||||
}
|
||||
|
||||
if (deleteOptionsDryRun !== undefined) {
|
||||
localVarQueryParameters['deleteOptions.dryRun'] = ObjectSerializer.serialize(deleteOptionsDryRun, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name
|
||||
* @param getOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
*/
|
||||
public async workflowTemplateServiceGetWorkflowTemplate (namespace: string, name: string, getOptionsResourceVersion?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceGetWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling workflowTemplateServiceGetWorkflowTemplate.');
|
||||
}
|
||||
|
||||
if (getOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['getOptions.resourceVersion'] = ObjectSerializer.serialize(getOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param body
|
||||
*/
|
||||
public async workflowTemplateServiceLintWorkflowTemplate (namespace: string, body: IoArgoprojWorkflowV1alpha1WorkflowTemplateLintRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}/lint'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceLintWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling workflowTemplateServiceLintWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplateLintRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param listOptionsLabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. +optional.
|
||||
* @param listOptionsFieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. +optional.
|
||||
* @param listOptionsWatch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. +optional.
|
||||
* @param listOptionsAllowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. +optional.
|
||||
* @param listOptionsResourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsResourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset +optional
|
||||
* @param listOptionsTimeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. +optional.
|
||||
* @param listOptionsLimit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||
* @param listOptionsContinue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||
*/
|
||||
public async workflowTemplateServiceListWorkflowTemplates (namespace: string, listOptionsLabelSelector?: string, listOptionsFieldSelector?: string, listOptionsWatch?: boolean, listOptionsAllowWatchBookmarks?: boolean, listOptionsResourceVersion?: string, listOptionsResourceVersionMatch?: string, listOptionsTimeoutSeconds?: string, listOptionsLimit?: string, listOptionsContinue?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplateList; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceListWorkflowTemplates.');
|
||||
}
|
||||
|
||||
if (listOptionsLabelSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.labelSelector'] = ObjectSerializer.serialize(listOptionsLabelSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsFieldSelector !== undefined) {
|
||||
localVarQueryParameters['listOptions.fieldSelector'] = ObjectSerializer.serialize(listOptionsFieldSelector, "string");
|
||||
}
|
||||
|
||||
if (listOptionsWatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.watch'] = ObjectSerializer.serialize(listOptionsWatch, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsAllowWatchBookmarks !== undefined) {
|
||||
localVarQueryParameters['listOptions.allowWatchBookmarks'] = ObjectSerializer.serialize(listOptionsAllowWatchBookmarks, "boolean");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersion !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersion'] = ObjectSerializer.serialize(listOptionsResourceVersion, "string");
|
||||
}
|
||||
|
||||
if (listOptionsResourceVersionMatch !== undefined) {
|
||||
localVarQueryParameters['listOptions.resourceVersionMatch'] = ObjectSerializer.serialize(listOptionsResourceVersionMatch, "string");
|
||||
}
|
||||
|
||||
if (listOptionsTimeoutSeconds !== undefined) {
|
||||
localVarQueryParameters['listOptions.timeoutSeconds'] = ObjectSerializer.serialize(listOptionsTimeoutSeconds, "string");
|
||||
}
|
||||
|
||||
if (listOptionsLimit !== undefined) {
|
||||
localVarQueryParameters['listOptions.limit'] = ObjectSerializer.serialize(listOptionsLimit, "string");
|
||||
}
|
||||
|
||||
if (listOptionsContinue !== undefined) {
|
||||
localVarQueryParameters['listOptions.continue'] = ObjectSerializer.serialize(listOptionsContinue, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplateList; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplateList");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param namespace
|
||||
* @param name DEPRECATED: This field is ignored.
|
||||
* @param body
|
||||
*/
|
||||
public async workflowTemplateServiceUpdateWorkflowTemplate (namespace: string, name: string, body: IoArgoprojWorkflowV1alpha1WorkflowTemplateUpdateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }> {
|
||||
const localVarPath = this.basePath + '/api/v1/workflow-templates/{namespace}/{name}'
|
||||
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'namespace' is not null or undefined
|
||||
if (namespace === null || namespace === undefined) {
|
||||
throw new Error('Required parameter namespace was null or undefined when calling workflowTemplateServiceUpdateWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling workflowTemplateServiceUpdateWorkflowTemplate.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling workflowTemplateServiceUpdateWorkflowTemplate.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PUT',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplateUpdateRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.BearerToken.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: IoArgoprojWorkflowV1alpha1WorkflowTemplate; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "IoArgoprojWorkflowV1alpha1WorkflowTemplate");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
57
plugins/argo-workflows/src/api/generated/git_push.sh
Normal file
57
plugins/argo-workflows/src/api/generated/git_push.sh
Normal file
|
@ -0,0 +1,57 @@
|
|||
#!/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 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
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://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
|
@ -0,0 +1,39 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventSource } from './ioArgoprojEventsV1alpha1EventSource';
|
||||
|
||||
export class EventsourceCreateEventSourceRequest {
|
||||
'eventSource'?: IoArgoprojEventsV1alpha1EventSource;
|
||||
'namespace'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "eventSource",
|
||||
"baseName": "eventSource",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSource"
|
||||
},
|
||||
{
|
||||
"name": "namespace",
|
||||
"baseName": "namespace",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return EventsourceCreateEventSourceRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventSource } from './ioArgoprojEventsV1alpha1EventSource';
|
||||
|
||||
export class EventsourceEventSourceWatchEvent {
|
||||
'object'?: IoArgoprojEventsV1alpha1EventSource;
|
||||
'type'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "object",
|
||||
"baseName": "object",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSource"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return EventsourceEventSourceWatchEvent.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class EventsourceLogEntry {
|
||||
'eventName'?: string;
|
||||
'eventSourceName'?: string;
|
||||
'eventSourceType'?: string;
|
||||
'level'?: string;
|
||||
'msg'?: string;
|
||||
'namespace'?: string;
|
||||
/**
|
||||
* Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
|
||||
*/
|
||||
'time'?: Date;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "eventName",
|
||||
"baseName": "eventName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "eventSourceName",
|
||||
"baseName": "eventSourceName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "eventSourceType",
|
||||
"baseName": "eventSourceType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "level",
|
||||
"baseName": "level",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "msg",
|
||||
"baseName": "msg",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "namespace",
|
||||
"baseName": "namespace",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "time",
|
||||
"baseName": "time",
|
||||
"type": "Date"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return EventsourceLogEntry.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventSource } from './ioArgoprojEventsV1alpha1EventSource';
|
||||
|
||||
export class EventsourceUpdateEventSourceRequest {
|
||||
'eventSource'?: IoArgoprojEventsV1alpha1EventSource;
|
||||
'name'?: string;
|
||||
'namespace'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "eventSource",
|
||||
"baseName": "eventSource",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSource"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "namespace",
|
||||
"baseName": "namespace",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return EventsourceUpdateEventSourceRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class GoogleProtobufAny {
|
||||
'typeUrl'?: string;
|
||||
'value'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "typeUrl",
|
||||
"baseName": "type_url",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"baseName": "value",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return GoogleProtobufAny.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { GoogleProtobufAny } from './googleProtobufAny';
|
||||
|
||||
export class GrpcGatewayRuntimeError {
|
||||
'code'?: number;
|
||||
'details'?: Array<GoogleProtobufAny>;
|
||||
'error'?: string;
|
||||
'message'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "code",
|
||||
"baseName": "code",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "details",
|
||||
"baseName": "details",
|
||||
"type": "Array<GoogleProtobufAny>"
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"baseName": "error",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"baseName": "message",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return GrpcGatewayRuntimeError.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { GoogleProtobufAny } from './googleProtobufAny';
|
||||
|
||||
export class GrpcGatewayRuntimeStreamError {
|
||||
'details'?: Array<GoogleProtobufAny>;
|
||||
'grpcCode'?: number;
|
||||
'httpCode'?: number;
|
||||
'httpStatus'?: string;
|
||||
'message'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "details",
|
||||
"baseName": "details",
|
||||
"type": "Array<GoogleProtobufAny>"
|
||||
},
|
||||
{
|
||||
"name": "grpcCode",
|
||||
"baseName": "grpc_code",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "httpCode",
|
||||
"baseName": "http_code",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "httpStatus",
|
||||
"baseName": "http_status",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"baseName": "message",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return GrpcGatewayRuntimeStreamError.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AMQPConsumeConfig {
|
||||
'autoAck'?: boolean;
|
||||
'consumerTag'?: string;
|
||||
'exclusive'?: boolean;
|
||||
'noLocal'?: boolean;
|
||||
'noWait'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "autoAck",
|
||||
"baseName": "autoAck",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "consumerTag",
|
||||
"baseName": "consumerTag",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "exclusive",
|
||||
"baseName": "exclusive",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "noLocal",
|
||||
"baseName": "noLocal",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"baseName": "noWait",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AMQPConsumeConfig.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1AMQPConsumeConfig } from './ioArgoprojEventsV1alpha1AMQPConsumeConfig';
|
||||
import { IoArgoprojEventsV1alpha1AMQPExchangeDeclareConfig } from './ioArgoprojEventsV1alpha1AMQPExchangeDeclareConfig';
|
||||
import { IoArgoprojEventsV1alpha1AMQPQueueBindConfig } from './ioArgoprojEventsV1alpha1AMQPQueueBindConfig';
|
||||
import { IoArgoprojEventsV1alpha1AMQPQueueDeclareConfig } from './ioArgoprojEventsV1alpha1AMQPQueueDeclareConfig';
|
||||
import { IoArgoprojEventsV1alpha1Backoff } from './ioArgoprojEventsV1alpha1Backoff';
|
||||
import { IoArgoprojEventsV1alpha1BasicAuth } from './ioArgoprojEventsV1alpha1BasicAuth';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
import { IoArgoprojEventsV1alpha1TLSConfig } from './ioArgoprojEventsV1alpha1TLSConfig';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AMQPEventSource {
|
||||
'auth'?: IoArgoprojEventsV1alpha1BasicAuth;
|
||||
'connectionBackoff'?: IoArgoprojEventsV1alpha1Backoff;
|
||||
'consume'?: IoArgoprojEventsV1alpha1AMQPConsumeConfig;
|
||||
'exchangeDeclare'?: IoArgoprojEventsV1alpha1AMQPExchangeDeclareConfig;
|
||||
'exchangeName'?: string;
|
||||
'exchangeType'?: string;
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'jsonBody'?: boolean;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'queueBind'?: IoArgoprojEventsV1alpha1AMQPQueueBindConfig;
|
||||
'queueDeclare'?: IoArgoprojEventsV1alpha1AMQPQueueDeclareConfig;
|
||||
'routingKey'?: string;
|
||||
'tls'?: IoArgoprojEventsV1alpha1TLSConfig;
|
||||
'url'?: string;
|
||||
'urlSecret'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "auth",
|
||||
"baseName": "auth",
|
||||
"type": "IoArgoprojEventsV1alpha1BasicAuth"
|
||||
},
|
||||
{
|
||||
"name": "connectionBackoff",
|
||||
"baseName": "connectionBackoff",
|
||||
"type": "IoArgoprojEventsV1alpha1Backoff"
|
||||
},
|
||||
{
|
||||
"name": "consume",
|
||||
"baseName": "consume",
|
||||
"type": "IoArgoprojEventsV1alpha1AMQPConsumeConfig"
|
||||
},
|
||||
{
|
||||
"name": "exchangeDeclare",
|
||||
"baseName": "exchangeDeclare",
|
||||
"type": "IoArgoprojEventsV1alpha1AMQPExchangeDeclareConfig"
|
||||
},
|
||||
{
|
||||
"name": "exchangeName",
|
||||
"baseName": "exchangeName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "exchangeType",
|
||||
"baseName": "exchangeType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "jsonBody",
|
||||
"baseName": "jsonBody",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "queueBind",
|
||||
"baseName": "queueBind",
|
||||
"type": "IoArgoprojEventsV1alpha1AMQPQueueBindConfig"
|
||||
},
|
||||
{
|
||||
"name": "queueDeclare",
|
||||
"baseName": "queueDeclare",
|
||||
"type": "IoArgoprojEventsV1alpha1AMQPQueueDeclareConfig"
|
||||
},
|
||||
{
|
||||
"name": "routingKey",
|
||||
"baseName": "routingKey",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "tls",
|
||||
"baseName": "tls",
|
||||
"type": "IoArgoprojEventsV1alpha1TLSConfig"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "url",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "urlSecret",
|
||||
"baseName": "urlSecret",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AMQPEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AMQPExchangeDeclareConfig {
|
||||
'autoDelete'?: boolean;
|
||||
'durable'?: boolean;
|
||||
'internal'?: boolean;
|
||||
'noWait'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "autoDelete",
|
||||
"baseName": "autoDelete",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "durable",
|
||||
"baseName": "durable",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "internal",
|
||||
"baseName": "internal",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"baseName": "noWait",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AMQPExchangeDeclareConfig.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AMQPQueueBindConfig {
|
||||
'noWait'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "noWait",
|
||||
"baseName": "noWait",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AMQPQueueBindConfig.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AMQPQueueDeclareConfig {
|
||||
'arguments'?: string;
|
||||
'autoDelete'?: boolean;
|
||||
'durable'?: boolean;
|
||||
'exclusive'?: boolean;
|
||||
'name'?: string;
|
||||
'noWait'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "arguments",
|
||||
"baseName": "arguments",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "autoDelete",
|
||||
"baseName": "autoDelete",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "durable",
|
||||
"baseName": "durable",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "exclusive",
|
||||
"baseName": "exclusive",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"baseName": "noWait",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AMQPQueueDeclareConfig.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1TriggerParameter } from './ioArgoprojEventsV1alpha1TriggerParameter';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AWSLambdaTrigger {
|
||||
'accessKey'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
/**
|
||||
* FunctionName refers to the name of the function to invoke.
|
||||
*/
|
||||
'functionName'?: string;
|
||||
/**
|
||||
* Choose from the following options. * RequestResponse (default) - Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data. * Event - Invoke the function asynchronously. Send events that fail multiple times to the function\'s dead-letter queue (if it\'s configured). The API response only includes a status code. * DryRun - Validate parameter values and verify that the user or role has permission to invoke the function. +optional
|
||||
*/
|
||||
'invocationType'?: string;
|
||||
'parameters'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
/**
|
||||
* Payload is the list of key-value extracted from an event payload to construct the request payload.
|
||||
*/
|
||||
'payload'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
'region'?: string;
|
||||
'roleARN'?: string;
|
||||
'secretKey'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "accessKey",
|
||||
"baseName": "accessKey",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "functionName",
|
||||
"baseName": "functionName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "invocationType",
|
||||
"baseName": "invocationType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "parameters",
|
||||
"baseName": "parameters",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"baseName": "payload",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "region",
|
||||
"baseName": "region",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "roleARN",
|
||||
"baseName": "roleARN",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "secretKey",
|
||||
"baseName": "secretKey",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AWSLambdaTrigger.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
/**
|
||||
* Amount represent a numeric amount.
|
||||
*/
|
||||
export class IoArgoprojEventsV1alpha1Amount {
|
||||
'value'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "value",
|
||||
"baseName": "value",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1Amount.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1ArtifactLocation } from './ioArgoprojEventsV1alpha1ArtifactLocation';
|
||||
import { IoArgoprojEventsV1alpha1TriggerParameter } from './ioArgoprojEventsV1alpha1TriggerParameter';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1ArgoWorkflowTrigger {
|
||||
'args'?: Array<string>;
|
||||
'operation'?: string;
|
||||
'parameters'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
'source'?: IoArgoprojEventsV1alpha1ArtifactLocation;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "args",
|
||||
"baseName": "args",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "operation",
|
||||
"baseName": "operation",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "parameters",
|
||||
"baseName": "parameters",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "source",
|
||||
"baseName": "source",
|
||||
"type": "IoArgoprojEventsV1alpha1ArtifactLocation"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1ArgoWorkflowTrigger.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1FileArtifact } from './ioArgoprojEventsV1alpha1FileArtifact';
|
||||
import { IoArgoprojEventsV1alpha1GitArtifact } from './ioArgoprojEventsV1alpha1GitArtifact';
|
||||
import { IoArgoprojEventsV1alpha1Resource } from './ioArgoprojEventsV1alpha1Resource';
|
||||
import { IoArgoprojEventsV1alpha1S3Artifact } from './ioArgoprojEventsV1alpha1S3Artifact';
|
||||
import { IoArgoprojEventsV1alpha1URLArtifact } from './ioArgoprojEventsV1alpha1URLArtifact';
|
||||
import { IoK8sApiCoreV1ConfigMapKeySelector } from './ioK8sApiCoreV1ConfigMapKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1ArtifactLocation {
|
||||
'configmap'?: IoK8sApiCoreV1ConfigMapKeySelector;
|
||||
'file'?: IoArgoprojEventsV1alpha1FileArtifact;
|
||||
'git'?: IoArgoprojEventsV1alpha1GitArtifact;
|
||||
'inline'?: string;
|
||||
'resource'?: IoArgoprojEventsV1alpha1Resource;
|
||||
's3'?: IoArgoprojEventsV1alpha1S3Artifact;
|
||||
'url'?: IoArgoprojEventsV1alpha1URLArtifact;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "configmap",
|
||||
"baseName": "configmap",
|
||||
"type": "IoK8sApiCoreV1ConfigMapKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"baseName": "file",
|
||||
"type": "IoArgoprojEventsV1alpha1FileArtifact"
|
||||
},
|
||||
{
|
||||
"name": "git",
|
||||
"baseName": "git",
|
||||
"type": "IoArgoprojEventsV1alpha1GitArtifact"
|
||||
},
|
||||
{
|
||||
"name": "inline",
|
||||
"baseName": "inline",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "resource",
|
||||
"baseName": "resource",
|
||||
"type": "IoArgoprojEventsV1alpha1Resource"
|
||||
},
|
||||
{
|
||||
"name": "s3",
|
||||
"baseName": "s3",
|
||||
"type": "IoArgoprojEventsV1alpha1S3Artifact"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "url",
|
||||
"type": "IoArgoprojEventsV1alpha1URLArtifact"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1ArtifactLocation.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1TriggerParameter } from './ioArgoprojEventsV1alpha1TriggerParameter';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AzureEventHubsTrigger {
|
||||
'fqdn'?: string;
|
||||
'hubName'?: string;
|
||||
'parameters'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
/**
|
||||
* Payload is the list of key-value extracted from an event payload to construct the request payload.
|
||||
*/
|
||||
'payload'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
'sharedAccessKey'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'sharedAccessKeyName'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "fqdn",
|
||||
"baseName": "fqdn",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "hubName",
|
||||
"baseName": "hubName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "parameters",
|
||||
"baseName": "parameters",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"baseName": "payload",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "sharedAccessKey",
|
||||
"baseName": "sharedAccessKey",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "sharedAccessKeyName",
|
||||
"baseName": "sharedAccessKeyName",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AzureEventHubsTrigger.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1AzureEventsHubEventSource {
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'fqdn'?: string;
|
||||
'hubName'?: string;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'sharedAccessKey'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'sharedAccessKeyName'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "fqdn",
|
||||
"baseName": "fqdn",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "hubName",
|
||||
"baseName": "hubName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "sharedAccessKey",
|
||||
"baseName": "sharedAccessKey",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "sharedAccessKeyName",
|
||||
"baseName": "sharedAccessKeyName",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1AzureEventsHubEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1Amount } from './ioArgoprojEventsV1alpha1Amount';
|
||||
import { IoArgoprojEventsV1alpha1Int64OrString } from './ioArgoprojEventsV1alpha1Int64OrString';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1Backoff {
|
||||
'duration'?: IoArgoprojEventsV1alpha1Int64OrString;
|
||||
'factor'?: IoArgoprojEventsV1alpha1Amount;
|
||||
'jitter'?: IoArgoprojEventsV1alpha1Amount;
|
||||
'steps'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "duration",
|
||||
"baseName": "duration",
|
||||
"type": "IoArgoprojEventsV1alpha1Int64OrString"
|
||||
},
|
||||
{
|
||||
"name": "factor",
|
||||
"baseName": "factor",
|
||||
"type": "IoArgoprojEventsV1alpha1Amount"
|
||||
},
|
||||
{
|
||||
"name": "jitter",
|
||||
"baseName": "jitter",
|
||||
"type": "IoArgoprojEventsV1alpha1Amount"
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"baseName": "steps",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1Backoff.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BasicAuth {
|
||||
'password'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'username'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "password",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "username",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BasicAuth.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1BitbucketBasicAuth } from './ioArgoprojEventsV1alpha1BitbucketBasicAuth';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketAuth {
|
||||
'basic'?: IoArgoprojEventsV1alpha1BitbucketBasicAuth;
|
||||
'oauthToken'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "basic",
|
||||
"baseName": "basic",
|
||||
"type": "IoArgoprojEventsV1alpha1BitbucketBasicAuth"
|
||||
},
|
||||
{
|
||||
"name": "oauthToken",
|
||||
"baseName": "oauthToken",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketAuth.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketBasicAuth {
|
||||
'password'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'username'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "password",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "username",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketBasicAuth.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1BitbucketAuth } from './ioArgoprojEventsV1alpha1BitbucketAuth';
|
||||
import { IoArgoprojEventsV1alpha1BitbucketRepository } from './ioArgoprojEventsV1alpha1BitbucketRepository';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
import { IoArgoprojEventsV1alpha1WebhookContext } from './ioArgoprojEventsV1alpha1WebhookContext';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketEventSource {
|
||||
'auth'?: IoArgoprojEventsV1alpha1BitbucketAuth;
|
||||
'deleteHookOnFinish'?: boolean;
|
||||
/**
|
||||
* Events this webhook is subscribed to.
|
||||
*/
|
||||
'events'?: Array<string>;
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'owner'?: string;
|
||||
'projectKey'?: string;
|
||||
'repositories'?: Array<IoArgoprojEventsV1alpha1BitbucketRepository>;
|
||||
'repositorySlug'?: string;
|
||||
'webhook'?: IoArgoprojEventsV1alpha1WebhookContext;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "auth",
|
||||
"baseName": "auth",
|
||||
"type": "IoArgoprojEventsV1alpha1BitbucketAuth"
|
||||
},
|
||||
{
|
||||
"name": "deleteHookOnFinish",
|
||||
"baseName": "deleteHookOnFinish",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "events",
|
||||
"baseName": "events",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "owner",
|
||||
"baseName": "owner",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "projectKey",
|
||||
"baseName": "projectKey",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "repositories",
|
||||
"baseName": "repositories",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1BitbucketRepository>"
|
||||
},
|
||||
{
|
||||
"name": "repositorySlug",
|
||||
"baseName": "repositorySlug",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "webhook",
|
||||
"baseName": "webhook",
|
||||
"type": "IoArgoprojEventsV1alpha1WebhookContext"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketRepository {
|
||||
'owner'?: string;
|
||||
'repositorySlug'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "owner",
|
||||
"baseName": "owner",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "repositorySlug",
|
||||
"baseName": "repositorySlug",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketRepository.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1BitbucketServerRepository } from './ioArgoprojEventsV1alpha1BitbucketServerRepository';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
import { IoArgoprojEventsV1alpha1WebhookContext } from './ioArgoprojEventsV1alpha1WebhookContext';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketServerEventSource {
|
||||
'accessToken'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'bitbucketserverBaseURL'?: string;
|
||||
'deleteHookOnFinish'?: boolean;
|
||||
'events'?: Array<string>;
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'projectKey'?: string;
|
||||
'repositories'?: Array<IoArgoprojEventsV1alpha1BitbucketServerRepository>;
|
||||
'repositorySlug'?: string;
|
||||
'webhook'?: IoArgoprojEventsV1alpha1WebhookContext;
|
||||
'webhookSecret'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "accessToken",
|
||||
"baseName": "accessToken",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "bitbucketserverBaseURL",
|
||||
"baseName": "bitbucketserverBaseURL",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deleteHookOnFinish",
|
||||
"baseName": "deleteHookOnFinish",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "events",
|
||||
"baseName": "events",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "projectKey",
|
||||
"baseName": "projectKey",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "repositories",
|
||||
"baseName": "repositories",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1BitbucketServerRepository>"
|
||||
},
|
||||
{
|
||||
"name": "repositorySlug",
|
||||
"baseName": "repositorySlug",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "webhook",
|
||||
"baseName": "webhook",
|
||||
"type": "IoArgoprojEventsV1alpha1WebhookContext"
|
||||
},
|
||||
{
|
||||
"name": "webhookSecret",
|
||||
"baseName": "webhookSecret",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketServerEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1BitbucketServerRepository {
|
||||
'projectKey'?: string;
|
||||
'repositorySlug'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "projectKey",
|
||||
"baseName": "projectKey",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "repositorySlug",
|
||||
"baseName": "repositorySlug",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1BitbucketServerRepository.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventPersistence } from './ioArgoprojEventsV1alpha1EventPersistence';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1CalendarEventSource {
|
||||
/**
|
||||
* ExclusionDates defines the list of DATE-TIME exceptions for recurring events.
|
||||
*/
|
||||
'exclusionDates'?: Array<string>;
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'interval'?: string;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'persistence'?: IoArgoprojEventsV1alpha1EventPersistence;
|
||||
'schedule'?: string;
|
||||
'timezone'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "exclusionDates",
|
||||
"baseName": "exclusionDates",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "interval",
|
||||
"baseName": "interval",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "persistence",
|
||||
"baseName": "persistence",
|
||||
"type": "IoArgoprojEventsV1alpha1EventPersistence"
|
||||
},
|
||||
{
|
||||
"name": "schedule",
|
||||
"baseName": "schedule",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "timezone",
|
||||
"baseName": "timezone",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1CalendarEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1CatchupConfiguration {
|
||||
'enabled'?: boolean;
|
||||
'maxDuration'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "enabled",
|
||||
"baseName": "enabled",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "maxDuration",
|
||||
"baseName": "maxDuration",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1CatchupConfiguration.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1Condition {
|
||||
/**
|
||||
* Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
|
||||
*/
|
||||
'lastTransitionTime'?: Date;
|
||||
'message'?: string;
|
||||
'reason'?: string;
|
||||
'status'?: string;
|
||||
'type'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "lastTransitionTime",
|
||||
"baseName": "lastTransitionTime",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"baseName": "message",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "reason",
|
||||
"baseName": "reason",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"baseName": "status",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1Condition.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1ConditionsResetByTime {
|
||||
'cron'?: string;
|
||||
'timezone'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "cron",
|
||||
"baseName": "cron",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "timezone",
|
||||
"baseName": "timezone",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1ConditionsResetByTime.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1ConditionsResetByTime } from './ioArgoprojEventsV1alpha1ConditionsResetByTime';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1ConditionsResetCriteria {
|
||||
'byTime'?: IoArgoprojEventsV1alpha1ConditionsResetByTime;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "byTime",
|
||||
"baseName": "byTime",
|
||||
"type": "IoArgoprojEventsV1alpha1ConditionsResetByTime"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1ConditionsResetCriteria.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1ConfigMapPersistence {
|
||||
'createIfNotExist'?: boolean;
|
||||
'name'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "createIfNotExist",
|
||||
"baseName": "createIfNotExist",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "name",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1ConfigMapPersistence.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1TriggerParameter } from './ioArgoprojEventsV1alpha1TriggerParameter';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
/**
|
||||
* CustomTrigger refers to the specification of the custom trigger.
|
||||
*/
|
||||
export class IoArgoprojEventsV1alpha1CustomTrigger {
|
||||
'certSecret'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
/**
|
||||
* Parameters is the list of parameters that is applied to resolved custom trigger trigger object.
|
||||
*/
|
||||
'parameters'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
/**
|
||||
* Payload is the list of key-value extracted from an event payload to construct the request payload.
|
||||
*/
|
||||
'payload'?: Array<IoArgoprojEventsV1alpha1TriggerParameter>;
|
||||
'secure'?: boolean;
|
||||
/**
|
||||
* ServerNameOverride for the secure connection between sensor and custom trigger gRPC server.
|
||||
*/
|
||||
'serverNameOverride'?: string;
|
||||
'serverURL'?: string;
|
||||
/**
|
||||
* Spec is the custom trigger resource specification that custom trigger gRPC server knows how to interpret.
|
||||
*/
|
||||
'spec'?: { [key: string]: string; };
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "certSecret",
|
||||
"baseName": "certSecret",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "parameters",
|
||||
"baseName": "parameters",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"baseName": "payload",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1TriggerParameter>"
|
||||
},
|
||||
{
|
||||
"name": "secure",
|
||||
"baseName": "secure",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "serverNameOverride",
|
||||
"baseName": "serverNameOverride",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "serverURL",
|
||||
"baseName": "serverURL",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "spec",
|
||||
"baseName": "spec",
|
||||
"type": "{ [key: string]: string; }"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1CustomTrigger.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1DataFilter {
|
||||
/**
|
||||
* Comparator compares the event data with a user given value. Can be \">=\", \">\", \"=\", \"!=\", \"<\", or \"<=\". Is optional, and if left blank treated as equality \"=\".
|
||||
*/
|
||||
'comparator'?: string;
|
||||
/**
|
||||
* Path is the JSONPath of the event\'s (JSON decoded) data key Path is a series of keys separated by a dot. A key may contain wildcard characters \'*\' and \'?\'. To access an array value use the index as the key. The dot and wildcard characters can be escaped with \'\\\\\'. See https://github.com/tidwall/gjson#path-syntax for more information on how to use this.
|
||||
*/
|
||||
'path'?: string;
|
||||
'template'?: string;
|
||||
'type'?: string;
|
||||
'value'?: Array<string>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "comparator",
|
||||
"baseName": "comparator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"baseName": "path",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "template",
|
||||
"baseName": "template",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"baseName": "value",
|
||||
"type": "Array<string>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1DataFilter.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1Backoff } from './ioArgoprojEventsV1alpha1Backoff';
|
||||
import { IoArgoprojEventsV1alpha1EventSourceFilter } from './ioArgoprojEventsV1alpha1EventSourceFilter';
|
||||
import { IoArgoprojEventsV1alpha1TLSConfig } from './ioArgoprojEventsV1alpha1TLSConfig';
|
||||
import { IoK8sApiCoreV1SecretKeySelector } from './ioK8sApiCoreV1SecretKeySelector';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1EmitterEventSource {
|
||||
/**
|
||||
* Broker URI to connect to.
|
||||
*/
|
||||
'broker'?: string;
|
||||
'channelKey'?: string;
|
||||
'channelName'?: string;
|
||||
'connectionBackoff'?: IoArgoprojEventsV1alpha1Backoff;
|
||||
'filter'?: IoArgoprojEventsV1alpha1EventSourceFilter;
|
||||
'jsonBody'?: boolean;
|
||||
'metadata'?: { [key: string]: string; };
|
||||
'password'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
'tls'?: IoArgoprojEventsV1alpha1TLSConfig;
|
||||
'username'?: IoK8sApiCoreV1SecretKeySelector;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "broker",
|
||||
"baseName": "broker",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "channelKey",
|
||||
"baseName": "channelKey",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "channelName",
|
||||
"baseName": "channelName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "connectionBackoff",
|
||||
"baseName": "connectionBackoff",
|
||||
"type": "IoArgoprojEventsV1alpha1Backoff"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"baseName": "filter",
|
||||
"type": "IoArgoprojEventsV1alpha1EventSourceFilter"
|
||||
},
|
||||
{
|
||||
"name": "jsonBody",
|
||||
"baseName": "jsonBody",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"baseName": "metadata",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "password",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
},
|
||||
{
|
||||
"name": "tls",
|
||||
"baseName": "tls",
|
||||
"type": "IoArgoprojEventsV1alpha1TLSConfig"
|
||||
},
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "username",
|
||||
"type": "IoK8sApiCoreV1SecretKeySelector"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1EmitterEventSource.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1EventContext {
|
||||
/**
|
||||
* DataContentType - A MIME (RFC2046) string describing the media type of `data`.
|
||||
*/
|
||||
'datacontenttype'?: string;
|
||||
/**
|
||||
* ID of the event; must be non-empty and unique within the scope of the producer.
|
||||
*/
|
||||
'id'?: string;
|
||||
/**
|
||||
* Source - A URI describing the event producer.
|
||||
*/
|
||||
'source'?: string;
|
||||
/**
|
||||
* SpecVersion - The version of the CloudEvents specification used by the io.argoproj.workflow.v1alpha1.
|
||||
*/
|
||||
'specversion'?: string;
|
||||
'subject'?: string;
|
||||
/**
|
||||
* Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
|
||||
*/
|
||||
'time'?: Date;
|
||||
/**
|
||||
* Type - The type of the occurrence which has happened.
|
||||
*/
|
||||
'type'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "datacontenttype",
|
||||
"baseName": "datacontenttype",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "source",
|
||||
"baseName": "source",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "specversion",
|
||||
"baseName": "specversion",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"baseName": "subject",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "time",
|
||||
"baseName": "time",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1EventContext.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1EventDependencyFilter } from './ioArgoprojEventsV1alpha1EventDependencyFilter';
|
||||
import { IoArgoprojEventsV1alpha1EventDependencyTransformer } from './ioArgoprojEventsV1alpha1EventDependencyTransformer';
|
||||
|
||||
export class IoArgoprojEventsV1alpha1EventDependency {
|
||||
'eventName'?: string;
|
||||
'eventSourceName'?: string;
|
||||
'filters'?: IoArgoprojEventsV1alpha1EventDependencyFilter;
|
||||
/**
|
||||
* FiltersLogicalOperator defines how different filters are evaluated together. Available values: and (&&), or (||) Is optional and if left blank treated as and (&&).
|
||||
*/
|
||||
'filtersLogicalOperator'?: string;
|
||||
'name'?: string;
|
||||
'transform'?: IoArgoprojEventsV1alpha1EventDependencyTransformer;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "eventName",
|
||||
"baseName": "eventName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "eventSourceName",
|
||||
"baseName": "eventSourceName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "filters",
|
||||
"baseName": "filters",
|
||||
"type": "IoArgoprojEventsV1alpha1EventDependencyFilter"
|
||||
},
|
||||
{
|
||||
"name": "filtersLogicalOperator",
|
||||
"baseName": "filtersLogicalOperator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "transform",
|
||||
"baseName": "transform",
|
||||
"type": "IoArgoprojEventsV1alpha1EventDependencyTransformer"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1EventDependency.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* Argo Workflows API
|
||||
* Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/
|
||||
*
|
||||
* The version of the OpenAPI document: VERSION
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { IoArgoprojEventsV1alpha1DataFilter } from './ioArgoprojEventsV1alpha1DataFilter';
|
||||
import { IoArgoprojEventsV1alpha1EventContext } from './ioArgoprojEventsV1alpha1EventContext';
|
||||
import { IoArgoprojEventsV1alpha1ExprFilter } from './ioArgoprojEventsV1alpha1ExprFilter';
|
||||
import { IoArgoprojEventsV1alpha1TimeFilter } from './ioArgoprojEventsV1alpha1TimeFilter';
|
||||
|
||||
/**
|
||||
* EventDependencyFilter defines filters and constraints for a io.argoproj.workflow.v1alpha1.
|
||||
*/
|
||||
export class IoArgoprojEventsV1alpha1EventDependencyFilter {
|
||||
'context'?: IoArgoprojEventsV1alpha1EventContext;
|
||||
'data'?: Array<IoArgoprojEventsV1alpha1DataFilter>;
|
||||
/**
|
||||
* DataLogicalOperator defines how multiple Data filters (if defined) are evaluated together. Available values: and (&&), or (||) Is optional and if left blank treated as and (&&).
|
||||
*/
|
||||
'dataLogicalOperator'?: string;
|
||||
/**
|
||||
* ExprLogicalOperator defines how multiple Exprs filters (if defined) are evaluated together. Available values: and (&&), or (||) Is optional and if left blank treated as and (&&).
|
||||
*/
|
||||
'exprLogicalOperator'?: string;
|
||||
/**
|
||||
* Exprs contains the list of expressions evaluated against the event payload.
|
||||
*/
|
||||
'exprs'?: Array<IoArgoprojEventsV1alpha1ExprFilter>;
|
||||
/**
|
||||
* Script refers to a Lua script evaluated to determine the validity of an io.argoproj.workflow.v1alpha1.
|
||||
*/
|
||||
'script'?: string;
|
||||
'time'?: IoArgoprojEventsV1alpha1TimeFilter;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "context",
|
||||
"baseName": "context",
|
||||
"type": "IoArgoprojEventsV1alpha1EventContext"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"baseName": "data",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1DataFilter>"
|
||||
},
|
||||
{
|
||||
"name": "dataLogicalOperator",
|
||||
"baseName": "dataLogicalOperator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "exprLogicalOperator",
|
||||
"baseName": "exprLogicalOperator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "exprs",
|
||||
"baseName": "exprs",
|
||||
"type": "Array<IoArgoprojEventsV1alpha1ExprFilter>"
|
||||
},
|
||||
{
|
||||
"name": "script",
|
||||
"baseName": "script",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "time",
|
||||
"baseName": "time",
|
||||
"type": "IoArgoprojEventsV1alpha1TimeFilter"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return IoArgoprojEventsV1alpha1EventDependencyFilter.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue