├── .scaffoldly ├── env-vars.json └── services.json ├── .gitignore ├── api └── github-sls-rest-api │ ├── .openapi-generator │ ├── VERSION │ └── FILES │ ├── version.json │ ├── .gitignore │ ├── .npmignore │ ├── index.ts │ ├── .openapi-generator-ignore │ ├── base.ts │ ├── git_push.sh │ ├── configuration.ts │ ├── common.ts │ └── api.ts ├── .vscode └── settings.json ├── assets └── faq │ ├── add-provider.png │ └── update-config.png ├── .prettierrc ├── openapitools.json ├── .openapis ├── src ├── index.ts ├── exec.ts └── action.ts ├── .eslintrc.json ├── webpack.config.js ├── dist └── main.js.LICENSE.txt ├── tsconfig.json ├── .github └── workflows │ ├── push-main.yml │ ├── release-published.yml │ └── acceptance-tests.yml ├── FAQS.md ├── action.yml ├── package.json ├── README.md └── LICENSE /.scaffoldly/env-vars.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | externals/ 4 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 5.3.1 -------------------------------------------------------------------------------- /api/github-sls-rest-api/version.json: -------------------------------------------------------------------------------- 1 | {"version":"1.0.89-0"} -------------------------------------------------------------------------------- /api/github-sls-rest-api/.gitignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node_modules 3 | typings 4 | dist 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.preferences.importModuleSpecifier": "relative" 3 | } 4 | -------------------------------------------------------------------------------- /assets/faq/add-provider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saml-to/assume-aws-role-action/HEAD/assets/faq/add-provider.png -------------------------------------------------------------------------------- /assets/faq/update-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saml-to/assume-aws-role-action/HEAD/assets/faq/update-config.png -------------------------------------------------------------------------------- /api/github-sls-rest-api/.npmignore: -------------------------------------------------------------------------------- 1 | # empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "all", 4 | "singleQuote": true, 5 | "printWidth": 100, 6 | "tabWidth": 2 7 | } 8 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .npmignore 3 | api.ts 4 | base.ts 5 | common.ts 6 | configuration.ts 7 | git_push.sh 8 | index.ts 9 | -------------------------------------------------------------------------------- /openapitools.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", 3 | "spaces": 2, 4 | "generator-cli": { 5 | "version": "5.3.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.scaffoldly/services.json: -------------------------------------------------------------------------------- 1 | { 2 | "github-sls-rest-api": { 3 | "base-url": "https://sso.saml.to/github", 4 | "service-name": "github-sls-rest-api", 5 | "service-slug": "github" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.openapis: -------------------------------------------------------------------------------- 1 | 2 | # Do not edit this file, it is managed by @scaffoldly/openapi-generator 3 | # 4 | # This file assists caching of auto-generated APIs in `api` during builds 5 | # 6 | # This file is *safe* to add to source control and will increase the speed of builds 7 | --- 8 | - serviceName: github-sls-rest-api 9 | version: 1.0.89-0 10 | 11 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { Action } from './action'; 2 | import { setFailed, notice } from '@actions/core'; 3 | 4 | (async () => { 5 | try { 6 | const action = new Action(); 7 | await action.run(); 8 | } catch (e) { 9 | if (e instanceof Error) { 10 | setFailed(e.message); 11 | notice(`Need help? https://docs.saml.to/troubleshooting/get-help`); 12 | return; 13 | } 14 | throw e; 15 | } 16 | process.exit(0); 17 | })(); 18 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/index.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * github-sls-rest-api 5 | * To generate a JWT token, go to the JWT Token Generator 6 | * 7 | * The version of the OpenAPI document: 1.0.89-0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | export * from "./api"; 17 | export * from "./configuration"; 18 | 19 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "plugins": ["@typescript-eslint"], 4 | "parserOptions": { 5 | "ecmaVersion": 2020, 6 | "sourceType": "module", 7 | "project": "./tsconfig.json" 8 | }, 9 | "extends": [ 10 | "eslint:recommended", 11 | "airbnb-typescript/base", 12 | "plugin:@typescript-eslint/eslint-recommended", 13 | "plugin:@typescript-eslint/recommended", 14 | "prettier", 15 | "plugin:prettier/recommended", 16 | "plugin:import/recommended" 17 | ], 18 | "rules": { 19 | "no-console": "off", 20 | "import/no-extraneous-dependencies": "off" 21 | }, 22 | "ignorePatterns": [ 23 | // Auto-generated files 24 | "build/**/*", 25 | "dist/**/*", 26 | "api/**/*" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires,no-undef */ 2 | const path = require('path'); 3 | 4 | // eslint-disable-next-line no-undef 5 | module.exports = { 6 | // CLI Bundling 7 | target: 'node', 8 | 9 | // bundling mode 10 | mode: 'production', 11 | 12 | // entry files 13 | entry: './src/index.ts', 14 | 15 | // output bundles (location) 16 | output: { 17 | path: path.resolve(__dirname, 'dist'), 18 | filename: 'main.js', 19 | }, 20 | 21 | // file resolutions 22 | resolve: { 23 | extensions: ['.ts', '.js'], 24 | }, 25 | 26 | // loaders 27 | module: { 28 | rules: [ 29 | { 30 | test: /\.tsx?/, 31 | use: 'ts-loader', 32 | exclude: /node_modules/, 33 | }, 34 | ], 35 | }, 36 | 37 | devtool: 'source-map', 38 | }; 39 | -------------------------------------------------------------------------------- /dist/main.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) Microsoft Corporation. 3 | 4 | Permission to use, copy, modify, and/or distribute this software for any 5 | purpose with or without fee is hereby granted. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 12 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13 | PERFORMANCE OF THIS SOFTWARE. 14 | ***************************************************************************** */ 15 | -------------------------------------------------------------------------------- /src/exec.ts: -------------------------------------------------------------------------------- 1 | import proc from 'child_process'; 2 | import which from 'which'; 3 | 4 | export const exec = (argv: string[]): Promise => { 5 | return new Promise((resolve, reject) => { 6 | const env = { 7 | ...process.env, 8 | }; 9 | 10 | let command: string; 11 | try { 12 | command = which.sync(argv[0]); 13 | } catch (e) { 14 | reject(new Error(`Unable to locate the '${argv[0]}' command on this system`)); 15 | return; 16 | } 17 | 18 | const p = proc.spawn(command, argv.slice(1), { 19 | shell: true, 20 | env, 21 | }); 22 | 23 | p.on('error', (err) => { 24 | reject(err); 25 | }); 26 | 27 | p.on('exit', () => { 28 | resolve(); 29 | }); 30 | 31 | p.stdin.pipe(process.stdin); 32 | p.stdout.pipe(process.stdout); 33 | p.stderr.pipe(process.stderr); 34 | }); 35 | }; 36 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | /* Basic Options */ 5 | "incremental": true, 6 | "target": "ESNext", 7 | "module": "CommonJS", 8 | "outDir": "build/", 9 | "sourceMap": true, 10 | "declaration": true, 11 | "declarationMap": true, 12 | 13 | /* Strict Type-Checking Options */ 14 | "strict": true, 15 | "noImplicitAny": true, 16 | "strictNullChecks": true, 17 | "strictFunctionTypes": true, 18 | "strictBindCallApply": true, 19 | "strictPropertyInitialization": true, 20 | "noImplicitThis": true, 21 | "alwaysStrict": true, 22 | 23 | /* Additional Checks */ 24 | "noUnusedLocals": true, 25 | "noUnusedParameters": true, 26 | "noImplicitReturns": true, 27 | "noFallthroughCasesInSwitch": true, 28 | 29 | /* Module Resolution Options */ 30 | "moduleResolution": "node", 31 | "baseUrl": "./", 32 | "esModuleInterop": true, 33 | "resolveJsonModule": true, 34 | 35 | /* Experimental Options */ 36 | "experimentalDecorators": true, 37 | "emitDecoratorMetadata": true, 38 | 39 | /* Advanced Options */ 40 | "forceConsistentCasingInFileNames": true 41 | }, 42 | "exclude": ["dist/**/*", "build/**/*"] 43 | } 44 | -------------------------------------------------------------------------------- /.github/workflows/push-main.yml: -------------------------------------------------------------------------------- 1 | name: Push to Main 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [main] 7 | 8 | jobs: 9 | prerelease: 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | node: ['14'] 14 | steps: 15 | - uses: actions/checkout@v2 16 | - uses: actions/setup-node@v2-beta 17 | with: 18 | node-version: ${{ matrix.node }} 19 | - uses: actions/cache@v2 20 | with: 21 | path: ./node_modules 22 | key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }} 23 | restore-keys: | 24 | ${{ runner.os }}-${{ matrix.node }}-yarn- 25 | - uses: actions/cache@v2 26 | with: 27 | path: ./api 28 | key: ${{ runner.os }}-${{ matrix.node }}-openapi-${{ hashFiles('./.openapis') }} 29 | restore-keys: | 30 | ${{ runner.os }}-${{ matrix.node }}-openapi- 31 | - run: yarn 32 | - run: yarn openapi 33 | - run: yarn build 34 | - if: ${{ matrix.node == '14' }} 35 | uses: scaffoldly/bump-version-action@v1 36 | with: 37 | action: prerelease 38 | version-file: package.json 39 | repo-token: ${{ secrets.GITHUB_TOKEN }} 40 | -------------------------------------------------------------------------------- /.github/workflows/release-published.yml: -------------------------------------------------------------------------------- 1 | name: Release Published 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | publish: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node: ['14'] 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v2-beta 16 | with: 17 | node-version: ${{ matrix.node }} 18 | registry-url: 'https://registry.npmjs.org' 19 | - uses: actions/cache@v2 20 | with: 21 | path: ./node_modules 22 | key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }} 23 | restore-keys: | 24 | ${{ runner.os }}-${{ matrix.node }}-yarn- 25 | - uses: actions/cache@v2 26 | with: 27 | path: ./api 28 | key: ${{ runner.os }}-${{ matrix.node }}-openapi-${{ hashFiles('./.openapis') }} 29 | restore-keys: | 30 | ${{ runner.os }}-${{ matrix.node }}-openapi- 31 | - run: yarn 32 | - run: yarn openapi 33 | - run: yarn build 34 | - if: ${{ matrix.node == '14' }} 35 | uses: scaffoldly/bump-version-action@v1 36 | with: 37 | action: postrelease 38 | version-file: package.json 39 | repo-token: ${{ secrets.GITHUB_TOKEN }} 40 | major-tag: true 41 | -------------------------------------------------------------------------------- /FAQS.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | ## I now have a slew of `saml-to.yml` files across many repositories, and it's quite repetitive. 4 | 5 | If you have multiple SAML.to files across many repositiories, they can be consolidated into one configuration file in a single repository in your GitHub Organization. It can be used delegate access to other repositories. 6 | 7 | Need more info on this? [Message us on Gitter](https://gitter.im/saml-to/assume-aws-role-action). 8 | 9 | ## I have many repositories that need this action, but creating a SAML Provider in AWS per-repository won't scale. 10 | 11 | If all repositories need access to the same role, make a new "Shared Provider" (sans the Repository Name) and place that in the various `saml-to.yml` configuration files. 12 | 13 | ### Step 1 - Create a "Shared Provider" 14 | 15 | ![Add a Provider](./assets/faq/add-provider.png) 16 | 17 | 1. When creating a provider, set the name to something generic, but unique to your AWS account. In this example, it's named as `saml.to`. 18 | 19 | 1. Download your [`IdP Metadata`](https://saml.to/metadata) for your organization from SAML.to. 20 | 21 | ### Step 2 - Update each of the `saml-to.yml` file(s) to use the "Shared Provider" 22 | 23 | ![saml-to.yml config](./assets/faq/update-config.png) 24 | 25 | 1. Change the `https://aws.amazon.com/SAML/Attributes/Role` to use the name of the "Shared Provider" 26 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'SAML.to Assume AWS Role' 2 | description: 'GitHub Action Assume AWS Roles using SAML.to' 3 | branding: 4 | icon: 'arrow-up-circle' 5 | color: 'blue' 6 | inputs: 7 | role: 8 | description: The ARN of the role to assume 9 | required: true 10 | region: 11 | description: The AWS Region 12 | required: false 13 | default: 'us-east-1' 14 | provider: 15 | description: The provider to use in saml-to.yml 16 | required: false 17 | configOwner: 18 | description: Specify a different GitHub Org/User that hosts the saml-to.yml, defaults to this repository's owner. 19 | required: false 20 | configPath: 21 | description: "Specify a path to the SAML.to config file (Default: 'saml-to.yml')" 22 | required: false 23 | profile: 24 | description: 'Store the credentials to the provided named profile in `~/.aws` (instead of writing them to Environment Variables)' 25 | required: false 26 | outputs: 27 | region: 28 | description: The AWS region 29 | accountId: 30 | description: The AWS Account ID 31 | userId: 32 | description: The Ephemeral User ID 33 | roleArn: 34 | description: The ARN of the Role 35 | assumedRoleArn: 36 | description: The effective ARN of the Assumed Role 37 | accessKeyId: 38 | description: The AWS Access Key ID 39 | secretAccessKey: 40 | description: The AWS Secret Access Key 41 | sessionToken: 42 | description: The AWS Session Token 43 | runs: 44 | using: 'node16' 45 | main: 'dist/main.js' 46 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/base.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * github-sls-rest-api 5 | * To generate a JWT token, go to the JWT Token Generator 6 | * 7 | * The version of the OpenAPI document: 1.0.89-0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | import { Configuration } from "./configuration"; 17 | // Some imports not used depending on template conditions 18 | // @ts-ignore 19 | import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; 20 | 21 | export const BASE_PATH = "https://sso.saml.to/github".replace(/\/+$/, ""); 22 | 23 | /** 24 | * 25 | * @export 26 | */ 27 | export const COLLECTION_FORMATS = { 28 | csv: ",", 29 | ssv: " ", 30 | tsv: "\t", 31 | pipes: "|", 32 | }; 33 | 34 | /** 35 | * 36 | * @export 37 | * @interface RequestArgs 38 | */ 39 | export interface RequestArgs { 40 | url: string; 41 | options: AxiosRequestConfig; 42 | } 43 | 44 | /** 45 | * 46 | * @export 47 | * @class BaseAPI 48 | */ 49 | export class BaseAPI { 50 | protected configuration: Configuration | undefined; 51 | 52 | constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { 53 | if (configuration) { 54 | this.configuration = configuration; 55 | this.basePath = configuration.basePath || this.basePath; 56 | } 57 | } 58 | }; 59 | 60 | /** 61 | * 62 | * @export 63 | * @class RequiredError 64 | * @extends {Error} 65 | */ 66 | export class RequiredError extends Error { 67 | name: "RequiredError" = "RequiredError"; 68 | constructor(public field: string, msg?: string) { 69 | super(msg); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | git_host=$4 10 | 11 | if [ "$git_host" = "" ]; then 12 | git_host="github.com" 13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host" 14 | fi 15 | 16 | if [ "$git_user_id" = "" ]; then 17 | git_user_id="GIT_USER_ID" 18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 19 | fi 20 | 21 | if [ "$git_repo_id" = "" ]; then 22 | git_repo_id="GIT_REPO_ID" 23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 24 | fi 25 | 26 | if [ "$release_note" = "" ]; then 27 | release_note="Minor update" 28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 29 | fi 30 | 31 | # Initialize the local directory as a Git repository 32 | git init 33 | 34 | # Adds the files in the local repository and stages them for commit. 35 | git add . 36 | 37 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 38 | git commit -m "$release_note" 39 | 40 | # Sets the new remote 41 | git_remote=$(git remote) 42 | if [ "$git_remote" = "" ]; then # git remote not defined 43 | 44 | if [ "$GIT_TOKEN" = "" ]; then 45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git 47 | else 48 | git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git 49 | fi 50 | 51 | fi 52 | 53 | git pull origin master 54 | 55 | # Pushes (Forces) the changes in the local repository up to the remote repository 56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" 57 | git push origin master 2>&1 | grep -v 'To https' 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@saml-to/assume-aws-role-action", 3 | "version": "1.0.13", 4 | "description": "Assume an AWS Role using SAML.to", 5 | "repository": "git@github.com:saml-to/assume-aws-role-action.git", 6 | "author": "Scaffoldly", 7 | "bugs": { 8 | "url": "https://github.com/saml-to/assume-aws-role-action/issues" 9 | }, 10 | "homepage": "https://github.com/saml-to/assume-aws-role-action#readme", 11 | "license": "Apache-2.0", 12 | "private": false, 13 | "scripts": { 14 | "build": "webpack", 15 | "start": "ts-node src/index.ts", 16 | "lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet --fix && yarn run prettier --write 'src/**/*.{js,ts,tsx}'", 17 | "openapi": "openapi-generator -g axios -i .scaffoldly/$NODE_ENV -o api -r auth-sls-rest-api github-sls-rest-api" 18 | }, 19 | "main": "dist/main.js", 20 | "bin": { 21 | "saml-to": "dist/main.js" 22 | }, 23 | "files": [ 24 | "dist/main.js", 25 | "dist/main.js.map" 26 | ], 27 | "engines": { 28 | "node": ">=14" 29 | }, 30 | "engineStrict": true, 31 | "keywords": [ 32 | "saml", 33 | "saml.to", 34 | "aws", 35 | "iam", 36 | "scaffoldly", 37 | "typescript" 38 | ], 39 | "dependencies": { 40 | "@actions/core": "^1.10.0", 41 | "@aws-sdk/client-sts": "^3.43.0", 42 | "axios": "^0.24.0", 43 | "which": "^2.0.2" 44 | }, 45 | "devDependencies": { 46 | "@babel/core": "^7.16.0", 47 | "@babel/eslint-parser": "^7.16.0", 48 | "@scaffoldly/openapi-generator": "^1.0.22", 49 | "@types/inquirer": "^8.1.3", 50 | "@types/js-yaml": "^4.0.5", 51 | "@types/node": "14", 52 | "@types/which": "^2.0.1", 53 | "@types/yargs": "^17.0.7", 54 | "@typescript-eslint/eslint-plugin": "^4.29.3", 55 | "@typescript-eslint/parser": "^4.29.3", 56 | "eslint": "^7.2.0", 57 | "eslint-config-airbnb": "18.2.1", 58 | "eslint-config-airbnb-typescript": "14.0.2", 59 | "eslint-config-prettier": "^8.3.0", 60 | "eslint-plugin-import": "^2.22.1", 61 | "eslint-plugin-jsx-a11y": "^6.4.1", 62 | "eslint-plugin-prettier": "^4.0.0", 63 | "prettier": "^2.4.1", 64 | "source-map": "^0.7.3", 65 | "ts-loader": "^9.2.6", 66 | "ts-node": "^10.4.0", 67 | "typescript": "^4.5.4", 68 | "webpack": "^5.65.0", 69 | "webpack-cli": "^4.9.1", 70 | "webpack-node-externals": "^3.0.0" 71 | } 72 | } -------------------------------------------------------------------------------- /api/github-sls-rest-api/configuration.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * github-sls-rest-api 5 | * To generate a JWT token, go to the JWT Token Generator 6 | * 7 | * The version of the OpenAPI document: 1.0.89-0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | export interface ConfigurationParameters { 17 | apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); 18 | username?: string; 19 | password?: string; 20 | accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); 21 | basePath?: string; 22 | baseOptions?: any; 23 | formDataCtor?: new () => any; 24 | } 25 | 26 | export class Configuration { 27 | /** 28 | * parameter for apiKey security 29 | * @param name security name 30 | * @memberof Configuration 31 | */ 32 | apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); 33 | /** 34 | * parameter for basic security 35 | * 36 | * @type {string} 37 | * @memberof Configuration 38 | */ 39 | username?: string; 40 | /** 41 | * parameter for basic security 42 | * 43 | * @type {string} 44 | * @memberof Configuration 45 | */ 46 | password?: string; 47 | /** 48 | * parameter for oauth2 security 49 | * @param name security name 50 | * @param scopes oauth2 scope 51 | * @memberof Configuration 52 | */ 53 | accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); 54 | /** 55 | * override base path 56 | * 57 | * @type {string} 58 | * @memberof Configuration 59 | */ 60 | basePath?: string; 61 | /** 62 | * base options for axios calls 63 | * 64 | * @type {any} 65 | * @memberof Configuration 66 | */ 67 | baseOptions?: any; 68 | /** 69 | * The FormData constructor that will be used to create multipart form data 70 | * requests. You can inject this here so that execution environments that 71 | * do not support the FormData class can still run the generated client. 72 | * 73 | * @type {new () => FormData} 74 | */ 75 | formDataCtor?: new () => any; 76 | 77 | constructor(param: ConfigurationParameters = {}) { 78 | this.apiKey = param.apiKey; 79 | this.username = param.username; 80 | this.password = param.password; 81 | this.accessToken = param.accessToken; 82 | this.basePath = param.basePath; 83 | this.baseOptions = param.baseOptions; 84 | this.formDataCtor = param.formDataCtor; 85 | } 86 | 87 | /** 88 | * Check if the given MIME is a JSON MIME. 89 | * JSON MIME examples: 90 | * application/json 91 | * application/json; charset=UTF8 92 | * APPLICATION/JSON 93 | * application/vnd.company+json 94 | * @param mime - MIME (Multipurpose Internet Mail Extensions) 95 | * @return True if the given MIME is JSON, false otherwise. 96 | */ 97 | public isJsonMime(mime: string): boolean { 98 | const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); 99 | return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/common.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * github-sls-rest-api 5 | * To generate a JWT token, go to the JWT Token Generator 6 | * 7 | * The version of the OpenAPI document: 1.0.89-0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | import { Configuration } from "./configuration"; 17 | import { RequiredError, RequestArgs } from "./base"; 18 | import { AxiosInstance, AxiosResponse } from 'axios'; 19 | 20 | /** 21 | * 22 | * @export 23 | */ 24 | export const DUMMY_BASE_URL = 'https://example.com' 25 | 26 | /** 27 | * 28 | * @throws {RequiredError} 29 | * @export 30 | */ 31 | export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { 32 | if (paramValue === null || paramValue === undefined) { 33 | throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); 34 | } 35 | } 36 | 37 | /** 38 | * 39 | * @export 40 | */ 41 | export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { 42 | if (configuration && configuration.apiKey) { 43 | const localVarApiKeyValue = typeof configuration.apiKey === 'function' 44 | ? await configuration.apiKey(keyParamName) 45 | : await configuration.apiKey; 46 | object[keyParamName] = localVarApiKeyValue; 47 | } 48 | } 49 | 50 | /** 51 | * 52 | * @export 53 | */ 54 | export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { 55 | if (configuration && (configuration.username || configuration.password)) { 56 | object["auth"] = { username: configuration.username, password: configuration.password }; 57 | } 58 | } 59 | 60 | /** 61 | * 62 | * @export 63 | */ 64 | export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { 65 | if (configuration && configuration.accessToken) { 66 | const accessToken = typeof configuration.accessToken === 'function' 67 | ? await configuration.accessToken() 68 | : await configuration.accessToken; 69 | object["Authorization"] = "Bearer " + accessToken; 70 | } 71 | } 72 | 73 | /** 74 | * 75 | * @export 76 | */ 77 | export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { 78 | if (configuration && configuration.accessToken) { 79 | const localVarAccessTokenValue = typeof configuration.accessToken === 'function' 80 | ? await configuration.accessToken(name, scopes) 81 | : await configuration.accessToken; 82 | object["Authorization"] = "Bearer " + localVarAccessTokenValue; 83 | } 84 | } 85 | 86 | /** 87 | * 88 | * @export 89 | */ 90 | export const setSearchParams = function (url: URL, ...objects: any[]) { 91 | const searchParams = new URLSearchParams(url.search); 92 | for (const object of objects) { 93 | for (const key in object) { 94 | if (Array.isArray(object[key])) { 95 | searchParams.delete(key); 96 | for (const item of object[key]) { 97 | searchParams.append(key, item); 98 | } 99 | } else { 100 | searchParams.set(key, object[key]); 101 | } 102 | } 103 | } 104 | url.search = searchParams.toString(); 105 | } 106 | 107 | /** 108 | * 109 | * @export 110 | */ 111 | export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { 112 | const nonString = typeof value !== 'string'; 113 | const needsSerialization = nonString && configuration && configuration.isJsonMime 114 | ? configuration.isJsonMime(requestOptions.headers['Content-Type']) 115 | : nonString; 116 | return needsSerialization 117 | ? JSON.stringify(value !== undefined ? value : {}) 118 | : (value || ""); 119 | } 120 | 121 | /** 122 | * 123 | * @export 124 | */ 125 | export const toPathString = function (url: URL) { 126 | return url.pathname + url.search + url.hash 127 | } 128 | 129 | /** 130 | * 131 | * @export 132 | */ 133 | export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { 134 | return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { 135 | const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; 136 | return axios.request(axiosRequestArgs); 137 | }; 138 | } 139 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # assume-aws-role-action 2 | 3 | ![GitHub release (latest by date)](https://img.shields.io/github/v/release/saml-to/assume-aws-role-action?label=version) ![GitHub issues](https://img.shields.io/github/issues/saml-to/assume-aws-role-action) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/saml-to/assume-aws-role-action/Push%20to%20Main) [![Gitter](https://img.shields.io/gitter/room/saml-to/assume-aws-role-action)](https://gitter.im/saml-to/assume-aws-role-action) 4 | 5 | This action enables workflows to obtain AWS Access Credentials for a desired IAM Role using **AWS IAM SAML** and a **GitHub Actions Repository Token**. 6 | 7 | Benefits: 8 | 9 | - No need to copy/paste AWS Access Tokens into GitHub Secrets 10 | - No need to rotate AWS Access Tokens 11 | 12 | This action uses [SAML.to](https://saml.to) and an [AWS IAM Identity Provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) to exchange a [GitHub Actions Token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) for AWS Access Credentials. 13 | 14 | This action will set the following environment variables: 15 | 16 | - `AWS_ACCESS_KEY_ID` 17 | - `AWS_SECRET_ACCESS_KEY` 18 | - `AWS_SESSION_TOKEN` 19 | - `AWS_DEFAULT_REGION` 20 | 21 | ## Usage 22 | 23 | See [action.yml](action.yml) 24 | 25 | ```yaml 26 | steps: 27 | - uses: saml-to/assume-aws-role-action@v1 28 | with: 29 | role: arn:aws:iam::123456789012:role/admin 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - run: aws sts get-caller-identity 33 | - run: aws ec2 describe-instances 34 | ``` 35 | 36 | ## Examples 37 | 38 | See [aws-assume-role-action-examples](https://github.com/saml-to/aws-assume-role-action-examples) 39 | 40 | ## Configuration 41 | 42 | 1. [Download Your Metadata](https://saml.to/metadata) from SAML.to 43 | 1. Create a new **SAML** [Identity Provider](https://console.aws.amazon.com/iamv2/home?#/identity_providers/create) in AWS IAM 44 | 1. **Provider Name**: _Repository Name_ (the name of the repository running the action) 45 | 1. **Metadata Document**: _Upload the Metadata Document from SAML.to_ 46 | 1. Make note of the **`Provder ARN`** in the AWS console 47 | 1. Create or update the [Trust Relationship](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/edit_trust.html) on a new or existing IAM Role to contain the following: 48 | ``` 49 | { 50 | "Version": "2012-10-17", 51 | "Statement": [ 52 | { 53 | "Effect": "Allow", 54 | "Principal": { 55 | "Federated": "PROVIDER_ARN" 56 | }, 57 | "Action": "sts:AssumeRoleWithSAML", 58 | "Condition": { 59 | "StringEquals": { 60 | "SAML:aud": "https://signin.aws.amazon.com/saml" 61 | } 62 | } 63 | } 64 | ] 65 | } 66 | ``` 67 | - Replace `PROVIDER_ARN` with the newly created ARN of the provider, e.g. `arn:aws:iam::123456789012:saml-provider/my-repository` 68 | - Make note of the **`Role ARN`** for this Role 69 | 1. Add a new file named _`saml-to.yml`_ to the repository that needs AWS Access Credentials during GitHub Actions: 70 | 71 | `your-repository/saml-to.yml`: 72 | 73 | ``` 74 | --- 75 | version: "20220101" 76 | variables: 77 | awsProviderArn: "PROVIDER_ARN" 78 | awsRoleArn: "ROLE_ARN" 79 | providers: 80 | aws: 81 | entityId: https://signin.aws.amazon.com/saml 82 | acsUrl: https://signin.aws.amazon.com/saml 83 | attributes: 84 | https://aws.amazon.com/SAML/Attributes/RoleSessionName: "<#= repo.name #>" 85 | https://aws.amazon.com/SAML/Attributes/SessionDuration: "3600" 86 | https://aws.amazon.com/SAML/Attributes/Role: "<#= repo.selectedRole #>,<$= awsProviderArn $>" 87 | permissions: 88 | aws: 89 | roles: 90 | - name: <$= awsRoleArn $> 91 | self: true 92 | ``` 93 | 94 | - Replace `PROVIDER_ARN` with the ARN of the provider created above (e.g. `arn:aws:iam::123456689012:saml-provider/my-repository`) 95 | - Replace `ROLE_ARN` with the ARN of the IAM Role modified above. (e.g. `arn:aws:iam::123456689012:role/admin`) 96 | 97 | 1. Modify the GitHub Action Workflow to obtain AWS Access Credentials 98 | 99 | `your-repository/.github/workflows/action-name.yml`: 100 | 101 | ``` 102 | jobs: 103 | prerelease: 104 | runs-on: ubuntu-latest 105 | steps: 106 | - uses: actions/checkout@v2 107 | ... 108 | - uses: saml-to/assume-aws-role-action@v1 109 | env: 110 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 111 | with: 112 | role: "ROLE_ARN" 113 | ... 114 | ``` 115 | 116 | - Replace `ROLE_ARN` with the ARN of the IAM Role modified above. (e.g. `arn:aws:iam::123456689012:role/admin`) 117 | 118 | ## Inputs 119 | 120 | ### `role` (**Required**) 121 | 122 | The ARN of the role to assume. This Role ARN must also be defined in the `saml-to.yml` configuration file under `permissions`. 123 | 124 | ### `region` (_Optional_) 125 | 126 | The AWS Region to use. This will also be set as the `AWS_DEFAULT_REGION` environment variable and the `region` output. 127 | 128 | **Default**: `us-east-1` 129 | 130 | ### `provider` (_Optional_) 131 | 132 | If there are multiple `provider` entries in the `saml-to.yml` configuration file, set a specific provider. 133 | 134 | **Note**: If multiple providers are configured, and this is absent, the Action will fail. 135 | 136 | **Default**: `` (_Empty String_) 137 | 138 | ### `configPath` (_Optional_) 139 | 140 | Specify an alternative path to the `saml-to.yml` configuration file. 141 | 142 | ### `profile` (_Optional_) 143 | 144 | Store the credentials to the provided named profile in `~/.aws` (instead of writing them to Environment Variables) 145 | 146 | **Default**: `` (_Empty String_) 147 | 148 | **Default**: `saml-to.yml` 149 | 150 | ## Outputs 151 | 152 | ### `region` 153 | 154 | The AWS Region authenitcated with (default: `us-east-1`) 155 | 156 | Can be modified with the `region` input. 157 | 158 | This will also be set in the `AWS_DEFAULT_REGION` environment variable. 159 | 160 | ### `accountId` 161 | 162 | The AWS Account ID authenticated with (e.g. `123456789012`) 163 | 164 | ### `userId` 165 | 166 | The ephemeral user ID (e.g. `AROAYOAAAAAAAAAAAAAAA:my-repository`) 167 | 168 | ### `roleArn` 169 | 170 | The ARN of the Role. 171 | 172 | It will be identical to the `role` input. 173 | 174 | ### `assumedRoleArn` 175 | 176 | The effective ARN of the Assumed Role (e.g. `arn:aws:sts::123456789012:assumed-role/admin/my-repository`) 177 | 178 | ### `accessKeyId` 179 | 180 | The generated AWS Access Key ID. 181 | 182 | This is also be set in the `AWS_ACCESS_KEY_ID` environment variable. 183 | 184 | ### `secretAccessKey` 185 | 186 | The generated AWS Secret Access Key. 187 | 188 | This is also be set in the `AWS_SECRET_ACCESS_KEY` environment variable. 189 | 190 | ### `sessionToken` 191 | 192 | The generated AWS Session Toke. 193 | 194 | This is also be set in the `AWS_SESSION_TOKEN` environment variable. 195 | 196 | ## FAQs 197 | 198 | See [FAQs](FAQS.md) 199 | 200 | ## Maintainers 201 | 202 | - [Scaffoldly](https://github.com/scaffoldly) 203 | - [cnuss](https://github.com/cnuss) 204 | 205 | ## Help & Support 206 | 207 | - [Message us on Gitter](https://gitter.im/saml-to/assume-aws-role-action) 208 | - [Support via Twitter](https://twitter.com/SamlToSupport) 209 | - [Discussions](https://github.com/saml-to/assume-aws-role-action/discussions) 210 | 211 | ## License 212 | 213 | [Apache-2.0 License](LICENSE) 214 | 215 | ![](https://sso.saml.to/github/px?action) 216 | -------------------------------------------------------------------------------- /src/action.ts: -------------------------------------------------------------------------------- 1 | import { exportVariable, getInput, info, notice, setFailed, setOutput } from '@actions/core'; 2 | import { STS } from '@aws-sdk/client-sts'; 3 | import axios from 'axios'; 4 | import { 5 | Configuration, 6 | IDPApi, 7 | GithubSlsRestApiSamlResponseContainer, 8 | GithubSlsRestApiAwsAssumeSdkOptions, 9 | } from '../api/github-sls-rest-api'; 10 | import { exec } from './exec'; 11 | 12 | const { GITHUB_TOKEN, GITHUB_REPOSITORY, GITHUB_SHA, SAML_TO_NONLIVE, SAML_TO_API_KEY } = 13 | process.env; 14 | 15 | export class Action { 16 | async run(): Promise { 17 | if (!GITHUB_TOKEN) { 18 | setFailed(`Missing GITHUB_TOKEN environment variable`); 19 | return; 20 | } 21 | 22 | if (!GITHUB_REPOSITORY) { 23 | throw new Error('Missing GITHUB_REPOSITORY environment variable'); 24 | } 25 | 26 | const [org, repo] = GITHUB_REPOSITORY.split('/'); 27 | if (!org || !repo) { 28 | throw new Error( 29 | `Unable to parse owner and repo from GITHUB_REPOSITORY environment variable: ${GITHUB_REPOSITORY}`, 30 | ); 31 | } 32 | 33 | const role = getInput('role', { required: true }); 34 | const provider = getInput('provider', { required: false }); 35 | const region = getInput('region', { required: false }) || 'us-east-1'; 36 | const configOwner = getInput('configOwner', { required: false }) || org; 37 | const configPath = getInput('configPath', { required: false }) || 'saml-to.yml'; 38 | const profile = getInput('profile', { required: false }) || undefined; 39 | 40 | if (provider) { 41 | info(`Assuming ${provider} Role: ${role} in ${region}`); 42 | } else { 43 | info(`Assuming Role: ${role} in ${region}`); 44 | } 45 | 46 | const configuration = new Configuration({ 47 | accessToken: GITHUB_TOKEN, 48 | baseOptions: { 49 | headers: { 'User-Agent': 'assume-aws-role-action', Origin: GITHUB_REPOSITORY }, 50 | }, 51 | }); 52 | if (SAML_TO_NONLIVE) { 53 | configuration.basePath = 'https://sso-nonlive.saml.to/github'; 54 | configuration.apiKey = SAML_TO_API_KEY; 55 | } 56 | 57 | const api = new IDPApi(configuration); 58 | 59 | let sdkOpts: GithubSlsRestApiAwsAssumeSdkOptions | undefined; 60 | 61 | try { 62 | const { data: response } = await api.assumeRoleForRepo( 63 | org, 64 | repo, 65 | role, 66 | provider || undefined, 67 | GITHUB_SHA, 68 | configOwner, 69 | configPath, 70 | ); 71 | 72 | info(`SAML Response generated for login to ${response.provider} via ${response.recipient}`); 73 | 74 | sdkOpts = response.sdkOptions; 75 | 76 | if (response.attributes && Object.keys(response.attributes).length) { 77 | info(` 78 | SAML Attributes:`); 79 | Object.entries(response.attributes).forEach(([k, v]) => info(` - ${k}: ${v}`)); 80 | } 81 | 82 | await this.assumeAws(response, region, profile); 83 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 84 | } catch (e: any) { 85 | const providerHint = sdkOpts ? ` (${sdkOpts.PrincipalArn}) ` : ' '; 86 | notice(`Unable to assume the role with an ARN of \`${role}\`${ 87 | provider ? ` (with explicitly specified provider: ${provider})` : '' 88 | }. 89 | 90 | Please ensure all of the following: 91 | 1) the SAML Provider Metadata${providerHint}in AWS IAM is correct. It can be obtained by downloading it from: https://saml.to/metadata/github/${org} 92 | 2) the SAML Provider ARN${providerHint}is correct in the \`${configPath}\` configuration file, and in the format of \`arn:aws:iam::ACCOUNT_ID:saml-provider/PROVIDER_NAME\`, 93 | 3) the Role ARN (${role}) is correct in the \`${configPath}\` configuration file, and in the format of \`arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME\` 94 | 4) the Role (${role}) has the correct Trust Relationship ${ 95 | sdkOpts ? `with ${sdkOpts.PrincipalArn}` : `` 96 | }, which can be found by opening the Role in AWS IAM, choosing the Trust Relationship tab, editing it to ensure it's in the following format: 97 | { 98 | "Version": "2012-10-17", 99 | "Statement": [ 100 | { 101 | "Effect": "Allow", 102 | "Principal": { 103 | "Federated": "${sdkOpts ? sdkOpts.PrincipalArn : 'YOUR_PROVIDER_ARN'}" 104 | }, 105 | "Action": "sts:AssumeRoleWithSAML", 106 | "Condition": { 107 | "StringEquals": { 108 | "SAML:aud": "https://signin.aws.amazon.com/saml" 109 | } 110 | } 111 | } 112 | ] 113 | } 114 | 115 | If a provider or role hasn't been created or configured yet, please follow the configuration instructions: https://github.com/saml-to/assume-aws-role-action/blob/main/README.md#configuration`); 116 | if (axios.isAxiosError(e)) { 117 | let message = e.message; 118 | if (e.response && e.response.data && e.response.data.message) { 119 | message = e.response.data.message; 120 | } 121 | 122 | if (e.response && e.response.status === 403) { 123 | const { data } = e.response; 124 | if (data) { 125 | const { context } = data; 126 | if (context && context.org && context.repo && context.configFile) { 127 | if (context.repo !== repo) { 128 | notice(`The SAML.to configuration for \`${org}/${repo}\` is managed in a separate repository: 129 | User/Org: ${context.org} 130 | Repo: ${context.repo} 131 | File: ${context.configFile} 132 | 133 | Provider configuration and role permissions must be made there. 134 | 135 | For more information on configuration files managed in a separate repository, visit: 136 | https://docs.saml.to/usage/github-actions/assume-aws-role-action#centrally-managed-configuration 137 | `); 138 | } 139 | } 140 | } 141 | } 142 | 143 | throw new Error(`Error: ${message}`); 144 | } 145 | throw e; 146 | } 147 | } 148 | 149 | async assumeAws( 150 | response: GithubSlsRestApiSamlResponseContainer, 151 | region: string, 152 | profile?: string, 153 | ): Promise { 154 | const sts = new STS({ region }); 155 | const opts = response.sdkOptions as GithubSlsRestApiAwsAssumeSdkOptions; 156 | if (!opts) { 157 | throw new Error('Missing sdk options from saml response'); 158 | } 159 | 160 | const assumeResponse = await sts.assumeRoleWithSAML({ 161 | ...opts, 162 | SAMLAssertion: response.samlResponse, 163 | }); 164 | 165 | if ( 166 | !assumeResponse.Credentials || 167 | !assumeResponse.Credentials.AccessKeyId || 168 | !assumeResponse.Credentials.SecretAccessKey || 169 | !assumeResponse.Credentials.SessionToken 170 | ) { 171 | throw new Error('Missing credentials'); 172 | } 173 | 174 | const assumedSts = new STS({ 175 | region, 176 | credentials: { 177 | accessKeyId: assumeResponse.Credentials.AccessKeyId, 178 | secretAccessKey: assumeResponse.Credentials.SecretAccessKey, 179 | sessionToken: assumeResponse.Credentials.SessionToken, 180 | }, 181 | }); 182 | 183 | const callerIdentity = await assumedSts.getCallerIdentity({}); 184 | 185 | info(` 186 | Assumed ${opts.RoleArn}: ${callerIdentity.Arn} (Credential expiration at ${assumeResponse.Credentials.Expiration})`); 187 | 188 | setOutput('region', region); 189 | setOutput('accountId', callerIdentity.Account); 190 | setOutput('userId', callerIdentity.UserId); 191 | setOutput('roleArn', opts.RoleArn); 192 | setOutput('assumedRoleArn', callerIdentity.Arn); 193 | setOutput('accessKeyId', assumeResponse.Credentials.AccessKeyId); 194 | setOutput('secretAccessKey', assumeResponse.Credentials.SecretAccessKey); 195 | setOutput('sessionToken', assumeResponse.Credentials.SessionToken); 196 | 197 | if (profile) { 198 | exportVariable('AWS_PROFILE', profile); 199 | 200 | const base = ['aws', 'configure']; 201 | 202 | if (profile !== 'default') { 203 | base.push('--profile', profile); 204 | } 205 | base.push('set'); 206 | await exec([...base, 'region', region]); 207 | await exec([...base, 'aws_access_key_id', assumeResponse.Credentials.AccessKeyId]); 208 | await exec([...base, 'aws_secret_access_key', assumeResponse.Credentials.SecretAccessKey]); 209 | await exec([...base, 'aws_session_token', assumeResponse.Credentials.SessionToken]); 210 | 211 | info(`AWS Profile has been set!`); 212 | return; 213 | } 214 | 215 | exportVariable('AWS_DEFAULT_REGION', region); 216 | exportVariable('AWS_ACCESS_KEY_ID', assumeResponse.Credentials.AccessKeyId); 217 | exportVariable('AWS_SECRET_ACCESS_KEY', assumeResponse.Credentials.SecretAccessKey); 218 | exportVariable('AWS_SESSION_TOKEN', assumeResponse.Credentials.SessionToken); 219 | 220 | info(`Environment Variables have been set!`); 221 | } 222 | } 223 | -------------------------------------------------------------------------------- /.github/workflows/acceptance-tests.yml: -------------------------------------------------------------------------------- 1 | name: 'Run Acceptance Tests' 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | assume-nonlive-fail: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v2 17 | - uses: actions/setup-node@v3 18 | with: 19 | node-version: 16 20 | cache: 'yarn' 21 | - run: yarn 22 | - run: yarn build 23 | - uses: ./ 24 | id: assume_doesnotexist 25 | continue-on-error: true 26 | with: 27 | role: arn:aws:iam::000000000000:role/doesnotexist 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | SAML_TO_NONLIVE: true 31 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 32 | - name: Assume Assertion (Success == Skipped) 33 | if: job.steps.assume_doesnotexist.status == success() 34 | run: exit 1 35 | assume-fail: 36 | runs-on: ubuntu-latest 37 | steps: 38 | - uses: actions/checkout@v2 39 | - uses: actions/setup-node@v3 40 | with: 41 | node-version: 16 42 | cache: 'yarn' 43 | - run: yarn 44 | - run: yarn build 45 | - uses: ./ 46 | id: assume_doesnotexist 47 | continue-on-error: true 48 | with: 49 | role: arn:aws:iam::000000000000:role/doesnotexist 50 | env: 51 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 52 | - name: Assume Assertion (Success == Skipped) 53 | if: job.steps.assume_doesnotexist.status == success() 54 | run: exit 1 55 | 56 | assume-nonlive: 57 | runs-on: ubuntu-latest 58 | steps: 59 | - uses: actions/checkout@v2 60 | - uses: actions/setup-node@v3 61 | with: 62 | node-version: 16 63 | cache: 'yarn' 64 | - run: yarn 65 | - run: yarn build 66 | - uses: ./ 67 | name: Assume test-assume-aws-role-action-nonlive using saml-to/saml-to/saml-to.yml 68 | with: 69 | role: arn:aws:iam::580360238192:role/test-assume-aws-role-action-nonlive 70 | env: 71 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 72 | SAML_TO_NONLIVE: true 73 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 74 | - uses: ./ 75 | name: Assume readonly-nonlive using slyo-org-01/saml-to/saml-to.yml 76 | with: 77 | role: arn:aws:iam::656716386475:role/readonly-nonlive 78 | configOwner: slyo-org-01 79 | env: 80 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 81 | SAML_TO_NONLIVE: true 82 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 83 | - uses: ./ 84 | name: Assume readonly using slyo-org-01/saml-to/saml-to.yml (with provider aws-nonlive) 85 | with: 86 | role: arn:aws:iam::656716386475:role/readonly 87 | configOwner: slyo-org-01 88 | provider: aws-nonlive 89 | env: 90 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 91 | SAML_TO_NONLIVE: true 92 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 93 | # TODO: To support this, we must augment the backend to support configPath for User Tokens 94 | # - uses: ./ 95 | # name: Assume readonly using slyu-standalone-01/saml-to-repo-001/saml-to-nonlive.yml 96 | # with: 97 | # role: arn:aws:iam::656716386475:role/readonly 98 | # configOwner: slyu-standalone-01 99 | # configPath: saml-to-repo-001/saml-to-nonlive.yml 100 | # env: 101 | # GITHUB_TOKEN: ${{ secrets.SLYU_STANDALONE_01_USER_EMAIL_GH_TOKEN }} 102 | # SAML_TO_NONLIVE: true 103 | # SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 104 | 105 | assume-nonlive-with-variables: 106 | runs-on: ubuntu-latest 107 | steps: 108 | - uses: actions/checkout@v2 109 | - uses: actions/setup-node@v3 110 | with: 111 | node-version: 16 112 | cache: 'yarn' 113 | - run: yarn 114 | - run: yarn build 115 | - uses: ./ 116 | name: Assume slyo-org-01-readonly-nonlive using slyo-org-01/saml-to/saml-to.yml 117 | with: 118 | role: arn:aws:iam::758332006924:role/slyo-org-01-readonly-nonlive 119 | configOwner: slyo-org-01 120 | env: 121 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 122 | SAML_TO_NONLIVE: true 123 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 124 | 125 | assume-nonlive-multiaccount: # TODO: assert account ID 126 | runs-on: ubuntu-latest 127 | steps: 128 | - uses: actions/checkout@v2 129 | - uses: actions/setup-node@v3 130 | with: 131 | node-version: 16 132 | cache: 'yarn' 133 | - run: yarn 134 | - run: yarn build 135 | - uses: ./ 136 | name: Assume slyo-org-01-readonly-nonlive in account 931426163329 using slyo-org-01/saml-to/saml-to.yml 137 | with: 138 | role: arn:aws:iam::931426163329:role/slyo-org-01-readonly-nonlive 139 | configOwner: slyo-org-01 140 | env: 141 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 142 | SAML_TO_NONLIVE: true 143 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 144 | - uses: ./ 145 | name: Assume slyo-org-01-readonly-nonlive in account 013527058470 using slyo-org-01/saml-to/saml-to.yml 146 | with: 147 | role: arn:aws:iam::013527058470:role/slyo-org-01-readonly-nonlive 148 | configOwner: slyo-org-01 149 | env: 150 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 151 | SAML_TO_NONLIVE: true 152 | SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 153 | 154 | assume-multiaccount: # TODO: assert account ID 155 | runs-on: ubuntu-latest 156 | steps: 157 | - uses: actions/checkout@v2 158 | - uses: actions/setup-node@v3 159 | with: 160 | node-version: 16 161 | cache: 'yarn' 162 | - run: yarn 163 | - run: yarn build 164 | - uses: ./ 165 | name: Assume slyo-org-01-readonly-live in account 931426163329 using slyo-org-01/saml-to/saml-to.yml 166 | with: 167 | role: arn:aws:iam::931426163329:role/slyo-org-01-readonly-live 168 | configOwner: slyo-org-01 169 | env: 170 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 | - uses: ./ 172 | name: Assume slyo-org-01-readonly-live in account 013527058470 using slyo-org-01/saml-to/saml-to.yml 173 | with: 174 | role: arn:aws:iam::013527058470:role/slyo-org-01-readonly-live 175 | configOwner: slyo-org-01 176 | env: 177 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 178 | 179 | assume: 180 | runs-on: ubuntu-latest 181 | steps: 182 | - uses: actions/checkout@v2 183 | - uses: actions/setup-node@v3 184 | with: 185 | node-version: 16 186 | cache: 'yarn' 187 | - run: yarn 188 | - run: yarn build 189 | - uses: ./ 190 | name: Assume test-assume-aws-role-action using saml-to/saml-to/saml-to.yml 191 | with: 192 | role: arn:aws:iam::580360238192:role/test-assume-aws-role-action 193 | env: 194 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 195 | - uses: ./ 196 | name: Assume readonly-live using slyo-org-01/saml-to/saml-to.yml 197 | with: 198 | role: arn:aws:iam::656716386475:role/readonly-live 199 | configOwner: slyo-org-01 200 | env: 201 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 202 | - uses: ./ 203 | name: Assume readonly using slyo-org-01/saml-to/saml-to.yml (with provider aws) 204 | with: 205 | role: arn:aws:iam::656716386475:role/readonly 206 | configOwner: slyo-org-01 207 | provider: aws 208 | env: 209 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 210 | # TODO: To support this, we must augment the backend to support configPath for User Tokens 211 | # - uses: ./ 212 | # name: Assume readonly using slyu-standalone-01/saml-to-repo-001/saml-to-live.yml 213 | # with: 214 | # role: arn:aws:iam::656716386475:role/readonly 215 | # configOwner: slyu-standalone-01 216 | # configPath: saml-to-repo-001/saml-to-live.yml 217 | # env: 218 | # GITHUB_TOKEN: ${{ secrets.SLYU_STANDALONE_01_USER_EMAIL_GH_TOKEN }} 219 | # SAML_TO_NONLIVE: true 220 | # SAML_TO_API_KEY: ${{ secrets.NONLIVE_API_KEY }} 221 | 222 | assume-with-variables: 223 | runs-on: ubuntu-latest 224 | steps: 225 | - uses: actions/checkout@v2 226 | - uses: actions/setup-node@v3 227 | with: 228 | node-version: 16 229 | cache: 'yarn' 230 | - run: yarn 231 | - run: yarn build 232 | - uses: ./ 233 | name: Assume slyo-org-01-readonly-nonlive using slyo-org-01/saml-to/saml-to.yml 234 | with: 235 | role: arn:aws:iam::758332006924:role/slyo-org-01-readonly-live 236 | configOwner: slyo-org-01 237 | env: 238 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 239 | 240 | assume-with-profile: 241 | runs-on: ubuntu-latest 242 | steps: 243 | - uses: actions/checkout@v2 244 | - uses: actions/setup-node@v3 245 | with: 246 | node-version: 16 247 | cache: 'yarn' 248 | - run: yarn 249 | - run: yarn build 250 | - uses: ./ 251 | name: Assume test-assume-aws-role-action using saml-to/saml-to/saml-to.yml 252 | with: 253 | role: arn:aws:iam::580360238192:role/test-assume-aws-role-action 254 | profile: my-profile 255 | env: 256 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 257 | - run: aws sts get-caller-identity 258 | name: Test using environment variable 259 | - run: aws sts get-caller-identity --profile my-profile 260 | name: Test using --profile flag 261 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | Copyright 2022 Scaffoldly LLC 177 | 178 | Licensed under the Apache License, Version 2.0 (the "License"); 179 | you may not use this file except in compliance with the License. 180 | You may obtain a copy of the License at 181 | 182 | http://www.apache.org/licenses/LICENSE-2.0 183 | 184 | Unless required by applicable law or agreed to in writing, software 185 | distributed under the License is distributed on an "AS IS" BASIS, 186 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 187 | See the License for the specific language governing permissions and 188 | limitations under the License. 189 | -------------------------------------------------------------------------------- /api/github-sls-rest-api/api.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * github-sls-rest-api 5 | * To generate a JWT token, go to the JWT Token Generator 6 | * 7 | * The version of the OpenAPI document: 1.0.89-0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | import { Configuration } from './configuration'; 17 | import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; 18 | // Some imports not used depending on template conditions 19 | // @ts-ignore 20 | import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; 21 | // @ts-ignore 22 | import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; 23 | 24 | /** 25 | * 26 | * @export 27 | * @interface GithubSlsRestApiAssumeBrowserResponse 28 | */ 29 | export interface GithubSlsRestApiAssumeBrowserResponse { 30 | /** 31 | * 32 | * @type {string} 33 | * @memberof GithubSlsRestApiAssumeBrowserResponse 34 | */ 35 | 'browserUri': string; 36 | } 37 | /** 38 | * 39 | * @export 40 | * @interface GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 41 | */ 42 | export interface GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 { 43 | /** 44 | * 45 | * @type {GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1VersionEnum} 46 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 47 | */ 48 | 'version': GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1VersionEnum; 49 | /** 50 | * 51 | * @type {GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1TypeEnum} 52 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 53 | */ 54 | 'type': GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1TypeEnum; 55 | /** 56 | * 57 | * @type {object} 58 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 59 | */ 60 | 'state': object; 61 | /** 62 | * 63 | * @type {number} 64 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 65 | */ 66 | 'installationId': number; 67 | /** 68 | * 69 | * @type {number} 70 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 71 | */ 72 | 'appId': number; 73 | /** 74 | * 75 | * @type {string} 76 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1 77 | */ 78 | 'target': string; 79 | } 80 | /** 81 | * 82 | * @export 83 | * @enum {string} 84 | */ 85 | 86 | export enum GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1TypeEnum { 87 | GithubInstallationEvent = 'GithubInstallationEvent' 88 | } 89 | 90 | /** 91 | * 92 | * @export 93 | * @enum {string} 94 | */ 95 | 96 | export enum GithubSlsRestApiAuthSlsRestApiGithubInstallationEventV1VersionEnum { 97 | NUMBER_1 = 1 98 | } 99 | 100 | /** 101 | * 102 | * @export 103 | * @interface GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 104 | */ 105 | export interface GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 { 106 | /** 107 | * 108 | * @type {GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1VersionEnum} 109 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 110 | */ 111 | 'version': GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1VersionEnum; 112 | /** 113 | * 114 | * @type {GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1TypeEnum} 115 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 116 | */ 117 | 'type': GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1TypeEnum; 118 | /** 119 | * 120 | * @type {boolean} 121 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 122 | */ 123 | 'deleted'?: boolean; 124 | /** 125 | * 126 | * @type {number} 127 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 128 | */ 129 | 'installationId'?: number; 130 | /** 131 | * 132 | * @type {number} 133 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 134 | */ 135 | 'appId'?: number; 136 | /** 137 | * 138 | * @type {string} 139 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 140 | */ 141 | 'token'?: string; 142 | /** 143 | * 144 | * @type {string} 145 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 146 | */ 147 | 'email'?: string; 148 | /** 149 | * 150 | * @type {string} 151 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1 152 | */ 153 | 'login': string; 154 | } 155 | /** 156 | * 157 | * @export 158 | * @enum {string} 159 | */ 160 | 161 | export enum GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1TypeEnum { 162 | GithubLoginTokenEvent = 'GithubLoginTokenEvent' 163 | } 164 | 165 | /** 166 | * 167 | * @export 168 | * @enum {string} 169 | */ 170 | 171 | export enum GithubSlsRestApiAuthSlsRestApiGithubLoginTokenEventV1VersionEnum { 172 | NUMBER_1 = 1 173 | } 174 | 175 | /** 176 | * 177 | * @export 178 | * @interface GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 179 | */ 180 | export interface GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 { 181 | /** 182 | * 183 | * @type {GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1VersionEnum} 184 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 185 | */ 186 | 'version': GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1VersionEnum; 187 | /** 188 | * 189 | * @type {GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1TypeEnum} 190 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 191 | */ 192 | 'type': GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1TypeEnum; 193 | /** 194 | * 195 | * @type {boolean} 196 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 197 | */ 198 | 'removed'?: boolean; 199 | /** 200 | * 201 | * @type {string} 202 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 203 | */ 204 | 'team': string; 205 | /** 206 | * 207 | * @type {string} 208 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 209 | */ 210 | 'login': string; 211 | /** 212 | * 213 | * @type {number} 214 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 215 | */ 216 | 'appId': number; 217 | /** 218 | * 219 | * @type {string} 220 | * @memberof GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1 221 | */ 222 | 'target': string; 223 | } 224 | /** 225 | * 226 | * @export 227 | * @enum {string} 228 | */ 229 | 230 | export enum GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1TypeEnum { 231 | GithubMembershipEvent = 'GithubMembershipEvent' 232 | } 233 | 234 | /** 235 | * 236 | * @export 237 | * @enum {string} 238 | */ 239 | 240 | export enum GithubSlsRestApiAuthSlsRestApiGithubMembershipEventV1VersionEnum { 241 | NUMBER_1 = 1 242 | } 243 | 244 | /** 245 | * 246 | * @export 247 | * @interface GithubSlsRestApiAwsAssumeSdkOptions 248 | */ 249 | export interface GithubSlsRestApiAwsAssumeSdkOptions { 250 | /** 251 | * 252 | * @type {number} 253 | * @memberof GithubSlsRestApiAwsAssumeSdkOptions 254 | */ 255 | 'DurationSeconds': number; 256 | /** 257 | * 258 | * @type {string} 259 | * @memberof GithubSlsRestApiAwsAssumeSdkOptions 260 | */ 261 | 'RoleArn': string; 262 | /** 263 | * 264 | * @type {string} 265 | * @memberof GithubSlsRestApiAwsAssumeSdkOptions 266 | */ 267 | 'PrincipalArn': string; 268 | } 269 | /** 270 | * 271 | * @export 272 | * @interface GithubSlsRestApiBaseEventCacheClearRequest1 273 | */ 274 | export interface GithubSlsRestApiBaseEventCacheClearRequest1 { 275 | /** 276 | * 277 | * @type {number} 278 | * @memberof GithubSlsRestApiBaseEventCacheClearRequest1 279 | */ 280 | 'version': GithubSlsRestApiBaseEventCacheClearRequest1VersionEnum; 281 | /** 282 | * 283 | * @type {string} 284 | * @memberof GithubSlsRestApiBaseEventCacheClearRequest1 285 | */ 286 | 'type': GithubSlsRestApiBaseEventCacheClearRequest1TypeEnum; 287 | } 288 | 289 | /** 290 | * @export 291 | * @enum {string} 292 | */ 293 | export enum GithubSlsRestApiBaseEventCacheClearRequest1VersionEnum { 294 | NUMBER_1 = 1 295 | } 296 | /** 297 | * @export 298 | * @enum {string} 299 | */ 300 | export enum GithubSlsRestApiBaseEventCacheClearRequest1TypeEnum { 301 | CacheClearRequest = 'CacheClearRequest' 302 | } 303 | 304 | /** 305 | * 306 | * @export 307 | * @interface GithubSlsRestApiBaseEventConfigChanged1 308 | */ 309 | export interface GithubSlsRestApiBaseEventConfigChanged1 { 310 | /** 311 | * 312 | * @type {number} 313 | * @memberof GithubSlsRestApiBaseEventConfigChanged1 314 | */ 315 | 'version': GithubSlsRestApiBaseEventConfigChanged1VersionEnum; 316 | /** 317 | * 318 | * @type {string} 319 | * @memberof GithubSlsRestApiBaseEventConfigChanged1 320 | */ 321 | 'type': GithubSlsRestApiBaseEventConfigChanged1TypeEnum; 322 | } 323 | 324 | /** 325 | * @export 326 | * @enum {string} 327 | */ 328 | export enum GithubSlsRestApiBaseEventConfigChanged1VersionEnum { 329 | NUMBER_1 = 1 330 | } 331 | /** 332 | * @export 333 | * @enum {string} 334 | */ 335 | export enum GithubSlsRestApiBaseEventConfigChanged1TypeEnum { 336 | ConfigChanged = 'ConfigChanged' 337 | } 338 | 339 | /** 340 | * 341 | * @export 342 | * @interface GithubSlsRestApiBaseEventIdpCertificate1 343 | */ 344 | export interface GithubSlsRestApiBaseEventIdpCertificate1 { 345 | /** 346 | * 347 | * @type {number} 348 | * @memberof GithubSlsRestApiBaseEventIdpCertificate1 349 | */ 350 | 'version': GithubSlsRestApiBaseEventIdpCertificate1VersionEnum; 351 | /** 352 | * 353 | * @type {string} 354 | * @memberof GithubSlsRestApiBaseEventIdpCertificate1 355 | */ 356 | 'type': GithubSlsRestApiBaseEventIdpCertificate1TypeEnum; 357 | } 358 | 359 | /** 360 | * @export 361 | * @enum {string} 362 | */ 363 | export enum GithubSlsRestApiBaseEventIdpCertificate1VersionEnum { 364 | NUMBER_1 = 1 365 | } 366 | /** 367 | * @export 368 | * @enum {string} 369 | */ 370 | export enum GithubSlsRestApiBaseEventIdpCertificate1TypeEnum { 371 | IdpCertificate = 'IdpCertificate' 372 | } 373 | 374 | /** 375 | * 376 | * @export 377 | * @interface GithubSlsRestApiCacheClearRequestEventV1 378 | */ 379 | export interface GithubSlsRestApiCacheClearRequestEventV1 { 380 | /** 381 | * 382 | * @type {number} 383 | * @memberof GithubSlsRestApiCacheClearRequestEventV1 384 | */ 385 | 'version': GithubSlsRestApiCacheClearRequestEventV1VersionEnum; 386 | /** 387 | * 388 | * @type {string} 389 | * @memberof GithubSlsRestApiCacheClearRequestEventV1 390 | */ 391 | 'type': GithubSlsRestApiCacheClearRequestEventV1TypeEnum; 392 | /** 393 | * 394 | * @type {number} 395 | * @memberof GithubSlsRestApiCacheClearRequestEventV1 396 | */ 397 | 'appId'?: number; 398 | /** 399 | * 400 | * @type {string} 401 | * @memberof GithubSlsRestApiCacheClearRequestEventV1 402 | */ 403 | 'repo': string; 404 | /** 405 | * 406 | * @type {string} 407 | * @memberof GithubSlsRestApiCacheClearRequestEventV1 408 | */ 409 | 'org': string; 410 | } 411 | 412 | /** 413 | * @export 414 | * @enum {string} 415 | */ 416 | export enum GithubSlsRestApiCacheClearRequestEventV1VersionEnum { 417 | NUMBER_1 = 1 418 | } 419 | /** 420 | * @export 421 | * @enum {string} 422 | */ 423 | export enum GithubSlsRestApiCacheClearRequestEventV1TypeEnum { 424 | CacheClearRequest = 'CacheClearRequest' 425 | } 426 | 427 | /** 428 | * 429 | * @export 430 | * @interface GithubSlsRestApiCacheClearRequestEventV1AllOf 431 | */ 432 | export interface GithubSlsRestApiCacheClearRequestEventV1AllOf { 433 | /** 434 | * 435 | * @type {number} 436 | * @memberof GithubSlsRestApiCacheClearRequestEventV1AllOf 437 | */ 438 | 'appId'?: number; 439 | /** 440 | * 441 | * @type {string} 442 | * @memberof GithubSlsRestApiCacheClearRequestEventV1AllOf 443 | */ 444 | 'repo': string; 445 | /** 446 | * 447 | * @type {string} 448 | * @memberof GithubSlsRestApiCacheClearRequestEventV1AllOf 449 | */ 450 | 'org': string; 451 | } 452 | /** 453 | * 454 | * @export 455 | * @interface GithubSlsRestApiCloudFormationGetAtt 456 | */ 457 | export interface GithubSlsRestApiCloudFormationGetAtt { 458 | /** 459 | * 460 | * @type {Array} 461 | * @memberof GithubSlsRestApiCloudFormationGetAtt 462 | */ 463 | 'Fn::GetAtt': Array; 464 | } 465 | /** 466 | * 467 | * @export 468 | * @interface GithubSlsRestApiCloudFormationHookEventV1 469 | */ 470 | export interface GithubSlsRestApiCloudFormationHookEventV1 { 471 | /** 472 | * 473 | * @type {string | GithubSlsRestApiCloudFormationGetAtt} 474 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 475 | */ 476 | 'roleName'?: string | GithubSlsRestApiCloudFormationGetAtt; 477 | /** 478 | * 479 | * @type {string | GithubSlsRestApiCloudFormationGetAtt} 480 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 481 | */ 482 | 'roleArn'?: string | GithubSlsRestApiCloudFormationGetAtt; 483 | /** 484 | * 485 | * @type {string | GithubSlsRestApiCloudFormationGetAtt} 486 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 487 | */ 488 | 'providerArn': string | GithubSlsRestApiCloudFormationGetAtt; 489 | /** 490 | * 491 | * @type {string} 492 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 493 | */ 494 | 'stage': string; 495 | /** 496 | * 497 | * @type {string} 498 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 499 | */ 500 | 'templateId': string; 501 | /** 502 | * 503 | * @type {string} 504 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 505 | */ 506 | 'org': string; 507 | /** 508 | * 509 | * @type {number} 510 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 511 | */ 512 | 'version': GithubSlsRestApiCloudFormationHookEventV1VersionEnum; 513 | /** 514 | * 515 | * @type {string} 516 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 517 | */ 518 | 'type': GithubSlsRestApiCloudFormationHookEventV1TypeEnum; 519 | /** 520 | * 521 | * @type {string} 522 | * @memberof GithubSlsRestApiCloudFormationHookEventV1 523 | */ 524 | 'ServiceToken': string; 525 | } 526 | 527 | /** 528 | * @export 529 | * @enum {string} 530 | */ 531 | export enum GithubSlsRestApiCloudFormationHookEventV1VersionEnum { 532 | NUMBER_1 = 1 533 | } 534 | /** 535 | * @export 536 | * @enum {string} 537 | */ 538 | export enum GithubSlsRestApiCloudFormationHookEventV1TypeEnum { 539 | CloudFormationHookEvent = 'CloudFormationHookEvent' 540 | } 541 | 542 | /** 543 | * 544 | * @export 545 | * @interface GithubSlsRestApiCloudFormationResponse 546 | */ 547 | export interface GithubSlsRestApiCloudFormationResponse { 548 | /** 549 | * 550 | * @type {string} 551 | * @memberof GithubSlsRestApiCloudFormationResponse 552 | */ 553 | 'roleName'?: string; 554 | /** 555 | * 556 | * @type {Array} 557 | * @memberof GithubSlsRestApiCloudFormationResponse 558 | */ 559 | 'configVariables'?: Array; 560 | /** 561 | * 562 | * @type {number} 563 | * @memberof GithubSlsRestApiCloudFormationResponse 564 | */ 565 | 'pollInterval': number; 566 | /** 567 | * 568 | * @type {string} 569 | * @memberof GithubSlsRestApiCloudFormationResponse 570 | */ 571 | 'cloudFormationUrl': string; 572 | /** 573 | * 574 | * @type {string} 575 | * @memberof GithubSlsRestApiCloudFormationResponse 576 | */ 577 | 'templateUrl': string; 578 | /** 579 | * 580 | * @type {string} 581 | * @memberof GithubSlsRestApiCloudFormationResponse 582 | */ 583 | 'templateId': string; 584 | } 585 | /** 586 | * 587 | * @export 588 | * @interface GithubSlsRestApiConfigBaseSupportedVersions 589 | */ 590 | export interface GithubSlsRestApiConfigBaseSupportedVersions { 591 | /** 592 | * 593 | * @type {string} 594 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 595 | */ 596 | 'ts'?: string; 597 | /** 598 | * 599 | * @type {string} 600 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 601 | */ 602 | 'repo'?: string; 603 | /** 604 | * 605 | * @type {string} 606 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 607 | */ 608 | 'org'?: string; 609 | /** 610 | * 611 | * @type {string} 612 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 613 | */ 614 | 'ref'?: string; 615 | /** 616 | * 617 | * @type {string} 618 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 619 | */ 620 | 'shaRendered'?: string; 621 | /** 622 | * 623 | * @type {string} 624 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 625 | */ 626 | 'sha'?: string; 627 | /** 628 | * 629 | * @type {string} 630 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 631 | */ 632 | 'path'?: string; 633 | /** 634 | * 635 | * @type {GithubSlsRestApiSupportedVersions} 636 | * @memberof GithubSlsRestApiConfigBaseSupportedVersions 637 | */ 638 | 'version': GithubSlsRestApiSupportedVersions; 639 | } 640 | /** 641 | * 642 | * @export 643 | * @interface GithubSlsRestApiConfigChangedEventV1 644 | */ 645 | export interface GithubSlsRestApiConfigChangedEventV1 { 646 | /** 647 | * 648 | * @type {number} 649 | * @memberof GithubSlsRestApiConfigChangedEventV1 650 | */ 651 | 'version': GithubSlsRestApiConfigChangedEventV1VersionEnum; 652 | /** 653 | * 654 | * @type {string} 655 | * @memberof GithubSlsRestApiConfigChangedEventV1 656 | */ 657 | 'type': GithubSlsRestApiConfigChangedEventV1TypeEnum; 658 | /** 659 | * 660 | * @type {GithubSlsRestApiConfigChangedEventV1AllOfPrevious} 661 | * @memberof GithubSlsRestApiConfigChangedEventV1 662 | */ 663 | 'previous': GithubSlsRestApiConfigChangedEventV1AllOfPrevious; 664 | /** 665 | * 666 | * @type {string} 667 | * @memberof GithubSlsRestApiConfigChangedEventV1 668 | */ 669 | 'configSha'?: string; 670 | /** 671 | * 672 | * @type {string} 673 | * @memberof GithubSlsRestApiConfigChangedEventV1 674 | */ 675 | 'repo': string; 676 | /** 677 | * 678 | * @type {string} 679 | * @memberof GithubSlsRestApiConfigChangedEventV1 680 | */ 681 | 'org': string; 682 | /** 683 | * 684 | * @type {Array} 685 | * @memberof GithubSlsRestApiConfigChangedEventV1 686 | */ 687 | 'states': Array; 688 | } 689 | 690 | /** 691 | * @export 692 | * @enum {string} 693 | */ 694 | export enum GithubSlsRestApiConfigChangedEventV1VersionEnum { 695 | NUMBER_1 = 1 696 | } 697 | /** 698 | * @export 699 | * @enum {string} 700 | */ 701 | export enum GithubSlsRestApiConfigChangedEventV1TypeEnum { 702 | ConfigChanged = 'ConfigChanged' 703 | } 704 | /** 705 | * @export 706 | * @enum {string} 707 | */ 708 | export enum GithubSlsRestApiConfigChangedEventV1StatesEnum { 709 | ShaChanged = 'SHA_CHANGED' 710 | } 711 | 712 | /** 713 | * 714 | * @export 715 | * @interface GithubSlsRestApiConfigChangedEventV1AllOf 716 | */ 717 | export interface GithubSlsRestApiConfigChangedEventV1AllOf { 718 | /** 719 | * 720 | * @type {GithubSlsRestApiConfigChangedEventV1AllOfPrevious} 721 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOf 722 | */ 723 | 'previous': GithubSlsRestApiConfigChangedEventV1AllOfPrevious; 724 | /** 725 | * 726 | * @type {string} 727 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOf 728 | */ 729 | 'configSha'?: string; 730 | /** 731 | * 732 | * @type {string} 733 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOf 734 | */ 735 | 'repo': string; 736 | /** 737 | * 738 | * @type {string} 739 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOf 740 | */ 741 | 'org': string; 742 | /** 743 | * 744 | * @type {Array} 745 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOf 746 | */ 747 | 'states': Array; 748 | } 749 | 750 | /** 751 | * @export 752 | * @enum {string} 753 | */ 754 | export enum GithubSlsRestApiConfigChangedEventV1AllOfStatesEnum { 755 | ShaChanged = 'SHA_CHANGED' 756 | } 757 | 758 | /** 759 | * 760 | * @export 761 | * @interface GithubSlsRestApiConfigChangedEventV1AllOfPrevious 762 | */ 763 | export interface GithubSlsRestApiConfigChangedEventV1AllOfPrevious { 764 | /** 765 | * 766 | * @type {string} 767 | * @memberof GithubSlsRestApiConfigChangedEventV1AllOfPrevious 768 | */ 769 | 'configSha'?: string; 770 | } 771 | /** 772 | * 773 | * @export 774 | * @interface GithubSlsRestApiConfigV20220101 775 | */ 776 | export interface GithubSlsRestApiConfigV20220101 { 777 | /** 778 | * 779 | * @type {string} 780 | * @memberof GithubSlsRestApiConfigV20220101 781 | */ 782 | 'ts'?: string; 783 | /** 784 | * 785 | * @type {string} 786 | * @memberof GithubSlsRestApiConfigV20220101 787 | */ 788 | 'repo'?: string; 789 | /** 790 | * 791 | * @type {string} 792 | * @memberof GithubSlsRestApiConfigV20220101 793 | */ 794 | 'org'?: string; 795 | /** 796 | * 797 | * @type {string} 798 | * @memberof GithubSlsRestApiConfigV20220101 799 | */ 800 | 'ref'?: string; 801 | /** 802 | * 803 | * @type {string} 804 | * @memberof GithubSlsRestApiConfigV20220101 805 | */ 806 | 'shaRendered'?: string; 807 | /** 808 | * 809 | * @type {string} 810 | * @memberof GithubSlsRestApiConfigV20220101 811 | */ 812 | 'sha'?: string; 813 | /** 814 | * 815 | * @type {string} 816 | * @memberof GithubSlsRestApiConfigV20220101 817 | */ 818 | 'path'?: string; 819 | /** 820 | * 821 | * @type {GithubSlsRestApiSupportedVersions} 822 | * @memberof GithubSlsRestApiConfigV20220101 823 | */ 824 | 'version': GithubSlsRestApiSupportedVersions; 825 | /** 826 | * 827 | * @type {{ [key: string]: GithubSlsRestApiPermissionV1; }} 828 | * @memberof GithubSlsRestApiConfigV20220101 829 | */ 830 | 'permissions'?: { [key: string]: GithubSlsRestApiPermissionV1; }; 831 | /** 832 | * 833 | * @type {{ [key: string]: GithubSlsRestApiProviderV1; }} 834 | * @memberof GithubSlsRestApiConfigV20220101 835 | */ 836 | 'providers'?: { [key: string]: GithubSlsRestApiProviderV1; }; 837 | /** 838 | * 839 | * @type {{ [key: string]: GithubSlsRestApiVariableV1; }} 840 | * @memberof GithubSlsRestApiConfigV20220101 841 | */ 842 | 'variables'?: { [key: string]: GithubSlsRestApiVariableV1; }; 843 | } 844 | /** 845 | * 846 | * @export 847 | * @interface GithubSlsRestApiConfigV20220101AllOf 848 | */ 849 | export interface GithubSlsRestApiConfigV20220101AllOf { 850 | /** 851 | * 852 | * @type {{ [key: string]: GithubSlsRestApiPermissionV1; }} 853 | * @memberof GithubSlsRestApiConfigV20220101AllOf 854 | */ 855 | 'permissions'?: { [key: string]: GithubSlsRestApiPermissionV1; }; 856 | /** 857 | * 858 | * @type {{ [key: string]: GithubSlsRestApiProviderV1; }} 859 | * @memberof GithubSlsRestApiConfigV20220101AllOf 860 | */ 861 | 'providers'?: { [key: string]: GithubSlsRestApiProviderV1; }; 862 | /** 863 | * 864 | * @type {{ [key: string]: GithubSlsRestApiVariableV1; }} 865 | * @memberof GithubSlsRestApiConfigV20220101AllOf 866 | */ 867 | 'variables'?: { [key: string]: GithubSlsRestApiVariableV1; }; 868 | } 869 | /** 870 | * 871 | * @export 872 | * @interface GithubSlsRestApiConfigVariable 873 | */ 874 | export interface GithubSlsRestApiConfigVariable { 875 | /** 876 | * 877 | * @type {string} 878 | * @memberof GithubSlsRestApiConfigVariable 879 | */ 880 | 'awsRoleArn'?: string; 881 | /** 882 | * 883 | * @type {string} 884 | * @memberof GithubSlsRestApiConfigVariable 885 | */ 886 | 'awsProviderArn': string; 887 | /** 888 | * 889 | * @type {string} 890 | * @memberof GithubSlsRestApiConfigVariable 891 | */ 892 | 'awsAccountId': string; 893 | } 894 | /** 895 | * 896 | * @export 897 | * @interface GithubSlsRestApiConfigVariablesResponse 898 | */ 899 | export interface GithubSlsRestApiConfigVariablesResponse { 900 | /** 901 | * 902 | * @type {Array} 903 | * @memberof GithubSlsRestApiConfigVariablesResponse 904 | */ 905 | 'results': Array; 906 | } 907 | /** 908 | * 909 | * @export 910 | * @interface GithubSlsRestApiConsolidateRequest 911 | */ 912 | export interface GithubSlsRestApiConsolidateRequest { 913 | /** 914 | * 915 | * @type {Array} 916 | * @memberof GithubSlsRestApiConsolidateRequest 917 | */ 918 | 'repos'?: Array; 919 | } 920 | /** 921 | * 922 | * @export 923 | * @interface GithubSlsRestApiConsolidateResponse 924 | */ 925 | export interface GithubSlsRestApiConsolidateResponse { 926 | /** 927 | * 928 | * @type {GithubSlsRestApiConfigV20220101} 929 | * @memberof GithubSlsRestApiConsolidateResponse 930 | */ 931 | 'after': GithubSlsRestApiConfigV20220101; 932 | /** 933 | * 934 | * @type {{ [key: string]: GithubSlsRestApiConfigV20220101; }} 935 | * @memberof GithubSlsRestApiConsolidateResponse 936 | */ 937 | 'before': { [key: string]: GithubSlsRestApiConfigV20220101; }; 938 | } 939 | /** 940 | * 941 | * @export 942 | * @interface GithubSlsRestApiEncryptRequest 943 | */ 944 | export interface GithubSlsRestApiEncryptRequest { 945 | /** 946 | * 947 | * @type {string} 948 | * @memberof GithubSlsRestApiEncryptRequest 949 | */ 950 | 'value': string; 951 | } 952 | /** 953 | * 954 | * @export 955 | * @interface GithubSlsRestApiEncryptResponse 956 | */ 957 | export interface GithubSlsRestApiEncryptResponse { 958 | /** 959 | * 960 | * @type {string} 961 | * @memberof GithubSlsRestApiEncryptResponse 962 | */ 963 | 'encryptedValue': string; 964 | } 965 | /** 966 | * This file was automatically generated by joi-to-typescript Do not modify this file manually 967 | * @export 968 | * @interface GithubSlsRestApiEncryptedField 969 | */ 970 | export interface GithubSlsRestApiEncryptedField { 971 | /** 972 | * 973 | * @type {string} 974 | * @memberof GithubSlsRestApiEncryptedField 975 | */ 976 | 'encryptedValue': string; 977 | /** 978 | * 979 | * @type {string} 980 | * @memberof GithubSlsRestApiEncryptedField 981 | */ 982 | 'keyId': string; 983 | } 984 | /** 985 | * 986 | * @export 987 | * @interface GithubSlsRestApiErrorResponse 988 | */ 989 | export interface GithubSlsRestApiErrorResponse { 990 | /** 991 | * 992 | * @type {string} 993 | * @memberof GithubSlsRestApiErrorResponse 994 | */ 995 | 'message': string; 996 | /** 997 | * 998 | * @type {string} 999 | * @memberof GithubSlsRestApiErrorResponse 1000 | */ 1001 | 'traceId': string; 1002 | /** 1003 | * 1004 | * @type {GithubSlsRestApiErrorResponseTracking} 1005 | * @memberof GithubSlsRestApiErrorResponse 1006 | */ 1007 | 'tracking': GithubSlsRestApiErrorResponseTracking; 1008 | /** 1009 | * 1010 | * @type {{ [key: string]: any; }} 1011 | * @memberof GithubSlsRestApiErrorResponse 1012 | */ 1013 | 'context'?: { [key: string]: any; }; 1014 | } 1015 | /** 1016 | * 1017 | * @export 1018 | * @interface GithubSlsRestApiErrorResponseTracking 1019 | */ 1020 | export interface GithubSlsRestApiErrorResponseTracking { 1021 | /** 1022 | * 1023 | * @type {string} 1024 | * @memberof GithubSlsRestApiErrorResponseTracking 1025 | */ 1026 | 'method': string; 1027 | /** 1028 | * 1029 | * @type {string} 1030 | * @memberof GithubSlsRestApiErrorResponseTracking 1031 | */ 1032 | 'path': string; 1033 | /** 1034 | * 1035 | * @type {string} 1036 | * @memberof GithubSlsRestApiErrorResponseTracking 1037 | */ 1038 | 'version': string; 1039 | } 1040 | /** 1041 | * 1042 | * @export 1043 | * @interface GithubSlsRestApiGithubUserResponse 1044 | */ 1045 | export interface GithubSlsRestApiGithubUserResponse { 1046 | /** 1047 | * 1048 | * @type {string} 1049 | * @memberof GithubSlsRestApiGithubUserResponse 1050 | */ 1051 | 'login': string; 1052 | } 1053 | /** 1054 | * 1055 | * @export 1056 | * @interface GithubSlsRestApiHealthResponse 1057 | */ 1058 | export interface GithubSlsRestApiHealthResponse { 1059 | /** 1060 | * 1061 | * @type {string} 1062 | * @memberof GithubSlsRestApiHealthResponse 1063 | */ 1064 | 'version': string; 1065 | /** 1066 | * 1067 | * @type {string} 1068 | * @memberof GithubSlsRestApiHealthResponse 1069 | */ 1070 | 'now': string; 1071 | /** 1072 | * 1073 | * @type {boolean} 1074 | * @memberof GithubSlsRestApiHealthResponse 1075 | */ 1076 | 'healty': boolean; 1077 | /** 1078 | * 1079 | * @type {string} 1080 | * @memberof GithubSlsRestApiHealthResponse 1081 | */ 1082 | 'name': string; 1083 | } 1084 | /** 1085 | * 1086 | * @export 1087 | * @interface GithubSlsRestApiIdentityResponse 1088 | */ 1089 | export interface GithubSlsRestApiIdentityResponse { 1090 | /** 1091 | * 1092 | * @type {string} 1093 | * @memberof GithubSlsRestApiIdentityResponse 1094 | */ 1095 | 'type': string; 1096 | /** 1097 | * 1098 | * @type {string} 1099 | * @memberof GithubSlsRestApiIdentityResponse 1100 | */ 1101 | 'name': string; 1102 | /** 1103 | * 1104 | * @type {number} 1105 | * @memberof GithubSlsRestApiIdentityResponse 1106 | */ 1107 | 'id': number; 1108 | /** 1109 | * 1110 | * @type {string} 1111 | * @memberof GithubSlsRestApiIdentityResponse 1112 | */ 1113 | 'fullName': string; 1114 | /** 1115 | * 1116 | * @type {string} 1117 | * @memberof GithubSlsRestApiIdentityResponse 1118 | */ 1119 | 'email': string; 1120 | /** 1121 | * 1122 | * @type {string} 1123 | * @memberof GithubSlsRestApiIdentityResponse 1124 | */ 1125 | 'clientId': string; 1126 | } 1127 | /** 1128 | * 1129 | * @export 1130 | * @interface GithubSlsRestApiIdpCertificateEventV1 1131 | */ 1132 | export interface GithubSlsRestApiIdpCertificateEventV1 { 1133 | /** 1134 | * 1135 | * @type {number} 1136 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1137 | */ 1138 | 'version': GithubSlsRestApiIdpCertificateEventV1VersionEnum; 1139 | /** 1140 | * 1141 | * @type {string} 1142 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1143 | */ 1144 | 'type': GithubSlsRestApiIdpCertificateEventV1TypeEnum; 1145 | /** 1146 | * 1147 | * @type {string} 1148 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1149 | */ 1150 | 'serial': string; 1151 | /** 1152 | * 1153 | * @type {string} 1154 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1155 | */ 1156 | 'repo': string; 1157 | /** 1158 | * 1159 | * @type {string} 1160 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1161 | */ 1162 | 'org': string; 1163 | /** 1164 | * 1165 | * @type {string} 1166 | * @memberof GithubSlsRestApiIdpCertificateEventV1 1167 | */ 1168 | 'state': GithubSlsRestApiIdpCertificateEventV1StateEnum; 1169 | } 1170 | 1171 | /** 1172 | * @export 1173 | * @enum {string} 1174 | */ 1175 | export enum GithubSlsRestApiIdpCertificateEventV1VersionEnum { 1176 | NUMBER_1 = 1 1177 | } 1178 | /** 1179 | * @export 1180 | * @enum {string} 1181 | */ 1182 | export enum GithubSlsRestApiIdpCertificateEventV1TypeEnum { 1183 | IdpCertificate = 'IdpCertificate' 1184 | } 1185 | /** 1186 | * @export 1187 | * @enum {string} 1188 | */ 1189 | export enum GithubSlsRestApiIdpCertificateEventV1StateEnum { 1190 | Updated = 'UPDATED' 1191 | } 1192 | 1193 | /** 1194 | * 1195 | * @export 1196 | * @interface GithubSlsRestApiIdpCertificateEventV1AllOf 1197 | */ 1198 | export interface GithubSlsRestApiIdpCertificateEventV1AllOf { 1199 | /** 1200 | * 1201 | * @type {string} 1202 | * @memberof GithubSlsRestApiIdpCertificateEventV1AllOf 1203 | */ 1204 | 'serial': string; 1205 | /** 1206 | * 1207 | * @type {string} 1208 | * @memberof GithubSlsRestApiIdpCertificateEventV1AllOf 1209 | */ 1210 | 'repo': string; 1211 | /** 1212 | * 1213 | * @type {string} 1214 | * @memberof GithubSlsRestApiIdpCertificateEventV1AllOf 1215 | */ 1216 | 'org': string; 1217 | /** 1218 | * 1219 | * @type {string} 1220 | * @memberof GithubSlsRestApiIdpCertificateEventV1AllOf 1221 | */ 1222 | 'state': GithubSlsRestApiIdpCertificateEventV1AllOfStateEnum; 1223 | } 1224 | 1225 | /** 1226 | * @export 1227 | * @enum {string} 1228 | */ 1229 | export enum GithubSlsRestApiIdpCertificateEventV1AllOfStateEnum { 1230 | Updated = 'UPDATED' 1231 | } 1232 | 1233 | /** 1234 | * This file was automatically generated by joi-to-typescript Do not modify this file manually 1235 | * @export 1236 | * @interface GithubSlsRestApiIdpOrgRepoCert 1237 | */ 1238 | export interface GithubSlsRestApiIdpOrgRepoCert { 1239 | /** 1240 | * 1241 | * @type {string} 1242 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1243 | */ 1244 | 'caCertificate': string; 1245 | /** 1246 | * 1247 | * @type {string} 1248 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1249 | */ 1250 | 'certificate': string; 1251 | /** 1252 | * 1253 | * @type {string} 1254 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1255 | */ 1256 | 'org': string; 1257 | /** 1258 | * 1259 | * @type {string} 1260 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1261 | */ 1262 | 'pk': string; 1263 | /** 1264 | * 1265 | * @type {string} 1266 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1267 | */ 1268 | 'repo': string; 1269 | /** 1270 | * 1271 | * @type {string} 1272 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1273 | */ 1274 | 'serial': string; 1275 | /** 1276 | * 1277 | * @type {string} 1278 | * @memberof GithubSlsRestApiIdpOrgRepoCert 1279 | */ 1280 | 'sk': string; 1281 | } 1282 | /** 1283 | * 1284 | * @export 1285 | * @interface GithubSlsRestApiListResponseLoginResponse 1286 | */ 1287 | export interface GithubSlsRestApiListResponseLoginResponse { 1288 | /** 1289 | * 1290 | * @type {GithubSlsRestApiListResponseOrgRepoConfigResponseNext} 1291 | * @memberof GithubSlsRestApiListResponseLoginResponse 1292 | */ 1293 | 'next'?: GithubSlsRestApiListResponseOrgRepoConfigResponseNext; 1294 | /** 1295 | * 1296 | * @type {number} 1297 | * @memberof GithubSlsRestApiListResponseLoginResponse 1298 | */ 1299 | 'total': number; 1300 | /** 1301 | * 1302 | * @type {number} 1303 | * @memberof GithubSlsRestApiListResponseLoginResponse 1304 | */ 1305 | 'count': number; 1306 | /** 1307 | * 1308 | * @type {Array} 1309 | * @memberof GithubSlsRestApiListResponseLoginResponse 1310 | */ 1311 | 'results': Array; 1312 | } 1313 | /** 1314 | * 1315 | * @export 1316 | * @interface GithubSlsRestApiListResponseOrgRepoConfigResponse 1317 | */ 1318 | export interface GithubSlsRestApiListResponseOrgRepoConfigResponse { 1319 | /** 1320 | * 1321 | * @type {GithubSlsRestApiListResponseOrgRepoConfigResponseNext} 1322 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponse 1323 | */ 1324 | 'next'?: GithubSlsRestApiListResponseOrgRepoConfigResponseNext; 1325 | /** 1326 | * 1327 | * @type {number} 1328 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponse 1329 | */ 1330 | 'total': number; 1331 | /** 1332 | * 1333 | * @type {number} 1334 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponse 1335 | */ 1336 | 'count': number; 1337 | /** 1338 | * 1339 | * @type {Array} 1340 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponse 1341 | */ 1342 | 'results': Array; 1343 | } 1344 | /** 1345 | * 1346 | * @export 1347 | * @interface GithubSlsRestApiListResponseOrgRepoConfigResponseNext 1348 | */ 1349 | export interface GithubSlsRestApiListResponseOrgRepoConfigResponseNext { 1350 | /** 1351 | * 1352 | * @type {string} 1353 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponseNext 1354 | */ 1355 | 'sk': string; 1356 | /** 1357 | * 1358 | * @type {string} 1359 | * @memberof GithubSlsRestApiListResponseOrgRepoConfigResponseNext 1360 | */ 1361 | 'pk': string; 1362 | } 1363 | /** 1364 | * 1365 | * @export 1366 | * @interface GithubSlsRestApiListResponseOrgRepoResponse 1367 | */ 1368 | export interface GithubSlsRestApiListResponseOrgRepoResponse { 1369 | /** 1370 | * 1371 | * @type {GithubSlsRestApiListResponseOrgRepoConfigResponseNext} 1372 | * @memberof GithubSlsRestApiListResponseOrgRepoResponse 1373 | */ 1374 | 'next'?: GithubSlsRestApiListResponseOrgRepoConfigResponseNext; 1375 | /** 1376 | * 1377 | * @type {number} 1378 | * @memberof GithubSlsRestApiListResponseOrgRepoResponse 1379 | */ 1380 | 'total': number; 1381 | /** 1382 | * 1383 | * @type {number} 1384 | * @memberof GithubSlsRestApiListResponseOrgRepoResponse 1385 | */ 1386 | 'count': number; 1387 | /** 1388 | * 1389 | * @type {Array} 1390 | * @memberof GithubSlsRestApiListResponseOrgRepoResponse 1391 | */ 1392 | 'results': Array; 1393 | } 1394 | /** 1395 | * 1396 | * @export 1397 | * @interface GithubSlsRestApiListResponseRoleResponse 1398 | */ 1399 | export interface GithubSlsRestApiListResponseRoleResponse { 1400 | /** 1401 | * 1402 | * @type {GithubSlsRestApiListResponseOrgRepoConfigResponseNext} 1403 | * @memberof GithubSlsRestApiListResponseRoleResponse 1404 | */ 1405 | 'next'?: GithubSlsRestApiListResponseOrgRepoConfigResponseNext; 1406 | /** 1407 | * 1408 | * @type {number} 1409 | * @memberof GithubSlsRestApiListResponseRoleResponse 1410 | */ 1411 | 'total': number; 1412 | /** 1413 | * 1414 | * @type {number} 1415 | * @memberof GithubSlsRestApiListResponseRoleResponse 1416 | */ 1417 | 'count': number; 1418 | /** 1419 | * 1420 | * @type {Array} 1421 | * @memberof GithubSlsRestApiListResponseRoleResponse 1422 | */ 1423 | 'results': Array; 1424 | } 1425 | /** 1426 | * 1427 | * @export 1428 | * @interface GithubSlsRestApiLoginResponse 1429 | */ 1430 | export interface GithubSlsRestApiLoginResponse { 1431 | /** 1432 | * 1433 | * @type {string} 1434 | * @memberof GithubSlsRestApiLoginResponse 1435 | */ 1436 | 'issuer': string; 1437 | /** 1438 | * 1439 | * @type {string} 1440 | * @memberof GithubSlsRestApiLoginResponse 1441 | */ 1442 | 'provider': string; 1443 | /** 1444 | * 1445 | * @type {string} 1446 | * @memberof GithubSlsRestApiLoginResponse 1447 | */ 1448 | 'repo': string; 1449 | /** 1450 | * 1451 | * @type {string} 1452 | * @memberof GithubSlsRestApiLoginResponse 1453 | */ 1454 | 'org': string; 1455 | /** 1456 | * 1457 | * @type {string} 1458 | * @memberof GithubSlsRestApiLoginResponse 1459 | */ 1460 | 'login': string; 1461 | } 1462 | /** 1463 | * 1464 | * @export 1465 | * @interface GithubSlsRestApiLoginResponseContainer 1466 | */ 1467 | export interface GithubSlsRestApiLoginResponseContainer { 1468 | /** 1469 | * 1470 | * @type {string} 1471 | * @memberof GithubSlsRestApiLoginResponseContainer 1472 | */ 1473 | 'browserUri': string; 1474 | /** 1475 | * 1476 | * @type {string} 1477 | * @memberof GithubSlsRestApiLoginResponseContainer 1478 | */ 1479 | 'provider': string; 1480 | /** 1481 | * 1482 | * @type {string} 1483 | * @memberof GithubSlsRestApiLoginResponseContainer 1484 | */ 1485 | 'repo': string; 1486 | /** 1487 | * 1488 | * @type {string} 1489 | * @memberof GithubSlsRestApiLoginResponseContainer 1490 | */ 1491 | 'org': string; 1492 | } 1493 | /** 1494 | * 1495 | * @export 1496 | * @interface GithubSlsRestApiLoginToken 1497 | */ 1498 | export interface GithubSlsRestApiLoginToken { 1499 | /** 1500 | * 1501 | * @type {string} 1502 | * @memberof GithubSlsRestApiLoginToken 1503 | */ 1504 | 'email'?: string; 1505 | /** 1506 | * 1507 | * @type {GithubSlsRestApiEncryptedField} 1508 | * @memberof GithubSlsRestApiLoginToken 1509 | */ 1510 | 'encryptedToken': GithubSlsRestApiEncryptedField; 1511 | /** 1512 | * 1513 | * @type {string} 1514 | * @memberof GithubSlsRestApiLoginToken 1515 | */ 1516 | 'login': string; 1517 | /** 1518 | * 1519 | * @type {string} 1520 | * @memberof GithubSlsRestApiLoginToken 1521 | */ 1522 | 'namespace': string; 1523 | /** 1524 | * 1525 | * @type {string} 1526 | * @memberof GithubSlsRestApiLoginToken 1527 | */ 1528 | 'pk': string; 1529 | /** 1530 | * 1531 | * @type {string} 1532 | * @memberof GithubSlsRestApiLoginToken 1533 | */ 1534 | 'scopes'?: string; 1535 | /** 1536 | * 1537 | * @type {string} 1538 | * @memberof GithubSlsRestApiLoginToken 1539 | */ 1540 | 'sk': string; 1541 | } 1542 | /** 1543 | * 1544 | * @export 1545 | * @interface GithubSlsRestApiMetadataResponse 1546 | */ 1547 | export interface GithubSlsRestApiMetadataResponse { 1548 | /** 1549 | * 1550 | * @type {Array} 1551 | * @memberof GithubSlsRestApiMetadataResponse 1552 | */ 1553 | 'admins': Array; 1554 | /** 1555 | * 1556 | * @type {string} 1557 | * @memberof GithubSlsRestApiMetadataResponse 1558 | */ 1559 | 'certificate': string; 1560 | /** 1561 | * 1562 | * @type {string} 1563 | * @memberof GithubSlsRestApiMetadataResponse 1564 | */ 1565 | 'logoutUrl': string; 1566 | /** 1567 | * 1568 | * @type {string} 1569 | * @memberof GithubSlsRestApiMetadataResponse 1570 | */ 1571 | 'loginUrl': string; 1572 | /** 1573 | * 1574 | * @type {string} 1575 | * @memberof GithubSlsRestApiMetadataResponse 1576 | */ 1577 | 'entityId': string; 1578 | /** 1579 | * 1580 | * @type {string} 1581 | * @memberof GithubSlsRestApiMetadataResponse 1582 | */ 1583 | 'metadataXml': string; 1584 | } 1585 | /** 1586 | * 1587 | * @export 1588 | * @enum {string} 1589 | */ 1590 | 1591 | export enum GithubSlsRestApiNameIdFormatV1 { 1592 | Id = 'id', 1593 | Login = 'login', 1594 | Email = 'email', 1595 | EmailV2 = 'emailV2' 1596 | } 1597 | 1598 | /** 1599 | * This file was automatically generated by joi-to-typescript Do not modify this file manually 1600 | * @export 1601 | * @interface GithubSlsRestApiOrgRepo 1602 | */ 1603 | export interface GithubSlsRestApiOrgRepo { 1604 | /** 1605 | * 1606 | * @type {number} 1607 | * @memberof GithubSlsRestApiOrgRepo 1608 | */ 1609 | 'appId'?: number; 1610 | /** 1611 | * 1612 | * @type {string} 1613 | * @memberof GithubSlsRestApiOrgRepo 1614 | */ 1615 | 'baseUrl': string; 1616 | /** 1617 | * 1618 | * @type {string} 1619 | * @memberof GithubSlsRestApiOrgRepo 1620 | */ 1621 | 'configSha'?: string; 1622 | /** 1623 | * 1624 | * @type {string} 1625 | * @memberof GithubSlsRestApiOrgRepo 1626 | */ 1627 | 'configShaRendered'?: string; 1628 | /** 1629 | * 1630 | * @type {number} 1631 | * @memberof GithubSlsRestApiOrgRepo 1632 | */ 1633 | 'installationId'?: number; 1634 | /** 1635 | * 1636 | * @type {string} 1637 | * @memberof GithubSlsRestApiOrgRepo 1638 | */ 1639 | 'org': string; 1640 | /** 1641 | * 1642 | * @type {number} 1643 | * @memberof GithubSlsRestApiOrgRepo 1644 | */ 1645 | 'orgId': number; 1646 | /** 1647 | * 1648 | * @type {string} 1649 | * @memberof GithubSlsRestApiOrgRepo 1650 | */ 1651 | 'pk': string; 1652 | /** 1653 | * 1654 | * @type {string} 1655 | * @memberof GithubSlsRestApiOrgRepo 1656 | */ 1657 | 'repo': string; 1658 | /** 1659 | * 1660 | * @type {number} 1661 | * @memberof GithubSlsRestApiOrgRepo 1662 | */ 1663 | 'repoId': number; 1664 | /** 1665 | * 1666 | * @type {string} 1667 | * @memberof GithubSlsRestApiOrgRepo 1668 | */ 1669 | 'sk': string; 1670 | } 1671 | /** 1672 | * 1673 | * @export 1674 | * @interface GithubSlsRestApiOrgRepoConfigListResponse 1675 | */ 1676 | export interface GithubSlsRestApiOrgRepoConfigListResponse { 1677 | /** 1678 | * 1679 | * @type {GithubSlsRestApiListResponseOrgRepoConfigResponseNext} 1680 | * @memberof GithubSlsRestApiOrgRepoConfigListResponse 1681 | */ 1682 | 'next'?: GithubSlsRestApiListResponseOrgRepoConfigResponseNext; 1683 | /** 1684 | * 1685 | * @type {number} 1686 | * @memberof GithubSlsRestApiOrgRepoConfigListResponse 1687 | */ 1688 | 'total': number; 1689 | /** 1690 | * 1691 | * @type {number} 1692 | * @memberof GithubSlsRestApiOrgRepoConfigListResponse 1693 | */ 1694 | 'count': number; 1695 | /** 1696 | * 1697 | * @type {Array} 1698 | * @memberof GithubSlsRestApiOrgRepoConfigListResponse 1699 | */ 1700 | 'results': Array; 1701 | /** 1702 | * 1703 | * @type {string} 1704 | * @memberof GithubSlsRestApiOrgRepoConfigListResponse 1705 | */ 1706 | 'login': string; 1707 | } 1708 | /** 1709 | * 1710 | * @export 1711 | * @interface GithubSlsRestApiOrgRepoConfigListResponseAllOf 1712 | */ 1713 | export interface GithubSlsRestApiOrgRepoConfigListResponseAllOf { 1714 | /** 1715 | * 1716 | * @type {string} 1717 | * @memberof GithubSlsRestApiOrgRepoConfigListResponseAllOf 1718 | */ 1719 | 'login': string; 1720 | } 1721 | /** 1722 | * 1723 | * @export 1724 | * @interface GithubSlsRestApiOrgRepoConfigRefreshResponse 1725 | */ 1726 | export interface GithubSlsRestApiOrgRepoConfigRefreshResponse { 1727 | /** 1728 | * 1729 | * @type {string} 1730 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1731 | */ 1732 | 'repo': string; 1733 | /** 1734 | * 1735 | * @type {string} 1736 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1737 | */ 1738 | 'org': string; 1739 | /** 1740 | * 1741 | * @type {string} 1742 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1743 | */ 1744 | 'branch'?: string; 1745 | /** 1746 | * 1747 | * @type {string} 1748 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1749 | */ 1750 | 'path'?: string; 1751 | /** 1752 | * 1753 | * @type {string} 1754 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1755 | */ 1756 | 'sha'?: string; 1757 | /** 1758 | * 1759 | * @type {boolean} 1760 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1761 | */ 1762 | 'dryrun': boolean; 1763 | /** 1764 | * 1765 | * @type {GithubSlsRestApiConfigV20220101} 1766 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponse 1767 | */ 1768 | 'config': GithubSlsRestApiConfigV20220101; 1769 | } 1770 | /** 1771 | * 1772 | * @export 1773 | * @interface GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1774 | */ 1775 | export interface GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf { 1776 | /** 1777 | * 1778 | * @type {string} 1779 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1780 | */ 1781 | 'branch'?: string; 1782 | /** 1783 | * 1784 | * @type {string} 1785 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1786 | */ 1787 | 'path'?: string; 1788 | /** 1789 | * 1790 | * @type {string} 1791 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1792 | */ 1793 | 'sha'?: string; 1794 | /** 1795 | * 1796 | * @type {boolean} 1797 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1798 | */ 1799 | 'dryrun': boolean; 1800 | /** 1801 | * 1802 | * @type {GithubSlsRestApiConfigV20220101} 1803 | * @memberof GithubSlsRestApiOrgRepoConfigRefreshResponseAllOf 1804 | */ 1805 | 'config': GithubSlsRestApiConfigV20220101; 1806 | } 1807 | /** 1808 | * 1809 | * @export 1810 | * @interface GithubSlsRestApiOrgRepoConfigResponse 1811 | */ 1812 | export interface GithubSlsRestApiOrgRepoConfigResponse { 1813 | /** 1814 | * 1815 | * @type {boolean} 1816 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1817 | */ 1818 | 'suspended'?: boolean; 1819 | /** 1820 | * 1821 | * @type {string} 1822 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1823 | */ 1824 | 'installationUrl'?: string; 1825 | /** 1826 | * 1827 | * @type {number} 1828 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1829 | */ 1830 | 'installationId'?: number; 1831 | /** 1832 | * 1833 | * @type {string} 1834 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1835 | */ 1836 | 'configUrl'?: string; 1837 | /** 1838 | * 1839 | * @type {string} 1840 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1841 | */ 1842 | 'repoUrl'?: string; 1843 | /** 1844 | * 1845 | * @type {string} 1846 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1847 | */ 1848 | 'orgUrl'?: string; 1849 | /** 1850 | * 1851 | * @type {string} 1852 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1853 | */ 1854 | 'configPath'?: string; 1855 | /** 1856 | * 1857 | * @type {string} 1858 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1859 | */ 1860 | 'repo'?: string; 1861 | /** 1862 | * 1863 | * @type {string} 1864 | * @memberof GithubSlsRestApiOrgRepoConfigResponse 1865 | */ 1866 | 'org': string; 1867 | } 1868 | /** 1869 | * This file was automatically generated by joi-to-typescript Do not modify this file manually 1870 | * @export 1871 | * @interface GithubSlsRestApiOrgRepoLogin 1872 | */ 1873 | export interface GithubSlsRestApiOrgRepoLogin { 1874 | /** 1875 | * 1876 | * @type {number} 1877 | * @memberof GithubSlsRestApiOrgRepoLogin 1878 | */ 1879 | 'appId'?: number; 1880 | /** 1881 | * 1882 | * @type {number} 1883 | * @memberof GithubSlsRestApiOrgRepoLogin 1884 | */ 1885 | 'installationId'?: number; 1886 | /** 1887 | * 1888 | * @type {string} 1889 | * @memberof GithubSlsRestApiOrgRepoLogin 1890 | */ 1891 | 'login': string; 1892 | /** 1893 | * 1894 | * @type {string} 1895 | * @memberof GithubSlsRestApiOrgRepoLogin 1896 | */ 1897 | 'org': string; 1898 | /** 1899 | * 1900 | * @type {string} 1901 | * @memberof GithubSlsRestApiOrgRepoLogin 1902 | */ 1903 | 'pk': string; 1904 | /** 1905 | * 1906 | * @type {string} 1907 | * @memberof GithubSlsRestApiOrgRepoLogin 1908 | */ 1909 | 'repo': string; 1910 | /** 1911 | * 1912 | * @type {string} 1913 | * @memberof GithubSlsRestApiOrgRepoLogin 1914 | */ 1915 | 'sk': string; 1916 | } 1917 | /** 1918 | * 1919 | * @export 1920 | * @interface GithubSlsRestApiOrgRepoResponse 1921 | */ 1922 | export interface GithubSlsRestApiOrgRepoResponse { 1923 | /** 1924 | * 1925 | * @type {string} 1926 | * @memberof GithubSlsRestApiOrgRepoResponse 1927 | */ 1928 | 'repo': string; 1929 | /** 1930 | * 1931 | * @type {string} 1932 | * @memberof GithubSlsRestApiOrgRepoResponse 1933 | */ 1934 | 'org': string; 1935 | } 1936 | /** 1937 | * 1938 | * @export 1939 | * @interface GithubSlsRestApiPermissionV1 1940 | */ 1941 | export interface GithubSlsRestApiPermissionV1 { 1942 | /** 1943 | * 1944 | * @type {boolean} 1945 | * @memberof GithubSlsRestApiPermissionV1 1946 | */ 1947 | 'self'?: boolean; 1948 | /** 1949 | * 1950 | * @type {Array} 1951 | * @memberof GithubSlsRestApiPermissionV1 1952 | */ 1953 | 'roles'?: Array; 1954 | /** 1955 | * 1956 | * @type {GithubSlsRestApiTeamsV1} 1957 | * @memberof GithubSlsRestApiPermissionV1 1958 | */ 1959 | 'teams'?: GithubSlsRestApiTeamsV1; 1960 | /** 1961 | * 1962 | * @type {GithubSlsRestApiReposV1} 1963 | * @memberof GithubSlsRestApiPermissionV1 1964 | */ 1965 | 'repos'?: GithubSlsRestApiReposV1; 1966 | /** 1967 | * 1968 | * @type {GithubSlsRestApiUsersV1} 1969 | * @memberof GithubSlsRestApiPermissionV1 1970 | */ 1971 | 'users'?: GithubSlsRestApiUsersV1; 1972 | /** 1973 | * 1974 | * @type {GithubSlsRestApiProviderConfigV1} 1975 | * @memberof GithubSlsRestApiPermissionV1 1976 | */ 1977 | 'provider'?: GithubSlsRestApiProviderConfigV1; 1978 | } 1979 | /** 1980 | * 1981 | * @export 1982 | * @interface GithubSlsRestApiProviderConfigV1 1983 | */ 1984 | export interface GithubSlsRestApiProviderConfigV1 { 1985 | /** 1986 | * 1987 | * @type {{ [key: string]: GithubSlsRestApiVariableV1; }} 1988 | * @memberof GithubSlsRestApiProviderConfigV1 1989 | */ 1990 | 'variables'?: { [key: string]: GithubSlsRestApiVariableV1; }; 1991 | } 1992 | /** 1993 | * 1994 | * @export 1995 | * @interface GithubSlsRestApiProviderV1 1996 | */ 1997 | export interface GithubSlsRestApiProviderV1 { 1998 | /** 1999 | * 2000 | * @type {GithubSlsRestApiProvisioningV1} 2001 | * @memberof GithubSlsRestApiProviderV1 2002 | */ 2003 | 'provisioning'?: GithubSlsRestApiProvisioningV1; 2004 | /** 2005 | * 2006 | * @type {{ [key: string]: string; }} 2007 | * @memberof GithubSlsRestApiProviderV1 2008 | */ 2009 | 'attributes'?: { [key: string]: string; }; 2010 | /** 2011 | * 2012 | * @type {GithubSlsRestApiNameIdFormatV1} 2013 | * @memberof GithubSlsRestApiProviderV1 2014 | */ 2015 | 'nameIdFormat'?: GithubSlsRestApiNameIdFormatV1; 2016 | /** 2017 | * 2018 | * @type {string} 2019 | * @memberof GithubSlsRestApiProviderV1 2020 | */ 2021 | 'nameId'?: string; 2022 | /** 2023 | * 2024 | * @type {string} 2025 | * @memberof GithubSlsRestApiProviderV1 2026 | */ 2027 | 'loginUrl'?: string; 2028 | /** 2029 | * 2030 | * @type {string} 2031 | * @memberof GithubSlsRestApiProviderV1 2032 | */ 2033 | 'acsUrl'?: string; 2034 | /** 2035 | * 2036 | * @type {string} 2037 | * @memberof GithubSlsRestApiProviderV1 2038 | */ 2039 | 'entityId'?: string; 2040 | } 2041 | /** 2042 | * 2043 | * @export 2044 | * @interface GithubSlsRestApiProvisioningV1 2045 | */ 2046 | export interface GithubSlsRestApiProvisioningV1 { 2047 | /** 2048 | * 2049 | * @type {GithubSlsRestApiScimV1} 2050 | * @memberof GithubSlsRestApiProvisioningV1 2051 | */ 2052 | 'scim'?: GithubSlsRestApiScimV1; 2053 | } 2054 | /** 2055 | * 2056 | * @export 2057 | * @interface GithubSlsRestApiRepoV1 2058 | */ 2059 | export interface GithubSlsRestApiRepoV1 { 2060 | /** 2061 | * 2062 | * @type {string} 2063 | * @memberof GithubSlsRestApiRepoV1 2064 | */ 2065 | 'name'?: string; 2066 | } 2067 | /** 2068 | * 2069 | * @export 2070 | * @interface GithubSlsRestApiReposV1 2071 | */ 2072 | export interface GithubSlsRestApiReposV1 { 2073 | /** 2074 | * 2075 | * @type {Array} 2076 | * @memberof GithubSlsRestApiReposV1 2077 | */ 2078 | 'github'?: Array; 2079 | } 2080 | /** 2081 | * 2082 | * @export 2083 | * @interface GithubSlsRestApiRoleResponse 2084 | */ 2085 | export interface GithubSlsRestApiRoleResponse { 2086 | /** 2087 | * 2088 | * @type {string} 2089 | * @memberof GithubSlsRestApiRoleResponse 2090 | */ 2091 | 'issuer': string; 2092 | /** 2093 | * 2094 | * @type {string} 2095 | * @memberof GithubSlsRestApiRoleResponse 2096 | */ 2097 | 'role': string; 2098 | /** 2099 | * 2100 | * @type {string} 2101 | * @memberof GithubSlsRestApiRoleResponse 2102 | */ 2103 | 'provider': string; 2104 | /** 2105 | * 2106 | * @type {string} 2107 | * @memberof GithubSlsRestApiRoleResponse 2108 | */ 2109 | 'repo': string; 2110 | /** 2111 | * 2112 | * @type {string} 2113 | * @memberof GithubSlsRestApiRoleResponse 2114 | */ 2115 | 'org': string; 2116 | /** 2117 | * 2118 | * @type {string} 2119 | * @memberof GithubSlsRestApiRoleResponse 2120 | */ 2121 | 'login': string; 2122 | } 2123 | /** 2124 | * 2125 | * @export 2126 | * @interface GithubSlsRestApiRolesV1 2127 | */ 2128 | export interface GithubSlsRestApiRolesV1 { 2129 | /** 2130 | * 2131 | * @type {boolean} 2132 | * @memberof GithubSlsRestApiRolesV1 2133 | */ 2134 | 'self'?: boolean; 2135 | /** 2136 | * 2137 | * @type {GithubSlsRestApiProviderConfigV1} 2138 | * @memberof GithubSlsRestApiRolesV1 2139 | */ 2140 | 'provider'?: GithubSlsRestApiProviderConfigV1; 2141 | /** 2142 | * 2143 | * @type {GithubSlsRestApiReposV1} 2144 | * @memberof GithubSlsRestApiRolesV1 2145 | */ 2146 | 'repos'?: GithubSlsRestApiReposV1; 2147 | /** 2148 | * 2149 | * @type {GithubSlsRestApiTeamsV1} 2150 | * @memberof GithubSlsRestApiRolesV1 2151 | */ 2152 | 'teams'?: GithubSlsRestApiTeamsV1; 2153 | /** 2154 | * 2155 | * @type {GithubSlsRestApiUsersV1} 2156 | * @memberof GithubSlsRestApiRolesV1 2157 | */ 2158 | 'users'?: GithubSlsRestApiUsersV1; 2159 | /** 2160 | * 2161 | * @type {string} 2162 | * @memberof GithubSlsRestApiRolesV1 2163 | */ 2164 | 'name'?: string; 2165 | } 2166 | /** 2167 | * 2168 | * @export 2169 | * @interface GithubSlsRestApiSamlHttpRequest 2170 | */ 2171 | export interface GithubSlsRestApiSamlHttpRequest { 2172 | /** 2173 | * 2174 | * @type {string} 2175 | * @memberof GithubSlsRestApiSamlHttpRequest 2176 | */ 2177 | 'contentType': string; 2178 | /** 2179 | * 2180 | * @type {string} 2181 | * @memberof GithubSlsRestApiSamlHttpRequest 2182 | */ 2183 | 'payload': string; 2184 | /** 2185 | * 2186 | * @type {string} 2187 | * @memberof GithubSlsRestApiSamlHttpRequest 2188 | */ 2189 | 'url': string; 2190 | /** 2191 | * 2192 | * @type {string} 2193 | * @memberof GithubSlsRestApiSamlHttpRequest 2194 | */ 2195 | 'method': GithubSlsRestApiSamlHttpRequestMethodEnum; 2196 | } 2197 | 2198 | /** 2199 | * @export 2200 | * @enum {string} 2201 | */ 2202 | export enum GithubSlsRestApiSamlHttpRequestMethodEnum { 2203 | Post = 'POST' 2204 | } 2205 | 2206 | /** 2207 | * 2208 | * @export 2209 | * @interface GithubSlsRestApiSamlResponseContainer 2210 | */ 2211 | export interface GithubSlsRestApiSamlResponseContainer { 2212 | /** 2213 | * 2214 | * @type {GithubSlsRestApiSamlHttpRequest} 2215 | * @memberof GithubSlsRestApiSamlResponseContainer 2216 | */ 2217 | 'samlHttpRequest'?: GithubSlsRestApiSamlHttpRequest; 2218 | /** 2219 | * 2220 | * @type {GithubSlsRestApiAwsAssumeSdkOptions} 2221 | * @memberof GithubSlsRestApiSamlResponseContainer 2222 | */ 2223 | 'sdkOptions'?: GithubSlsRestApiAwsAssumeSdkOptions; 2224 | /** 2225 | * 2226 | * @type {string} 2227 | * @memberof GithubSlsRestApiSamlResponseContainer 2228 | */ 2229 | 'browserUri'?: string; 2230 | /** 2231 | * 2232 | * @type {string} 2233 | * @memberof GithubSlsRestApiSamlResponseContainer 2234 | */ 2235 | 'role'?: string; 2236 | /** 2237 | * 2238 | * @type {string} 2239 | * @memberof GithubSlsRestApiSamlResponseContainer 2240 | */ 2241 | 'provider': string; 2242 | /** 2243 | * 2244 | * @type {string} 2245 | * @memberof GithubSlsRestApiSamlResponseContainer 2246 | */ 2247 | 'repo': string; 2248 | /** 2249 | * 2250 | * @type {string} 2251 | * @memberof GithubSlsRestApiSamlResponseContainer 2252 | */ 2253 | 'org': string; 2254 | /** 2255 | * 2256 | * @type {{ [key: string]: string; }} 2257 | * @memberof GithubSlsRestApiSamlResponseContainer 2258 | */ 2259 | 'attributes'?: { [key: string]: string; }; 2260 | /** 2261 | * 2262 | * @type {string} 2263 | * @memberof GithubSlsRestApiSamlResponseContainer 2264 | */ 2265 | 'samlResponse': string; 2266 | /** 2267 | * 2268 | * @type {string} 2269 | * @memberof GithubSlsRestApiSamlResponseContainer 2270 | */ 2271 | 'relayState': string; 2272 | /** 2273 | * 2274 | * @type {string} 2275 | * @memberof GithubSlsRestApiSamlResponseContainer 2276 | */ 2277 | 'recipient': string; 2278 | /** 2279 | * 2280 | * @type {string} 2281 | * @memberof GithubSlsRestApiSamlResponseContainer 2282 | */ 2283 | 'issuer': string; 2284 | } 2285 | /** 2286 | * 2287 | * @export 2288 | * @interface GithubSlsRestApiSaveConfigRequest 2289 | */ 2290 | export interface GithubSlsRestApiSaveConfigRequest { 2291 | /** 2292 | * 2293 | * @type {string} 2294 | * @memberof GithubSlsRestApiSaveConfigRequest 2295 | */ 2296 | 'configYaml': string; 2297 | } 2298 | /** 2299 | * 2300 | * @export 2301 | * @interface GithubSlsRestApiSaveConfigResponse 2302 | */ 2303 | export interface GithubSlsRestApiSaveConfigResponse { 2304 | /** 2305 | * 2306 | * @type {GithubSlsRestApiOrgRepoConfigResponse} 2307 | * @memberof GithubSlsRestApiSaveConfigResponse 2308 | */ 2309 | 'orgRepoConfig'?: GithubSlsRestApiOrgRepoConfigResponse; 2310 | /** 2311 | * 2312 | * @type {string} 2313 | * @memberof GithubSlsRestApiSaveConfigResponse 2314 | */ 2315 | 'commitLink': string; 2316 | /** 2317 | * 2318 | * @type {string} 2319 | * @memberof GithubSlsRestApiSaveConfigResponse 2320 | */ 2321 | 'configLink': string; 2322 | /** 2323 | * 2324 | * @type {string} 2325 | * @memberof GithubSlsRestApiSaveConfigResponse 2326 | */ 2327 | 'configYaml': string; 2328 | /** 2329 | * 2330 | * @type {string} 2331 | * @memberof GithubSlsRestApiSaveConfigResponse 2332 | */ 2333 | 'sha': string; 2334 | } 2335 | /** 2336 | * 2337 | * @export 2338 | * @interface GithubSlsRestApiScimV1 2339 | */ 2340 | export interface GithubSlsRestApiScimV1 { 2341 | /** 2342 | * 2343 | * @type {string} 2344 | * @memberof GithubSlsRestApiScimV1 2345 | */ 2346 | 'encryptedToken'?: string; 2347 | /** 2348 | * 2349 | * @type {string} 2350 | * @memberof GithubSlsRestApiScimV1 2351 | */ 2352 | 'endpoint'?: string; 2353 | } 2354 | /** 2355 | * 2356 | * @export 2357 | * @enum {string} 2358 | */ 2359 | 2360 | export enum GithubSlsRestApiSupportedVersions { 2361 | _20220101 = '20220101' 2362 | } 2363 | 2364 | /** 2365 | * 2366 | * @export 2367 | * @interface GithubSlsRestApiTeamsV1 2368 | */ 2369 | export interface GithubSlsRestApiTeamsV1 { 2370 | /** 2371 | * 2372 | * @type {Array} 2373 | * @memberof GithubSlsRestApiTeamsV1 2374 | */ 2375 | 'github'?: Array; 2376 | } 2377 | /** 2378 | * 2379 | * @export 2380 | * @interface GithubSlsRestApiUsersV1 2381 | */ 2382 | export interface GithubSlsRestApiUsersV1 { 2383 | /** 2384 | * 2385 | * @type {Array} 2386 | * @memberof GithubSlsRestApiUsersV1 2387 | */ 2388 | 'github'?: Array; 2389 | } 2390 | /** 2391 | * 2392 | * @export 2393 | * @interface GithubSlsRestApiVariableV1 2394 | */ 2395 | export interface GithubSlsRestApiVariableV1 { 2396 | } 2397 | 2398 | /** 2399 | * ConfigApi - axios parameter creator 2400 | * @export 2401 | */ 2402 | export const ConfigApiAxiosParamCreator = function (configuration?: Configuration) { 2403 | return { 2404 | /** 2405 | * 2406 | * @param {*} [options] Override http request option. 2407 | * @throws {RequiredError} 2408 | */ 2409 | listOrgRepoConfigs: async (options: AxiosRequestConfig = {}): Promise => { 2410 | const localVarPath = `/api/v1/config/orgs`; 2411 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2412 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2413 | let baseOptions; 2414 | if (configuration) { 2415 | baseOptions = configuration.baseOptions; 2416 | } 2417 | 2418 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2419 | const localVarHeaderParameter = {} as any; 2420 | const localVarQueryParameter = {} as any; 2421 | 2422 | // authentication jwt required 2423 | // http bearer authentication required 2424 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2425 | 2426 | 2427 | 2428 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2429 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2430 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2431 | 2432 | return { 2433 | url: toPathString(localVarUrlObj), 2434 | options: localVarRequestOptions, 2435 | }; 2436 | }, 2437 | /** 2438 | * 2439 | * @param {string} org 2440 | * @param {GithubSlsRestApiSaveConfigRequest} githubSlsRestApiSaveConfigRequest 2441 | * @param {boolean} [force] 2442 | * @param {*} [options] Override http request option. 2443 | * @throws {RequiredError} 2444 | */ 2445 | saveConfig: async (org: string, githubSlsRestApiSaveConfigRequest: GithubSlsRestApiSaveConfigRequest, force?: boolean, options: AxiosRequestConfig = {}): Promise => { 2446 | // verify required parameter 'org' is not null or undefined 2447 | assertParamExists('saveConfig', 'org', org) 2448 | // verify required parameter 'githubSlsRestApiSaveConfigRequest' is not null or undefined 2449 | assertParamExists('saveConfig', 'githubSlsRestApiSaveConfigRequest', githubSlsRestApiSaveConfigRequest) 2450 | const localVarPath = `/api/v1/config/orgs/{org}` 2451 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 2452 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2453 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2454 | let baseOptions; 2455 | if (configuration) { 2456 | baseOptions = configuration.baseOptions; 2457 | } 2458 | 2459 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 2460 | const localVarHeaderParameter = {} as any; 2461 | const localVarQueryParameter = {} as any; 2462 | 2463 | // authentication jwt required 2464 | // http bearer authentication required 2465 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2466 | 2467 | if (force !== undefined) { 2468 | localVarQueryParameter['force'] = force; 2469 | } 2470 | 2471 | 2472 | 2473 | localVarHeaderParameter['Content-Type'] = 'application/json'; 2474 | 2475 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2476 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2477 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2478 | localVarRequestOptions.data = serializeDataIfNeeded(githubSlsRestApiSaveConfigRequest, localVarRequestOptions, configuration) 2479 | 2480 | return { 2481 | url: toPathString(localVarUrlObj), 2482 | options: localVarRequestOptions, 2483 | }; 2484 | }, 2485 | } 2486 | }; 2487 | 2488 | /** 2489 | * ConfigApi - functional programming interface 2490 | * @export 2491 | */ 2492 | export const ConfigApiFp = function(configuration?: Configuration) { 2493 | const localVarAxiosParamCreator = ConfigApiAxiosParamCreator(configuration) 2494 | return { 2495 | /** 2496 | * 2497 | * @param {*} [options] Override http request option. 2498 | * @throws {RequiredError} 2499 | */ 2500 | async listOrgRepoConfigs(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 2501 | const localVarAxiosArgs = await localVarAxiosParamCreator.listOrgRepoConfigs(options); 2502 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 2503 | }, 2504 | /** 2505 | * 2506 | * @param {string} org 2507 | * @param {GithubSlsRestApiSaveConfigRequest} githubSlsRestApiSaveConfigRequest 2508 | * @param {boolean} [force] 2509 | * @param {*} [options] Override http request option. 2510 | * @throws {RequiredError} 2511 | */ 2512 | async saveConfig(org: string, githubSlsRestApiSaveConfigRequest: GithubSlsRestApiSaveConfigRequest, force?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 2513 | const localVarAxiosArgs = await localVarAxiosParamCreator.saveConfig(org, githubSlsRestApiSaveConfigRequest, force, options); 2514 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 2515 | }, 2516 | } 2517 | }; 2518 | 2519 | /** 2520 | * ConfigApi - factory interface 2521 | * @export 2522 | */ 2523 | export const ConfigApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { 2524 | const localVarFp = ConfigApiFp(configuration) 2525 | return { 2526 | /** 2527 | * 2528 | * @param {*} [options] Override http request option. 2529 | * @throws {RequiredError} 2530 | */ 2531 | listOrgRepoConfigs(options?: any): AxiosPromise { 2532 | return localVarFp.listOrgRepoConfigs(options).then((request) => request(axios, basePath)); 2533 | }, 2534 | /** 2535 | * 2536 | * @param {string} org 2537 | * @param {GithubSlsRestApiSaveConfigRequest} githubSlsRestApiSaveConfigRequest 2538 | * @param {boolean} [force] 2539 | * @param {*} [options] Override http request option. 2540 | * @throws {RequiredError} 2541 | */ 2542 | saveConfig(org: string, githubSlsRestApiSaveConfigRequest: GithubSlsRestApiSaveConfigRequest, force?: boolean, options?: any): AxiosPromise { 2543 | return localVarFp.saveConfig(org, githubSlsRestApiSaveConfigRequest, force, options).then((request) => request(axios, basePath)); 2544 | }, 2545 | }; 2546 | }; 2547 | 2548 | /** 2549 | * ConfigApi - object-oriented interface 2550 | * @export 2551 | * @class ConfigApi 2552 | * @extends {BaseAPI} 2553 | */ 2554 | export class ConfigApi extends BaseAPI { 2555 | /** 2556 | * 2557 | * @param {*} [options] Override http request option. 2558 | * @throws {RequiredError} 2559 | * @memberof ConfigApi 2560 | */ 2561 | public listOrgRepoConfigs(options?: AxiosRequestConfig) { 2562 | return ConfigApiFp(this.configuration).listOrgRepoConfigs(options).then((request) => request(this.axios, this.basePath)); 2563 | } 2564 | 2565 | /** 2566 | * 2567 | * @param {string} org 2568 | * @param {GithubSlsRestApiSaveConfigRequest} githubSlsRestApiSaveConfigRequest 2569 | * @param {boolean} [force] 2570 | * @param {*} [options] Override http request option. 2571 | * @throws {RequiredError} 2572 | * @memberof ConfigApi 2573 | */ 2574 | public saveConfig(org: string, githubSlsRestApiSaveConfigRequest: GithubSlsRestApiSaveConfigRequest, force?: boolean, options?: AxiosRequestConfig) { 2575 | return ConfigApiFp(this.configuration).saveConfig(org, githubSlsRestApiSaveConfigRequest, force, options).then((request) => request(this.axios, this.basePath)); 2576 | } 2577 | } 2578 | 2579 | 2580 | /** 2581 | * HealthApi - axios parameter creator 2582 | * @export 2583 | */ 2584 | export const HealthApiAxiosParamCreator = function (configuration?: Configuration) { 2585 | return { 2586 | /** 2587 | * 2588 | * @param {*} [options] Override http request option. 2589 | * @throws {RequiredError} 2590 | */ 2591 | get: async (options: AxiosRequestConfig = {}): Promise => { 2592 | const localVarPath = `/api/health`; 2593 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2594 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2595 | let baseOptions; 2596 | if (configuration) { 2597 | baseOptions = configuration.baseOptions; 2598 | } 2599 | 2600 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2601 | const localVarHeaderParameter = {} as any; 2602 | const localVarQueryParameter = {} as any; 2603 | 2604 | 2605 | 2606 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2607 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2608 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2609 | 2610 | return { 2611 | url: toPathString(localVarUrlObj), 2612 | options: localVarRequestOptions, 2613 | }; 2614 | }, 2615 | } 2616 | }; 2617 | 2618 | /** 2619 | * HealthApi - functional programming interface 2620 | * @export 2621 | */ 2622 | export const HealthApiFp = function(configuration?: Configuration) { 2623 | const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration) 2624 | return { 2625 | /** 2626 | * 2627 | * @param {*} [options] Override http request option. 2628 | * @throws {RequiredError} 2629 | */ 2630 | async get(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 2631 | const localVarAxiosArgs = await localVarAxiosParamCreator.get(options); 2632 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 2633 | }, 2634 | } 2635 | }; 2636 | 2637 | /** 2638 | * HealthApi - factory interface 2639 | * @export 2640 | */ 2641 | export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { 2642 | const localVarFp = HealthApiFp(configuration) 2643 | return { 2644 | /** 2645 | * 2646 | * @param {*} [options] Override http request option. 2647 | * @throws {RequiredError} 2648 | */ 2649 | get(options?: any): AxiosPromise { 2650 | return localVarFp.get(options).then((request) => request(axios, basePath)); 2651 | }, 2652 | }; 2653 | }; 2654 | 2655 | /** 2656 | * HealthApi - object-oriented interface 2657 | * @export 2658 | * @class HealthApi 2659 | * @extends {BaseAPI} 2660 | */ 2661 | export class HealthApi extends BaseAPI { 2662 | /** 2663 | * 2664 | * @param {*} [options] Override http request option. 2665 | * @throws {RequiredError} 2666 | * @memberof HealthApi 2667 | */ 2668 | public get(options?: AxiosRequestConfig) { 2669 | return HealthApiFp(this.configuration).get(options).then((request) => request(this.axios, this.basePath)); 2670 | } 2671 | } 2672 | 2673 | 2674 | /** 2675 | * IDPApi - axios parameter creator 2676 | * @export 2677 | */ 2678 | export const IDPApiAxiosParamCreator = function (configuration?: Configuration) { 2679 | return { 2680 | /** 2681 | * 2682 | * @param {string} role 2683 | * @param {string} [org] 2684 | * @param {string} [provider] 2685 | * @param {*} [options] Override http request option. 2686 | * @throws {RequiredError} 2687 | */ 2688 | assumeRole: async (role: string, org?: string, provider?: string, options: AxiosRequestConfig = {}): Promise => { 2689 | // verify required parameter 'role' is not null or undefined 2690 | assertParamExists('assumeRole', 'role', role) 2691 | const localVarPath = `/api/v1/idp/roles/{role}/assume` 2692 | .replace(`{${"role"}}`, encodeURIComponent(String(role))); 2693 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2694 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2695 | let baseOptions; 2696 | if (configuration) { 2697 | baseOptions = configuration.baseOptions; 2698 | } 2699 | 2700 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 2701 | const localVarHeaderParameter = {} as any; 2702 | const localVarQueryParameter = {} as any; 2703 | 2704 | // authentication jwt required 2705 | // http bearer authentication required 2706 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2707 | 2708 | if (org !== undefined) { 2709 | localVarQueryParameter['org'] = org; 2710 | } 2711 | 2712 | if (provider !== undefined) { 2713 | localVarQueryParameter['provider'] = provider; 2714 | } 2715 | 2716 | 2717 | 2718 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2719 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2720 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2721 | 2722 | return { 2723 | url: toPathString(localVarUrlObj), 2724 | options: localVarRequestOptions, 2725 | }; 2726 | }, 2727 | /** 2728 | * 2729 | * @param {string} role 2730 | * @param {string} [org] 2731 | * @param {string} [provider] 2732 | * @param {*} [options] Override http request option. 2733 | * @throws {RequiredError} 2734 | */ 2735 | assumeRoleForBrowser: async (role: string, org?: string, provider?: string, options: AxiosRequestConfig = {}): Promise => { 2736 | // verify required parameter 'role' is not null or undefined 2737 | assertParamExists('assumeRoleForBrowser', 'role', role) 2738 | const localVarPath = `/api/v1/idp/roles/{role}/assume/browser` 2739 | .replace(`{${"role"}}`, encodeURIComponent(String(role))); 2740 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2741 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2742 | let baseOptions; 2743 | if (configuration) { 2744 | baseOptions = configuration.baseOptions; 2745 | } 2746 | 2747 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2748 | const localVarHeaderParameter = {} as any; 2749 | const localVarQueryParameter = {} as any; 2750 | 2751 | if (org !== undefined) { 2752 | localVarQueryParameter['org'] = org; 2753 | } 2754 | 2755 | if (provider !== undefined) { 2756 | localVarQueryParameter['provider'] = provider; 2757 | } 2758 | 2759 | 2760 | 2761 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2762 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2763 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2764 | 2765 | return { 2766 | url: toPathString(localVarUrlObj), 2767 | options: localVarRequestOptions, 2768 | }; 2769 | }, 2770 | /** 2771 | * 2772 | * @param {string} org 2773 | * @param {string} repo 2774 | * @param {string} role 2775 | * @param {string} [provider] 2776 | * @param {string} [commitSha] 2777 | * @param {string} [configOwner] 2778 | * @param {string} [configPath] 2779 | * @param {*} [options] Override http request option. 2780 | * @throws {RequiredError} 2781 | */ 2782 | assumeRoleForRepo: async (org: string, repo: string, role: string, provider?: string, commitSha?: string, configOwner?: string, configPath?: string, options: AxiosRequestConfig = {}): Promise => { 2783 | // verify required parameter 'org' is not null or undefined 2784 | assertParamExists('assumeRoleForRepo', 'org', org) 2785 | // verify required parameter 'repo' is not null or undefined 2786 | assertParamExists('assumeRoleForRepo', 'repo', repo) 2787 | // verify required parameter 'role' is not null or undefined 2788 | assertParamExists('assumeRoleForRepo', 'role', role) 2789 | const localVarPath = `/api/v1/idp/orgs/{org}/repos/{repo}/roles/{role}/assume` 2790 | .replace(`{${"org"}}`, encodeURIComponent(String(org))) 2791 | .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) 2792 | .replace(`{${"role"}}`, encodeURIComponent(String(role))); 2793 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2794 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2795 | let baseOptions; 2796 | if (configuration) { 2797 | baseOptions = configuration.baseOptions; 2798 | } 2799 | 2800 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 2801 | const localVarHeaderParameter = {} as any; 2802 | const localVarQueryParameter = {} as any; 2803 | 2804 | // authentication jwt required 2805 | // http bearer authentication required 2806 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2807 | 2808 | if (provider !== undefined) { 2809 | localVarQueryParameter['provider'] = provider; 2810 | } 2811 | 2812 | if (commitSha !== undefined) { 2813 | localVarQueryParameter['commitSha'] = commitSha; 2814 | } 2815 | 2816 | if (configOwner !== undefined) { 2817 | localVarQueryParameter['configOwner'] = configOwner; 2818 | } 2819 | 2820 | if (configPath !== undefined) { 2821 | localVarQueryParameter['configPath'] = configPath; 2822 | } 2823 | 2824 | 2825 | 2826 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2827 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2828 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2829 | 2830 | return { 2831 | url: toPathString(localVarUrlObj), 2832 | options: localVarRequestOptions, 2833 | }; 2834 | }, 2835 | /** 2836 | * 2837 | * @param {string} org 2838 | * @param {GithubSlsRestApiEncryptRequest} githubSlsRestApiEncryptRequest 2839 | * @param {*} [options] Override http request option. 2840 | * @throws {RequiredError} 2841 | */ 2842 | encrypt: async (org: string, githubSlsRestApiEncryptRequest: GithubSlsRestApiEncryptRequest, options: AxiosRequestConfig = {}): Promise => { 2843 | // verify required parameter 'org' is not null or undefined 2844 | assertParamExists('encrypt', 'org', org) 2845 | // verify required parameter 'githubSlsRestApiEncryptRequest' is not null or undefined 2846 | assertParamExists('encrypt', 'githubSlsRestApiEncryptRequest', githubSlsRestApiEncryptRequest) 2847 | const localVarPath = `/api/v1/idp/orgs/{org}/encrypt` 2848 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 2849 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2850 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2851 | let baseOptions; 2852 | if (configuration) { 2853 | baseOptions = configuration.baseOptions; 2854 | } 2855 | 2856 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 2857 | const localVarHeaderParameter = {} as any; 2858 | const localVarQueryParameter = {} as any; 2859 | 2860 | 2861 | 2862 | localVarHeaderParameter['Content-Type'] = 'application/json'; 2863 | 2864 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2865 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2866 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2867 | localVarRequestOptions.data = serializeDataIfNeeded(githubSlsRestApiEncryptRequest, localVarRequestOptions, configuration) 2868 | 2869 | return { 2870 | url: toPathString(localVarUrlObj), 2871 | options: localVarRequestOptions, 2872 | }; 2873 | }, 2874 | /** 2875 | * 2876 | * @param {*} [options] Override http request option. 2877 | * @throws {RequiredError} 2878 | */ 2879 | getIdentity: async (options: AxiosRequestConfig = {}): Promise => { 2880 | const localVarPath = `/api/v1/idp/me`; 2881 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2882 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2883 | let baseOptions; 2884 | if (configuration) { 2885 | baseOptions = configuration.baseOptions; 2886 | } 2887 | 2888 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2889 | const localVarHeaderParameter = {} as any; 2890 | const localVarQueryParameter = {} as any; 2891 | 2892 | // authentication jwt required 2893 | // http bearer authentication required 2894 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2895 | 2896 | 2897 | 2898 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2899 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2900 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2901 | 2902 | return { 2903 | url: toPathString(localVarUrlObj), 2904 | options: localVarRequestOptions, 2905 | }; 2906 | }, 2907 | /** 2908 | * 2909 | * @param {string} org 2910 | * @param {boolean} [raw] 2911 | * @param {*} [options] Override http request option. 2912 | * @throws {RequiredError} 2913 | */ 2914 | getOrgConfig: async (org: string, raw?: boolean, options: AxiosRequestConfig = {}): Promise => { 2915 | // verify required parameter 'org' is not null or undefined 2916 | assertParamExists('getOrgConfig', 'org', org) 2917 | const localVarPath = `/api/v1/idp/orgs/{org}/config` 2918 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 2919 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2920 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2921 | let baseOptions; 2922 | if (configuration) { 2923 | baseOptions = configuration.baseOptions; 2924 | } 2925 | 2926 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2927 | const localVarHeaderParameter = {} as any; 2928 | const localVarQueryParameter = {} as any; 2929 | 2930 | // authentication jwt required 2931 | // http bearer authentication required 2932 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 2933 | 2934 | if (raw !== undefined) { 2935 | localVarQueryParameter['raw'] = raw; 2936 | } 2937 | 2938 | 2939 | 2940 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2941 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2942 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2943 | 2944 | return { 2945 | url: toPathString(localVarUrlObj), 2946 | options: localVarRequestOptions, 2947 | }; 2948 | }, 2949 | /** 2950 | * 2951 | * @param {string} org 2952 | * @param {*} [options] Override http request option. 2953 | * @throws {RequiredError} 2954 | */ 2955 | getOrgMetadata: async (org: string, options: AxiosRequestConfig = {}): Promise => { 2956 | // verify required parameter 'org' is not null or undefined 2957 | assertParamExists('getOrgMetadata', 'org', org) 2958 | const localVarPath = `/api/v1/idp/orgs/{org}/metadata` 2959 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 2960 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2961 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2962 | let baseOptions; 2963 | if (configuration) { 2964 | baseOptions = configuration.baseOptions; 2965 | } 2966 | 2967 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 2968 | const localVarHeaderParameter = {} as any; 2969 | const localVarQueryParameter = {} as any; 2970 | 2971 | 2972 | 2973 | setSearchParams(localVarUrlObj, localVarQueryParameter); 2974 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 2975 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 2976 | 2977 | return { 2978 | url: toPathString(localVarUrlObj), 2979 | options: localVarRequestOptions, 2980 | }; 2981 | }, 2982 | /** 2983 | * 2984 | * @param {string} org 2985 | * @param {*} [options] Override http request option. 2986 | * @throws {RequiredError} 2987 | */ 2988 | getOrgRepo: async (org: string, options: AxiosRequestConfig = {}): Promise => { 2989 | // verify required parameter 'org' is not null or undefined 2990 | assertParamExists('getOrgRepo', 'org', org) 2991 | const localVarPath = `/api/v1/idp/orgs/{org}` 2992 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 2993 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 2994 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 2995 | let baseOptions; 2996 | if (configuration) { 2997 | baseOptions = configuration.baseOptions; 2998 | } 2999 | 3000 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3001 | const localVarHeaderParameter = {} as any; 3002 | const localVarQueryParameter = {} as any; 3003 | 3004 | // authentication jwt required 3005 | // http bearer authentication required 3006 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3007 | 3008 | 3009 | 3010 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3011 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3012 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3013 | 3014 | return { 3015 | url: toPathString(localVarUrlObj), 3016 | options: localVarRequestOptions, 3017 | }; 3018 | }, 3019 | /** 3020 | * 3021 | * @param {string} [org] 3022 | * @param {boolean} [refresh] 3023 | * @param {*} [options] Override http request option. 3024 | * @throws {RequiredError} 3025 | */ 3026 | listLogins: async (org?: string, refresh?: boolean, options: AxiosRequestConfig = {}): Promise => { 3027 | const localVarPath = `/api/v1/idp/logins`; 3028 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3029 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3030 | let baseOptions; 3031 | if (configuration) { 3032 | baseOptions = configuration.baseOptions; 3033 | } 3034 | 3035 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3036 | const localVarHeaderParameter = {} as any; 3037 | const localVarQueryParameter = {} as any; 3038 | 3039 | // authentication jwt required 3040 | // http bearer authentication required 3041 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3042 | 3043 | if (org !== undefined) { 3044 | localVarQueryParameter['org'] = org; 3045 | } 3046 | 3047 | if (refresh !== undefined) { 3048 | localVarQueryParameter['refresh'] = refresh; 3049 | } 3050 | 3051 | 3052 | 3053 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3054 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3055 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3056 | 3057 | return { 3058 | url: toPathString(localVarUrlObj), 3059 | options: localVarRequestOptions, 3060 | }; 3061 | }, 3062 | /** 3063 | * 3064 | * @param {*} [options] Override http request option. 3065 | * @throws {RequiredError} 3066 | */ 3067 | listOrgRepos: async (options: AxiosRequestConfig = {}): Promise => { 3068 | const localVarPath = `/api/v1/idp/orgs`; 3069 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3070 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3071 | let baseOptions; 3072 | if (configuration) { 3073 | baseOptions = configuration.baseOptions; 3074 | } 3075 | 3076 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3077 | const localVarHeaderParameter = {} as any; 3078 | const localVarQueryParameter = {} as any; 3079 | 3080 | // authentication jwt required 3081 | // http bearer authentication required 3082 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3083 | 3084 | 3085 | 3086 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3087 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3088 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3089 | 3090 | return { 3091 | url: toPathString(localVarUrlObj), 3092 | options: localVarRequestOptions, 3093 | }; 3094 | }, 3095 | /** 3096 | * 3097 | * @param {string} [org] 3098 | * @param {string} [provider] 3099 | * @param {boolean} [refresh] 3100 | * @param {*} [options] Override http request option. 3101 | * @throws {RequiredError} 3102 | */ 3103 | listRoles: async (org?: string, provider?: string, refresh?: boolean, options: AxiosRequestConfig = {}): Promise => { 3104 | const localVarPath = `/api/v1/idp/roles`; 3105 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3106 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3107 | let baseOptions; 3108 | if (configuration) { 3109 | baseOptions = configuration.baseOptions; 3110 | } 3111 | 3112 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3113 | const localVarHeaderParameter = {} as any; 3114 | const localVarQueryParameter = {} as any; 3115 | 3116 | // authentication jwt required 3117 | // http bearer authentication required 3118 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3119 | 3120 | if (org !== undefined) { 3121 | localVarQueryParameter['org'] = org; 3122 | } 3123 | 3124 | if (provider !== undefined) { 3125 | localVarQueryParameter['provider'] = provider; 3126 | } 3127 | 3128 | if (refresh !== undefined) { 3129 | localVarQueryParameter['refresh'] = refresh; 3130 | } 3131 | 3132 | 3133 | 3134 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3135 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3136 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3137 | 3138 | return { 3139 | url: toPathString(localVarUrlObj), 3140 | options: localVarRequestOptions, 3141 | }; 3142 | }, 3143 | /** 3144 | * 3145 | * @param {string} provider 3146 | * @param {string} [org] 3147 | * @param {*} [options] Override http request option. 3148 | * @throws {RequiredError} 3149 | */ 3150 | providerLogin: async (provider: string, org?: string, options: AxiosRequestConfig = {}): Promise => { 3151 | // verify required parameter 'provider' is not null or undefined 3152 | assertParamExists('providerLogin', 'provider', provider) 3153 | const localVarPath = `/api/v1/idp/logins/{provider}/login` 3154 | .replace(`{${"provider"}}`, encodeURIComponent(String(provider))); 3155 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3156 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3157 | let baseOptions; 3158 | if (configuration) { 3159 | baseOptions = configuration.baseOptions; 3160 | } 3161 | 3162 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 3163 | const localVarHeaderParameter = {} as any; 3164 | const localVarQueryParameter = {} as any; 3165 | 3166 | // authentication jwt required 3167 | // http bearer authentication required 3168 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3169 | 3170 | if (org !== undefined) { 3171 | localVarQueryParameter['org'] = org; 3172 | } 3173 | 3174 | 3175 | 3176 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3177 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3178 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3179 | 3180 | return { 3181 | url: toPathString(localVarUrlObj), 3182 | options: localVarRequestOptions, 3183 | }; 3184 | }, 3185 | /** 3186 | * 3187 | * @param {string} org 3188 | * @param {string} repo 3189 | * @param {boolean} [dryrun] 3190 | * @param {string} [commitSha] 3191 | * @param {string} [commitRef] 3192 | * @param {*} [options] Override http request option. 3193 | * @throws {RequiredError} 3194 | */ 3195 | refreshOrgRepoConfig: async (org: string, repo: string, dryrun?: boolean, commitSha?: string, commitRef?: string, options: AxiosRequestConfig = {}): Promise => { 3196 | // verify required parameter 'org' is not null or undefined 3197 | assertParamExists('refreshOrgRepoConfig', 'org', org) 3198 | // verify required parameter 'repo' is not null or undefined 3199 | assertParamExists('refreshOrgRepoConfig', 'repo', repo) 3200 | const localVarPath = `/api/v1/idp/orgs/{org}/repos/{repo}/config` 3201 | .replace(`{${"org"}}`, encodeURIComponent(String(org))) 3202 | .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); 3203 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3204 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3205 | let baseOptions; 3206 | if (configuration) { 3207 | baseOptions = configuration.baseOptions; 3208 | } 3209 | 3210 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 3211 | const localVarHeaderParameter = {} as any; 3212 | const localVarQueryParameter = {} as any; 3213 | 3214 | // authentication jwt required 3215 | // http bearer authentication required 3216 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3217 | 3218 | if (dryrun !== undefined) { 3219 | localVarQueryParameter['dryrun'] = dryrun; 3220 | } 3221 | 3222 | if (commitSha !== undefined) { 3223 | localVarQueryParameter['commitSha'] = commitSha; 3224 | } 3225 | 3226 | if (commitRef !== undefined) { 3227 | localVarQueryParameter['commitRef'] = commitRef; 3228 | } 3229 | 3230 | 3231 | 3232 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3233 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3234 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3235 | 3236 | return { 3237 | url: toPathString(localVarUrlObj), 3238 | options: localVarRequestOptions, 3239 | }; 3240 | }, 3241 | /** 3242 | * 3243 | * @param {string} org 3244 | * @param {string} repo 3245 | * @param {boolean} [force] 3246 | * @param {boolean} [create] 3247 | * @param {*} [options] Override http request option. 3248 | * @throws {RequiredError} 3249 | */ 3250 | setOrgAndRepo: async (org: string, repo: string, force?: boolean, create?: boolean, options: AxiosRequestConfig = {}): Promise => { 3251 | // verify required parameter 'org' is not null or undefined 3252 | assertParamExists('setOrgAndRepo', 'org', org) 3253 | // verify required parameter 'repo' is not null or undefined 3254 | assertParamExists('setOrgAndRepo', 'repo', repo) 3255 | const localVarPath = `/api/v1/idp/orgs/{org}/repos/{repo}` 3256 | .replace(`{${"org"}}`, encodeURIComponent(String(org))) 3257 | .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); 3258 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3259 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3260 | let baseOptions; 3261 | if (configuration) { 3262 | baseOptions = configuration.baseOptions; 3263 | } 3264 | 3265 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 3266 | const localVarHeaderParameter = {} as any; 3267 | const localVarQueryParameter = {} as any; 3268 | 3269 | // authentication jwt required 3270 | // http bearer authentication required 3271 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3272 | 3273 | if (force !== undefined) { 3274 | localVarQueryParameter['force'] = force; 3275 | } 3276 | 3277 | if (create !== undefined) { 3278 | localVarQueryParameter['create'] = create; 3279 | } 3280 | 3281 | 3282 | 3283 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3284 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3285 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3286 | 3287 | return { 3288 | url: toPathString(localVarUrlObj), 3289 | options: localVarRequestOptions, 3290 | }; 3291 | }, 3292 | } 3293 | }; 3294 | 3295 | /** 3296 | * IDPApi - functional programming interface 3297 | * @export 3298 | */ 3299 | export const IDPApiFp = function(configuration?: Configuration) { 3300 | const localVarAxiosParamCreator = IDPApiAxiosParamCreator(configuration) 3301 | return { 3302 | /** 3303 | * 3304 | * @param {string} role 3305 | * @param {string} [org] 3306 | * @param {string} [provider] 3307 | * @param {*} [options] Override http request option. 3308 | * @throws {RequiredError} 3309 | */ 3310 | async assumeRole(role: string, org?: string, provider?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3311 | const localVarAxiosArgs = await localVarAxiosParamCreator.assumeRole(role, org, provider, options); 3312 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3313 | }, 3314 | /** 3315 | * 3316 | * @param {string} role 3317 | * @param {string} [org] 3318 | * @param {string} [provider] 3319 | * @param {*} [options] Override http request option. 3320 | * @throws {RequiredError} 3321 | */ 3322 | async assumeRoleForBrowser(role: string, org?: string, provider?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3323 | const localVarAxiosArgs = await localVarAxiosParamCreator.assumeRoleForBrowser(role, org, provider, options); 3324 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3325 | }, 3326 | /** 3327 | * 3328 | * @param {string} org 3329 | * @param {string} repo 3330 | * @param {string} role 3331 | * @param {string} [provider] 3332 | * @param {string} [commitSha] 3333 | * @param {string} [configOwner] 3334 | * @param {string} [configPath] 3335 | * @param {*} [options] Override http request option. 3336 | * @throws {RequiredError} 3337 | */ 3338 | async assumeRoleForRepo(org: string, repo: string, role: string, provider?: string, commitSha?: string, configOwner?: string, configPath?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3339 | const localVarAxiosArgs = await localVarAxiosParamCreator.assumeRoleForRepo(org, repo, role, provider, commitSha, configOwner, configPath, options); 3340 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3341 | }, 3342 | /** 3343 | * 3344 | * @param {string} org 3345 | * @param {GithubSlsRestApiEncryptRequest} githubSlsRestApiEncryptRequest 3346 | * @param {*} [options] Override http request option. 3347 | * @throws {RequiredError} 3348 | */ 3349 | async encrypt(org: string, githubSlsRestApiEncryptRequest: GithubSlsRestApiEncryptRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3350 | const localVarAxiosArgs = await localVarAxiosParamCreator.encrypt(org, githubSlsRestApiEncryptRequest, options); 3351 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3352 | }, 3353 | /** 3354 | * 3355 | * @param {*} [options] Override http request option. 3356 | * @throws {RequiredError} 3357 | */ 3358 | async getIdentity(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3359 | const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentity(options); 3360 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3361 | }, 3362 | /** 3363 | * 3364 | * @param {string} org 3365 | * @param {boolean} [raw] 3366 | * @param {*} [options] Override http request option. 3367 | * @throws {RequiredError} 3368 | */ 3369 | async getOrgConfig(org: string, raw?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3370 | const localVarAxiosArgs = await localVarAxiosParamCreator.getOrgConfig(org, raw, options); 3371 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3372 | }, 3373 | /** 3374 | * 3375 | * @param {string} org 3376 | * @param {*} [options] Override http request option. 3377 | * @throws {RequiredError} 3378 | */ 3379 | async getOrgMetadata(org: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3380 | const localVarAxiosArgs = await localVarAxiosParamCreator.getOrgMetadata(org, options); 3381 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3382 | }, 3383 | /** 3384 | * 3385 | * @param {string} org 3386 | * @param {*} [options] Override http request option. 3387 | * @throws {RequiredError} 3388 | */ 3389 | async getOrgRepo(org: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3390 | const localVarAxiosArgs = await localVarAxiosParamCreator.getOrgRepo(org, options); 3391 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3392 | }, 3393 | /** 3394 | * 3395 | * @param {string} [org] 3396 | * @param {boolean} [refresh] 3397 | * @param {*} [options] Override http request option. 3398 | * @throws {RequiredError} 3399 | */ 3400 | async listLogins(org?: string, refresh?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3401 | const localVarAxiosArgs = await localVarAxiosParamCreator.listLogins(org, refresh, options); 3402 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3403 | }, 3404 | /** 3405 | * 3406 | * @param {*} [options] Override http request option. 3407 | * @throws {RequiredError} 3408 | */ 3409 | async listOrgRepos(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3410 | const localVarAxiosArgs = await localVarAxiosParamCreator.listOrgRepos(options); 3411 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3412 | }, 3413 | /** 3414 | * 3415 | * @param {string} [org] 3416 | * @param {string} [provider] 3417 | * @param {boolean} [refresh] 3418 | * @param {*} [options] Override http request option. 3419 | * @throws {RequiredError} 3420 | */ 3421 | async listRoles(org?: string, provider?: string, refresh?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3422 | const localVarAxiosArgs = await localVarAxiosParamCreator.listRoles(org, provider, refresh, options); 3423 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3424 | }, 3425 | /** 3426 | * 3427 | * @param {string} provider 3428 | * @param {string} [org] 3429 | * @param {*} [options] Override http request option. 3430 | * @throws {RequiredError} 3431 | */ 3432 | async providerLogin(provider: string, org?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3433 | const localVarAxiosArgs = await localVarAxiosParamCreator.providerLogin(provider, org, options); 3434 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3435 | }, 3436 | /** 3437 | * 3438 | * @param {string} org 3439 | * @param {string} repo 3440 | * @param {boolean} [dryrun] 3441 | * @param {string} [commitSha] 3442 | * @param {string} [commitRef] 3443 | * @param {*} [options] Override http request option. 3444 | * @throws {RequiredError} 3445 | */ 3446 | async refreshOrgRepoConfig(org: string, repo: string, dryrun?: boolean, commitSha?: string, commitRef?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3447 | const localVarAxiosArgs = await localVarAxiosParamCreator.refreshOrgRepoConfig(org, repo, dryrun, commitSha, commitRef, options); 3448 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3449 | }, 3450 | /** 3451 | * 3452 | * @param {string} org 3453 | * @param {string} repo 3454 | * @param {boolean} [force] 3455 | * @param {boolean} [create] 3456 | * @param {*} [options] Override http request option. 3457 | * @throws {RequiredError} 3458 | */ 3459 | async setOrgAndRepo(org: string, repo: string, force?: boolean, create?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3460 | const localVarAxiosArgs = await localVarAxiosParamCreator.setOrgAndRepo(org, repo, force, create, options); 3461 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3462 | }, 3463 | } 3464 | }; 3465 | 3466 | /** 3467 | * IDPApi - factory interface 3468 | * @export 3469 | */ 3470 | export const IDPApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { 3471 | const localVarFp = IDPApiFp(configuration) 3472 | return { 3473 | /** 3474 | * 3475 | * @param {string} role 3476 | * @param {string} [org] 3477 | * @param {string} [provider] 3478 | * @param {*} [options] Override http request option. 3479 | * @throws {RequiredError} 3480 | */ 3481 | assumeRole(role: string, org?: string, provider?: string, options?: any): AxiosPromise { 3482 | return localVarFp.assumeRole(role, org, provider, options).then((request) => request(axios, basePath)); 3483 | }, 3484 | /** 3485 | * 3486 | * @param {string} role 3487 | * @param {string} [org] 3488 | * @param {string} [provider] 3489 | * @param {*} [options] Override http request option. 3490 | * @throws {RequiredError} 3491 | */ 3492 | assumeRoleForBrowser(role: string, org?: string, provider?: string, options?: any): AxiosPromise { 3493 | return localVarFp.assumeRoleForBrowser(role, org, provider, options).then((request) => request(axios, basePath)); 3494 | }, 3495 | /** 3496 | * 3497 | * @param {string} org 3498 | * @param {string} repo 3499 | * @param {string} role 3500 | * @param {string} [provider] 3501 | * @param {string} [commitSha] 3502 | * @param {string} [configOwner] 3503 | * @param {string} [configPath] 3504 | * @param {*} [options] Override http request option. 3505 | * @throws {RequiredError} 3506 | */ 3507 | assumeRoleForRepo(org: string, repo: string, role: string, provider?: string, commitSha?: string, configOwner?: string, configPath?: string, options?: any): AxiosPromise { 3508 | return localVarFp.assumeRoleForRepo(org, repo, role, provider, commitSha, configOwner, configPath, options).then((request) => request(axios, basePath)); 3509 | }, 3510 | /** 3511 | * 3512 | * @param {string} org 3513 | * @param {GithubSlsRestApiEncryptRequest} githubSlsRestApiEncryptRequest 3514 | * @param {*} [options] Override http request option. 3515 | * @throws {RequiredError} 3516 | */ 3517 | encrypt(org: string, githubSlsRestApiEncryptRequest: GithubSlsRestApiEncryptRequest, options?: any): AxiosPromise { 3518 | return localVarFp.encrypt(org, githubSlsRestApiEncryptRequest, options).then((request) => request(axios, basePath)); 3519 | }, 3520 | /** 3521 | * 3522 | * @param {*} [options] Override http request option. 3523 | * @throws {RequiredError} 3524 | */ 3525 | getIdentity(options?: any): AxiosPromise { 3526 | return localVarFp.getIdentity(options).then((request) => request(axios, basePath)); 3527 | }, 3528 | /** 3529 | * 3530 | * @param {string} org 3531 | * @param {boolean} [raw] 3532 | * @param {*} [options] Override http request option. 3533 | * @throws {RequiredError} 3534 | */ 3535 | getOrgConfig(org: string, raw?: boolean, options?: any): AxiosPromise { 3536 | return localVarFp.getOrgConfig(org, raw, options).then((request) => request(axios, basePath)); 3537 | }, 3538 | /** 3539 | * 3540 | * @param {string} org 3541 | * @param {*} [options] Override http request option. 3542 | * @throws {RequiredError} 3543 | */ 3544 | getOrgMetadata(org: string, options?: any): AxiosPromise { 3545 | return localVarFp.getOrgMetadata(org, options).then((request) => request(axios, basePath)); 3546 | }, 3547 | /** 3548 | * 3549 | * @param {string} org 3550 | * @param {*} [options] Override http request option. 3551 | * @throws {RequiredError} 3552 | */ 3553 | getOrgRepo(org: string, options?: any): AxiosPromise { 3554 | return localVarFp.getOrgRepo(org, options).then((request) => request(axios, basePath)); 3555 | }, 3556 | /** 3557 | * 3558 | * @param {string} [org] 3559 | * @param {boolean} [refresh] 3560 | * @param {*} [options] Override http request option. 3561 | * @throws {RequiredError} 3562 | */ 3563 | listLogins(org?: string, refresh?: boolean, options?: any): AxiosPromise { 3564 | return localVarFp.listLogins(org, refresh, options).then((request) => request(axios, basePath)); 3565 | }, 3566 | /** 3567 | * 3568 | * @param {*} [options] Override http request option. 3569 | * @throws {RequiredError} 3570 | */ 3571 | listOrgRepos(options?: any): AxiosPromise { 3572 | return localVarFp.listOrgRepos(options).then((request) => request(axios, basePath)); 3573 | }, 3574 | /** 3575 | * 3576 | * @param {string} [org] 3577 | * @param {string} [provider] 3578 | * @param {boolean} [refresh] 3579 | * @param {*} [options] Override http request option. 3580 | * @throws {RequiredError} 3581 | */ 3582 | listRoles(org?: string, provider?: string, refresh?: boolean, options?: any): AxiosPromise { 3583 | return localVarFp.listRoles(org, provider, refresh, options).then((request) => request(axios, basePath)); 3584 | }, 3585 | /** 3586 | * 3587 | * @param {string} provider 3588 | * @param {string} [org] 3589 | * @param {*} [options] Override http request option. 3590 | * @throws {RequiredError} 3591 | */ 3592 | providerLogin(provider: string, org?: string, options?: any): AxiosPromise { 3593 | return localVarFp.providerLogin(provider, org, options).then((request) => request(axios, basePath)); 3594 | }, 3595 | /** 3596 | * 3597 | * @param {string} org 3598 | * @param {string} repo 3599 | * @param {boolean} [dryrun] 3600 | * @param {string} [commitSha] 3601 | * @param {string} [commitRef] 3602 | * @param {*} [options] Override http request option. 3603 | * @throws {RequiredError} 3604 | */ 3605 | refreshOrgRepoConfig(org: string, repo: string, dryrun?: boolean, commitSha?: string, commitRef?: string, options?: any): AxiosPromise { 3606 | return localVarFp.refreshOrgRepoConfig(org, repo, dryrun, commitSha, commitRef, options).then((request) => request(axios, basePath)); 3607 | }, 3608 | /** 3609 | * 3610 | * @param {string} org 3611 | * @param {string} repo 3612 | * @param {boolean} [force] 3613 | * @param {boolean} [create] 3614 | * @param {*} [options] Override http request option. 3615 | * @throws {RequiredError} 3616 | */ 3617 | setOrgAndRepo(org: string, repo: string, force?: boolean, create?: boolean, options?: any): AxiosPromise { 3618 | return localVarFp.setOrgAndRepo(org, repo, force, create, options).then((request) => request(axios, basePath)); 3619 | }, 3620 | }; 3621 | }; 3622 | 3623 | /** 3624 | * IDPApi - object-oriented interface 3625 | * @export 3626 | * @class IDPApi 3627 | * @extends {BaseAPI} 3628 | */ 3629 | export class IDPApi extends BaseAPI { 3630 | /** 3631 | * 3632 | * @param {string} role 3633 | * @param {string} [org] 3634 | * @param {string} [provider] 3635 | * @param {*} [options] Override http request option. 3636 | * @throws {RequiredError} 3637 | * @memberof IDPApi 3638 | */ 3639 | public assumeRole(role: string, org?: string, provider?: string, options?: AxiosRequestConfig) { 3640 | return IDPApiFp(this.configuration).assumeRole(role, org, provider, options).then((request) => request(this.axios, this.basePath)); 3641 | } 3642 | 3643 | /** 3644 | * 3645 | * @param {string} role 3646 | * @param {string} [org] 3647 | * @param {string} [provider] 3648 | * @param {*} [options] Override http request option. 3649 | * @throws {RequiredError} 3650 | * @memberof IDPApi 3651 | */ 3652 | public assumeRoleForBrowser(role: string, org?: string, provider?: string, options?: AxiosRequestConfig) { 3653 | return IDPApiFp(this.configuration).assumeRoleForBrowser(role, org, provider, options).then((request) => request(this.axios, this.basePath)); 3654 | } 3655 | 3656 | /** 3657 | * 3658 | * @param {string} org 3659 | * @param {string} repo 3660 | * @param {string} role 3661 | * @param {string} [provider] 3662 | * @param {string} [commitSha] 3663 | * @param {string} [configOwner] 3664 | * @param {string} [configPath] 3665 | * @param {*} [options] Override http request option. 3666 | * @throws {RequiredError} 3667 | * @memberof IDPApi 3668 | */ 3669 | public assumeRoleForRepo(org: string, repo: string, role: string, provider?: string, commitSha?: string, configOwner?: string, configPath?: string, options?: AxiosRequestConfig) { 3670 | return IDPApiFp(this.configuration).assumeRoleForRepo(org, repo, role, provider, commitSha, configOwner, configPath, options).then((request) => request(this.axios, this.basePath)); 3671 | } 3672 | 3673 | /** 3674 | * 3675 | * @param {string} org 3676 | * @param {GithubSlsRestApiEncryptRequest} githubSlsRestApiEncryptRequest 3677 | * @param {*} [options] Override http request option. 3678 | * @throws {RequiredError} 3679 | * @memberof IDPApi 3680 | */ 3681 | public encrypt(org: string, githubSlsRestApiEncryptRequest: GithubSlsRestApiEncryptRequest, options?: AxiosRequestConfig) { 3682 | return IDPApiFp(this.configuration).encrypt(org, githubSlsRestApiEncryptRequest, options).then((request) => request(this.axios, this.basePath)); 3683 | } 3684 | 3685 | /** 3686 | * 3687 | * @param {*} [options] Override http request option. 3688 | * @throws {RequiredError} 3689 | * @memberof IDPApi 3690 | */ 3691 | public getIdentity(options?: AxiosRequestConfig) { 3692 | return IDPApiFp(this.configuration).getIdentity(options).then((request) => request(this.axios, this.basePath)); 3693 | } 3694 | 3695 | /** 3696 | * 3697 | * @param {string} org 3698 | * @param {boolean} [raw] 3699 | * @param {*} [options] Override http request option. 3700 | * @throws {RequiredError} 3701 | * @memberof IDPApi 3702 | */ 3703 | public getOrgConfig(org: string, raw?: boolean, options?: AxiosRequestConfig) { 3704 | return IDPApiFp(this.configuration).getOrgConfig(org, raw, options).then((request) => request(this.axios, this.basePath)); 3705 | } 3706 | 3707 | /** 3708 | * 3709 | * @param {string} org 3710 | * @param {*} [options] Override http request option. 3711 | * @throws {RequiredError} 3712 | * @memberof IDPApi 3713 | */ 3714 | public getOrgMetadata(org: string, options?: AxiosRequestConfig) { 3715 | return IDPApiFp(this.configuration).getOrgMetadata(org, options).then((request) => request(this.axios, this.basePath)); 3716 | } 3717 | 3718 | /** 3719 | * 3720 | * @param {string} org 3721 | * @param {*} [options] Override http request option. 3722 | * @throws {RequiredError} 3723 | * @memberof IDPApi 3724 | */ 3725 | public getOrgRepo(org: string, options?: AxiosRequestConfig) { 3726 | return IDPApiFp(this.configuration).getOrgRepo(org, options).then((request) => request(this.axios, this.basePath)); 3727 | } 3728 | 3729 | /** 3730 | * 3731 | * @param {string} [org] 3732 | * @param {boolean} [refresh] 3733 | * @param {*} [options] Override http request option. 3734 | * @throws {RequiredError} 3735 | * @memberof IDPApi 3736 | */ 3737 | public listLogins(org?: string, refresh?: boolean, options?: AxiosRequestConfig) { 3738 | return IDPApiFp(this.configuration).listLogins(org, refresh, options).then((request) => request(this.axios, this.basePath)); 3739 | } 3740 | 3741 | /** 3742 | * 3743 | * @param {*} [options] Override http request option. 3744 | * @throws {RequiredError} 3745 | * @memberof IDPApi 3746 | */ 3747 | public listOrgRepos(options?: AxiosRequestConfig) { 3748 | return IDPApiFp(this.configuration).listOrgRepos(options).then((request) => request(this.axios, this.basePath)); 3749 | } 3750 | 3751 | /** 3752 | * 3753 | * @param {string} [org] 3754 | * @param {string} [provider] 3755 | * @param {boolean} [refresh] 3756 | * @param {*} [options] Override http request option. 3757 | * @throws {RequiredError} 3758 | * @memberof IDPApi 3759 | */ 3760 | public listRoles(org?: string, provider?: string, refresh?: boolean, options?: AxiosRequestConfig) { 3761 | return IDPApiFp(this.configuration).listRoles(org, provider, refresh, options).then((request) => request(this.axios, this.basePath)); 3762 | } 3763 | 3764 | /** 3765 | * 3766 | * @param {string} provider 3767 | * @param {string} [org] 3768 | * @param {*} [options] Override http request option. 3769 | * @throws {RequiredError} 3770 | * @memberof IDPApi 3771 | */ 3772 | public providerLogin(provider: string, org?: string, options?: AxiosRequestConfig) { 3773 | return IDPApiFp(this.configuration).providerLogin(provider, org, options).then((request) => request(this.axios, this.basePath)); 3774 | } 3775 | 3776 | /** 3777 | * 3778 | * @param {string} org 3779 | * @param {string} repo 3780 | * @param {boolean} [dryrun] 3781 | * @param {string} [commitSha] 3782 | * @param {string} [commitRef] 3783 | * @param {*} [options] Override http request option. 3784 | * @throws {RequiredError} 3785 | * @memberof IDPApi 3786 | */ 3787 | public refreshOrgRepoConfig(org: string, repo: string, dryrun?: boolean, commitSha?: string, commitRef?: string, options?: AxiosRequestConfig) { 3788 | return IDPApiFp(this.configuration).refreshOrgRepoConfig(org, repo, dryrun, commitSha, commitRef, options).then((request) => request(this.axios, this.basePath)); 3789 | } 3790 | 3791 | /** 3792 | * 3793 | * @param {string} org 3794 | * @param {string} repo 3795 | * @param {boolean} [force] 3796 | * @param {boolean} [create] 3797 | * @param {*} [options] Override http request option. 3798 | * @throws {RequiredError} 3799 | * @memberof IDPApi 3800 | */ 3801 | public setOrgAndRepo(org: string, repo: string, force?: boolean, create?: boolean, options?: AxiosRequestConfig) { 3802 | return IDPApiFp(this.configuration).setOrgAndRepo(org, repo, force, create, options).then((request) => request(this.axios, this.basePath)); 3803 | } 3804 | } 3805 | 3806 | 3807 | /** 3808 | * TemplateApi - axios parameter creator 3809 | * @export 3810 | */ 3811 | export const TemplateApiAxiosParamCreator = function (configuration?: Configuration) { 3812 | return { 3813 | /** 3814 | * 3815 | * @param {string} org 3816 | * @param {string} [managedPolicy] 3817 | * @param {*} [options] Override http request option. 3818 | * @throws {RequiredError} 3819 | */ 3820 | createCloudFormation: async (org: string, managedPolicy?: string, options: AxiosRequestConfig = {}): Promise => { 3821 | // verify required parameter 'org' is not null or undefined 3822 | assertParamExists('createCloudFormation', 'org', org) 3823 | const localVarPath = `/api/v1/template/orgs/{org}/cloudformation` 3824 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 3825 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3826 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3827 | let baseOptions; 3828 | if (configuration) { 3829 | baseOptions = configuration.baseOptions; 3830 | } 3831 | 3832 | const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; 3833 | const localVarHeaderParameter = {} as any; 3834 | const localVarQueryParameter = {} as any; 3835 | 3836 | // authentication jwt required 3837 | // http bearer authentication required 3838 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3839 | 3840 | if (managedPolicy !== undefined) { 3841 | localVarQueryParameter['managedPolicy'] = managedPolicy; 3842 | } 3843 | 3844 | 3845 | 3846 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3847 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3848 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3849 | 3850 | return { 3851 | url: toPathString(localVarUrlObj), 3852 | options: localVarRequestOptions, 3853 | }; 3854 | }, 3855 | /** 3856 | * 3857 | * @param {string} org 3858 | * @param {string} [templateId] 3859 | * @param {*} [options] Override http request option. 3860 | * @throws {RequiredError} 3861 | */ 3862 | getCloudFormation: async (org: string, templateId?: string, options: AxiosRequestConfig = {}): Promise => { 3863 | // verify required parameter 'org' is not null or undefined 3864 | assertParamExists('getCloudFormation', 'org', org) 3865 | const localVarPath = `/api/v1/template/orgs/{org}/cloudformation` 3866 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 3867 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3868 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3869 | let baseOptions; 3870 | if (configuration) { 3871 | baseOptions = configuration.baseOptions; 3872 | } 3873 | 3874 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3875 | const localVarHeaderParameter = {} as any; 3876 | const localVarQueryParameter = {} as any; 3877 | 3878 | // authentication jwt required 3879 | // http bearer authentication required 3880 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3881 | 3882 | if (templateId !== undefined) { 3883 | localVarQueryParameter['templateId'] = templateId; 3884 | } 3885 | 3886 | 3887 | 3888 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3889 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3890 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3891 | 3892 | return { 3893 | url: toPathString(localVarUrlObj), 3894 | options: localVarRequestOptions, 3895 | }; 3896 | }, 3897 | /** 3898 | * 3899 | * @param {string} org 3900 | * @param {*} [options] Override http request option. 3901 | * @throws {RequiredError} 3902 | */ 3903 | getConfigVariables: async (org: string, options: AxiosRequestConfig = {}): Promise => { 3904 | // verify required parameter 'org' is not null or undefined 3905 | assertParamExists('getConfigVariables', 'org', org) 3906 | const localVarPath = `/api/v1/template/orgs/{org}/configvariables` 3907 | .replace(`{${"org"}}`, encodeURIComponent(String(org))); 3908 | // use dummy base URL string because the URL constructor only accepts absolute URLs. 3909 | const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); 3910 | let baseOptions; 3911 | if (configuration) { 3912 | baseOptions = configuration.baseOptions; 3913 | } 3914 | 3915 | const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; 3916 | const localVarHeaderParameter = {} as any; 3917 | const localVarQueryParameter = {} as any; 3918 | 3919 | // authentication jwt required 3920 | // http bearer authentication required 3921 | await setBearerAuthToObject(localVarHeaderParameter, configuration) 3922 | 3923 | 3924 | 3925 | setSearchParams(localVarUrlObj, localVarQueryParameter); 3926 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; 3927 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; 3928 | 3929 | return { 3930 | url: toPathString(localVarUrlObj), 3931 | options: localVarRequestOptions, 3932 | }; 3933 | }, 3934 | } 3935 | }; 3936 | 3937 | /** 3938 | * TemplateApi - functional programming interface 3939 | * @export 3940 | */ 3941 | export const TemplateApiFp = function(configuration?: Configuration) { 3942 | const localVarAxiosParamCreator = TemplateApiAxiosParamCreator(configuration) 3943 | return { 3944 | /** 3945 | * 3946 | * @param {string} org 3947 | * @param {string} [managedPolicy] 3948 | * @param {*} [options] Override http request option. 3949 | * @throws {RequiredError} 3950 | */ 3951 | async createCloudFormation(org: string, managedPolicy?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3952 | const localVarAxiosArgs = await localVarAxiosParamCreator.createCloudFormation(org, managedPolicy, options); 3953 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3954 | }, 3955 | /** 3956 | * 3957 | * @param {string} org 3958 | * @param {string} [templateId] 3959 | * @param {*} [options] Override http request option. 3960 | * @throws {RequiredError} 3961 | */ 3962 | async getCloudFormation(org: string, templateId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3963 | const localVarAxiosArgs = await localVarAxiosParamCreator.getCloudFormation(org, templateId, options); 3964 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3965 | }, 3966 | /** 3967 | * 3968 | * @param {string} org 3969 | * @param {*} [options] Override http request option. 3970 | * @throws {RequiredError} 3971 | */ 3972 | async getConfigVariables(org: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 3973 | const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigVariables(org, options); 3974 | return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); 3975 | }, 3976 | } 3977 | }; 3978 | 3979 | /** 3980 | * TemplateApi - factory interface 3981 | * @export 3982 | */ 3983 | export const TemplateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { 3984 | const localVarFp = TemplateApiFp(configuration) 3985 | return { 3986 | /** 3987 | * 3988 | * @param {string} org 3989 | * @param {string} [managedPolicy] 3990 | * @param {*} [options] Override http request option. 3991 | * @throws {RequiredError} 3992 | */ 3993 | createCloudFormation(org: string, managedPolicy?: string, options?: any): AxiosPromise { 3994 | return localVarFp.createCloudFormation(org, managedPolicy, options).then((request) => request(axios, basePath)); 3995 | }, 3996 | /** 3997 | * 3998 | * @param {string} org 3999 | * @param {string} [templateId] 4000 | * @param {*} [options] Override http request option. 4001 | * @throws {RequiredError} 4002 | */ 4003 | getCloudFormation(org: string, templateId?: string, options?: any): AxiosPromise { 4004 | return localVarFp.getCloudFormation(org, templateId, options).then((request) => request(axios, basePath)); 4005 | }, 4006 | /** 4007 | * 4008 | * @param {string} org 4009 | * @param {*} [options] Override http request option. 4010 | * @throws {RequiredError} 4011 | */ 4012 | getConfigVariables(org: string, options?: any): AxiosPromise { 4013 | return localVarFp.getConfigVariables(org, options).then((request) => request(axios, basePath)); 4014 | }, 4015 | }; 4016 | }; 4017 | 4018 | /** 4019 | * TemplateApi - object-oriented interface 4020 | * @export 4021 | * @class TemplateApi 4022 | * @extends {BaseAPI} 4023 | */ 4024 | export class TemplateApi extends BaseAPI { 4025 | /** 4026 | * 4027 | * @param {string} org 4028 | * @param {string} [managedPolicy] 4029 | * @param {*} [options] Override http request option. 4030 | * @throws {RequiredError} 4031 | * @memberof TemplateApi 4032 | */ 4033 | public createCloudFormation(org: string, managedPolicy?: string, options?: AxiosRequestConfig) { 4034 | return TemplateApiFp(this.configuration).createCloudFormation(org, managedPolicy, options).then((request) => request(this.axios, this.basePath)); 4035 | } 4036 | 4037 | /** 4038 | * 4039 | * @param {string} org 4040 | * @param {string} [templateId] 4041 | * @param {*} [options] Override http request option. 4042 | * @throws {RequiredError} 4043 | * @memberof TemplateApi 4044 | */ 4045 | public getCloudFormation(org: string, templateId?: string, options?: AxiosRequestConfig) { 4046 | return TemplateApiFp(this.configuration).getCloudFormation(org, templateId, options).then((request) => request(this.axios, this.basePath)); 4047 | } 4048 | 4049 | /** 4050 | * 4051 | * @param {string} org 4052 | * @param {*} [options] Override http request option. 4053 | * @throws {RequiredError} 4054 | * @memberof TemplateApi 4055 | */ 4056 | public getConfigVariables(org: string, options?: AxiosRequestConfig) { 4057 | return TemplateApiFp(this.configuration).getConfigVariables(org, options).then((request) => request(this.axios, this.basePath)); 4058 | } 4059 | } 4060 | 4061 | 4062 | --------------------------------------------------------------------------------