diff --git a/.circleci/config.yml b/.circleci/config.yml index d3f046e..d26b19c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,12 +1,41 @@ version: 2.1 +defaults: &defaults + docker: + - image: cimg/python:3.11.0-browsers +install_dependency: &install_dependency + name: Installation of build and deployment dependencies. + command: | + sudo apt update + sudo apt install jq + sudo apt install python3-pip + sudo pip3 install awscli --upgrade + sudo pip3 install docker-compose + sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest + sudo chmod +x /usr/local/bin/ecs-cli +install_deploysuite: &install_deploysuite + name: Installation of install_deploysuite. + command: | + git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript + cp ./../buildscript/master_deploy.sh . + cp ./../buildscript/buildenv.sh . + cp ./../buildscript/awsconfiguration.sh . + cp ./../buildscript/buildproperties.sh . +deploy_steps: &deploy_steps +- checkout +- setup_remote_docker +- run: *install_dependency +- run: *install_deploysuite +- deploy: + name: Running MasterScript. + command: "#./awsconfiguration.sh $DEPLOY_ENV\n./awsconfiguration.sh $DEPLOY_ENV\nsource awsenvconf\n./buildproperties.sh -e $BUILD_ENV -k grpc\n./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar\nsource buildenvvar\n#./buildimage.sh\n./buildimage.sh ${DEPLOY_ENV}\n#./master_deploy.sh -d ECS -e $DEPLOY_ENV -m CLI -t latest -i ${APPNAME} \necs-cli configure --region us-east-1 --cluster $AWS_ECS_CLUSTER\necs-cli compose --project-name domain-challenge service up\n#magic___^_^___line\n" jobs: publish-image: docker: - image: cimg/aws:2023.01 environment: CODEARTIFACT_ENV: PROD - ECR_ENV: DEV + ECR_ENV: QA SERVICE_NAME: "domain-challenge" OUT_DIR: "buildscripts" steps: @@ -16,7 +45,7 @@ jobs: - run: name: "Setup deploy scripts" command: | - git clone -b v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../${OUT_DIR} + git clone -b v1.4.15 https://github.com/topcoder-platform/tc-deploy-scripts ../${OUT_DIR} cp ./../${OUT_DIR}/awsconfiguration.sh . - run: name: "Authenticate with AWS CodeArtifact and Build Docker Image" @@ -39,6 +68,34 @@ jobs: docker tag ${SERVICE_NAME}:${CIRCLE_SHA1} $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/${SERVICE_NAME}:${CIRCLE_SHA1} docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/${SERVICE_NAME}:${CIRCLE_SHA1} + deploy-dev: + !!merge <<: *defaults + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + BUILD_ENV: "dev" + APPNAME: "domain-challenge" + steps: *deploy_steps + + deploy-qa: + !!merge <<: *defaults + environment: + DEPLOY_ENV: "QA" + LOGICAL_ENV: "qa" + BUILD_ENV: "qa" + APPNAME: "domain-challenge" + steps: *deploy_steps + + deploy-prod: + !!merge <<: *defaults + environment: + DEPLOY_ENV: "PROD" + LOGICAL_ENV: "prod" + BUILD_ENV: "prod" + APPNAME: "domain-challenge" + steps: *deploy_steps + + workflows: version: 2 publish: @@ -49,3 +106,21 @@ workflows: branches: only: - main + - "deploy-dev": + context: "org-global" + filters: + branches: + only: + - deploy/dev + - "deploy-qa": + context: "org-global" + filters: + branches: + only: + - deploy/qa + - "deploy-prod": + context: "org-global" + filters: + branches: + only: + - deploy/prod diff --git a/Dockerfile b/Dockerfile index c33d1b4..244af97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ COPY yarn*.lock ./ COPY package*.json ./ COPY tsconfig*.json ./ COPY .npmrc ./ +COPY reflections ./reflections RUN yarn install --frozen-lockfile --production=false COPY . ./ RUN yarn build:app @@ -30,11 +31,14 @@ ENV GRPC_NOSQL_SERVER_PORT=50052 ENV REGISTRATION_PHASE_ID="" ENV SUBMISSION_PHASE_ID="" ENV CHECKPOINT_SUBMISSION_PHASE_ID="" +ENV TOPCODER_API_URL="" ENV AUTH_SECRET="" ENV AUTH0_AUDIENCE="" ENV AUTH0_CLIENT_ID="" ENV AUTH0_CLIENT_SECRET="" ENV AUTH0_PROXY_SERVER_URL="" ENV AUTH0_URL="" +ENV TOPCODER_SCHEDULER_LAMBDA_ARN="" +ENV KAFKA_ERROR_TOPIC="" CMD ["server.js"] diff --git a/bin/nosql-client.js b/bin/nosql-client.js deleted file mode 100644 index d64bc90..0000000 --- a/bin/nosql-client.js +++ /dev/null @@ -1,38 +0,0 @@ -const path = require("path"); -const rimraf = require("rimraf"); - -const { execSync } = require("child_process"); - -const PROTO_DIR = path.join( - __dirname, - "../node_modules/topcoder-interface/data-access-layer/nosql" -); -const MODEL_DIR = path.join(__dirname, "../src/dal/models/nosql/"); - -const PROTOC_PATH = "protoc"; -const PLUGIN_PATH = path.join( - __dirname, - "../node_modules/.bin/protoc-gen-ts_proto" -); - -rimraf.sync(`${MODEL_DIR}/*`, { - glob: { ignore: `${MODEL_DIR}/tsconfig.json` }, -}); - -const protoConfig = [ - `--plugin=${PLUGIN_PATH}`, - // https://github.com/stephenh/ts-proto/blob/main/README.markdown - "--ts_proto_opt=outputServices=grpc-js,env=node,useOptionals=messages,exportCommonSymbols=false,esModuleInterop=true", - `--ts_proto_opt=oneof=unions`, - `--ts_proto_opt=addGrpcMetadata=true`, - `--ts_proto_opt=stringEnums=true`, - `--ts_proto_opt=useDate=string`, - `--ts_proto_opt=outputServerImpl=false`, - `--ts_proto_out=${MODEL_DIR}`, - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/*.proto`, -]; - -// https://github.com/stephenh/ts-proto#usage -execSync(`${PROTOC_PATH} ${protoConfig.join(" ")}`); - -console.log(`> Proto models created: ${MODEL_DIR}`); diff --git a/bin/server.js b/bin/server.js deleted file mode 100644 index 4f68799..0000000 --- a/bin/server.js +++ /dev/null @@ -1,40 +0,0 @@ -const path = require("path"); -const rimraf = require("rimraf"); - -const { execSync } = require("child_process"); - -const PROTO_DIR = path.join(__dirname, "../node_modules/topcoder-interface"); -const PROTO_REFLECTIONS = path.join(__dirname, "../reflections/reflection.bin"); - -const MODEL_DIR = path.join(__dirname, "../src/models/"); - -const PROTOC_PATH = "protoc"; -const PLUGIN_PATH = path.join( - __dirname, - "../node_modules/.bin/protoc-gen-ts_proto" -); - -rimraf.sync(`${MODEL_DIR}/*`, { - glob: { ignore: `${MODEL_DIR}/tsconfig.json` }, -}); - -const protoConfig = [ - `--plugin=${PLUGIN_PATH}`, - // https://github.com/stephenh/ts-proto/blob/main/README.markdown - "--ts_proto_opt=outputServices=grpc-js,env=node,useOptionals=messages,exportCommonSymbols=false,esModuleInterop=true", - `--ts_proto_out=${MODEL_DIR}`, - `--ts_proto_opt=oneof=unions`, - `--ts_proto_opt=addGrpcMetadata=true`, - `--ts_proto_opt=outputClientImpl=false`, - `--ts_proto_opt=useDate=string`, - `--include_imports`, - `--descriptor_set_out ${PROTO_REFLECTIONS}`, - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/common/*.proto`, - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/domain-layer/challenge/*.proto`, - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/domain-layer/challenge/services/*.proto`, -]; - -// https://github.com/stephenh/ts-proto#usage -execSync(`${PROTOC_PATH} ${protoConfig.join(" ")}`); - -console.log(`> Proto models created: ${MODEL_DIR}`); diff --git a/buildimage.sh b/buildimage.sh new file mode 100755 index 0000000..6fd932c --- /dev/null +++ b/buildimage.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -eo pipefail + +ENV=$1 +ENV=`echo "$ENV" | tr '[:upper:]' '[:lower:]'` + +informix_access_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/informix-access-layer:06c1f275bcd1d3083f7cee14ed7cebf14590a027 +dynamo_access_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/dynamo-access-layer:6f987a97bae1242e577b7d812fd250875a41cb6d +anticorruption_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/anticorruption-layer:87b2b14a9ef986ed87394e3b67f026c2996289f1 +domain_challenge_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/domain-challenge:579570b726af7e284bee49a64e84483df0cc492e + +sed -i='' "s|dynamo-access-layer:latest|$dynamo_access_layer_TAG|" docker-compose.yml + +sed -i='' "s|informix-access-layer:latest|$informix_access_layer_TAG|" docker-compose.yml + +sed -i='' "s|anticorruption-layer:latest|$anticorruption_layer_TAG|" docker-compose.yml + +sed -i='' "s|domain-challenge:latest|$domain_challenge_TAG|" docker-compose.yml + +if [[ "$ENV" == prod ]]; then + sed -i='' "s|grpcserver.topcoder-dev.com|grpcserver.topcoder.com|" docker-compose.yml +fi + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..febdd9f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,79 @@ +version: "3" +services: + dynamo-access-layer: + image: dynamo-access-layer:latest + read_only: true + container_name: dynamo-access-layer + hostname: dynamo-access-layer + restart: always + ports: + - "0:50052" + logging: + driver: awslogs + options: + awslogs-group: /aws/ecs/grpc-services + awslogs-region: us-east-1 + awslogs-stream-prefix: dynamo-access-layer + environment: + - GRPC_SERVER_HOST=0.0.0.0 + - GRPC_SERVER_PORT=50052 + informix-access-layer: + image: informix-access-layer:latest + read_only: true + container_name: informix-access-layer + hostname: informix-access-layer + restart: always + ports: + - "0:9090" + logging: + driver: awslogs + options: + awslogs-group: /aws/ecs/grpc-services + awslogs-region: us-east-1 + awslogs-stream-prefix: informix-access-layer + env_file: + - ia_env.ini + anticorruption-layer: + image: anticorruption-layer:latest + read_only: true + container_name: anticorruption-layer + hostname: anticorruption-layer + restart: always + ports: + - "0:40020" + links: + - informix-access-layer + logging: + driver: awslogs + options: + awslogs-group: /aws/ecs/grpc-services + awslogs-region: us-east-1 + awslogs-stream-prefix: anticorruption-layer + env_file: + - acl_env.ini + depends_on: + - informix-access-layer + domain-challenge: + image: domain-challenge:latest + read_only: true + container_name: domain-challenge + hostname: domain-challenge + restart: always + ports: + - "0:8888" + links: + - anticorruption-layer + - informix-access-layer + - dynamo-access-layer + logging: + driver: awslogs + options: + awslogs-group: /aws/ecs/grpc-services + awslogs-region: us-east-1 + awslogs-stream-prefix: domain-challenge + env_file: + - dc_env.ini + depends_on: + - dynamo-access-layer + - informix-access-layer + - anticorruption-layer diff --git a/ecs-params.yml b/ecs-params.yml new file mode 100644 index 0000000..78446ae --- /dev/null +++ b/ecs-params.yml @@ -0,0 +1,16 @@ +version: 1 +task_definition: + task_role_arn: ${GRPC_ROLE} + services: + dynamo-access-layer: + cpu_shares: 100 + mem_limit: 1G + informix-access-layer: + cpu_shares: 100 + mem_limit: 1G + anticorruption-layer: + cpu_shares: 100 + mem_limit: 1G + domain-challenge: + cpu_shares: 100 + mem_limit: 1GB \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index 97d6f48..0000000 --- a/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "tc-domain-challenge", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build:proto:client:nosql": "node bin/nosql-client", - "build:proto:client": "node bin/nosql-client", - "build:proto:server": "node bin/server", - "build:proto": "node bin/nosql-client && node bin/server", - "build:app": "rimraf dist && tsc -b", - "build": "yarn build:proto:client && yarn build:proto:server && yarn build:app", - "start": "ts-node-dev --respawn --transpile-only src/server.ts" - }, - "keywords": [ - "Topcoder Domain", - "Challenge" - ], - "author": "Rakib Ansary ", - "license": "ISC", - "dependencies": { - "@aws-sdk/client-lambda": "^3.294.0", - "@aws-sdk/util-utf8-node": "^3.259.0", - "@grpc/grpc-js": "^1.7.1", - "@opensearch-project/opensearch": "^2.2.0", - "@topcoder-framework/domain-acl": "^0.7.0", - "@topcoder-framework/lib-common": "^0.7.0", - "axios": "^1.2.2", - "dayjs": "^1.11.7", - "dotenv": "^16.0.3", - "grpc-server-reflection": "^0.1.5", - "lodash": "^4.17.21", - "moment": "^2.29.4", - "source-map-support": "^0.5.21", - "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", - "topcoder-interface": "github:topcoder-platform/plat-interface-definition#v0.0.29", - "uuidv4": "^6.2.13", - "xss": "^1.0.14" - }, - "volta": { - "node": "18.14.1", - "typescript": "4.9.4", - "yarn": "1.22.19" - }, - "devDependencies": { - "@types/lodash": "^4.14.191", - "@types/node": "^18.11.17", - "ts-node-dev": "^2.0.0", - "ts-proto": "^1.126.1", - "typescript": "^4.9.4" - } -} diff --git a/src/api/v4Api.ts b/src/api/v4Api.ts deleted file mode 100644 index 05a43b0..0000000 --- a/src/api/v4Api.ts +++ /dev/null @@ -1,268 +0,0 @@ -const { V4_TECHNOLOGIES_API_URL, V4_PLATFORMS_API_URL, V4_CHALLENGE_API_URL } = - process.env; - -import _ from "lodash"; -import axios from "axios"; - -import { - CancelledFailedScreening, - CancelledPaymentFailed, - CHECKPOINT_SUBMISSION_PHASE_ID, - PrizeSetTypes, - REGISTRATION_PHASE_ID, - SUBMISSION_PHASE_ID, -} from "../common/Constants"; - -import { V5_TO_V4 } from "../common/ConversionMap"; - -// TODO: Create RPC calls in anticorruption-layer -class V4Api { - public getLegacyTrackInformation( - trackId: string, - typeId: string, - tags: string[] - ) { - return V5_TO_V4[trackId][typeId](tags); - } - - /** - * Construct DTO from challenge:create payload. - * @param {Object} payload the challenge:create payload - * @param {String} m2mToken the m2m token - * @returns the DTO for saving a draft contest.(refer SaveDraftContestDTO in ap-challenge-microservice) - */ - public async getV4ChallengePayload(payload: any, m2mToken: string) { - try { - const projectId = payload.legacy.directProjectId; - const legacyTrackInfo = this.getLegacyTrackInformation( - payload.trackId, - payload.typeId, - payload.tags - ); - const data: any = { - ...legacyTrackInfo, - name: payload.name, - reviewType: _.get(payload, "legacy.reviewType", "INTERNAL"), - projectId, - status: - payload.status === CancelledPaymentFailed - ? CancelledFailedScreening - : payload.status, - billingAccountId: null, - forumId: null, - copilotId: null, - confidentialityType: null, - submissionGuidelines: "Please read above", - submissionVisibility: true, - milestoneId: 1, - detailedRequirements: payload.description, - }; - - if (payload.billingAccountId) { - data.billingAccountId = payload.billingAccountId; - } - - if (_.get(payload, "legacy.forumId")) { - data.forumId = payload.legacy.forumId; - } - if (payload.copilotId) { - data.copilotId = payload.copilotId; - } - data.confidentialityType = _.get( - payload, - "legacy.confidentialityType", - "public" - ); - - if (payload.privateDescription) { - data.detailedRequirements += "\n\r"; - data.detailedRequirements += - "V5 Challenge - Additional Details: " + payload.id; - } - - const SECONDS_TO_MILLIS = 1000; - if (payload.phases) { - const registrationPhase = _.find(payload.phases, (p) => { - return p.phaseId == REGISTRATION_PHASE_ID; - }); - const submissionPhase = _.find( - payload.phases, - (p) => p.phaseId == SUBMISSION_PHASE_ID - ); - const startDate = payload.startDate - ? new Date(payload.startDate) - : new Date(); - - data.registrationStartsAt = startDate.toISOString(); - data.registrationEndsAt = new Date( - startDate.getTime() + - (registrationPhase || submissionPhase).duration * SECONDS_TO_MILLIS - ).toISOString(); - data.registrationDuration = - (registrationPhase || submissionPhase).duration * SECONDS_TO_MILLIS; - data.submissionEndsAt = new Date( - startDate.getTime() + submissionPhase.duration * SECONDS_TO_MILLIS - ).toISOString(); - data.submissionDuration = submissionPhase.duration * SECONDS_TO_MILLIS; - - // Only Design can have checkpoint phase and checkpoint prizes - const checkpointPhase = _.find( - payload.phases, - (p) => p.phaseId === CHECKPOINT_SUBMISSION_PHASE_ID - ); - if (checkpointPhase) { - data.checkpointSubmissionStartsAt = startDate.toISOString(); - data.checkpointSubmissionEndsAt = new Date( - startDate.getTime() + checkpointPhase.duration * SECONDS_TO_MILLIS - ).toISOString(); - data.checkpointSubmissionDuration = - checkpointPhase.duration * SECONDS_TO_MILLIS; - } else { - data.checkpointSubmissionStartsAt = null; - data.checkpointSubmissionEndsAt = null; - data.checkpointSubmissionDuration = null; - } - } - if (payload.prizeSets) { - // Only Design can have checkpoint phase and checkpoint prizes - const checkpointPrize = _.find(payload.prizeSets, { - type: PrizeSetTypes.CheckPoint, - }); - if (checkpointPrize) { - // checkpoint prize are the same for each checkpoint submission winner - data.numberOfCheckpointPrizes = checkpointPrize.prizes.length; - data.checkpointPrize = checkpointPrize.prizes[0].value; - } else { - data.numberOfCheckpointPrizes = 0; - data.checkpointPrize = 0; - } - - // prize type can be Challenge prizes - const challengePrizes = _.find(payload.prizeSets, { - type: PrizeSetTypes.ChallengePrizes, - }); - if (!challengePrizes) { - throw new Error("Challenge prize information is invalid."); - } - data.prizes = _.map(challengePrizes.prizes, "value").sort( - (a, b) => b - a - ); - } - if (payload.tags) { - const techResult = await this.getTechnologies(m2mToken); - data.technologies = _.filter(techResult.result.content, (e) => - payload.tags.includes(e.name) - ); - - if (data.technologies.length < 1) { - data.technologies = _.filter( - techResult.result.content, - (e) => e.name === "Other" - ); - } - - const platResult = await this.getPlatforms(m2mToken); - data.platforms = _.filter(platResult.result.content, (e) => - payload.tags.includes(e.name) - ); - - if (data.platforms.length < 1) { - data.platforms = _.filter( - platResult.result.content, - (e) => e.name === "Other" - ); - } - } - - if (payload.metadata && payload.metadata.length > 0) { - const fileTypes = _.find( - payload.metadata, - (meta) => meta.name === "fileTypes" - ); - if (fileTypes) { - if (_.isArray(fileTypes.value)) { - data.fileTypes = fileTypes.value; - } else { - try { - data.fileTypes = JSON.parse(fileTypes.value); - } catch (e) { - data.fileTypes = []; - } - } - } - } - - return data; - } catch (err: unknown) { - console.log("Something went wrong", err); - // Debugging - if (err instanceof Error) { - // extract error message from V5 API - const message = _.get(err, "response.body.message"); - throw new Error(message); - } else { - throw err; - } - } - } - - public async createLegacyChallenge(payload: any, m2mToken: string) { - const data = await this.getV4ChallengePayload(payload, m2mToken); - try { - const result = await axios.post( - `${V4_CHALLENGE_API_URL}?filter=skipForum=true`, - { - param: data, - }, - { - headers: { - Authorization: `Bearer ${m2mToken}`, - "Content-Type": "application/json", - }, - } - ); - - const { - data: { - result: { content: legacyChallenge }, - }, - } = result; - - return { - legacyId: legacyChallenge.id, - track: legacyChallenge.track, - subTrack: legacyChallenge.subTrack, - isTask: payload.task || false, - forumId: legacyChallenge.forumId || 0, - }; - } catch (err) { - throw err; - } - } - - async getTechnologies( - m2mToken: string - ): Promise<{ result: { content: { name: string }[] } }> { - const response = await axios.get(V4_TECHNOLOGIES_API_URL!, { - headers: { - Authorization: `Bearer ${m2mToken}`, - }, - }); - - return response.data; - } - - async getPlatforms( - m2mToken: string - ): Promise<{ result: { content: { name: string }[] } }> { - const response = await axios.get(V4_PLATFORMS_API_URL!, { - headers: { - Authorization: `Bearer ${m2mToken}`, - }, - }); - - return response.data; - } -} - -export default new V4Api(); diff --git a/src/api/v5Api.ts b/src/api/v5Api.ts deleted file mode 100644 index 8be4036..0000000 --- a/src/api/v5Api.ts +++ /dev/null @@ -1,10 +0,0 @@ -const { V4_TECHNOLOGIES_API_URL, V4_PLATFORMS_API_URL, V4_CHALLENGE_API_URL } = - process.env; - -import _ from "lodash"; -import axios from "axios"; - -export const getRequest = async (url:string, token:string): Promise => { - const res = await axios.get(url, { headers: { authorization: `Bearer ${token}` }}) - return res.data; -} diff --git a/src/common/Constants.ts b/src/common/Constants.ts deleted file mode 100644 index dc2e4d5..0000000 --- a/src/common/Constants.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const { - REGISTRATION_PHASE_ID, - SUBMISSION_PHASE_ID, - CHECKPOINT_SUBMISSION_PHASE_ID, - ES_INDEX, - ES_REFRESH, -} = process.env; - -export const CancelledPaymentFailed = "Cancelled - Payment Failed"; -export const CancelledFailedScreening = "Cancelled - Failed Screening"; -export const PrizeSetTypes = { - ChallengePrizes: "placement", - CopilotPayment: "copilot", - ReviewerPayment: "reviewer", - CheckPoint: "checkpoint", -}; -export const PrizeTypeIds = { - Contest: 15, - Checkpoint: 14, -}; - -export const PaymentTypeIds = { - Copilot: 15, -}; - -export const ProjectPaymentTypeIds = { - Copilot: 4, -}; - -export const ResourceRoleTypes = { - IterativeReviewer: 21, - Copilot: 14, -}; - -export const ProjectInfoIds = { - CopilotPayment: 49, -}; - -export const ResourceInfoIds = { - CopilotPayment: 7, -}; - -export const ChallengeStatuses = { - New: "New", - Active: "Active", -}; diff --git a/src/common/ConversionMap.ts b/src/common/ConversionMap.ts deleted file mode 100644 index 988049d..0000000 --- a/src/common/ConversionMap.ts +++ /dev/null @@ -1,392 +0,0 @@ -import _ from "lodash"; - -const V5_TRACK_IDS = { - DATA_SCIENCE: "c0f5d461-8219-4c14-878a-c3a3f356466d", - DESIGN: "5fa04185-041f-49a6-bfd1-fe82533cd6c8", - DEVELOPMENT: "9b6fc876-f4d9-4ccb-9dfd-419247628825", - QA: "36e6a8d0-7e1e-4608-a673-64279d99c115", - CMP: "9d6e0de8-df14-4c76-ba0a-a9a8cb03a4ea", -}; - -const V5_TRACK_NAMES_TO_IDS = { - DESIGN: V5_TRACK_IDS.DESIGN, - DEVELOPMENT: V5_TRACK_IDS.DEVELOPMENT, - "DATA SCIENCE": V5_TRACK_IDS.DATA_SCIENCE, - "QUALITY ASSURANCE": V5_TRACK_IDS.QA, - "COMPETITIVE PROGRAMMING": V5_TRACK_IDS.CMP, -}; - -const V5_TRACK_IDS_TO_NAMES = { - [V5_TRACK_IDS.DATA_SCIENCE]: "Data Science", - [V5_TRACK_IDS.DESIGN]: "Design", - [V5_TRACK_IDS.DEVELOPMENT]: "Development", - [V5_TRACK_IDS.QA]: "Quality Assurance", - [V5_TRACK_IDS.CMP]: "Competitive Programming", -}; - -const V5_TYPE_IDS = { - CHALLENGE: "927abff4-7af9-4145-8ba1-577c16e64e2e", - TASK: "ecd58c69-238f-43a4-a4bb-d172719b9f31", - FIRST_2_FINISH: "dc876fa4-ef2d-4eee-b701-b555fcc6544c", - PC: "34602883-a58d-45a9-b370-749574b6890d", - MM: "929bc408-9cf2-4b3e-ba71-adfbf693046c", - RDM: "78b37a69-92d5-4ad7-bf85-c79b65420c79", - SKL: "ddc4252a-270c-408f-a15d-2f31c2141cd3", - MA: "f9a5e88c-a815-4146-8b7a-169a3692feaf", -}; - -const V5_TYPE_NAMES_TO_IDS = { - CHALLENGE: V5_TYPE_IDS.CHALLENGE, - FIRST2FINISH: V5_TYPE_IDS.FIRST_2_FINISH, - TASK: V5_TYPE_IDS.TASK, -}; - -const V5_TYPE_IDS_TO_NAMES = { - [V5_TYPE_IDS.CHALLENGE]: "Challenge", - [V5_TYPE_IDS.TASK]: "Task", - [V5_TYPE_IDS.FIRST_2_FINISH]: "First2Finish", - [V5_TYPE_IDS.PC]: "Practice Challenge", - [V5_TYPE_IDS.MM]: "Marathon Match", - [V5_TYPE_IDS.RDM]: "Rapid Development Match", - [V5_TYPE_IDS.SKL]: "Skill Builder", - [V5_TYPE_IDS.MA]: "Match", -}; - -const V4_TRACKS = { - DEVELOP: "DEVELOP", - DATA_SCIENCE: "DATA_SCIENCE", - DESIGN: "DESIGN", -}; - -const V4_SUBTRACKS = { - MARATHON_MATCH: "MARATHON_MATCH", - DESIGN_FIRST_2_FINISH: "DESIGN_FIRST_2_FINISH", - APPLICATION_FRONT_END_DESIGN: "APPLICATION_FRONT_END_DESIGN", - WEB_DESIGNS: "WEB_DESIGNS", - IDEA_GENERATION: "IDEA_GENERATION", - WIDGET_OR_MOBILE_SCREEN_DESIGN: "WIDGET_OR_MOBILE_SCREEN_DESIGN", - WIREFRAMES: "WIREFRAMES", - PRINT_OR_PRESENTATION: "PRINT_OR_PRESENTATION", - STUDIO_OTHER: "STUDIO_OTHER", - BANNERS_OR_ICONS: "BANNERS_OR_ICONS", - LOGO_DESIGN: "LOGO_DESIGN", - FRONT_END_FLASH: "FRONT_END_FLASH", - DEVELOPMENT: "DEVELOPMENT", - FIRST_2_FINISH: "FIRST_2_FINISH", - CODE: "CODE", - COPILOT_POSTING: "COPILOT_POSTING", - BUG_HUNT: "BUG_HUNT", - DEVELOP_MARATHON_MATCH: "DEVELOP_MARATHON_MATCH", - TEST_SUITES: "TEST_SUITES", - UI_PROTOTYPE_COMPETITION: "UI_PROTOTYPE_COMPETITION", - ARCHITECTURE: "ARCHITECTURE", - ASSEMBLY_COMPETITION: "ASSEMBLY_COMPETITION", - SPECIFICATION: "SPECIFICATION", - TEST_SCENARIOS: "TEST_SCENARIOS", - CONCEPTUALIZATION: "CONCEPTUALIZATION", - CONTENT_CREATION: "CONTENT_CREATION", - DESIGN: "DESIGN", - RIA_BUILD_COMPETITION: "RIA_BUILD_COMPETITION", - RIA_COMPONENT_COMPETITION: "RIA_COMPONENT_COMPETITION", - REPORTING: "REPORTING", - PROCESS: "PROCESS", - LEGACY: "Legacy", - TESTING_COMPETITION: "TESTING_COMPETITION", - DEPLOYMENT: "DEPLOYMENT", - COMPONENT_PRODUCTION: "COMPONENT_PRODUCTION", - AUTOMATED_TESTING: "AUTOMATED TESTING", - SECURITY: "SECURITY", -}; - -const MARATHON_MATCH_TAG = "Marathon Match"; -const DATA_SCIENCE_TAG = "Data Science"; - -const FE_DESIGN_TAG = "Front-End Design"; -const IDEATION_TAG = "Ideation"; -const WIREFRAME_TAG = "Wireframe"; -const BUG_HUNT_TAG = "Bug Hunt"; -const TEST_SUITES_TAG = "Test Suites"; -const TEST_SCENARIOS_TAG = "Test Scenarios"; -const TESTING_COMPETITION_TAG = "Testing Competition"; - -// Helper methodS to simply avoid writing too much -const buildV4Data = ( - track: string, - subTrack: string, - isTask: boolean, - technologies: string[] -) => ({ - track, - subTrack, - isTask, - ...(technologies ? { technologies } : {}), -}); - -const buildV5Data = (trackId: string, typeId: string, tags: string[] = []) => ({ - trackId, - typeId, - track: V5_TRACK_IDS_TO_NAMES[trackId], - type: V5_TYPE_IDS_TO_NAMES[typeId], - tags, -}); - -export const V5_TO_V4 = { - [V5_TRACK_IDS.DATA_SCIENCE]: { - [V5_TYPE_IDS.CHALLENGE]: (tags: string[]) => { - if ( - _.includes(tags, MARATHON_MATCH_TAG) || - _.includes(tags, DATA_SCIENCE_TAG) - ) { - return buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ); - } else { - return buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, [ - DATA_SCIENCE_TAG, - ]); - } - }, - [V5_TYPE_IDS.FIRST_2_FINISH]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, false, []), - [V5_TYPE_IDS.TASK]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, true, []), - [V5_TYPE_IDS.PC]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.MM]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.RDM]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.SKL]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.MA]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - }, - [V5_TRACK_IDS.DESIGN]: { - [V5_TYPE_IDS.CHALLENGE]: () => - buildV4Data(V4_TRACKS.DESIGN, V4_SUBTRACKS.WEB_DESIGNS, false, []), - [V5_TYPE_IDS.FIRST_2_FINISH]: () => - buildV4Data( - V4_TRACKS.DESIGN, - V4_SUBTRACKS.DESIGN_FIRST_2_FINISH, - false, - [] - ), - [V5_TYPE_IDS.TASK]: () => - buildV4Data( - V4_TRACKS.DESIGN, - V4_SUBTRACKS.DESIGN_FIRST_2_FINISH, - true, - [] - ), - [V5_TYPE_IDS.PC]: () => - buildV4Data(V4_TRACKS.DESIGN, V4_SUBTRACKS.WEB_DESIGNS, false, []), - [V5_TYPE_IDS.MM]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.RDM]: () => - buildV4Data(V4_TRACKS.DESIGN, V4_SUBTRACKS.WEB_DESIGNS, false, []), - [V5_TYPE_IDS.SKL]: () => - buildV4Data(V4_TRACKS.DESIGN, V4_SUBTRACKS.WEB_DESIGNS, false, []), - [V5_TYPE_IDS.MA]: () => - buildV4Data(V4_TRACKS.DESIGN, V4_SUBTRACKS.WEB_DESIGNS, false, []), - }, - [V5_TRACK_IDS.DEVELOPMENT]: { - [V5_TYPE_IDS.CHALLENGE]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.FIRST_2_FINISH]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, false, []), - [V5_TYPE_IDS.TASK]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, true, []), - [V5_TYPE_IDS.PC]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MM]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.RDM]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.SKL]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MA]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - }, - [V5_TRACK_IDS.QA]: { - [V5_TYPE_IDS.CHALLENGE]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.BUG_HUNT, false, []), - [V5_TYPE_IDS.FIRST_2_FINISH]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, false, []), - [V5_TYPE_IDS.TASK]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, true, []), - [V5_TYPE_IDS.PC]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MM]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.RDM]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.SKL]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MA]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - }, - [V5_TRACK_IDS.CMP]: { - [V5_TYPE_IDS.CHALLENGE]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.BUG_HUNT, false, []), - [V5_TYPE_IDS.FIRST_2_FINISH]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, false, []), - [V5_TYPE_IDS.TASK]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.FIRST_2_FINISH, true, []), - [V5_TYPE_IDS.PC]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MM]: () => - buildV4Data( - V4_TRACKS.DATA_SCIENCE, - V4_SUBTRACKS.MARATHON_MATCH, - false, - [] - ), - [V5_TYPE_IDS.RDM]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.SKL]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - [V5_TYPE_IDS.MA]: () => - buildV4Data(V4_TRACKS.DEVELOP, V4_SUBTRACKS.CODE, false, []), - }, -}; - -export const V4_TO_V5 = { - [V4_TRACKS.DATA_SCIENCE]: { - // categorizes non competitive programming marathon matches as Data Science Match - [V4_SUBTRACKS.MARATHON_MATCH]: () => - buildV5Data(V5_TRACK_IDS.DATA_SCIENCE, V5_TYPE_IDS.CHALLENGE, [ - DATA_SCIENCE_TAG, - ]), - }, - [V4_TRACKS.DESIGN]: { - [V4_SUBTRACKS.DESIGN_FIRST_2_FINISH]: (isTask: boolean) => - buildV5Data( - V5_TRACK_IDS.DESIGN, - isTask ? V5_TYPE_IDS.TASK : V5_TYPE_IDS.FIRST_2_FINISH - ), - [V4_SUBTRACKS.APPLICATION_FRONT_END_DESIGN]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE, [FE_DESIGN_TAG]), - [V4_SUBTRACKS.WEB_DESIGNS]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.IDEA_GENERATION]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE, [IDEATION_TAG]), - [V4_SUBTRACKS.WIDGET_OR_MOBILE_SCREEN_DESIGN]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.WIREFRAMES]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE, [WIREFRAME_TAG]), - [V4_SUBTRACKS.PRINT_OR_PRESENTATION]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.STUDIO_OTHER]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.BANNERS_OR_ICONS]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.LOGO_DESIGN]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.FRONT_END_FLASH]: () => - buildV5Data(V5_TRACK_IDS.DESIGN, V5_TYPE_IDS.CHALLENGE), - }, - [V4_TRACKS.DEVELOP]: { - [V4_SUBTRACKS.DEVELOPMENT]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.FIRST_2_FINISH]: (isTask: boolean) => - buildV5Data( - V5_TRACK_IDS.DEVELOPMENT, - isTask ? V5_TYPE_IDS.TASK : V5_TYPE_IDS.FIRST_2_FINISH - ), - [V4_SUBTRACKS.CODE]: (isTask: boolean, tags: string[]) => { - if (_.includes(tags, MARATHON_MATCH_TAG)) { - return buildV5Data(V5_TRACK_IDS.DATA_SCIENCE, V5_TYPE_IDS.CHALLENGE); - } else if (_.includes(tags, DATA_SCIENCE_TAG)) { - return buildV5Data(V5_TRACK_IDS.DATA_SCIENCE, V5_TYPE_IDS.CHALLENGE); - } else { - return buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE); - } - }, - [V4_SUBTRACKS.COPILOT_POSTING]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.BUG_HUNT]: () => - buildV5Data(V5_TRACK_IDS.QA, V5_TYPE_IDS.CHALLENGE, [BUG_HUNT_TAG]), - [V4_SUBTRACKS.DEVELOP_MARATHON_MATCH]: () => - buildV5Data(V5_TRACK_IDS.DATA_SCIENCE, V5_TYPE_IDS.CHALLENGE, [ - MARATHON_MATCH_TAG, - ]), - [V4_SUBTRACKS.TEST_SUITES]: () => - buildV5Data(V5_TRACK_IDS.QA, V5_TYPE_IDS.CHALLENGE, [TEST_SUITES_TAG]), - [V4_SUBTRACKS.UI_PROTOTYPE_COMPETITION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.ARCHITECTURE]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.ASSEMBLY_COMPETITION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.SPECIFICATION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.TEST_SCENARIOS]: () => - buildV5Data(V5_TRACK_IDS.QA, V5_TYPE_IDS.CHALLENGE, [TEST_SCENARIOS_TAG]), - [V4_SUBTRACKS.CONCEPTUALIZATION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.CONTENT_CREATION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.DESIGN]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.RIA_BUILD_COMPETITION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.RIA_COMPONENT_COMPETITION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.REPORTING]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.PROCESS]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.LEGACY]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.TESTING_COMPETITION]: () => - buildV5Data(V5_TRACK_IDS.QA, V5_TYPE_IDS.CHALLENGE, [ - TESTING_COMPETITION_TAG, - ]), - [V4_SUBTRACKS.DEPLOYMENT]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.COMPONENT_PRODUCTION]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.SECURITY]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - [V4_SUBTRACKS.AUTOMATED_TESTING]: () => - buildV5Data(V5_TRACK_IDS.DEVELOPMENT, V5_TYPE_IDS.CHALLENGE), - }, -}; diff --git a/src/common/CoreOperations.ts b/src/common/CoreOperations.ts deleted file mode 100644 index 713f780..0000000 --- a/src/common/CoreOperations.ts +++ /dev/null @@ -1,429 +0,0 @@ -// TODO: Move this to @topcoder-framework -import { noSqlClient } from "../dal/client/nosql"; - -// TODO: Import from @topcoder-framework/lib-common -import { - LookupCriteria, - ScanCriteria, - ScanResult, -} from "../models/common/common"; - -// TODO: Import from @topcoder-framework/lib-common -import { Value } from "../models/google/protobuf/struct"; - -import { - Attribute, - DataType, - Filter, - Operator, - QueryRequest, - QueryResponse, - Response, - ReturnValue, - SelectQuery, - UpdateAction, - UpdateType, - Value as PartiQLValue, -} from "../dal/models/nosql/parti_ql"; -import { StatusBuilder } from "@grpc/grpc-js"; -import { Status } from "@grpc/grpc-js/build/src/constants"; - -export type ValueType = - | "nullValue" - | "numberValue" - | "stringValue" - | "boolValue" - | "structValue" - | "listValue"; - -export type DynamoTableIndex = { - [key: string]: { - index: string; - partitionKey: string; - sortKey?: string; - }; -}; - -abstract class CoreOperations< - T extends { [key: string]: any }, - I extends { [key: string]: any } -> { - public constructor( - private entityName: string, - private entityAttributes: Attribute[], - private entityIndexList: DynamoTableIndex - ) {} - - private attributesKeyTypeMap: { [key: string]: DataType } = - this.entityAttributes.reduce( - (map, attribute) => ({ - ...map, - [attribute.name]: attribute.type, - }), - {} - ); - - public async lookup(lookupCriteria: LookupCriteria): Promise { - const selectQuery: SelectQuery = { - table: this.entityName, - attributes: this.entityAttributes, - filters: [ - { - name: lookupCriteria.key, - operator: Operator.OPERATOR_EQUAL, - value: this.getFilterValue(lookupCriteria.value), - }, - ], - }; - - const queryRequest: QueryRequest = { - kind: { - $case: "query", - query: { - kind: { - $case: "select", - select: selectQuery, - }, - }, - }, - }; - - const queryResponse: QueryResponse = await noSqlClient.query(queryRequest); - - switch (queryResponse.kind?.$case) { - case "error": - throw new StatusBuilder() - .withCode(Status.INTERNAL) - .withDetails(queryResponse.kind?.error?.message) - .build(); - case "response": - if (queryResponse.kind?.response?.items?.length > 0) { - return this.toEntity(queryResponse.kind?.response?.items[0]); - } - } - - throw new StatusBuilder() - .withCode(Status.NOT_FOUND) - .withDetails( - `Entity not found: ${lookupCriteria.key} = ${Value.unwrap( - (lookupCriteria.value as { value: Value }).value - )}` - ) - .build(); - } - - public async scan( - scanCriteria: ScanCriteria[], - nextToken: string | undefined - ): Promise { - const { index, filters } = this.toFilters(scanCriteria); - - const queryRequest: QueryRequest = { - kind: { - $case: "query", - query: { - kind: { - $case: "select", - select: { - table: this.entityName, - index: index ?? undefined, - attributes: this.entityAttributes, - filters, - nextToken, - }, - }, - }, - }, - }; - - const queryRespose: QueryResponse = await noSqlClient.query(queryRequest); - - if (queryRespose.kind?.$case === "error") { - throw new Error(queryRespose.kind?.error?.message); - } - - const response = queryRespose.kind?.response; - - return { - nextToken: response?.nextToken, - items: response?.items.map((item) => this.toEntity(item)) ?? [], - }; - } - - protected async create(entity: I & T): Promise { - const queryRequest: QueryRequest = { - kind: { - $case: "query", - query: { - kind: { - $case: "insert", - insert: { - table: this.entityName, - attributes: entity, - }, - }, - }, - }, - }; - - const queryResponse: QueryResponse = await noSqlClient.query(queryRequest); - - if (queryResponse.kind?.$case === "error") { - throw new Error(queryResponse.kind?.error?.message); - } - - return this.toEntity(entity); - } - - public async update( - scanCriteria: ScanCriteria[], - entity: unknown - ): Promise<{ items: T[] }> { - if (typeof entity != "object" || entity == null) { - throw new Error("Expected key-value pairs to update"); - } - - const { filters } = this.toFilters(scanCriteria); - const queryRequest: QueryRequest = { - kind: { - $case: "query", - query: { - kind: { - $case: "update", - update: { - table: this.entityName, - // TODO: Write a convenience method in @topcoder-framework/lib-common to support additional update operations like LIST_APPEND, SET_ADD, SET_REMOVE, etc - updates: Object.entries(entity).map(([key, value]) => ({ - action: UpdateAction.UPDATE_ACTION_SET, - type: UpdateType.UPDATE_TYPE_VALUE, - attribute: key, - value: this.toValue(key, value), - })), - filters, - returnValue: ReturnValue.RETURN_VALUE_ALL_NEW, - }, - }, - }, - }, - }; - - const queryResponse: QueryResponse = await noSqlClient.query(queryRequest); - - if (queryResponse.kind?.$case === "error") { - throw new Error(queryResponse.kind?.error?.message); - } - const response: Response = queryResponse.kind?.response!; - if (response.items?.length === 0) { - throw new StatusBuilder() - .withCode(Status.NOT_FOUND) - .withDetails(`No record matched the filter criteria`) - .build(); - } - - return { - items: response.items.map((item) => this.toEntity(item)), - }; - } - - public async delete(lookupCriteria: LookupCriteria): Promise<{ items: T[] }> { - const queryRequest: QueryRequest = { - kind: { - $case: "query", - query: { - kind: { - $case: "delete", - delete: { - table: this.entityName, - filters: [ - { - name: lookupCriteria.key, - operator: Operator.OPERATOR_EQUAL, - value: this.getFilterValue(lookupCriteria.value), - }, - ], - returnValues: ReturnValue.RETURN_VALUE_ALL_OLD, - }, - }, - }, - }, - }; - - const queryResponse: QueryResponse = await noSqlClient.query(queryRequest); - - if (queryResponse.kind?.$case === "error") { - throw new StatusBuilder() - .withCode(Status.INTERNAL) - .withDetails(queryResponse.kind?.error?.message) - .build(); - } - - const response: Response = queryResponse.kind?.response!; - - if (response.items?.length === 0) { - throw new StatusBuilder() - .withCode(Status.NOT_FOUND) - .withDetails( - `Entity not found: ${lookupCriteria.key} = ${Value.unwrap( - (lookupCriteria.value as { value: Value }).value - )}` - ) - .build(); - } - - return { - items: response.items.map((item) => this.toEntity(item)), - }; - } - - private toFilters(scanCriteria: ScanCriteria[]): { - index: string | null; - filters: Filter[]; - } { - let index: string | null = null; - const filters: Filter[] = scanCriteria.map((criteria) => { - if (index == null && this.entityIndexList[criteria.key] != null) { - index = this.entityIndexList[criteria.key].index!; - } - - return { - name: criteria.key, - // TODO: Map operator from topcoder.common.Operator to PartiQL.Operator - operator: Operator.OPERATOR_EQUAL, - value: this.toValue(criteria.key, criteria.value), - }; - }); - - return { - index, - filters, - }; - } - - private getFilterValue(filter: unknown): PartiQLValue { - const filterValue = (filter as { value: Value }).value; - let value: PartiQLValue; - - switch (filterValue.kind?.$case) { - case "numberValue": - value = { - kind: { - $case: "numberValue", - numberValue: filterValue.kind.numberValue, - }, - }; - break; - case "stringValue": - value = { - kind: { - $case: "stringValue", - stringValue: filterValue.kind.stringValue, - }, - }; - break; - case "boolValue": - value = { - kind: { - $case: "boolean", - boolean: filterValue.kind.boolValue, - }, - }; - break; - - default: - throw new Error( - "Lookups are only supported for string, number & boolean value" - ); - } - - return value; - } - - private toValue(key: string, value: unknown): PartiQLValue { - const dataType: DataType = this.attributesKeyTypeMap[key]; - - if (dataType == null) { - throw new Error(`Unknown attribute: ${key}`); - } - - if (dataType == DataType.DATA_TYPE_STRING) { - return { - kind: { - $case: "stringValue", - stringValue: - typeof value === "object" - ? JSON.stringify(value) - : ((value as string) || "").toString(), - }, - }; - } - - if (dataType == DataType.DATA_TYPE_NUMBER) { - return { - kind: { - $case: "numberValue", - numberValue: value as number, - }, - }; - } - - if (dataType == DataType.DATA_TYPE_BOOLEAN) { - return { - kind: { - $case: "boolean", - boolean: value as boolean, - }, - }; - } - - if (dataType == DataType.DATA_TYPE_LIST) { - return { - kind: { - $case: "listValue", - listValue: (value as unknown[]).map((item) => item), - }, - }; - } - - if (dataType == DataType.DATA_TYPE_MAP) { - return { - kind: { - $case: "mapValue", - mapValue: value as { [key: string]: unknown }, - }, - }; - } - - if (dataType === DataType.DATA_TYPE_STRING_SET) { - return { - kind: { - $case: "stringSetValue", - stringSetValue: { - values: value as string[], - }, - }, - }; - } - - if (dataType === DataType.DATA_TYPE_NUMBER_SET) { - return { - kind: { - $case: "numberSetValue", - numberSetValue: { - values: value as number[], - }, - }, - }; - } - - throw new Error(`Unsupported data type: ${dataType}`); - } - - // TODO: Use defined schema to do the conversion - protected toInsertAttributes(model: T): any { - return model; - } - - protected abstract toEntity(response: { [key: string]: PartiQLValue }): T; -} - -export default CoreOperations; diff --git a/src/common/GrpcError.ts b/src/common/GrpcError.ts deleted file mode 100644 index 749087c..0000000 --- a/src/common/GrpcError.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { StatusObject } from "@grpc/grpc-js"; - -export class GrpcError extends Error { - constructor(public error: Partial) { - super(error.details); - } -} diff --git a/src/dal/client/nosql.ts b/src/dal/client/nosql.ts deleted file mode 100644 index d4a4a97..0000000 --- a/src/dal/client/nosql.ts +++ /dev/null @@ -1,39 +0,0 @@ -const { GRPC_NOSQL_SERVER_HOST, GRPC_NOSQL_SERVER_PORT } = process.env; - -import "source-map-support/register"; - -import { credentials, Metadata } from "@grpc/grpc-js"; -import { promisify } from "util"; - -import { - PartiQLQueryClient, - QueryRequest, - QueryResponse, -} from "../models/nosql/parti_ql"; - -class NoSQLClient { - // https://github.com/grpc/grpc/blob/master/doc/keepalive.md - // https://cloud.ibm.com/docs/blockchain-multicloud?topic=blockchain-multicloud-best-practices-app#best-practices-app-connections - private readonly client: PartiQLQueryClient = new PartiQLQueryClient( - `${GRPC_NOSQL_SERVER_HOST}:${GRPC_NOSQL_SERVER_PORT}`, // 5051 - credentials.createInsecure(), - { - "grpc.keepalive_time_ms": 120000, - "grpc.http2.min_time_between_pings_ms": 120000, - "grpc.keepalive_timeout_ms": 20000, - "grpc.http2.max_pings_without_data": 0, - "grpc.keepalive_permit_without_calls": 1, - } - ); - - public async query( - param: QueryRequest, - metadata: Metadata = new Metadata() - ): Promise { - return promisify( - this.client.query.bind(this.client) - )(param, metadata); - } -} - -export const noSqlClient = new NoSQLClient(); diff --git a/src/dal/models/nosql/google/protobuf/struct.ts b/src/dal/models/nosql/google/protobuf/struct.ts deleted file mode 100644 index 2fd4c31..0000000 --- a/src/dal/models/nosql/google/protobuf/struct.ts +++ /dev/null @@ -1,505 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - */ -export enum NullValue { - /** NULL_VALUE - Null value. */ - NULL_VALUE = "NULL_VALUE", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function nullValueFromJSON(object: any): NullValue { - switch (object) { - case 0: - case "NULL_VALUE": - return NullValue.NULL_VALUE; - case -1: - case "UNRECOGNIZED": - default: - return NullValue.UNRECOGNIZED; - } -} - -export function nullValueToJSON(object: NullValue): string { - switch (object) { - case NullValue.NULL_VALUE: - return "NULL_VALUE"; - case NullValue.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function nullValueToNumber(object: NullValue): number { - switch (object) { - case NullValue.NULL_VALUE: - return 0; - case NullValue.UNRECOGNIZED: - default: - return -1; - } -} - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - */ -export interface Struct { - /** Unordered map of dynamically typed values. */ - fields: { [key: string]: any }; -} - -export interface Struct_FieldsEntry { - key: string; - value?: any; -} - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of these - * variants. Absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - */ -export interface Value { - kind?: - | { $case: "nullValue"; nullValue: NullValue } - | { $case: "numberValue"; numberValue: number } - | { $case: "stringValue"; stringValue: string } - | { $case: "boolValue"; boolValue: boolean } - | { $case: "structValue"; structValue: { [key: string]: any } } - | { $case: "listValue"; listValue: Array }; -} - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - */ -export interface ListValue { - /** Repeated field of dynamically typed values. */ - values: any[]; -} - -function createBaseStruct(): Struct { - return { fields: {} }; -} - -export const Struct = { - encode(message: Struct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - Object.entries(message.fields).forEach(([key, value]) => { - if (value !== undefined) { - Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); - } - }); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Struct { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32()); - if (entry1.value !== undefined) { - message.fields[entry1.key] = entry1.value; - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Struct { - return { - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; - }, - - toJSON(message: Struct): unknown { - const obj: any = {}; - obj.fields = {}; - if (message.fields) { - Object.entries(message.fields).forEach(([k, v]) => { - obj.fields[k] = v; - }); - } - return obj; - }, - - create, I>>(base?: I): Struct { - return Struct.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Struct { - const message = createBaseStruct(); - message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: any }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); - return message; - }, - - wrap(object: { [key: string]: any } | undefined): Struct { - const struct = createBaseStruct(); - if (object !== undefined) { - Object.keys(object).forEach((key) => { - struct.fields[key] = object[key]; - }); - } - return struct; - }, - - unwrap(message: Struct): { [key: string]: any } { - const object: { [key: string]: any } = {}; - if (message.fields) { - Object.keys(message.fields).forEach((key) => { - object[key] = message.fields[key]; - }); - } - return object; - }, -}; - -function createBaseStruct_FieldsEntry(): Struct_FieldsEntry { - return { key: "", value: undefined }; -} - -export const Struct_FieldsEntry = { - encode(message: Struct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Struct_FieldsEntry { - return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined }; - }, - - toJSON(message: Struct_FieldsEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - create, I>>(base?: I): Struct_FieldsEntry { - return Struct_FieldsEntry.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Struct_FieldsEntry { - const message = createBaseStruct_FieldsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; - return message; - }, -}; - -function createBaseValue(): Value { - return { kind: undefined }; -} - -export const Value = { - encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "nullValue": - writer.uint32(8).int32(nullValueToNumber(message.kind.nullValue)); - break; - case "numberValue": - writer.uint32(17).double(message.kind.numberValue); - break; - case "stringValue": - writer.uint32(26).string(message.kind.stringValue); - break; - case "boolValue": - writer.uint32(32).bool(message.kind.boolValue); - break; - case "structValue": - Struct.encode(Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).ldelim(); - break; - case "listValue": - ListValue.encode(ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Value { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "nullValue", nullValue: nullValueFromJSON(reader.int32()) }; - break; - case 2: - message.kind = { $case: "numberValue", numberValue: reader.double() }; - break; - case 3: - message.kind = { $case: "stringValue", stringValue: reader.string() }; - break; - case 4: - message.kind = { $case: "boolValue", boolValue: reader.bool() }; - break; - case 5: - message.kind = { $case: "structValue", structValue: Struct.unwrap(Struct.decode(reader, reader.uint32())) }; - break; - case 6: - message.kind = { $case: "listValue", listValue: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Value { - return { - kind: isSet(object.nullValue) - ? { $case: "nullValue", nullValue: nullValueFromJSON(object.nullValue) } - : isSet(object.numberValue) - ? { $case: "numberValue", numberValue: Number(object.numberValue) } - : isSet(object.stringValue) - ? { $case: "stringValue", stringValue: String(object.stringValue) } - : isSet(object.boolValue) - ? { $case: "boolValue", boolValue: Boolean(object.boolValue) } - : isSet(object.structValue) - ? { $case: "structValue", structValue: object.structValue } - : isSet(object.listValue) - ? { $case: "listValue", listValue: [...object.listValue] } - : undefined, - }; - }, - - toJSON(message: Value): unknown { - const obj: any = {}; - message.kind?.$case === "nullValue" && - (obj.nullValue = message.kind?.nullValue !== undefined ? nullValueToJSON(message.kind?.nullValue) : undefined); - message.kind?.$case === "numberValue" && (obj.numberValue = message.kind?.numberValue); - message.kind?.$case === "stringValue" && (obj.stringValue = message.kind?.stringValue); - message.kind?.$case === "boolValue" && (obj.boolValue = message.kind?.boolValue); - message.kind?.$case === "structValue" && (obj.structValue = message.kind?.structValue); - message.kind?.$case === "listValue" && (obj.listValue = message.kind?.listValue); - return obj; - }, - - create, I>>(base?: I): Value { - return Value.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Value { - const message = createBaseValue(); - if (object.kind?.$case === "nullValue" && object.kind?.nullValue !== undefined && object.kind?.nullValue !== null) { - message.kind = { $case: "nullValue", nullValue: object.kind.nullValue }; - } - if ( - object.kind?.$case === "numberValue" && - object.kind?.numberValue !== undefined && - object.kind?.numberValue !== null - ) { - message.kind = { $case: "numberValue", numberValue: object.kind.numberValue }; - } - if ( - object.kind?.$case === "stringValue" && - object.kind?.stringValue !== undefined && - object.kind?.stringValue !== null - ) { - message.kind = { $case: "stringValue", stringValue: object.kind.stringValue }; - } - if (object.kind?.$case === "boolValue" && object.kind?.boolValue !== undefined && object.kind?.boolValue !== null) { - message.kind = { $case: "boolValue", boolValue: object.kind.boolValue }; - } - if ( - object.kind?.$case === "structValue" && - object.kind?.structValue !== undefined && - object.kind?.structValue !== null - ) { - message.kind = { $case: "structValue", structValue: object.kind.structValue }; - } - if (object.kind?.$case === "listValue" && object.kind?.listValue !== undefined && object.kind?.listValue !== null) { - message.kind = { $case: "listValue", listValue: object.kind.listValue }; - } - return message; - }, - - wrap(value: any): Value { - const result = createBaseValue(); - if (value === null) { - result.kind = { $case: "nullValue", nullValue: NullValue.NULL_VALUE }; - } else if (typeof value === "boolean") { - result.kind = { $case: "boolValue", boolValue: value }; - } else if (typeof value === "number") { - result.kind = { $case: "numberValue", numberValue: value }; - } else if (typeof value === "string") { - result.kind = { $case: "stringValue", stringValue: value }; - } else if (Array.isArray(value)) { - result.kind = { $case: "listValue", listValue: value }; - } else if (typeof value === "object") { - result.kind = { $case: "structValue", structValue: value }; - } else if (typeof value !== "undefined") { - throw new Error("Unsupported any value type: " + typeof value); - } - return result; - }, - - unwrap(message: Value): string | number | boolean | Object | null | Array | undefined { - if (message.kind?.$case === "nullValue") { - return null; - } else if (message.kind?.$case === "numberValue") { - return message.kind?.numberValue; - } else if (message.kind?.$case === "stringValue") { - return message.kind?.stringValue; - } else if (message.kind?.$case === "boolValue") { - return message.kind?.boolValue; - } else if (message.kind?.$case === "structValue") { - return message.kind?.structValue; - } else if (message.kind?.$case === "listValue") { - return message.kind?.listValue; - } else { - return undefined; - } - }, -}; - -function createBaseListValue(): ListValue { - return { values: [] }; -} - -export const ListValue = { - encode(message: ListValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.values) { - Value.encode(Value.wrap(v!), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ListValue { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListValue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.values.push(Value.unwrap(Value.decode(reader, reader.uint32()))); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ListValue { - return { values: Array.isArray(object?.values) ? [...object.values] : [] }; - }, - - toJSON(message: ListValue): unknown { - const obj: any = {}; - if (message.values) { - obj.values = message.values.map((e) => e); - } else { - obj.values = []; - } - return obj; - }, - - create, I>>(base?: I): ListValue { - return ListValue.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ListValue { - const message = createBaseListValue(); - message.values = object.values?.map((e) => e) || []; - return message; - }, - - wrap(array: Array | undefined): ListValue { - const result = createBaseListValue(); - result.values = array ?? []; - return result; - }, - - unwrap(message: ListValue): Array { - if (message?.hasOwnProperty("values") && Array.isArray(message.values)) { - return message.values; - } else { - return message as any; - } - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/dal/models/nosql/parti_ql.ts b/src/dal/models/nosql/parti_ql.ts deleted file mode 100644 index e3db89a..0000000 --- a/src/dal/models/nosql/parti_ql.ts +++ /dev/null @@ -1,2238 +0,0 @@ -/* eslint-disable */ -import { - CallOptions, - ChannelCredentials, - Client, - ClientOptions, - ClientUnaryCall, - handleUnaryCall, - makeGenericClientConstructor, - Metadata, - ServiceError, - UntypedServiceImplementation, -} from "@grpc/grpc-js"; -import _m0 from "protobufjs/minimal"; -import { - ListValue, - NullValue, - nullValueFromJSON, - nullValueToJSON, - nullValueToNumber, - Struct, -} from "./google/protobuf/struct"; - -export enum DataType { - DATA_TYPE_UNSPECIFIED = "DATA_TYPE_UNSPECIFIED", - DATA_TYPE_BOOLEAN = "DATA_TYPE_BOOLEAN", - DATA_TYPE_BINARY = "DATA_TYPE_BINARY", - DATA_TYPE_LIST = "DATA_TYPE_LIST", - DATA_TYPE_MAP = "DATA_TYPE_MAP", - DATA_TYPE_NULL = "DATA_TYPE_NULL", - DATA_TYPE_NUMBER = "DATA_TYPE_NUMBER", - DATA_TYPE_NUMBER_SET = "DATA_TYPE_NUMBER_SET", - DATA_TYPE_STRING = "DATA_TYPE_STRING", - DATA_TYPE_STRING_SET = "DATA_TYPE_STRING_SET", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function dataTypeFromJSON(object: any): DataType { - switch (object) { - case 0: - case "DATA_TYPE_UNSPECIFIED": - return DataType.DATA_TYPE_UNSPECIFIED; - case 1: - case "DATA_TYPE_BOOLEAN": - return DataType.DATA_TYPE_BOOLEAN; - case 2: - case "DATA_TYPE_BINARY": - return DataType.DATA_TYPE_BINARY; - case 3: - case "DATA_TYPE_LIST": - return DataType.DATA_TYPE_LIST; - case 4: - case "DATA_TYPE_MAP": - return DataType.DATA_TYPE_MAP; - case 5: - case "DATA_TYPE_NULL": - return DataType.DATA_TYPE_NULL; - case 6: - case "DATA_TYPE_NUMBER": - return DataType.DATA_TYPE_NUMBER; - case 7: - case "DATA_TYPE_NUMBER_SET": - return DataType.DATA_TYPE_NUMBER_SET; - case 8: - case "DATA_TYPE_STRING": - return DataType.DATA_TYPE_STRING; - case 9: - case "DATA_TYPE_STRING_SET": - return DataType.DATA_TYPE_STRING_SET; - case -1: - case "UNRECOGNIZED": - default: - return DataType.UNRECOGNIZED; - } -} - -export function dataTypeToJSON(object: DataType): string { - switch (object) { - case DataType.DATA_TYPE_UNSPECIFIED: - return "DATA_TYPE_UNSPECIFIED"; - case DataType.DATA_TYPE_BOOLEAN: - return "DATA_TYPE_BOOLEAN"; - case DataType.DATA_TYPE_BINARY: - return "DATA_TYPE_BINARY"; - case DataType.DATA_TYPE_LIST: - return "DATA_TYPE_LIST"; - case DataType.DATA_TYPE_MAP: - return "DATA_TYPE_MAP"; - case DataType.DATA_TYPE_NULL: - return "DATA_TYPE_NULL"; - case DataType.DATA_TYPE_NUMBER: - return "DATA_TYPE_NUMBER"; - case DataType.DATA_TYPE_NUMBER_SET: - return "DATA_TYPE_NUMBER_SET"; - case DataType.DATA_TYPE_STRING: - return "DATA_TYPE_STRING"; - case DataType.DATA_TYPE_STRING_SET: - return "DATA_TYPE_STRING_SET"; - case DataType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function dataTypeToNumber(object: DataType): number { - switch (object) { - case DataType.DATA_TYPE_UNSPECIFIED: - return 0; - case DataType.DATA_TYPE_BOOLEAN: - return 1; - case DataType.DATA_TYPE_BINARY: - return 2; - case DataType.DATA_TYPE_LIST: - return 3; - case DataType.DATA_TYPE_MAP: - return 4; - case DataType.DATA_TYPE_NULL: - return 5; - case DataType.DATA_TYPE_NUMBER: - return 6; - case DataType.DATA_TYPE_NUMBER_SET: - return 7; - case DataType.DATA_TYPE_STRING: - return 8; - case DataType.DATA_TYPE_STRING_SET: - return 9; - case DataType.UNRECOGNIZED: - default: - return -1; - } -} - -export enum Operator { - OPERATOR_UNSPECIFIED = "OPERATOR_UNSPECIFIED", - OPERATOR_EQUAL = "OPERATOR_EQUAL", - OPERATOR_NOT_EQUAL = "OPERATOR_NOT_EQUAL", - OPERATOR_GREATER_THAN = "OPERATOR_GREATER_THAN", - OPERATOR_GREATER_THAN_OR_EQUAL = "OPERATOR_GREATER_THAN_OR_EQUAL", - OPERATOR_LESS_THAN = "OPERATOR_LESS_THAN", - OPERATOR_LESS_THAN_OR_EQUAL = "OPERATOR_LESS_THAN_OR_EQUAL", - OPERATOR_AND = "OPERATOR_AND", - OPERATOR_BETWEEN = "OPERATOR_BETWEEN", - OPERATOR_IN = "OPERATOR_IN", - OPERATOR_IS = "OPERATOR_IS", - OPERATOR_NOT = "OPERATOR_NOT", - OPERATOR_OR = "OPERATOR_OR", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function operatorFromJSON(object: any): Operator { - switch (object) { - case 0: - case "OPERATOR_UNSPECIFIED": - return Operator.OPERATOR_UNSPECIFIED; - case 1: - case "OPERATOR_EQUAL": - return Operator.OPERATOR_EQUAL; - case 2: - case "OPERATOR_NOT_EQUAL": - return Operator.OPERATOR_NOT_EQUAL; - case 3: - case "OPERATOR_GREATER_THAN": - return Operator.OPERATOR_GREATER_THAN; - case 4: - case "OPERATOR_GREATER_THAN_OR_EQUAL": - return Operator.OPERATOR_GREATER_THAN_OR_EQUAL; - case 5: - case "OPERATOR_LESS_THAN": - return Operator.OPERATOR_LESS_THAN; - case 6: - case "OPERATOR_LESS_THAN_OR_EQUAL": - return Operator.OPERATOR_LESS_THAN_OR_EQUAL; - case 7: - case "OPERATOR_AND": - return Operator.OPERATOR_AND; - case 8: - case "OPERATOR_BETWEEN": - return Operator.OPERATOR_BETWEEN; - case 9: - case "OPERATOR_IN": - return Operator.OPERATOR_IN; - case 10: - case "OPERATOR_IS": - return Operator.OPERATOR_IS; - case 11: - case "OPERATOR_NOT": - return Operator.OPERATOR_NOT; - case 12: - case "OPERATOR_OR": - return Operator.OPERATOR_OR; - case -1: - case "UNRECOGNIZED": - default: - return Operator.UNRECOGNIZED; - } -} - -export function operatorToJSON(object: Operator): string { - switch (object) { - case Operator.OPERATOR_UNSPECIFIED: - return "OPERATOR_UNSPECIFIED"; - case Operator.OPERATOR_EQUAL: - return "OPERATOR_EQUAL"; - case Operator.OPERATOR_NOT_EQUAL: - return "OPERATOR_NOT_EQUAL"; - case Operator.OPERATOR_GREATER_THAN: - return "OPERATOR_GREATER_THAN"; - case Operator.OPERATOR_GREATER_THAN_OR_EQUAL: - return "OPERATOR_GREATER_THAN_OR_EQUAL"; - case Operator.OPERATOR_LESS_THAN: - return "OPERATOR_LESS_THAN"; - case Operator.OPERATOR_LESS_THAN_OR_EQUAL: - return "OPERATOR_LESS_THAN_OR_EQUAL"; - case Operator.OPERATOR_AND: - return "OPERATOR_AND"; - case Operator.OPERATOR_BETWEEN: - return "OPERATOR_BETWEEN"; - case Operator.OPERATOR_IN: - return "OPERATOR_IN"; - case Operator.OPERATOR_IS: - return "OPERATOR_IS"; - case Operator.OPERATOR_NOT: - return "OPERATOR_NOT"; - case Operator.OPERATOR_OR: - return "OPERATOR_OR"; - case Operator.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function operatorToNumber(object: Operator): number { - switch (object) { - case Operator.OPERATOR_UNSPECIFIED: - return 0; - case Operator.OPERATOR_EQUAL: - return 1; - case Operator.OPERATOR_NOT_EQUAL: - return 2; - case Operator.OPERATOR_GREATER_THAN: - return 3; - case Operator.OPERATOR_GREATER_THAN_OR_EQUAL: - return 4; - case Operator.OPERATOR_LESS_THAN: - return 5; - case Operator.OPERATOR_LESS_THAN_OR_EQUAL: - return 6; - case Operator.OPERATOR_AND: - return 7; - case Operator.OPERATOR_BETWEEN: - return 8; - case Operator.OPERATOR_IN: - return 9; - case Operator.OPERATOR_IS: - return 10; - case Operator.OPERATOR_NOT: - return 11; - case Operator.OPERATOR_OR: - return 12; - case Operator.UNRECOGNIZED: - default: - return -1; - } -} - -export enum Error { - ERROR_UNSPECIFIED = "ERROR_UNSPECIFIED", - ERROR_DATABASE_ERROR = "ERROR_DATABASE_ERROR", - ERROR_INVALID_ARGUMENT = "ERROR_INVALID_ARGUMENT", - ERROR_INVALID_QUERY = "ERROR_INVALID_QUERY", - ERROR_NOT_FOUND = "ERROR_NOT_FOUND", - ERROR_UNAUTHENTICATED = "ERROR_UNAUTHENTICATED", - ERROR_UNAUTHORIZED = "ERROR_UNAUTHORIZED", - ERROR_UNKNOWN = "ERROR_UNKNOWN", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function errorFromJSON(object: any): Error { - switch (object) { - case 0: - case "ERROR_UNSPECIFIED": - return Error.ERROR_UNSPECIFIED; - case 1: - case "ERROR_DATABASE_ERROR": - return Error.ERROR_DATABASE_ERROR; - case 2: - case "ERROR_INVALID_ARGUMENT": - return Error.ERROR_INVALID_ARGUMENT; - case 3: - case "ERROR_INVALID_QUERY": - return Error.ERROR_INVALID_QUERY; - case 4: - case "ERROR_NOT_FOUND": - return Error.ERROR_NOT_FOUND; - case 5: - case "ERROR_UNAUTHENTICATED": - return Error.ERROR_UNAUTHENTICATED; - case 6: - case "ERROR_UNAUTHORIZED": - return Error.ERROR_UNAUTHORIZED; - case 7: - case "ERROR_UNKNOWN": - return Error.ERROR_UNKNOWN; - case -1: - case "UNRECOGNIZED": - default: - return Error.UNRECOGNIZED; - } -} - -export function errorToJSON(object: Error): string { - switch (object) { - case Error.ERROR_UNSPECIFIED: - return "ERROR_UNSPECIFIED"; - case Error.ERROR_DATABASE_ERROR: - return "ERROR_DATABASE_ERROR"; - case Error.ERROR_INVALID_ARGUMENT: - return "ERROR_INVALID_ARGUMENT"; - case Error.ERROR_INVALID_QUERY: - return "ERROR_INVALID_QUERY"; - case Error.ERROR_NOT_FOUND: - return "ERROR_NOT_FOUND"; - case Error.ERROR_UNAUTHENTICATED: - return "ERROR_UNAUTHENTICATED"; - case Error.ERROR_UNAUTHORIZED: - return "ERROR_UNAUTHORIZED"; - case Error.ERROR_UNKNOWN: - return "ERROR_UNKNOWN"; - case Error.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function errorToNumber(object: Error): number { - switch (object) { - case Error.ERROR_UNSPECIFIED: - return 0; - case Error.ERROR_DATABASE_ERROR: - return 1; - case Error.ERROR_INVALID_ARGUMENT: - return 2; - case Error.ERROR_INVALID_QUERY: - return 3; - case Error.ERROR_NOT_FOUND: - return 4; - case Error.ERROR_UNAUTHENTICATED: - return 5; - case Error.ERROR_UNAUTHORIZED: - return 6; - case Error.ERROR_UNKNOWN: - return 7; - case Error.UNRECOGNIZED: - default: - return -1; - } -} - -export enum UpdateAction { - UPDATE_ACTION_UNSPECIFIED = "UPDATE_ACTION_UNSPECIFIED", - UPDATE_ACTION_SET = "UPDATE_ACTION_SET", - UPDATE_ACTION_REMOVE = "UPDATE_ACTION_REMOVE", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function updateActionFromJSON(object: any): UpdateAction { - switch (object) { - case 0: - case "UPDATE_ACTION_UNSPECIFIED": - return UpdateAction.UPDATE_ACTION_UNSPECIFIED; - case 1: - case "UPDATE_ACTION_SET": - return UpdateAction.UPDATE_ACTION_SET; - case 2: - case "UPDATE_ACTION_REMOVE": - return UpdateAction.UPDATE_ACTION_REMOVE; - case -1: - case "UNRECOGNIZED": - default: - return UpdateAction.UNRECOGNIZED; - } -} - -export function updateActionToJSON(object: UpdateAction): string { - switch (object) { - case UpdateAction.UPDATE_ACTION_UNSPECIFIED: - return "UPDATE_ACTION_UNSPECIFIED"; - case UpdateAction.UPDATE_ACTION_SET: - return "UPDATE_ACTION_SET"; - case UpdateAction.UPDATE_ACTION_REMOVE: - return "UPDATE_ACTION_REMOVE"; - case UpdateAction.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function updateActionToNumber(object: UpdateAction): number { - switch (object) { - case UpdateAction.UPDATE_ACTION_UNSPECIFIED: - return 0; - case UpdateAction.UPDATE_ACTION_SET: - return 1; - case UpdateAction.UPDATE_ACTION_REMOVE: - return 2; - case UpdateAction.UNRECOGNIZED: - default: - return -1; - } -} - -export enum UpdateType { - UPDATE_TYPE_UNSPECIFIED = "UPDATE_TYPE_UNSPECIFIED", - UPDATE_TYPE_VALUE = "UPDATE_TYPE_VALUE", - UPDATE_TYPE_SET_ADD = "UPDATE_TYPE_SET_ADD", - UPDATE_TYPE_SET_DELETE = "UPDATE_TYPE_SET_DELETE", - UPDATE_TYPE_LIST_APPEND = "UPDATE_TYPE_LIST_APPEND", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function updateTypeFromJSON(object: any): UpdateType { - switch (object) { - case 0: - case "UPDATE_TYPE_UNSPECIFIED": - return UpdateType.UPDATE_TYPE_UNSPECIFIED; - case 1: - case "UPDATE_TYPE_VALUE": - return UpdateType.UPDATE_TYPE_VALUE; - case 2: - case "UPDATE_TYPE_SET_ADD": - return UpdateType.UPDATE_TYPE_SET_ADD; - case 3: - case "UPDATE_TYPE_SET_DELETE": - return UpdateType.UPDATE_TYPE_SET_DELETE; - case 4: - case "UPDATE_TYPE_LIST_APPEND": - return UpdateType.UPDATE_TYPE_LIST_APPEND; - case -1: - case "UNRECOGNIZED": - default: - return UpdateType.UNRECOGNIZED; - } -} - -export function updateTypeToJSON(object: UpdateType): string { - switch (object) { - case UpdateType.UPDATE_TYPE_UNSPECIFIED: - return "UPDATE_TYPE_UNSPECIFIED"; - case UpdateType.UPDATE_TYPE_VALUE: - return "UPDATE_TYPE_VALUE"; - case UpdateType.UPDATE_TYPE_SET_ADD: - return "UPDATE_TYPE_SET_ADD"; - case UpdateType.UPDATE_TYPE_SET_DELETE: - return "UPDATE_TYPE_SET_DELETE"; - case UpdateType.UPDATE_TYPE_LIST_APPEND: - return "UPDATE_TYPE_LIST_APPEND"; - case UpdateType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function updateTypeToNumber(object: UpdateType): number { - switch (object) { - case UpdateType.UPDATE_TYPE_UNSPECIFIED: - return 0; - case UpdateType.UPDATE_TYPE_VALUE: - return 1; - case UpdateType.UPDATE_TYPE_SET_ADD: - return 2; - case UpdateType.UPDATE_TYPE_SET_DELETE: - return 3; - case UpdateType.UPDATE_TYPE_LIST_APPEND: - return 4; - case UpdateType.UNRECOGNIZED: - default: - return -1; - } -} - -export enum ReturnValue { - RETURN_VALUE_UNSPECIFIED = "RETURN_VALUE_UNSPECIFIED", - RETURN_VALUE_ALL_NEW = "RETURN_VALUE_ALL_NEW", - RETURN_VALUE_MODIFIED_NEW = "RETURN_VALUE_MODIFIED_NEW", - RETURN_VALUE_ALL_OLD = "RETURN_VALUE_ALL_OLD", - RETURN_VALUE_MODIFIED_OLD = "RETURN_VALUE_MODIFIED_OLD", - UNRECOGNIZED = "UNRECOGNIZED", -} - -export function returnValueFromJSON(object: any): ReturnValue { - switch (object) { - case 0: - case "RETURN_VALUE_UNSPECIFIED": - return ReturnValue.RETURN_VALUE_UNSPECIFIED; - case 1: - case "RETURN_VALUE_ALL_NEW": - return ReturnValue.RETURN_VALUE_ALL_NEW; - case 2: - case "RETURN_VALUE_MODIFIED_NEW": - return ReturnValue.RETURN_VALUE_MODIFIED_NEW; - case 3: - case "RETURN_VALUE_ALL_OLD": - return ReturnValue.RETURN_VALUE_ALL_OLD; - case 4: - case "RETURN_VALUE_MODIFIED_OLD": - return ReturnValue.RETURN_VALUE_MODIFIED_OLD; - case -1: - case "UNRECOGNIZED": - default: - return ReturnValue.UNRECOGNIZED; - } -} - -export function returnValueToJSON(object: ReturnValue): string { - switch (object) { - case ReturnValue.RETURN_VALUE_UNSPECIFIED: - return "RETURN_VALUE_UNSPECIFIED"; - case ReturnValue.RETURN_VALUE_ALL_NEW: - return "RETURN_VALUE_ALL_NEW"; - case ReturnValue.RETURN_VALUE_MODIFIED_NEW: - return "RETURN_VALUE_MODIFIED_NEW"; - case ReturnValue.RETURN_VALUE_ALL_OLD: - return "RETURN_VALUE_ALL_OLD"; - case ReturnValue.RETURN_VALUE_MODIFIED_OLD: - return "RETURN_VALUE_MODIFIED_OLD"; - case ReturnValue.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export function returnValueToNumber(object: ReturnValue): number { - switch (object) { - case ReturnValue.RETURN_VALUE_UNSPECIFIED: - return 0; - case ReturnValue.RETURN_VALUE_ALL_NEW: - return 1; - case ReturnValue.RETURN_VALUE_MODIFIED_NEW: - return 2; - case ReturnValue.RETURN_VALUE_ALL_OLD: - return 3; - case ReturnValue.RETURN_VALUE_MODIFIED_OLD: - return 4; - case ReturnValue.UNRECOGNIZED: - default: - return -1; - } -} - -export interface StringSet { - values: string[]; -} - -export interface NumberSet { - values: number[]; -} - -export interface Value { - kind?: - | { $case: "boolean"; boolean: boolean } - | { $case: "binary"; binary: Buffer } - | { $case: "listValue"; listValue: Array } - | { $case: "mapValue"; mapValue: { [key: string]: any } } - | { $case: "nullValue"; nullValue: NullValue } - | { $case: "numberValue"; numberValue: number } - | { $case: "numberSetValue"; numberSetValue: NumberSet } - | { $case: "stringValue"; stringValue: string } - | { $case: "stringSetValue"; stringSetValue: StringSet }; -} - -export interface Attribute { - name: string; - type: DataType; -} - -export interface Filter { - name: string; - operator: Operator; - value?: Value; -} - -export interface SelectQuery { - table: string; - index?: string | undefined; - attributes: Attribute[]; - filters: Filter[]; - nextToken?: string | undefined; -} - -export interface InsertQuery { - table: string; - attributes?: { [key: string]: any }; -} - -export interface UpdateOperation { - action: UpdateAction; - attribute: string; - type: UpdateType; - value?: Value; -} - -export interface UpdateQuery { - table: string; - updates: UpdateOperation[]; - filters: Filter[]; - returnValue?: ReturnValue | undefined; -} - -export interface DeleteQuery { - table: string; - filters: Filter[]; - returnValues?: ReturnValue | undefined; -} - -export interface ReadQuery { - queries: SelectQuery[]; -} - -export interface WriteQuery { - kind?: { $case: "insert"; insert: InsertQuery } | { $case: "update"; update: UpdateQuery } | { - $case: "delete"; - delete: DeleteQuery; - }; -} - -export interface BulkWriteQuery { - queries: WriteQuery[]; -} - -export interface BulkQuery { - kind?: { $case: "read"; read: ReadQuery } | { $case: "bulkWriteQueries"; bulkWriteQueries: WriteQuery }; -} - -export interface Query { - kind?: { $case: "select"; select: SelectQuery } | { $case: "insert"; insert: InsertQuery } | { - $case: "update"; - update: UpdateQuery; - } | { $case: "delete"; delete: DeleteQuery }; -} - -export interface Response { - items: { [key: string]: any }[]; - nextToken?: string | undefined; -} - -export interface QueryRequest { - kind?: { $case: "query"; query: Query } | { $case: "queries"; queries: BulkQuery }; -} - -export interface ResponseError { - message: string; -} - -export interface QueryResponse { - kind?: { $case: "response"; response: Response } | { $case: "error"; error: ResponseError }; -} - -function createBaseStringSet(): StringSet { - return { values: [] }; -} - -export const StringSet = { - encode(message: StringSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.values) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): StringSet { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStringSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.values.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StringSet { - return { values: Array.isArray(object?.values) ? object.values.map((e: any) => String(e)) : [] }; - }, - - toJSON(message: StringSet): unknown { - const obj: any = {}; - if (message.values) { - obj.values = message.values.map((e) => e); - } else { - obj.values = []; - } - return obj; - }, - - create, I>>(base?: I): StringSet { - return StringSet.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): StringSet { - const message = createBaseStringSet(); - message.values = object.values?.map((e) => e) || []; - return message; - }, -}; - -function createBaseNumberSet(): NumberSet { - return { values: [] }; -} - -export const NumberSet = { - encode(message: NumberSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - writer.uint32(10).fork(); - for (const v of message.values) { - writer.double(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): NumberSet { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNumberSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.values.push(reader.double()); - } - } else { - message.values.push(reader.double()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): NumberSet { - return { values: Array.isArray(object?.values) ? object.values.map((e: any) => Number(e)) : [] }; - }, - - toJSON(message: NumberSet): unknown { - const obj: any = {}; - if (message.values) { - obj.values = message.values.map((e) => e); - } else { - obj.values = []; - } - return obj; - }, - - create, I>>(base?: I): NumberSet { - return NumberSet.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): NumberSet { - const message = createBaseNumberSet(); - message.values = object.values?.map((e) => e) || []; - return message; - }, -}; - -function createBaseValue(): Value { - return { kind: undefined }; -} - -export const Value = { - encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "boolean": - writer.uint32(8).bool(message.kind.boolean); - break; - case "binary": - writer.uint32(18).bytes(message.kind.binary); - break; - case "listValue": - ListValue.encode(ListValue.wrap(message.kind.listValue), writer.uint32(26).fork()).ldelim(); - break; - case "mapValue": - Struct.encode(Struct.wrap(message.kind.mapValue), writer.uint32(34).fork()).ldelim(); - break; - case "nullValue": - writer.uint32(40).int32(nullValueToNumber(message.kind.nullValue)); - break; - case "numberValue": - writer.uint32(49).double(message.kind.numberValue); - break; - case "numberSetValue": - NumberSet.encode(message.kind.numberSetValue, writer.uint32(58).fork()).ldelim(); - break; - case "stringValue": - writer.uint32(66).string(message.kind.stringValue); - break; - case "stringSetValue": - StringSet.encode(message.kind.stringSetValue, writer.uint32(74).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Value { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "boolean", boolean: reader.bool() }; - break; - case 2: - message.kind = { $case: "binary", binary: reader.bytes() as Buffer }; - break; - case 3: - message.kind = { $case: "listValue", listValue: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) }; - break; - case 4: - message.kind = { $case: "mapValue", mapValue: Struct.unwrap(Struct.decode(reader, reader.uint32())) }; - break; - case 5: - message.kind = { $case: "nullValue", nullValue: nullValueFromJSON(reader.int32()) }; - break; - case 6: - message.kind = { $case: "numberValue", numberValue: reader.double() }; - break; - case 7: - message.kind = { $case: "numberSetValue", numberSetValue: NumberSet.decode(reader, reader.uint32()) }; - break; - case 8: - message.kind = { $case: "stringValue", stringValue: reader.string() }; - break; - case 9: - message.kind = { $case: "stringSetValue", stringSetValue: StringSet.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Value { - return { - kind: isSet(object.boolean) - ? { $case: "boolean", boolean: Boolean(object.boolean) } - : isSet(object.binary) - ? { $case: "binary", binary: Buffer.from(bytesFromBase64(object.binary)) } - : isSet(object.listValue) - ? { $case: "listValue", listValue: [...object.listValue] } - : isSet(object.mapValue) - ? { $case: "mapValue", mapValue: object.mapValue } - : isSet(object.nullValue) - ? { $case: "nullValue", nullValue: nullValueFromJSON(object.nullValue) } - : isSet(object.numberValue) - ? { $case: "numberValue", numberValue: Number(object.numberValue) } - : isSet(object.numberSetValue) - ? { $case: "numberSetValue", numberSetValue: NumberSet.fromJSON(object.numberSetValue) } - : isSet(object.stringValue) - ? { $case: "stringValue", stringValue: String(object.stringValue) } - : isSet(object.stringSetValue) - ? { $case: "stringSetValue", stringSetValue: StringSet.fromJSON(object.stringSetValue) } - : undefined, - }; - }, - - toJSON(message: Value): unknown { - const obj: any = {}; - message.kind?.$case === "boolean" && (obj.boolean = message.kind?.boolean); - message.kind?.$case === "binary" && - (obj.binary = message.kind?.binary !== undefined ? base64FromBytes(message.kind?.binary) : undefined); - message.kind?.$case === "listValue" && (obj.listValue = message.kind?.listValue); - message.kind?.$case === "mapValue" && (obj.mapValue = message.kind?.mapValue); - message.kind?.$case === "nullValue" && - (obj.nullValue = message.kind?.nullValue !== undefined ? nullValueToJSON(message.kind?.nullValue) : undefined); - message.kind?.$case === "numberValue" && (obj.numberValue = message.kind?.numberValue); - message.kind?.$case === "numberSetValue" && - (obj.numberSetValue = message.kind?.numberSetValue ? NumberSet.toJSON(message.kind?.numberSetValue) : undefined); - message.kind?.$case === "stringValue" && (obj.stringValue = message.kind?.stringValue); - message.kind?.$case === "stringSetValue" && - (obj.stringSetValue = message.kind?.stringSetValue ? StringSet.toJSON(message.kind?.stringSetValue) : undefined); - return obj; - }, - - create, I>>(base?: I): Value { - return Value.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Value { - const message = createBaseValue(); - if (object.kind?.$case === "boolean" && object.kind?.boolean !== undefined && object.kind?.boolean !== null) { - message.kind = { $case: "boolean", boolean: object.kind.boolean }; - } - if (object.kind?.$case === "binary" && object.kind?.binary !== undefined && object.kind?.binary !== null) { - message.kind = { $case: "binary", binary: object.kind.binary }; - } - if (object.kind?.$case === "listValue" && object.kind?.listValue !== undefined && object.kind?.listValue !== null) { - message.kind = { $case: "listValue", listValue: object.kind.listValue }; - } - if (object.kind?.$case === "mapValue" && object.kind?.mapValue !== undefined && object.kind?.mapValue !== null) { - message.kind = { $case: "mapValue", mapValue: object.kind.mapValue }; - } - if (object.kind?.$case === "nullValue" && object.kind?.nullValue !== undefined && object.kind?.nullValue !== null) { - message.kind = { $case: "nullValue", nullValue: object.kind.nullValue }; - } - if ( - object.kind?.$case === "numberValue" && - object.kind?.numberValue !== undefined && - object.kind?.numberValue !== null - ) { - message.kind = { $case: "numberValue", numberValue: object.kind.numberValue }; - } - if ( - object.kind?.$case === "numberSetValue" && - object.kind?.numberSetValue !== undefined && - object.kind?.numberSetValue !== null - ) { - message.kind = { $case: "numberSetValue", numberSetValue: NumberSet.fromPartial(object.kind.numberSetValue) }; - } - if ( - object.kind?.$case === "stringValue" && - object.kind?.stringValue !== undefined && - object.kind?.stringValue !== null - ) { - message.kind = { $case: "stringValue", stringValue: object.kind.stringValue }; - } - if ( - object.kind?.$case === "stringSetValue" && - object.kind?.stringSetValue !== undefined && - object.kind?.stringSetValue !== null - ) { - message.kind = { $case: "stringSetValue", stringSetValue: StringSet.fromPartial(object.kind.stringSetValue) }; - } - return message; - }, -}; - -function createBaseAttribute(): Attribute { - return { name: "", type: DataType.DATA_TYPE_UNSPECIFIED }; -} - -export const Attribute = { - encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.type !== DataType.DATA_TYPE_UNSPECIFIED) { - writer.uint32(16).int32(dataTypeToNumber(message.type)); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Attribute { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAttribute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = dataTypeFromJSON(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Attribute { - return { - name: isSet(object.name) ? String(object.name) : "", - type: isSet(object.type) ? dataTypeFromJSON(object.type) : DataType.DATA_TYPE_UNSPECIFIED, - }; - }, - - toJSON(message: Attribute): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.type !== undefined && (obj.type = dataTypeToJSON(message.type)); - return obj; - }, - - create, I>>(base?: I): Attribute { - return Attribute.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Attribute { - const message = createBaseAttribute(); - message.name = object.name ?? ""; - message.type = object.type ?? DataType.DATA_TYPE_UNSPECIFIED; - return message; - }, -}; - -function createBaseFilter(): Filter { - return { name: "", operator: Operator.OPERATOR_UNSPECIFIED, value: undefined }; -} - -export const Filter = { - encode(message: Filter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.operator !== Operator.OPERATOR_UNSPECIFIED) { - writer.uint32(16).int32(operatorToNumber(message.operator)); - } - if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Filter { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFilter(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.operator = operatorFromJSON(reader.int32()); - break; - case 3: - message.value = Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Filter { - return { - name: isSet(object.name) ? String(object.name) : "", - operator: isSet(object.operator) ? operatorFromJSON(object.operator) : Operator.OPERATOR_UNSPECIFIED, - value: isSet(object.value) ? Value.fromJSON(object.value) : undefined, - }; - }, - - toJSON(message: Filter): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.operator !== undefined && (obj.operator = operatorToJSON(message.operator)); - message.value !== undefined && (obj.value = message.value ? Value.toJSON(message.value) : undefined); - return obj; - }, - - create, I>>(base?: I): Filter { - return Filter.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Filter { - const message = createBaseFilter(); - message.name = object.name ?? ""; - message.operator = object.operator ?? Operator.OPERATOR_UNSPECIFIED; - message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined; - return message; - }, -}; - -function createBaseSelectQuery(): SelectQuery { - return { table: "", index: undefined, attributes: [], filters: [], nextToken: undefined }; -} - -export const SelectQuery = { - encode(message: SelectQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.table !== "") { - writer.uint32(10).string(message.table); - } - if (message.index !== undefined) { - writer.uint32(18).string(message.index); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.filters) { - Filter.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.nextToken !== undefined) { - writer.uint32(42).string(message.nextToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SelectQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSelectQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.index = reader.string(); - break; - case 3: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - case 4: - message.filters.push(Filter.decode(reader, reader.uint32())); - break; - case 5: - message.nextToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SelectQuery { - return { - table: isSet(object.table) ? String(object.table) : "", - index: isSet(object.index) ? String(object.index) : undefined, - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], - filters: Array.isArray(object?.filters) ? object.filters.map((e: any) => Filter.fromJSON(e)) : [], - nextToken: isSet(object.nextToken) ? String(object.nextToken) : undefined, - }; - }, - - toJSON(message: SelectQuery): unknown { - const obj: any = {}; - message.table !== undefined && (obj.table = message.table); - message.index !== undefined && (obj.index = message.index); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => e ? Attribute.toJSON(e) : undefined); - } else { - obj.attributes = []; - } - if (message.filters) { - obj.filters = message.filters.map((e) => e ? Filter.toJSON(e) : undefined); - } else { - obj.filters = []; - } - message.nextToken !== undefined && (obj.nextToken = message.nextToken); - return obj; - }, - - create, I>>(base?: I): SelectQuery { - return SelectQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): SelectQuery { - const message = createBaseSelectQuery(); - message.table = object.table ?? ""; - message.index = object.index ?? undefined; - message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.filters = object.filters?.map((e) => Filter.fromPartial(e)) || []; - message.nextToken = object.nextToken ?? undefined; - return message; - }, -}; - -function createBaseInsertQuery(): InsertQuery { - return { table: "", attributes: undefined }; -} - -export const InsertQuery = { - encode(message: InsertQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.table !== "") { - writer.uint32(10).string(message.table); - } - if (message.attributes !== undefined) { - Struct.encode(Struct.wrap(message.attributes), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): InsertQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInsertQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.attributes = Struct.unwrap(Struct.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InsertQuery { - return { - table: isSet(object.table) ? String(object.table) : "", - attributes: isObject(object.attributes) ? object.attributes : undefined, - }; - }, - - toJSON(message: InsertQuery): unknown { - const obj: any = {}; - message.table !== undefined && (obj.table = message.table); - message.attributes !== undefined && (obj.attributes = message.attributes); - return obj; - }, - - create, I>>(base?: I): InsertQuery { - return InsertQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): InsertQuery { - const message = createBaseInsertQuery(); - message.table = object.table ?? ""; - message.attributes = object.attributes ?? undefined; - return message; - }, -}; - -function createBaseUpdateOperation(): UpdateOperation { - return { - action: UpdateAction.UPDATE_ACTION_UNSPECIFIED, - attribute: "", - type: UpdateType.UPDATE_TYPE_UNSPECIFIED, - value: undefined, - }; -} - -export const UpdateOperation = { - encode(message: UpdateOperation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.action !== UpdateAction.UPDATE_ACTION_UNSPECIFIED) { - writer.uint32(8).int32(updateActionToNumber(message.action)); - } - if (message.attribute !== "") { - writer.uint32(18).string(message.attribute); - } - if (message.type !== UpdateType.UPDATE_TYPE_UNSPECIFIED) { - writer.uint32(24).int32(updateTypeToNumber(message.type)); - } - if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateOperation { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateOperation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.action = updateActionFromJSON(reader.int32()); - break; - case 2: - message.attribute = reader.string(); - break; - case 3: - message.type = updateTypeFromJSON(reader.int32()); - break; - case 4: - message.value = Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateOperation { - return { - action: isSet(object.action) ? updateActionFromJSON(object.action) : UpdateAction.UPDATE_ACTION_UNSPECIFIED, - attribute: isSet(object.attribute) ? String(object.attribute) : "", - type: isSet(object.type) ? updateTypeFromJSON(object.type) : UpdateType.UPDATE_TYPE_UNSPECIFIED, - value: isSet(object.value) ? Value.fromJSON(object.value) : undefined, - }; - }, - - toJSON(message: UpdateOperation): unknown { - const obj: any = {}; - message.action !== undefined && (obj.action = updateActionToJSON(message.action)); - message.attribute !== undefined && (obj.attribute = message.attribute); - message.type !== undefined && (obj.type = updateTypeToJSON(message.type)); - message.value !== undefined && (obj.value = message.value ? Value.toJSON(message.value) : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateOperation { - return UpdateOperation.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateOperation { - const message = createBaseUpdateOperation(); - message.action = object.action ?? UpdateAction.UPDATE_ACTION_UNSPECIFIED; - message.attribute = object.attribute ?? ""; - message.type = object.type ?? UpdateType.UPDATE_TYPE_UNSPECIFIED; - message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined; - return message; - }, -}; - -function createBaseUpdateQuery(): UpdateQuery { - return { table: "", updates: [], filters: [], returnValue: undefined }; -} - -export const UpdateQuery = { - encode(message: UpdateQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.table !== "") { - writer.uint32(10).string(message.table); - } - for (const v of message.updates) { - UpdateOperation.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.filters) { - Filter.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.returnValue !== undefined) { - writer.uint32(32).int32(returnValueToNumber(message.returnValue)); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.updates.push(UpdateOperation.decode(reader, reader.uint32())); - break; - case 3: - message.filters.push(Filter.decode(reader, reader.uint32())); - break; - case 4: - message.returnValue = returnValueFromJSON(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateQuery { - return { - table: isSet(object.table) ? String(object.table) : "", - updates: Array.isArray(object?.updates) ? object.updates.map((e: any) => UpdateOperation.fromJSON(e)) : [], - filters: Array.isArray(object?.filters) ? object.filters.map((e: any) => Filter.fromJSON(e)) : [], - returnValue: isSet(object.returnValue) ? returnValueFromJSON(object.returnValue) : undefined, - }; - }, - - toJSON(message: UpdateQuery): unknown { - const obj: any = {}; - message.table !== undefined && (obj.table = message.table); - if (message.updates) { - obj.updates = message.updates.map((e) => e ? UpdateOperation.toJSON(e) : undefined); - } else { - obj.updates = []; - } - if (message.filters) { - obj.filters = message.filters.map((e) => e ? Filter.toJSON(e) : undefined); - } else { - obj.filters = []; - } - message.returnValue !== undefined && - (obj.returnValue = message.returnValue !== undefined ? returnValueToJSON(message.returnValue) : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateQuery { - return UpdateQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateQuery { - const message = createBaseUpdateQuery(); - message.table = object.table ?? ""; - message.updates = object.updates?.map((e) => UpdateOperation.fromPartial(e)) || []; - message.filters = object.filters?.map((e) => Filter.fromPartial(e)) || []; - message.returnValue = object.returnValue ?? undefined; - return message; - }, -}; - -function createBaseDeleteQuery(): DeleteQuery { - return { table: "", filters: [], returnValues: undefined }; -} - -export const DeleteQuery = { - encode(message: DeleteQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.table !== "") { - writer.uint32(10).string(message.table); - } - for (const v of message.filters) { - Filter.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.returnValues !== undefined) { - writer.uint32(24).int32(returnValueToNumber(message.returnValues)); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.filters.push(Filter.decode(reader, reader.uint32())); - break; - case 3: - message.returnValues = returnValueFromJSON(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DeleteQuery { - return { - table: isSet(object.table) ? String(object.table) : "", - filters: Array.isArray(object?.filters) ? object.filters.map((e: any) => Filter.fromJSON(e)) : [], - returnValues: isSet(object.returnValues) ? returnValueFromJSON(object.returnValues) : undefined, - }; - }, - - toJSON(message: DeleteQuery): unknown { - const obj: any = {}; - message.table !== undefined && (obj.table = message.table); - if (message.filters) { - obj.filters = message.filters.map((e) => e ? Filter.toJSON(e) : undefined); - } else { - obj.filters = []; - } - message.returnValues !== undefined && - (obj.returnValues = message.returnValues !== undefined ? returnValueToJSON(message.returnValues) : undefined); - return obj; - }, - - create, I>>(base?: I): DeleteQuery { - return DeleteQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): DeleteQuery { - const message = createBaseDeleteQuery(); - message.table = object.table ?? ""; - message.filters = object.filters?.map((e) => Filter.fromPartial(e)) || []; - message.returnValues = object.returnValues ?? undefined; - return message; - }, -}; - -function createBaseReadQuery(): ReadQuery { - return { queries: [] }; -} - -export const ReadQuery = { - encode(message: ReadQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.queries) { - SelectQuery.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ReadQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReadQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.queries.push(SelectQuery.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ReadQuery { - return { queries: Array.isArray(object?.queries) ? object.queries.map((e: any) => SelectQuery.fromJSON(e)) : [] }; - }, - - toJSON(message: ReadQuery): unknown { - const obj: any = {}; - if (message.queries) { - obj.queries = message.queries.map((e) => e ? SelectQuery.toJSON(e) : undefined); - } else { - obj.queries = []; - } - return obj; - }, - - create, I>>(base?: I): ReadQuery { - return ReadQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ReadQuery { - const message = createBaseReadQuery(); - message.queries = object.queries?.map((e) => SelectQuery.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseWriteQuery(): WriteQuery { - return { kind: undefined }; -} - -export const WriteQuery = { - encode(message: WriteQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "insert": - InsertQuery.encode(message.kind.insert, writer.uint32(10).fork()).ldelim(); - break; - case "update": - UpdateQuery.encode(message.kind.update, writer.uint32(18).fork()).ldelim(); - break; - case "delete": - DeleteQuery.encode(message.kind.delete, writer.uint32(26).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): WriteQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWriteQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "insert", insert: InsertQuery.decode(reader, reader.uint32()) }; - break; - case 2: - message.kind = { $case: "update", update: UpdateQuery.decode(reader, reader.uint32()) }; - break; - case 3: - message.kind = { $case: "delete", delete: DeleteQuery.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): WriteQuery { - return { - kind: isSet(object.insert) - ? { $case: "insert", insert: InsertQuery.fromJSON(object.insert) } - : isSet(object.update) - ? { $case: "update", update: UpdateQuery.fromJSON(object.update) } - : isSet(object.delete) - ? { $case: "delete", delete: DeleteQuery.fromJSON(object.delete) } - : undefined, - }; - }, - - toJSON(message: WriteQuery): unknown { - const obj: any = {}; - message.kind?.$case === "insert" && - (obj.insert = message.kind?.insert ? InsertQuery.toJSON(message.kind?.insert) : undefined); - message.kind?.$case === "update" && - (obj.update = message.kind?.update ? UpdateQuery.toJSON(message.kind?.update) : undefined); - message.kind?.$case === "delete" && - (obj.delete = message.kind?.delete ? DeleteQuery.toJSON(message.kind?.delete) : undefined); - return obj; - }, - - create, I>>(base?: I): WriteQuery { - return WriteQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): WriteQuery { - const message = createBaseWriteQuery(); - if (object.kind?.$case === "insert" && object.kind?.insert !== undefined && object.kind?.insert !== null) { - message.kind = { $case: "insert", insert: InsertQuery.fromPartial(object.kind.insert) }; - } - if (object.kind?.$case === "update" && object.kind?.update !== undefined && object.kind?.update !== null) { - message.kind = { $case: "update", update: UpdateQuery.fromPartial(object.kind.update) }; - } - if (object.kind?.$case === "delete" && object.kind?.delete !== undefined && object.kind?.delete !== null) { - message.kind = { $case: "delete", delete: DeleteQuery.fromPartial(object.kind.delete) }; - } - return message; - }, -}; - -function createBaseBulkWriteQuery(): BulkWriteQuery { - return { queries: [] }; -} - -export const BulkWriteQuery = { - encode(message: BulkWriteQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.queries) { - WriteQuery.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BulkWriteQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBulkWriteQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.queries.push(WriteQuery.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BulkWriteQuery { - return { queries: Array.isArray(object?.queries) ? object.queries.map((e: any) => WriteQuery.fromJSON(e)) : [] }; - }, - - toJSON(message: BulkWriteQuery): unknown { - const obj: any = {}; - if (message.queries) { - obj.queries = message.queries.map((e) => e ? WriteQuery.toJSON(e) : undefined); - } else { - obj.queries = []; - } - return obj; - }, - - create, I>>(base?: I): BulkWriteQuery { - return BulkWriteQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): BulkWriteQuery { - const message = createBaseBulkWriteQuery(); - message.queries = object.queries?.map((e) => WriteQuery.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseBulkQuery(): BulkQuery { - return { kind: undefined }; -} - -export const BulkQuery = { - encode(message: BulkQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "read": - ReadQuery.encode(message.kind.read, writer.uint32(10).fork()).ldelim(); - break; - case "bulkWriteQueries": - WriteQuery.encode(message.kind.bulkWriteQueries, writer.uint32(18).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BulkQuery { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBulkQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "read", read: ReadQuery.decode(reader, reader.uint32()) }; - break; - case 2: - message.kind = { $case: "bulkWriteQueries", bulkWriteQueries: WriteQuery.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BulkQuery { - return { - kind: isSet(object.read) - ? { $case: "read", read: ReadQuery.fromJSON(object.read) } - : isSet(object.bulkWriteQueries) - ? { $case: "bulkWriteQueries", bulkWriteQueries: WriteQuery.fromJSON(object.bulkWriteQueries) } - : undefined, - }; - }, - - toJSON(message: BulkQuery): unknown { - const obj: any = {}; - message.kind?.$case === "read" && - (obj.read = message.kind?.read ? ReadQuery.toJSON(message.kind?.read) : undefined); - message.kind?.$case === "bulkWriteQueries" && (obj.bulkWriteQueries = message.kind?.bulkWriteQueries - ? WriteQuery.toJSON(message.kind?.bulkWriteQueries) - : undefined); - return obj; - }, - - create, I>>(base?: I): BulkQuery { - return BulkQuery.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): BulkQuery { - const message = createBaseBulkQuery(); - if (object.kind?.$case === "read" && object.kind?.read !== undefined && object.kind?.read !== null) { - message.kind = { $case: "read", read: ReadQuery.fromPartial(object.kind.read) }; - } - if ( - object.kind?.$case === "bulkWriteQueries" && - object.kind?.bulkWriteQueries !== undefined && - object.kind?.bulkWriteQueries !== null - ) { - message.kind = { - $case: "bulkWriteQueries", - bulkWriteQueries: WriteQuery.fromPartial(object.kind.bulkWriteQueries), - }; - } - return message; - }, -}; - -function createBaseQuery(): Query { - return { kind: undefined }; -} - -export const Query = { - encode(message: Query, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "select": - SelectQuery.encode(message.kind.select, writer.uint32(10).fork()).ldelim(); - break; - case "insert": - InsertQuery.encode(message.kind.insert, writer.uint32(18).fork()).ldelim(); - break; - case "update": - UpdateQuery.encode(message.kind.update, writer.uint32(26).fork()).ldelim(); - break; - case "delete": - DeleteQuery.encode(message.kind.delete, writer.uint32(34).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Query { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "select", select: SelectQuery.decode(reader, reader.uint32()) }; - break; - case 2: - message.kind = { $case: "insert", insert: InsertQuery.decode(reader, reader.uint32()) }; - break; - case 3: - message.kind = { $case: "update", update: UpdateQuery.decode(reader, reader.uint32()) }; - break; - case 4: - message.kind = { $case: "delete", delete: DeleteQuery.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Query { - return { - kind: isSet(object.select) - ? { $case: "select", select: SelectQuery.fromJSON(object.select) } - : isSet(object.insert) - ? { $case: "insert", insert: InsertQuery.fromJSON(object.insert) } - : isSet(object.update) - ? { $case: "update", update: UpdateQuery.fromJSON(object.update) } - : isSet(object.delete) - ? { $case: "delete", delete: DeleteQuery.fromJSON(object.delete) } - : undefined, - }; - }, - - toJSON(message: Query): unknown { - const obj: any = {}; - message.kind?.$case === "select" && - (obj.select = message.kind?.select ? SelectQuery.toJSON(message.kind?.select) : undefined); - message.kind?.$case === "insert" && - (obj.insert = message.kind?.insert ? InsertQuery.toJSON(message.kind?.insert) : undefined); - message.kind?.$case === "update" && - (obj.update = message.kind?.update ? UpdateQuery.toJSON(message.kind?.update) : undefined); - message.kind?.$case === "delete" && - (obj.delete = message.kind?.delete ? DeleteQuery.toJSON(message.kind?.delete) : undefined); - return obj; - }, - - create, I>>(base?: I): Query { - return Query.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Query { - const message = createBaseQuery(); - if (object.kind?.$case === "select" && object.kind?.select !== undefined && object.kind?.select !== null) { - message.kind = { $case: "select", select: SelectQuery.fromPartial(object.kind.select) }; - } - if (object.kind?.$case === "insert" && object.kind?.insert !== undefined && object.kind?.insert !== null) { - message.kind = { $case: "insert", insert: InsertQuery.fromPartial(object.kind.insert) }; - } - if (object.kind?.$case === "update" && object.kind?.update !== undefined && object.kind?.update !== null) { - message.kind = { $case: "update", update: UpdateQuery.fromPartial(object.kind.update) }; - } - if (object.kind?.$case === "delete" && object.kind?.delete !== undefined && object.kind?.delete !== null) { - message.kind = { $case: "delete", delete: DeleteQuery.fromPartial(object.kind.delete) }; - } - return message; - }, -}; - -function createBaseResponse(): Response { - return { items: [], nextToken: undefined }; -} - -export const Response = { - encode(message: Response, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - Struct.encode(Struct.wrap(v!), writer.uint32(10).fork()).ldelim(); - } - if (message.nextToken !== undefined) { - writer.uint32(18).string(message.nextToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Response { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(Struct.unwrap(Struct.decode(reader, reader.uint32()))); - break; - case 2: - message.nextToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Response { - return { - items: Array.isArray(object?.items) ? [...object.items] : [], - nextToken: isSet(object.nextToken) ? String(object.nextToken) : undefined, - }; - }, - - toJSON(message: Response): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e); - } else { - obj.items = []; - } - message.nextToken !== undefined && (obj.nextToken = message.nextToken); - return obj; - }, - - create, I>>(base?: I): Response { - return Response.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Response { - const message = createBaseResponse(); - message.items = object.items?.map((e) => e) || []; - message.nextToken = object.nextToken ?? undefined; - return message; - }, -}; - -function createBaseQueryRequest(): QueryRequest { - return { kind: undefined }; -} - -export const QueryRequest = { - encode(message: QueryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "query": - Query.encode(message.kind.query, writer.uint32(10).fork()).ldelim(); - break; - case "queries": - BulkQuery.encode(message.kind.queries, writer.uint32(18).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "query", query: Query.decode(reader, reader.uint32()) }; - break; - case 2: - message.kind = { $case: "queries", queries: BulkQuery.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRequest { - return { - kind: isSet(object.query) - ? { $case: "query", query: Query.fromJSON(object.query) } - : isSet(object.queries) - ? { $case: "queries", queries: BulkQuery.fromJSON(object.queries) } - : undefined, - }; - }, - - toJSON(message: QueryRequest): unknown { - const obj: any = {}; - message.kind?.$case === "query" && - (obj.query = message.kind?.query ? Query.toJSON(message.kind?.query) : undefined); - message.kind?.$case === "queries" && - (obj.queries = message.kind?.queries ? BulkQuery.toJSON(message.kind?.queries) : undefined); - return obj; - }, - - create, I>>(base?: I): QueryRequest { - return QueryRequest.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): QueryRequest { - const message = createBaseQueryRequest(); - if (object.kind?.$case === "query" && object.kind?.query !== undefined && object.kind?.query !== null) { - message.kind = { $case: "query", query: Query.fromPartial(object.kind.query) }; - } - if (object.kind?.$case === "queries" && object.kind?.queries !== undefined && object.kind?.queries !== null) { - message.kind = { $case: "queries", queries: BulkQuery.fromPartial(object.kind.queries) }; - } - return message; - }, -}; - -function createBaseResponseError(): ResponseError { - return { message: "" }; -} - -export const ResponseError = { - encode(message: ResponseError, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ResponseError { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseError(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseError { - return { message: isSet(object.message) ? String(object.message) : "" }; - }, - - toJSON(message: ResponseError): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - create, I>>(base?: I): ResponseError { - return ResponseError.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ResponseError { - const message = createBaseResponseError(); - message.message = object.message ?? ""; - return message; - }, -}; - -function createBaseQueryResponse(): QueryResponse { - return { kind: undefined }; -} - -export const QueryResponse = { - encode(message: QueryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "response": - Response.encode(message.kind.response, writer.uint32(10).fork()).ldelim(); - break; - case "error": - ResponseError.encode(message.kind.error, writer.uint32(18).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "response", response: Response.decode(reader, reader.uint32()) }; - break; - case 2: - message.kind = { $case: "error", error: ResponseError.decode(reader, reader.uint32()) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryResponse { - return { - kind: isSet(object.response) - ? { $case: "response", response: Response.fromJSON(object.response) } - : isSet(object.error) - ? { $case: "error", error: ResponseError.fromJSON(object.error) } - : undefined, - }; - }, - - toJSON(message: QueryResponse): unknown { - const obj: any = {}; - message.kind?.$case === "response" && - (obj.response = message.kind?.response ? Response.toJSON(message.kind?.response) : undefined); - message.kind?.$case === "error" && - (obj.error = message.kind?.error ? ResponseError.toJSON(message.kind?.error) : undefined); - return obj; - }, - - create, I>>(base?: I): QueryResponse { - return QueryResponse.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): QueryResponse { - const message = createBaseQueryResponse(); - if (object.kind?.$case === "response" && object.kind?.response !== undefined && object.kind?.response !== null) { - message.kind = { $case: "response", response: Response.fromPartial(object.kind.response) }; - } - if (object.kind?.$case === "error" && object.kind?.error !== undefined && object.kind?.error !== null) { - message.kind = { $case: "error", error: ResponseError.fromPartial(object.kind.error) }; - } - return message; - }, -}; - -export type PartiQLQueryService = typeof PartiQLQueryService; -export const PartiQLQueryService = { - query: { - path: "/topcoder.dal.partiql.PartiQLQuery/Query", - requestStream: false, - responseStream: false, - requestSerialize: (value: QueryRequest) => Buffer.from(QueryRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => QueryRequest.decode(value), - responseSerialize: (value: QueryResponse) => Buffer.from(QueryResponse.encode(value).finish()), - responseDeserialize: (value: Buffer) => QueryResponse.decode(value), - }, -} as const; - -export interface PartiQLQueryServer extends UntypedServiceImplementation { - query: handleUnaryCall; -} - -export interface PartiQLQueryClient extends Client { - query( - request: QueryRequest, - callback: (error: ServiceError | null, response: QueryResponse) => void, - ): ClientUnaryCall; - query( - request: QueryRequest, - metadata: Metadata, - callback: (error: ServiceError | null, response: QueryResponse) => void, - ): ClientUnaryCall; - query( - request: QueryRequest, - metadata: Metadata, - options: Partial, - callback: (error: ServiceError | null, response: QueryResponse) => void, - ): ClientUnaryCall; -} - -export const PartiQLQueryClient = makeGenericClientConstructor( - PartiQLQueryService, - "topcoder.dal.partiql.PartiQLQuery", -) as unknown as { - new (address: string, credentials: ChannelCredentials, options?: Partial): PartiQLQueryClient; - service: typeof PartiQLQueryService; -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/dal/models/nosql/tsconfig.json b/src/dal/models/nosql/tsconfig.json deleted file mode 100644 index 6e9daf6..0000000 --- a/src/dal/models/nosql/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../../../tsconfig.json", - "compilerOptions": { - "composite": true, - "outDir": "../../../../dist/dal/models/nosql", - "noImplicitReturns": false, - "forceConsistentCasingInFileNames": true - }, - "include": ["**/*"], - "exclude": ["node_modules"] -} diff --git a/src/domain/Attachment.ts b/src/domain/Attachment.ts deleted file mode 100644 index 5723e6f..0000000 --- a/src/domain/Attachment.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { CreateAttachmentInput } from "../models/domain-layer/challenge/attachment"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { Attachment } from "../models/domain-layer/challenge/attachment"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -import { AttachmentSchema } from "../schema/AttachmentSchema"; - -class AttachmentDomain extends CoreOperations< - Attachment, - CreateAttachmentInput -> { - protected toEntity(item: { [key: string]: Value }): Attachment { - return Attachment.fromJSON(item); - } - - public create(createInput: CreateAttachmentInput): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new AttachmentDomain( - AttachmentSchema.tableName, - AttachmentSchema.attributes, - AttachmentSchema.indices -); diff --git a/src/domain/Challenge.ts b/src/domain/Challenge.ts deleted file mode 100644 index 3ed4621..0000000 --- a/src/domain/Challenge.ts +++ /dev/null @@ -1,1442 +0,0 @@ -const { - V5_TERMS_API_URL, - V5_RESOURCES_API_URL, - COPILOT_ROLE_ID, - COPILOT_PAYMENT_TYPE, - V5_GROUPS_API_URL, - V5_TERMS_NDA_ID, - LEGACY_TERMS_NDA_ID, - LEGACY_TERMS_STANDARD_ID, - LEGACY_SUBMITTER_ROLE_ID, - V5_TERMS_STANDARD_ID, -} = process.env; -import moment from "moment"; -import xss from "xss"; -import CoreOperations from "../common/CoreOperations"; -import { Value } from "../dal/models/nosql/parti_ql"; -import IdGenerator from "../helpers/IdGenerator"; -import { - DomainHelper, - Value as ProtobufValue, -} from "@topcoder-framework/lib-common"; -import { - Challenge, - ChallengeList, - Challenge_Legacy, - Challenge_Overview, - Challenge_Phase, - Challenge_PrizeSet, - CreateChallengeInput, - UpdateChallengeInputForACL_UpdateInputForACL, - UpdateChallengeInputForACL_WinnerACL, - UpdateChallengeInput_UpdateInput, -} from "../models/domain-layer/challenge/challenge"; -import { ChallengeSchema } from "../schema/Challenge"; - -import { - ChallengeDomain as LegacyChallengeDomain, - GroupContestEligibilityDomain as LegacyGroupContestEligibilityDomain, - PaymentDomain as LegacyPaymentDomain, - PhaseDomain as LegacyPhaseDomain, - PrizeDomain as LegacyPrizeDomain, - ProjectInfoDomain as LegacyProjectInfoDomain, - ResourceDomain as LegacyResourceDomain, - ReviewDomain as LegacyReviewDomain, - TermDomain as LegacyTermDomain, - CreateChallengeInput as LegacyCreateChallengeInput, -} from "@topcoder-framework/domain-acl"; -import _ from "lodash"; -import * as v5Api from "../api/v5Api"; -import { - PaymentTypeIds, - PrizeSetTypes, - PrizeTypeIds, - ProjectInfoIds, - ProjectPaymentTypeIds, - ResourceRoleTypes, - ES_INDEX, - ES_REFRESH, - ChallengeStatuses, -} from "../common/Constants"; -import m2m from "../helpers/MachineToMachineToken"; -import ElasticSearch from "../helpers/ElasticSearch"; -import { ScanCriteria } from "../models/common/common"; -import constants from "../util/constants"; -import legacyMapper from "../util/LegacyMapper"; -import { CreateResult, Operator } from "@topcoder-framework/lib-common"; -import { StatusBuilder } from "@grpc/grpc-js"; -import { Status } from "@grpc/grpc-js/build/src/constants"; -import ChallengeScheduler from "../util/ChallengeScheduler"; - -if (!process.env.GRPC_ACL_SERVER_HOST || !process.env.GRPC_ACL_SERVER_PORT) { - throw new Error( - "Missing required configurations GRPC_ACL_SERVER_HOST and GRPC_ACL_SERVER_PORT" - ); -} - -const legacyPrizeDomain = new LegacyPrizeDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyChallengeDomain = new LegacyChallengeDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyProjectInfoDomain = new LegacyProjectInfoDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyPaymentDomain = new LegacyPaymentDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyResourceDomain = new LegacyResourceDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyReviewDomain = new LegacyReviewDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyPhaseDomain = new LegacyPhaseDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -const legacyGroupContestEligibilityDomain = - new LegacyGroupContestEligibilityDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT - ); -const legacyTermDomain = new LegacyTermDomain( - process.env.GRPC_ACL_SERVER_HOST, - process.env.GRPC_ACL_SERVER_PORT -); -interface GetGroupsResult { - groupsToBeAdded: any[]; - groupsToBeDeleted: any[]; -} - -class ChallengeDomain extends CoreOperations { - private esClient = ElasticSearch.getESClient(); - - protected toEntity(item: { [key: string]: Value }): Challenge { - for (const key of [ - "phases", - "terms", - "tags", - "metadata", - "events", - "prizeSets", - ]) { - try { - if (key === "metadata") { - if (item["metadata"].kind?.$case === "listValue") { - item["metadata"] = { - kind: { - $case: "listValue", - listValue: item["metadata"].kind.listValue.map((v) => { - try { - return JSON.stringify(JSON.parse(v.toString())); - } catch (e) { - return v; - } - }), - }, - }; - } - } - - item[key] = JSON.parse(item[key].toString()); - } catch (e) { - // do nothing - } - } - return Challenge.fromJSON(item); - } - - public async create(input: CreateChallengeInput): Promise { - input.name = xss(input.name); - - if (Array.isArray(input.discussions)) { - for (const discussion of input.discussions) { - discussion.id = IdGenerator.generateUUID(); - discussion.name = xss(discussion.name.substring(0, 100)); - } - } - - let placementPrizes = 0; - if (input.prizeSets) { - for (const { type, prizes } of input.prizeSets) { - if (type === "placement") { - for (const { value } of prizes) { - placementPrizes += value; - } - } - } - } - - const now = new Date().getTime(); - - // Begin Anti-Corruption Layer - - const { track, subTrack, isTask, technologies } = - legacyMapper.mapTrackAndType(input.trackId, input.typeId, input.tags); - - input.legacy = { - ...input.legacy, - track, - subTrack, - pureV5Task: isTask, - forumId: 0, - directProjectId: input.legacy!.directProjectId, - reviewType: input.legacy!.reviewType, - confidentialityType: input.legacy!.confidentialityType, - }; - - let legacyChallengeId: number | null = null; - if (input.status === "Draft") { - try { - // prettier-ignore - const legacyChallengeCreateInput = LegacyCreateChallengeInput.fromPartial(legacyMapper.mapChallengeDraftUpdateInput(input)); - // prettier-ignore - const legacyChallengeCreateResponse = await legacyChallengeDomain.create(legacyChallengeCreateInput); - if (legacyChallengeCreateResponse.kind?.$case === "integerId") { - legacyChallengeId = legacyChallengeCreateResponse.kind.integerId; - } - } catch (err) { - console.log("err", err); - throw new StatusBuilder() - .withCode(Status.INTERNAL) - .withDetails("Failed to create legacy challenge") - .build(); - } - } - - // End Anti-Corruption Layer - - const challenge: Challenge = { - id: IdGenerator.generateUUID(), - created: now, - createdBy: "tcwebservice", // TODO: extract from JWT - updated: now, - updatedBy: "tcwebservice", // TODO: extract from JWT - winners: [], - overview: { - totalPrizes: placementPrizes, - }, - ...input, - legacyId: legacyChallengeId != null ? legacyChallengeId : undefined, - description: xss(input.description ?? ""), - privateDescription: xss(input.privateDescription ?? ""), - metadata: - input.metadata.map((m) => { - let parsedValue = m.value; - try { - parsedValue = JSON.parse(m.value); - } catch (e) { - // ignore error and use unparsed value - } - return { - name: m.name, - value: parsedValue, - }; - }) ?? [], - }; - - return super.create(challenge); - } - - async syncChallengePhases( - legacyId: number, - v5Phases: any[], - isSelfService: boolean, - numOfReviewers: number, - isBeingActivated: boolean - ) { - const { phaseTypes } = await legacyPhaseDomain.getPhaseTypes({}); - const { projectPhases: phasesFromIFx } = - await legacyPhaseDomain.getProjectPhases({ projectId: legacyId }); - console.log(`Phases from v5: ${JSON.stringify(v5Phases)}`); - console.log(`Phases from IFX: ${JSON.stringify(phasesFromIFx)}`); - let phaseGroups: any = {}; - _.forEach(phasesFromIFx, (p) => { - if (!phaseGroups[p.phaseTypeId]) { - phaseGroups[p.phaseTypeId] = []; - } - phaseGroups[p.phaseTypeId].push(p); - }); - _.forEach(_.cloneDeep(phaseGroups), (pg, pt) => { - phaseGroups[pt] = _.sortBy(pg, "scheduledStartTime"); - }); - - for (const key of _.keys(phaseGroups)) { - let phaseOrder = 0; - let v5Equivalents = undefined; - for (const phase of phaseGroups[key]) { - const phaseName = _.get( - _.find(phaseTypes, (pt) => pt.phaseTypeId === phase.phaseTypeId), - "name" - ); - if (_.isUndefined(v5Equivalents)) { - v5Equivalents = _.sortBy( - _.filter(v5Phases, (p) => p.name === phaseName), - "scheduledStartDate" - ); - } - if (v5Equivalents.length > 0) { - if (v5Equivalents.length === phaseGroups[key].length) { - const v5Equivalent = v5Equivalents[phaseOrder]; - console.log( - `Will update phase ${phaseName}/${v5Equivalent.name} from ${ - phase.duration - } to duration ${v5Equivalent.duration * 1000} milli` - ); - let newStatus = _.toInteger(phase.phaseStatusId); - if ( - v5Equivalent.isOpen && - _.toInteger(phase.phaseStatusId) === - constants.PhaseStatusTypes.Closed - ) { - newStatus = constants.PhaseStatusTypes.Scheduled; - } - - if ( - isBeingActivated && - ["Registration", "Submission"].indexOf(v5Equivalent.name) != -1 - ) { - const scheduledStartDate = v5Equivalent.scheduledStartDate; - const now = new Date().getTime(); - if ( - scheduledStartDate != null && - new Date(scheduledStartDate).getTime() < now - ) { - newStatus = constants.PhaseStatusTypes.Open; - } - - console.log( - `Challenge phase ${v5Equivalent.name} status is being set to: ${newStatus} on challenge activation.` - ); - } - console.log({ - projectPhaseId: phase.projectPhaseId, - phaseStatusId: newStatus, - fixedStartTime: moment(phase.fixedStartTime).format( - "yyyy-MM-DD HH:mm:ss" - ) - ? moment(v5Equivalent.scheduledStartDate).format( - "yyyy-MM-DD HH:mm:ss" - ) - : undefined, - scheduledStartTime: moment( - v5Equivalent.scheduledStartDate - ).format("yyyy-MM-DD HH:mm:ss"), - scheduledEndTime: moment(v5Equivalent.scheduledEndDate).format( - "yyyy-MM-DD HH:mm:ss" - ), - duration: v5Equivalent.duration * 1000, - ...(isBeingActivated && - newStatus == constants.PhaseStatusTypes.Open - ? { actualStartTime: moment().format("yyyy-MM-DD HH:mm:ss") } - : {}), - }); - - await legacyPhaseDomain.updateProjectPhase({ - projectPhaseId: phase.projectPhaseId, - phaseStatusId: newStatus, - fixedStartTime: moment(phase.fixedStartTime).format( - "yyyy-MM-DD HH:mm:ss" - ) - ? moment(v5Equivalent.scheduledStartDate).format( - "yyyy-MM-DD HH:mm:ss" - ) - : undefined, - scheduledStartTime: moment( - v5Equivalent.scheduledStartDate - ).format("yyyy-MM-DD HH:mm:ss"), - scheduledEndTime: moment(v5Equivalent.scheduledEndDate).format( - "yyyy-MM-DD HH:mm:ss" - ), - duration: v5Equivalent.duration * 1000, - ...(isBeingActivated && - newStatus == constants.PhaseStatusTypes.Open - ? { actualStartTime: moment().format("yyyy-MM-DD HH:mm:ss") } - : {}), - }); - } else { - console.log(`number of ${phaseName} does not match`); - } - } else { - console.log(`No v5 Equivalent Found for ${phaseName}`); - } - if (isSelfService && phaseName === "Review") { - // make sure to set the required reviewers to 2 - const { phaseCriteriaList } = - await legacyPhaseDomain.getPhaseCriteria({ - projectPhaseId: phase.projectPhaseId, - phaseCriteriaTypeId: 6, // TODO: fix magic number here - }); - if (phaseCriteriaList && phaseCriteriaList.length > 0) { - // delete existing criteria - await legacyPhaseDomain.deletePhaseCriteria({ - projectPhaseId: phase.projectPhaseId, - phaseCriteriaTypeId: 6, - }); - } - // create - await legacyPhaseDomain.createPhaseCriteria({ - projectPhaseId: phase.projectPhaseId, - phaseCriteriaTypeId: 6, - parameter: _.toString(numOfReviewers), - }); - } - phaseOrder = phaseOrder + 1; - } - } - // TODO: What about iterative reviews? There can be many for the same challenge. - // TODO: handle timeline template updates - } - - async addPhaseConstraints(legacyId: number, v5Phases: any[]) { - console.log( - `addPhaseConstraints :: start: ${legacyId}, ${JSON.stringify(v5Phases)}` - ); - - const { phaseTypes } = await legacyPhaseDomain.getPhaseTypes({}); // TODO: Update framework to not require any params - console.log( - `addPhaseConstraints :: phaseTypes: ${JSON.stringify(phaseTypes)}` - ); - - const { projectPhases: phasesFromIFx } = - await legacyPhaseDomain.getProjectPhases({ - projectId: legacyId, - }); - - for (const phase of v5Phases) { - console.log( - `addPhaseConstraints :: phase: ${legacyId} -> ${JSON.stringify(phase)}` - ); - if (phase.constraints == null || phase.constraints.length === 0) continue; - - const phaseLegacyId = _.get( - _.find(phaseTypes, (pt) => pt.name === phase.name), - "phaseTypeId" - ); - const existingLegacyPhase = _.find( - phasesFromIFx, - (p) => p.phaseTypeId === phaseLegacyId - ); - - const projectPhaseId = _.get(existingLegacyPhase, "projectPhaseId"); - if (!projectPhaseId) { - console.log(`Could not find phase ${phase.name} on legacy!`); - continue; - } - - let constraintName: any = null; - let constraintValue = null; - let phaseCriteriaTypeId = null; - - if (phase.name === "Submission") { - const numSubmissionsConstraint = phase.constraints.find( - (c: any) => c.name === "Number of Submissions" - ); - if (numSubmissionsConstraint) { - constraintName = "Submission Number"; - constraintValue = numSubmissionsConstraint.value; - phaseCriteriaTypeId = 3; - } - } - - if (phase.name === "Registration") { - const numRegistrantsConstraint = phase.constraints.find( - (c: any) => c.name === "Number of Registrants" - ); - if (numRegistrantsConstraint) { - constraintName = "Registration Number"; - constraintValue = numRegistrantsConstraint.value; - phaseCriteriaTypeId = 2; - } - } - - if (phase.name === "Review") { - const numReviewersConstraint = phase.constraints.find( - (c: any) => c.name === "Number of Reviewers" - ); - if (numReviewersConstraint) { - constraintName = "Reviewer Number"; - constraintValue = numReviewersConstraint.value; - phaseCriteriaTypeId = 6; - } - } - - // We have an interesting situation if a submission phase constraint was added but - // no registgration phase constraint was added. This ends up opening Post-Mortem - // phase if registration closes with 0 submissions. - // For now I'll leave it as is and handle this better in the new Autopilot implementation - // A quick solution would have been adding a registration constraint with value 1 if none is provided when there is a submission phase constraint - - if (constraintName && constraintValue) { - constraintValue = _.toString(constraintValue); - const { phaseCriteriaList } = await legacyPhaseDomain.getPhaseCriteria({ - projectPhaseId, - }); - console.log( - `phaseCriteriaList: ${JSON.stringify( - phaseCriteriaList - )} for projectPhaseId: ${projectPhaseId}` - ); - if (phaseCriteriaList && phaseCriteriaList.length > 0) { - console.log( - `Will create phase constraint ${constraintName} with value ${constraintValue}` - ); - // Ideally we should update the existing phase criteria, but this processor will go away in weeks - // and it's a backend processor, so we can just drop and recreate without slowing down anything - await legacyPhaseDomain.deletePhaseCriteria({ - projectPhaseId, - phaseCriteriaTypeId: phaseCriteriaTypeId as number, - }); - await legacyPhaseDomain.createPhaseCriteria({ - projectPhaseId, - phaseCriteriaTypeId: phaseCriteriaTypeId as number, - parameter: constraintValue, - }); - } else { - console.log( - `Could not find phase criteria type for ${constraintName}. Will create it with value ${constraintValue}` - ); - await legacyPhaseDomain.createPhaseCriteria({ - projectPhaseId, - phaseCriteriaTypeId: phaseCriteriaTypeId as number, - parameter: constraintValue, - }); - } - } - } - console.log("addPhaseConstraints :: end"); - } - - private async updateMemberPayments(legacyId: number, v5PrizeSets: any) { - const { prizes: prizesFromIfx } = await legacyPrizeDomain.get({ - criteria: [ - { - key: "projectId", - value: legacyId, - operator: Operator.OPERATOR_EQUAL, - }, - { - key: "prizeTypeId", - value: PrizeTypeIds.Contest, - operator: Operator.OPERATOR_EQUAL, - }, - ], - }); - const { prizes: checkpointPrizes } = await legacyPrizeDomain.get({ - criteria: [ - { - key: "projectId", - value: legacyId, - operator: Operator.OPERATOR_EQUAL, - }, - { - key: "prizeTypeId", - value: PrizeTypeIds.Checkpoint, - operator: Operator.OPERATOR_EQUAL, - }, - ], - }); - - const checkpointPrizesFromIfx = checkpointPrizes - ? checkpointPrizes[0] - : null; - const v5Prizes = _.map( - _.get( - _.find(v5PrizeSets, (p) => p.type === PrizeSetTypes.ChallengePrizes), - "prizes", - [] - ), - (prize) => prize.value - ); - const v5CheckPointPrizes = _.map( - _.get( - _.find(v5PrizeSets, (p) => p.type === PrizeSetTypes.CheckPoint), - "prizes", - [] - ), - (prize) => prize.value - ); - // compare prizes - if (v5Prizes && v5Prizes.length > 0) { - v5Prizes.sort((a, b) => b - a); - for (let i = 0; i < v5Prizes.length; i += 1) { - const ifxPrize = _.find(prizesFromIfx, (p) => p.place === i + 1); - if (ifxPrize) { - if (_.toInteger(ifxPrize.prizeAmount) !== v5Prizes[i]) { - await legacyPrizeDomain.update({ - updateCriteria: { - prizeId: ifxPrize.prizeId, - place: i + 1, - projectId: legacyId, - }, - updateInput: { - prizeAmount: v5Prizes[i], - }, - }); - } - } else { - await legacyPrizeDomain.create({ - projectId: legacyId, - place: i + 1, - prizeAmount: v5Prizes[i], - prizeTypeId: PrizeTypeIds.Contest, - numberOfSubmissions: 1, - }); - } - } - if (prizesFromIfx.length > v5Prizes.length) { - const prizesToDelete = _.filter( - prizesFromIfx, - (p) => p.place > v5Prizes.length - ); - for (const prizeToDelete of prizesToDelete) { - await legacyPrizeDomain.delete({ - prizeId: prizeToDelete.prizeId, - projectId: legacyId, - }); - } - } - } - // compare checkpoint prizes - if ( - checkpointPrizesFromIfx && - v5CheckPointPrizes && - v5CheckPointPrizes.length > 0 - ) { - // we assume that all checkpoint prizes will be the same - if ( - v5CheckPointPrizes.length !== - checkpointPrizesFromIfx.numberOfSubmissions || - v5CheckPointPrizes[0] !== - _.toInteger(checkpointPrizesFromIfx.prizeAmount) - ) { - await legacyPrizeDomain.update({ - updateCriteria: { - prizeId: checkpointPrizesFromIfx.prizeId, - projectId: legacyId, - }, - updateInput: { - prizeAmount: v5CheckPointPrizes[0], - numberOfSubmissions: v5CheckPointPrizes.length, - }, - }); - } - } else if (checkpointPrizesFromIfx) { - await legacyPrizeDomain.delete({ - prizeId: checkpointPrizesFromIfx.prizeId, - projectId: legacyId, - }); - } - } - - async associateChallengeTerms(v5Terms: any[], legacyChallengeId: number) { - // console.log(`v5Terms Terms Array: ${JSON.stringify(v5Terms)}`) - const { terms: legacyTermsArray } = - await legacyTermDomain.GetProjectRoleTermsOfUseXrefs({ - projectId: legacyChallengeId, - }); - // console.log(`Legacy Terms Array: ${JSON.stringify(legacyTermsArray)}`) - const nda = _.find(v5Terms, (e: any) => e.id === V5_TERMS_NDA_ID); - const legacyNDA: any = _.find( - legacyTermsArray, - (e: any) => _.toNumber(e.termsOfUseId) === _.toNumber(LEGACY_TERMS_NDA_ID) - ); - - const standardTerms = _.find(v5Terms, (e) => e.id === V5_TERMS_STANDARD_ID); - const legacyStandardTerms: any = _.find( - legacyTermsArray, - (e: any) => - _.toNumber(e.termsOfUseId) === _.toNumber(LEGACY_TERMS_STANDARD_ID) - ); - - // console.log(`NDA: ${config.V5_TERMS_NDA_ID} - ${JSON.stringify(nda)}`) - // console.log(`Standard Terms: ${config.V5_TERMS_STANDARD_ID} - ${JSON.stringify(standardTerms)}`) - // console.log(`Legacy NDA: ${JSON.stringify(legacyNDA)}`) - // console.log(`Legacy Standard Terms: ${JSON.stringify(legacyStandardTerms)}`) - - const m2mToken = await m2m.getM2MToken(); - if (standardTerms && standardTerms.id && !legacyStandardTerms) { - console.log( - "Associate Challenge Terms - v5 Standard Terms exist, not in legacy. Adding to Legacy." - ); - const v5StandardTerm = await v5Api.getRequest( - `${V5_TERMS_API_URL}/${standardTerms.id}`, - m2mToken - ); - await legacyTermDomain.createProjectRoleTermsOfUseXref({ - projectId: legacyChallengeId, - resourceRoleId: _.toInteger(LEGACY_SUBMITTER_ROLE_ID), - termsOfUseId: v5StandardTerm.legacyId, - }); - } else if ( - !standardTerms && - legacyStandardTerms && - legacyStandardTerms.id - ) { - console.log( - "Associate Challenge Terms - Legacy NDA exist, not in V5. Removing from Legacy." - ); - await legacyTermDomain.deleteProjectRoleTermsOfUseXref({ - projectId: legacyChallengeId, - resourceRoleId: _.toInteger(LEGACY_SUBMITTER_ROLE_ID), - termsOfUseId: legacyStandardTerms.id, - }); - } - - if (nda && nda.id && !legacyNDA) { - console.log( - "Associate Challenge Terms - v5 NDA exist, not in legacy. Adding to Legacy." - ); - const v5NDATerm = await v5Api.getRequest( - `${V5_TERMS_API_URL}/${nda.id}`, - m2mToken - ); - await legacyTermDomain.createProjectRoleTermsOfUseXref({ - projectId: legacyChallengeId, - resourceRoleId: _.toInteger(LEGACY_SUBMITTER_ROLE_ID), - termsOfUseId: v5NDATerm.legacyId, - }); - } else if (!nda && legacyNDA && legacyNDA.id) { - console.log( - "Associate Challenge Terms - Legacy NDA exist, not in V5. Removing from Legacy." - ); - await legacyTermDomain.deleteProjectRoleTermsOfUseXref({ - projectId: legacyChallengeId, - resourceRoleId: _.toInteger(LEGACY_SUBMITTER_ROLE_ID), - termsOfUseId: legacyNDA.id, - }); - } - - // console.log('Associate Challenge Terms - Nothing to Do') - } - - async getGroup(v5GroupId: string) { - const token = await m2m.getM2MToken(); - return await v5Api.getRequest(`${V5_GROUPS_API_URL}/${v5GroupId}`, token); - } - - async getGroups(v5Groups: any[], legacyId: number): Promise { - const { contestEligibilities } = - await legacyGroupContestEligibilityDomain.getContestEligibilities({ - contestId: legacyId, - }); - const v4GroupIds = []; - for (const ce of contestEligibilities) { - const { groupContestEligibilities } = - await legacyGroupContestEligibilityDomain.getGroupContestEligibilities({ - contestEligibilityId: ce.contestEligibilityId, - }); - for (const gce of groupContestEligibilities) { - v4GroupIds.push(gce.groupId); - } - } - // get groupContestEligibilities -> groupId - let groupsToBeAdded: any[] = []; - let groupsToBeDeleted: any[] = []; - if (v5Groups && v5Groups.length > 0) { - const oldGroups = _.map(v4GroupIds, (g) => _.toString(g)); - const newGroups = []; - - for (const group of v5Groups) { - try { - const groupInfo = await this.getGroup(group); - if (!_.isEmpty(_.get(groupInfo, "oldId"))) { - newGroups.push(_.toString(_.get(groupInfo, "oldId"))); - } - } catch (e) { - console.log(`Failed to load details for group ${group}`); - } - } - groupsToBeAdded = _.difference(newGroups, oldGroups); - groupsToBeDeleted = _.difference(oldGroups, newGroups); - if (groupsToBeAdded.length > 0) { - console.log( - `parsePayload :: Adding Groups ${JSON.stringify(groupsToBeAdded)}` - ); - } - if (groupsToBeDeleted.length > 0) { - console.log( - `parsePayload :: Deleting Groups ${JSON.stringify(groupsToBeDeleted)}` - ); - } - } else if (v4GroupIds && v4GroupIds.length > 0) { - groupsToBeDeleted = _.map(v4GroupIds, (g) => _.toString(g)); - } - return { - groupsToBeAdded, - groupsToBeDeleted, - }; - } - - async associateChallengeGroups( - v5groups: any[], - legacyId: number, - isStudio: number - ) { - const { groupsToBeAdded, groupsToBeDeleted } = await this.getGroups( - v5groups, - legacyId - ); - console.log( - `Groups to add to challenge: ${legacyId}: ${JSON.stringify( - groupsToBeAdded - )}` - ); - for (const group of groupsToBeAdded) { - // await groupService.addGroupToChallenge(legacyId, group) - const createdContestEligibility: CreateResult = - await legacyGroupContestEligibilityDomain.createContestEligibility({ - contestEligibilityId: group, - contestId: legacyId, - isStudio, - }); - const ceId = createdContestEligibility.kind - ? _.get( - createdContestEligibility.kind, - createdContestEligibility.kind?.$case, - undefined - ) - : undefined; - if (!ceId) throw new Error("cannot create contest eligibility"); - await legacyGroupContestEligibilityDomain.createGroupContestEligibility({ - contestEligibilityId: ceId, - groupId: group, - }); - } - console.log( - `Groups to remove from challenge: ${legacyId}: ${JSON.stringify( - groupsToBeDeleted - )}` - ); - for (const group of groupsToBeDeleted) { - // await groupService.removeGroupFromChallenge(legacyId, group) - const { contestEligibilities } = - await legacyGroupContestEligibilityDomain.getContestEligibilities({ - contestId: legacyId, - }); - const contestEligibilityToRemove = _.find( - contestEligibilities, - (ce) => ce.contestEligibilityId === group - ); - if (contestEligibilityToRemove) { - await legacyGroupContestEligibilityDomain.deleteContestEligibility({ - contestEligibilityId: contestEligibilityToRemove.contestEligibilityId, - }); - await legacyGroupContestEligibilityDomain.deleteGroupContestEligibility( - { - contestEligibilityId: - contestEligibilityToRemove.contestEligibilityId, - groupId: group, - } - ); - } - } - } - - async setCopilotPayment( - challengeId: string, - legacyChallengeId: number, - prizeSets: any = [] - ) { - try { - const token = await m2m.getM2MToken(); - const amount = _.get( - _.find(prizeSets, (p) => p.type === COPILOT_PAYMENT_TYPE), - "prizes[0].value", - 0 - ); - console.log("Fetching challenge copilot..."); - const [copilotResource] = await v5Api.getRequest( - `${V5_RESOURCES_API_URL}?challengeId=${challengeId}&roleId=${COPILOT_ROLE_ID}`, - token - ); - if (!copilotResource) { - console.log( - `Copilot does not exist for challenge ${challengeId} (legacy: ${legacyChallengeId})` - ); - return; - } - console.log( - `Setting Copilot Payment: ${amount} for legacyId ${legacyChallengeId} for copilot ${copilotResource.memberId}` - ); - const { resources } = await legacyResourceDomain.getResources({ - projectId: legacyChallengeId, - resourceRoleId: ResourceRoleTypes.Copilot, - }); - if (resources && resources.length > 0) { - const { resourceInfos } = await legacyResourceDomain.getResourceInfos({ - resourceId: resources[0].resourceId, - resourceInfoTypeId: PaymentTypeIds.Copilot, - }); - if (resourceInfos && resourceInfos.length > 0) { - // update - await legacyResourceDomain.updateResourceInfos({ - resourceId: resources[0].resourceId, - resourceInfoTypeId: PaymentTypeIds.Copilot, - value: "true", - }); - } else { - // create - await legacyResourceDomain.createResourceInfos({ - resourceId: resources[0].resourceId, - resourceInfoTypeId: PaymentTypeIds.Copilot, - value: "true", - }); - } - - // Set payment - const { projectPayments } = await legacyPaymentDomain.get({ - resourceId: resources[0].resourceId, - projectPaymentTypeId: ProjectPaymentTypeIds.Copilot, - }); - const copilotProjectPayment = - projectPayments?.length > 0 ? projectPayments[0] : undefined; - - const { projectInfos } = await legacyProjectInfoDomain.getProjectInfo({ - projectId: legacyChallengeId, - projectInfoTypeId: ProjectInfoIds.CopilotPayment, - }); - const copilotPayment = - projectInfos?.length > 0 ? projectInfos[0] : undefined; - - if (amount !== null && amount >= 0) { - if (copilotPayment) { - await legacyProjectInfoDomain.update({ - projectId: legacyChallengeId, - projectInfoTypeId: ProjectInfoIds.CopilotPayment, - value: amount, - }); - } else { - console.log( - `Creating copilot payment: ${amount}... with project id: ${legacyChallengeId} and project info type id: ${ProjectInfoIds.CopilotPayment}...` - ); - try { - await legacyProjectInfoDomain.create({ - projectId: legacyChallengeId, - projectInfoTypeId: ProjectInfoIds.CopilotPayment, - value: amount, - }); - } catch (e) { - console.log("Failed to create copilot payment!"); - console.log(e); - } - } - if (copilotProjectPayment) { - await legacyPaymentDomain.update({ - resourceId: resources[0].resourceId, - projectPaymentTypeId: ProjectPaymentTypeIds.Copilot, - amount, - }); - } else { - await legacyPaymentDomain.create({ - resourceId: resources[0].resourceId, - projectPaymentTypeId: ProjectPaymentTypeIds.Copilot, - amount, - }); - } - } else { - await legacyPaymentDomain.delete({ - resourceId: resources[0].resourceId, - projectPaymentTypeId: ProjectPaymentTypeIds.Copilot, - }); - await legacyProjectInfoDomain.delete({ - projectId: legacyChallengeId, - projectInfoTypeId: ProjectInfoIds.CopilotPayment, - }); - } - } - } catch (e) { - console.log("Failed to set the copilot payment!"); - console.log(e); - } - } - - public async update( - scanCriteria: ScanCriteria[], - input: UpdateChallengeInput_UpdateInput - ): Promise { - // TODO: Use legacyChallengeDomain to backfill data in informix - const createdByUserId = 22838965; // TODO: Extract from interceptors - const updatedByUserId = 22838965; // TODO: Extract from interceptors - - if (!input?.legacyId) { - const { track, subTrack, isTask, technologies } = - legacyMapper.mapTrackAndType( - input.trackId as string, - input.typeId as string, - input.tags - ); - - input.legacy = { - ...input.legacy, - track, - subTrack, - pureV5Task: isTask, - forumId: 0, - directProjectId: input.legacy!.directProjectId, - reviewType: input.legacy!.reviewType, - confidentialityType: input.legacy!.confidentialityType, - }; - - let legacyChallengeId: number | null = null; - - try { - // prettier-ignore - const legacyChallengeCreateInput = LegacyCreateChallengeInput.fromPartial(legacyMapper.mapChallengeDraftUpdateInput(input)); - // prettier-ignore - const legacyChallengeCreateResponse = await legacyChallengeDomain.create(legacyChallengeCreateInput); - if (legacyChallengeCreateResponse.kind?.$case === "integerId") { - legacyChallengeId = legacyChallengeCreateResponse.kind.integerId; - } - } catch (err) { - console.log("err", err); - throw new StatusBuilder() - .withCode(Status.INTERNAL) - .withDetails("Failed to create legacy challenge") - .build(); - } - input.legacyId = legacyChallengeId as number; - } - - if (input?.legacyId) { - const legacyId = input.legacyId; - const legacyChallenge = await legacyChallengeDomain.getLegacyChallenge({ - legacyChallengeId: legacyId, - }); - - // Handle metadata (project_info) - let metaValue; - const { projectInfos } = await legacyProjectInfoDomain.getProjectInfo({ - projectId: legacyId, - }); - for (const metadataKey of _.keys(constants.supportedMetadata)) { - try { - metaValue = _.toString( - constants.supportedMetadata[metadataKey].method( - input, - constants.supportedMetadata[metadataKey].defaultValue - ) - ); - if (metaValue !== null && metaValue !== "") { - if ( - !_.find( - projectInfos, - (pi: any) => pi.projectInfoTypeId === _.toInteger(metadataKey) - ) - ) { - await legacyProjectInfoDomain.create({ - projectId: legacyId, - projectInfoTypeId: _.toInteger(metadataKey), - value: metaValue, - }); - } else { - await legacyProjectInfoDomain.update({ - projectId: legacyId, - projectInfoTypeId: _.toInteger(metadataKey), - value: metaValue, - }); - } - } - } catch (e) { - console.log( - `Failed to set ${constants.supportedMetadata[metadataKey].description} to ${metaValue} for challenge ${legacyId}` - ); - console.log(e); - } - } - - // updateMemberPayments - await this.updateMemberPayments(legacyId, input.prizeSets); - // associateChallengeGroups - await this.associateChallengeGroups( - input.groups, - legacyId, - _.includes( - constants.STUDIO_CATEGORY_TYPES, - legacyChallenge.projectCategoryId - ) - ? 1 - : 0 - ); - // associateChallengeTerms - await this.associateChallengeTerms(input.terms, legacyId); - // setCopilotPayment - await this.setCopilotPayment( - input.id, - legacyId, - _.get(input, "prizeSets") - ); - - // If iterative review is open - if ( - _.find( - _.get(input, "phases"), - (p) => p.isOpen && p.name === "Iterative Review" - ) - ) { - // Try to read reviews and insert them into informix DB - if (input.metadata && input.legacy?.reviewScorecardId) { - let orReviewFeedback: any = _.find( - input.metadata, - (meta) => meta.name === "or_review_feedback" - ); - let orReviewScore: any = _.find( - input.metadata, - (meta) => meta.name === "or_review_score" - ); - if ( - !_.isUndefined(orReviewFeedback) && - !_.isUndefined(orReviewScore) - ) { - orReviewFeedback = JSON.parse(_.toString(orReviewFeedback)); - const reviewResponses: any[] = []; - _.each(orReviewFeedback, (value, key) => { - if (input?.legacy?.reviewScorecardId) { - const questionId = _.get( - _.find( - _.get( - constants.scorecardQuestionMapping, - input.legacy.reviewScorecardId - ), - (item) => - _.toString(item.questionId) === _.toString(key) || - _.toLower(item.description) === _.toLower(key) - ), - "questionId" - ); - reviewResponses.push({ - questionId, - answer: value, - }); - } - }); - orReviewScore = _.toNumber(orReviewFeedback); - const { resources } = await legacyResourceDomain.getResources({ - projectId: input.legacyId, - resourceRoleId: ResourceRoleTypes.IterativeReviewer, - }); - if (resources.length === 0) - throw new Error("Cannot find iterative reviewer"); - const iterativeReviewer = resources[0]; - const submission = await legacyReviewDomain.getSubmission({ - projectId: input.legacyId, - resourceId: iterativeReviewer.resourceId, - }); - if (!submission) throw new Error("Cannot find submission"); - const { projectPhases } = await legacyPhaseDomain.getProjectPhases({ - projectId: input.legacyId, - phaseTypeId: 18, - }); - if (projectPhases.length === 0) - throw new Error("Cannot find project phase"); - const projectPhase = projectPhases[0]; - const review = await legacyReviewDomain.createReview({ - resourceId: iterativeReviewer.resourceId, - submissionId: submission.submissionId, - projectPhaseId: projectPhase.projectPhaseId, - scorecardId: input.legacy.reviewScorecardId, - committed: 1, - score: orReviewScore, - initialScore: orReviewScore, - }); - const reviewId = review.kind - ? _.get(review.kind, review.kind?.$case, undefined) - : undefined; - if (!reviewId) throw new Error("Cannot create review"); - for (let i = 0; i < reviewResponses.length; i += 1) { - await legacyReviewDomain.createReviewItem({ - reviewId, - scorecardQuestionId: reviewResponses[i].questionId, - uploadId: submission.uploadId, - answer: reviewResponses[i], - sort: i, - }); - } - } - } - } - - let isBeingActivated = false; - - if (input.status && legacyChallenge) { - if ( - input.status === constants.challengeStatuses.Active && - legacyChallenge.projectStatusId !== - constants.legacyChallengeStatusesMap.Active - ) { - isBeingActivated = true; - console.log("Activating challenge..."); - await legacyChallengeDomain.activate({ - legacyChallengeId: legacyId, - }); - console.log(`Activated! `); - // make sure autopilot is on - if (!_.find(projectInfos, (pi) => pi.projectInfoTypeId === 9)) { - try { - await legacyProjectInfoDomain.create({ - projectId: legacyId, - projectInfoTypeId: 9, - value: "On", - }); - } catch (e) { - console.log("Failed to set autopilot to On"); - console.log(e); - } - } else { - await legacyProjectInfoDomain.update({ - projectId: legacyId, - projectInfoTypeId: 9, - value: "On", - }); - } - } - if ( - input.status === constants.challengeStatuses.Completed && - legacyChallenge.projectStatusId !== - constants.legacyChallengeStatusesMap.Completed - ) { - if (input.task?.isTask) { - console.log("Challenge is a TASK"); - if (!input.winners || input.winners.length === 0) { - throw new Error("Cannot close challenge without winners"); - } - const winnerId = _.find( - input.winners, - (winner) => winner.placement === 1 - )?.userId; - console.log( - `Will close the challenge with ID ${legacyId}. Winner ${winnerId}!` - ); - if (!winnerId) throw new Error("Cannot find winner"); - await legacyChallengeDomain.closeChallenge({ - projectId: legacyId, - winnerId, - }); - } else { - console.log( - "Challenge type is not a task.. Skip closing challenge..." - ); - } - } - - if (!_.get(input, "task.isTask")) { - const numOfReviewers = 2; - await this.syncChallengePhases( - legacyId, - input.phases, - _.get(input, "legacy.selfService", false), - numOfReviewers, - isBeingActivated - ); - await this.addPhaseConstraints(legacyId, input.phases); - } else { - console.log("Will skip syncing phases as the challenge is a task..."); - } - if ( - input.status === constants.challengeStatuses.CancelledClientRequest && - legacyChallenge.projectStatusId !== - constants.legacyChallengeStatusesMap.CancelledClientRequest - ) { - console.log("Cancelling challenge..."); - await legacyChallengeDomain.update({ - projectId: legacyId, - projectStatusId: - constants.legacyChallengeStatusesMap.CancelledClientRequest, - }); - } - } - } - - // toEntity parses the below properties thus we should now stringify them again - // for (const key of ["phases", - // "terms", - // "tags", - // "metadata", - // "events", - // "prizeSets"]) { - // _.set(input, key, JSON.stringify(_.get(input, key))) - // } - // console.log('------ before save --------'); - - // console.log(input); - console.log(_.omit(input, ["id"])); - - const challengeList = await super.update(scanCriteria, { - ..._.omit(input, ["id"]), - ...(input.prizeSets - ? { prizeSets: input.prizeSets.map((ps) => JSON.stringify(ps)) } - : {}), - }); - - console.log("------ after save --------"); - - // if (input.phases && input.phases.length) { - // await ChallengeScheduler.schedule({ - // action: "schedule", - // challengeId: input.id, - // phases: input.phases.map((phase) => ({ - // name: phase.name, - // scheduledStartDate: phase.scheduledStartDate, - // scheduledEndDate: phase.scheduledEndDate, - // })), - // }); - // } - - return challengeList; - } - - public async updateForAcl( - scanCriteria: ScanCriteria[], - input: UpdateChallengeInputForACL_UpdateInputForACL - ): Promise { - console.log("updateforacl", JSON.stringify(input.phases)); - console.log("scan-criteria", scanCriteria); - const updatedBy = "tcwebservice"; // TODO: Extract from interceptors - let challenge: Challenge | undefined = undefined; - const id = scanCriteria[0].value; - const data: IUpdateDataFromACL = {}; - if (!_.isUndefined(input.status)) { - data.status = input.status; - } - if (!_.isUndefined(input.phases)) { - console.log("setting phases"); - data.phases = input.phases.phases; - console.log("done setting phases"); - data.currentPhase = input.currentPhase; - data.registrationEndDate = input.registrationStartDate; - data.registrationEndDate = input.registrationEndDate; - data.submissionStartDate = input.submissionStartDate; - data.submissionEndDate = input.submissionEndDate; - data.startDate = input.startDate; - data.endDate = input.endDate; - } - console.log("current-phase"); - if (!_.isUndefined(input.currentPhaseNames)) { - data.currentPhaseNames = input.currentPhaseNames.currentPhaseNames; - } - console.log("done-phase"); - if (!_.isUndefined(input.legacy)) { - if (_.isUndefined(challenge)) { - console.log("lookup challenge"); - try { - challenge = await this.lookup( - DomainHelper.getLookupCriteria("id", id) - ); - } catch (err) { - console.error(err); - throw err; - } - console.log("done lookoing up challenge"); - } - data.legacy = _.assign({}, challenge.legacy, input.legacy); - } - console.log("done-legacy"); - if (!_.isUndefined(input.prizeSets)) { - if (_.isUndefined(challenge)) { - challenge = await this.lookup(DomainHelper.getLookupCriteria("id", id)); - } - const prizeSets = _.filter( - [ - ..._.intersectionBy( - input.prizeSets.prizeSets, - challenge.prizeSets, - "type" - ), - ..._.differenceBy( - challenge.prizeSets, - input.prizeSets.prizeSets, - "type" - ), - ], - (entry) => entry.type !== "copilot" - ); - const copilotPayments = _.filter( - input.prizeSets.prizeSets, - (entry) => entry.type === "copilot" - ); - if (!_.isEmpty(copilotPayments)) { - prizeSets.push(...copilotPayments); - } - data.prizeSets = prizeSets; - } - console.log("done with prizesets"); - if (!_.isUndefined(input.overview)) { - data.overview = input.overview; - } - console.log("done with overview"); - if (!_.isUndefined(input.winners)) { - data.winners = input.winners.winners; - } - console.log("done with winners"); - - data.updated = new Date(); - data.updatedBy = updatedBy; - - console.log("Updating...", JSON.stringify(data, null, 2)); - await super.update( - scanCriteria, - _.omit(data, [ - "currentPhase", - "currentPhaseNames", - "registrationStartDate", - "registrationEndDate", - "submissionStartDate", - "submissionEndDate", - ]) - ); - - // if (input.phases?.phases && input.phases.phases.length) { - // await ChallengeScheduler.schedule({ - // action: "schedule", - // challengeId: id, - // phases: input.phases.phases.map((phase) => ({ - // name: phase.name, - // scheduledStartDate: phase.scheduledStartDate, - // scheduledEndDate: phase.scheduledEndDate, - // })), - // }); - // } - - await this.esClient.update({ - index: ES_INDEX, - refresh: ES_REFRESH, - id, - body: { - doc: data, - }, - }); - } -} - -interface IUpdateDataFromACL { - status?: string | undefined; - phases?: Challenge_Phase[] | undefined; - currentPhase?: Challenge_Phase | undefined; - currentPhaseNames?: string[] | undefined; - registrationStartDate?: string | undefined; - registrationEndDate?: string | undefined; - submissionStartDate?: string | undefined; - submissionEndDate?: string | undefined; - startDate?: string | undefined; - endDate?: string | undefined; - legacy?: Challenge_Legacy | undefined; - prizeSets?: Challenge_PrizeSet[] | undefined; - overview?: Challenge_Overview | undefined; - winners?: UpdateChallengeInputForACL_WinnerACL[] | undefined; - updated?: Date; - updatedBy?: string; -} - -export default new ChallengeDomain( - ChallengeSchema.tableName, - ChallengeSchema.attributes, - ChallengeSchema.indices -); diff --git a/src/domain/ChallengeTimelineTemplate.ts b/src/domain/ChallengeTimelineTemplate.ts deleted file mode 100644 index 9251548..0000000 --- a/src/domain/ChallengeTimelineTemplate.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CreateChallengeTimelineTemplateInput } from "./../models/domain-layer/challenge/challenge_timeline_template"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { ChallengeTimelineTemplateSchema } from "../schema/ChallengeTimelineTemplate"; -import { ChallengeTimelineTemplate } from "../models/domain-layer/challenge/challenge_timeline_template"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -class ChallengeTimelineTemplateDomain extends CoreOperations< - ChallengeTimelineTemplate, - CreateChallengeTimelineTemplateInput -> { - protected toEntity(item: { - [key: string]: Value; - }): ChallengeTimelineTemplate { - return ChallengeTimelineTemplate.fromJSON(item); - } - - public create( - createInput: CreateChallengeTimelineTemplateInput - ): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new ChallengeTimelineTemplateDomain( - ChallengeTimelineTemplateSchema.tableName, - ChallengeTimelineTemplateSchema.attributes, - ChallengeTimelineTemplateSchema.indices -); diff --git a/src/domain/ChallengeTrack.ts b/src/domain/ChallengeTrack.ts deleted file mode 100644 index 55818c8..0000000 --- a/src/domain/ChallengeTrack.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { CreateChallengeTrackInput } from "./../models/domain-layer/challenge/challenge_track"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { ChallengeTrack } from "../models/domain-layer/challenge/challenge_track"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -import { ChallengeTrackSchema } from "../schema/ChallengeTrackSchema"; - -class ChallengeTrackDomain extends CoreOperations< - ChallengeTrack, - CreateChallengeTrackInput -> { - protected toEntity(item: { [key: string]: Value }): ChallengeTrack { - return ChallengeTrack.fromJSON(item); - } - - public create( - createInput: CreateChallengeTrackInput - ): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new ChallengeTrackDomain( - ChallengeTrackSchema.tableName, - ChallengeTrackSchema.attributes, - ChallengeTrackSchema.indices -); diff --git a/src/domain/ChallengeType.ts b/src/domain/ChallengeType.ts deleted file mode 100644 index 4c47d54..0000000 --- a/src/domain/ChallengeType.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { CreateChallengeTypeInput } from "../models/domain-layer/challenge/challenge_type"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { ChallengeType } from "../models/domain-layer/challenge/challenge_type"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -import { ChallengeTypeSchema } from "../schema/ChallengeTypeSchema"; - -class ChallengeTypeDomain extends CoreOperations< - ChallengeType, - CreateChallengeTypeInput -> { - protected toEntity(item: { [key: string]: Value }): ChallengeType { - return ChallengeType.fromJSON(item); - } - - public create(createInput: CreateChallengeTypeInput): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new ChallengeTypeDomain( - ChallengeTypeSchema.tableName, - ChallengeTypeSchema.attributes, - ChallengeTypeSchema.indices -); diff --git a/src/domain/Phase.ts b/src/domain/Phase.ts deleted file mode 100644 index 091373d..0000000 --- a/src/domain/Phase.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { CreatePhaseInput } from "../models/domain-layer/challenge/phase"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { Phase } from "../models/domain-layer/challenge/phase"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -import { PhaseSchema } from "../schema/PhaseSchema"; - -class PhaseDomain extends CoreOperations { - protected toEntity(item: { [key: string]: Value }): Phase { - return Phase.fromJSON(item); - } - - public create(createInput: CreatePhaseInput): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new PhaseDomain( - PhaseSchema.tableName, - PhaseSchema.attributes, - PhaseSchema.indices -); diff --git a/src/domain/TimelineTemplate.ts b/src/domain/TimelineTemplate.ts deleted file mode 100644 index 8219639..0000000 --- a/src/domain/TimelineTemplate.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { CreateTimelineTemplateInput } from "../models/domain-layer/challenge/timeline_template"; -import { Value } from "../dal/models/nosql/parti_ql"; - -import { TimelineTemplate } from "../models/domain-layer/challenge/timeline_template"; - -import CoreOperations from "../common/CoreOperations"; -import IdGenerator from "../helpers/IdGenerator"; - -import { TimelineTemplateSchema } from "../schema/TimelineTemplateSchema"; - -class TimelineTemplateDomain extends CoreOperations< - TimelineTemplate, - CreateTimelineTemplateInput -> { - protected toEntity(item: { [key: string]: Value }): TimelineTemplate { - try { - item.phases = JSON.parse(item.phases.toString()); - } catch (e) { - // do nothing - } - return TimelineTemplate.fromJSON(item); - } - - public create( - createInput: CreateTimelineTemplateInput - ): Promise { - return super.create({ - id: IdGenerator.generateUUID(), - ...createInput, - }); - } -} - -export default new TimelineTemplateDomain( - TimelineTemplateSchema.tableName, - TimelineTemplateSchema.attributes, - TimelineTemplateSchema.indices -); diff --git a/src/helpers/ElasticSearch.ts b/src/helpers/ElasticSearch.ts deleted file mode 100644 index 27ebb5f..0000000 --- a/src/helpers/ElasticSearch.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Client as ESClient } from "@opensearch-project/opensearch" - -class ElasticSearch { - private esClient: any; - private esHost: string | undefined; - - constructor() { - const { ES_HOST } = process.env; - this.esHost = ES_HOST - } - - getESClient() { - if (this.esClient) { - return this.esClient; - } - this.esClient = new ESClient({ - node: this.esHost, - ssl: { - rejectUnauthorized: false, - }, - }); - return this.esClient; - } -} - -export default new ElasticSearch(); diff --git a/src/helpers/IdGenerator.ts b/src/helpers/IdGenerator.ts deleted file mode 100644 index 53223f1..0000000 --- a/src/helpers/IdGenerator.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { uuid } from "uuidv4"; - -class IdGenerator { - public generateUUID(): string { - return uuid(); - } -} - -export default new IdGenerator(); diff --git a/src/helpers/MachineToMachineToken.ts b/src/helpers/MachineToMachineToken.ts deleted file mode 100644 index e0a2560..0000000 --- a/src/helpers/MachineToMachineToken.ts +++ /dev/null @@ -1,28 +0,0 @@ -const { - AUTH0_URL, - AUTH0_AUDIENCE, - TOKEN_CACHE_TIME, - AUTH0_CLIENT_ID, - AUTH0_CLIENT_SECRET, -} = process.env; - -import _ from "lodash"; -const m2mAuth = require("tc-core-library-js").auth.m2m; - -class Machine2MachineToken { - m2m: any; - - constructor() { - this.m2m = m2mAuth({ - AUTH0_URL, - AUTH0_AUDIENCE, - TOKEN_CACHE_TIME, - }); - } - - async getM2MToken(): Promise { - return this.m2m.getMachineToken(AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET); - } -} - -export default new Machine2MachineToken(); diff --git a/src/models/common/common.ts b/src/models/common/common.ts deleted file mode 100644 index adc5229..0000000 --- a/src/models/common/common.ts +++ /dev/null @@ -1,803 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Empty } from "../google/protobuf/empty"; -import { Struct, Value } from "../google/protobuf/struct"; -import { Timestamp } from "../google/protobuf/timestamp"; - -export enum Operator { - OPERATOR_UNSPECIFIED = 0, - OPERATOR_EQUAL = 1, - OPERATOR_NOT_EQUAL = 2, - OPERATOR_GREATER_THAN = 3, - OPERATOR_GREATER_THAN_OR_EQUAL = 4, - OPERATOR_LESS_THAN = 5, - OPERATOR_LESS_THAN_OR_EQUAL = 6, - OPERATOR_AND = 7, - OPERATOR_BETWEEN = 8, - OPERATOR_IN = 9, - OPERATOR_IS = 10, - OPERATOR_NOT = 11, - OPERATOR_OR = 12, - UNRECOGNIZED = -1, -} - -export function operatorFromJSON(object: any): Operator { - switch (object) { - case 0: - case "OPERATOR_UNSPECIFIED": - return Operator.OPERATOR_UNSPECIFIED; - case 1: - case "OPERATOR_EQUAL": - return Operator.OPERATOR_EQUAL; - case 2: - case "OPERATOR_NOT_EQUAL": - return Operator.OPERATOR_NOT_EQUAL; - case 3: - case "OPERATOR_GREATER_THAN": - return Operator.OPERATOR_GREATER_THAN; - case 4: - case "OPERATOR_GREATER_THAN_OR_EQUAL": - return Operator.OPERATOR_GREATER_THAN_OR_EQUAL; - case 5: - case "OPERATOR_LESS_THAN": - return Operator.OPERATOR_LESS_THAN; - case 6: - case "OPERATOR_LESS_THAN_OR_EQUAL": - return Operator.OPERATOR_LESS_THAN_OR_EQUAL; - case 7: - case "OPERATOR_AND": - return Operator.OPERATOR_AND; - case 8: - case "OPERATOR_BETWEEN": - return Operator.OPERATOR_BETWEEN; - case 9: - case "OPERATOR_IN": - return Operator.OPERATOR_IN; - case 10: - case "OPERATOR_IS": - return Operator.OPERATOR_IS; - case 11: - case "OPERATOR_NOT": - return Operator.OPERATOR_NOT; - case 12: - case "OPERATOR_OR": - return Operator.OPERATOR_OR; - case -1: - case "UNRECOGNIZED": - default: - return Operator.UNRECOGNIZED; - } -} - -export function operatorToJSON(object: Operator): string { - switch (object) { - case Operator.OPERATOR_UNSPECIFIED: - return "OPERATOR_UNSPECIFIED"; - case Operator.OPERATOR_EQUAL: - return "OPERATOR_EQUAL"; - case Operator.OPERATOR_NOT_EQUAL: - return "OPERATOR_NOT_EQUAL"; - case Operator.OPERATOR_GREATER_THAN: - return "OPERATOR_GREATER_THAN"; - case Operator.OPERATOR_GREATER_THAN_OR_EQUAL: - return "OPERATOR_GREATER_THAN_OR_EQUAL"; - case Operator.OPERATOR_LESS_THAN: - return "OPERATOR_LESS_THAN"; - case Operator.OPERATOR_LESS_THAN_OR_EQUAL: - return "OPERATOR_LESS_THAN_OR_EQUAL"; - case Operator.OPERATOR_AND: - return "OPERATOR_AND"; - case Operator.OPERATOR_BETWEEN: - return "OPERATOR_BETWEEN"; - case Operator.OPERATOR_IN: - return "OPERATOR_IN"; - case Operator.OPERATOR_IS: - return "OPERATOR_IS"; - case Operator.OPERATOR_NOT: - return "OPERATOR_NOT"; - case Operator.OPERATOR_OR: - return "OPERATOR_OR"; - case Operator.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum Domain { - DOMAIN_UNSPECIFIED = 0, - DOMAIN_RESOURCE = 1, - DOMAIN_RESOURCE_ROLE = 2, - DOMAIN_RESOURCE_ROLE_PHASE_DEPENDENCY = 3, - DOMAIN_CHALLENGE = 4, - DOMAIN_CHALLENGE_TYPE = 5, - DOMAIN_CHALLENG_TIMELINE_TEMPLATE = 6, - DOMAIN_CHALLENGE_TRACK = 7, - DOMAIN_CHALLENGE_PHASE = 8, - DOMAIN_CHALLENGE_TIMELINE_TEMPLATE = 9, - DOMAIN_SUBMISSION = 10, - UNRECOGNIZED = -1, -} - -export function domainFromJSON(object: any): Domain { - switch (object) { - case 0: - case "DOMAIN_UNSPECIFIED": - return Domain.DOMAIN_UNSPECIFIED; - case 1: - case "DOMAIN_RESOURCE": - return Domain.DOMAIN_RESOURCE; - case 2: - case "DOMAIN_RESOURCE_ROLE": - return Domain.DOMAIN_RESOURCE_ROLE; - case 3: - case "DOMAIN_RESOURCE_ROLE_PHASE_DEPENDENCY": - return Domain.DOMAIN_RESOURCE_ROLE_PHASE_DEPENDENCY; - case 4: - case "DOMAIN_CHALLENGE": - return Domain.DOMAIN_CHALLENGE; - case 5: - case "DOMAIN_CHALLENGE_TYPE": - return Domain.DOMAIN_CHALLENGE_TYPE; - case 6: - case "DOMAIN_CHALLENG_TIMELINE_TEMPLATE": - return Domain.DOMAIN_CHALLENG_TIMELINE_TEMPLATE; - case 7: - case "DOMAIN_CHALLENGE_TRACK": - return Domain.DOMAIN_CHALLENGE_TRACK; - case 8: - case "DOMAIN_CHALLENGE_PHASE": - return Domain.DOMAIN_CHALLENGE_PHASE; - case 9: - case "DOMAIN_CHALLENGE_TIMELINE_TEMPLATE": - return Domain.DOMAIN_CHALLENGE_TIMELINE_TEMPLATE; - case 10: - case "DOMAIN_SUBMISSION": - return Domain.DOMAIN_SUBMISSION; - case -1: - case "UNRECOGNIZED": - default: - return Domain.UNRECOGNIZED; - } -} - -export function domainToJSON(object: Domain): string { - switch (object) { - case Domain.DOMAIN_UNSPECIFIED: - return "DOMAIN_UNSPECIFIED"; - case Domain.DOMAIN_RESOURCE: - return "DOMAIN_RESOURCE"; - case Domain.DOMAIN_RESOURCE_ROLE: - return "DOMAIN_RESOURCE_ROLE"; - case Domain.DOMAIN_RESOURCE_ROLE_PHASE_DEPENDENCY: - return "DOMAIN_RESOURCE_ROLE_PHASE_DEPENDENCY"; - case Domain.DOMAIN_CHALLENGE: - return "DOMAIN_CHALLENGE"; - case Domain.DOMAIN_CHALLENGE_TYPE: - return "DOMAIN_CHALLENGE_TYPE"; - case Domain.DOMAIN_CHALLENG_TIMELINE_TEMPLATE: - return "DOMAIN_CHALLENG_TIMELINE_TEMPLATE"; - case Domain.DOMAIN_CHALLENGE_TRACK: - return "DOMAIN_CHALLENGE_TRACK"; - case Domain.DOMAIN_CHALLENGE_PHASE: - return "DOMAIN_CHALLENGE_PHASE"; - case Domain.DOMAIN_CHALLENGE_TIMELINE_TEMPLATE: - return "DOMAIN_CHALLENGE_TIMELINE_TEMPLATE"; - case Domain.DOMAIN_SUBMISSION: - return "DOMAIN_SUBMISSION"; - case Domain.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface ScanCriteria { - key: string; - operator?: Operator | undefined; - value?: any; -} - -export interface ScanRequest { - criteria: ScanCriteria[]; - nextToken?: string | undefined; -} - -export interface ScanResult { - nextToken?: string | undefined; - items: { [key: string]: any }[]; -} - -export interface CreateResult { - kind?: { $case: "integerId"; integerId: number } | { $case: "stringId"; stringId: string }; -} - -export interface UpdateResult { - updatedCount: number; - message?: string | undefined; -} - -export interface CheckExistsResult { - exists: boolean; -} - -export interface LookupCriteria { - key: string; - value?: any; -} - -/** TODO: There has to be a better way to do this. */ -export interface GoogleProtobufTypesPlaceholder { - timestamp?: string; - empty?: Empty; -} - -function createBaseScanCriteria(): ScanCriteria { - return { key: "", operator: undefined, value: undefined }; -} - -export const ScanCriteria = { - encode(message: ScanCriteria, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.operator !== undefined) { - writer.uint32(16).int32(message.operator); - } - if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ScanCriteria { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScanCriteria(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.operator = reader.int32() as any; - break; - case 3: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScanCriteria { - return { - key: isSet(object.key) ? String(object.key) : "", - operator: isSet(object.operator) ? operatorFromJSON(object.operator) : undefined, - value: isSet(object?.value) ? object.value : undefined, - }; - }, - - toJSON(message: ScanCriteria): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.operator !== undefined && - (obj.operator = message.operator !== undefined ? operatorToJSON(message.operator) : undefined); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - create, I>>(base?: I): ScanCriteria { - return ScanCriteria.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ScanCriteria { - const message = createBaseScanCriteria(); - message.key = object.key ?? ""; - message.operator = object.operator ?? undefined; - message.value = object.value ?? undefined; - return message; - }, -}; - -function createBaseScanRequest(): ScanRequest { - return { criteria: [], nextToken: undefined }; -} - -export const ScanRequest = { - encode(message: ScanRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.criteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.nextToken !== undefined) { - writer.uint32(18).string(message.nextToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ScanRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScanRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.criteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.nextToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScanRequest { - return { - criteria: Array.isArray(object?.criteria) ? object.criteria.map((e: any) => ScanCriteria.fromJSON(e)) : [], - nextToken: isSet(object.nextToken) ? String(object.nextToken) : undefined, - }; - }, - - toJSON(message: ScanRequest): unknown { - const obj: any = {}; - if (message.criteria) { - obj.criteria = message.criteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.criteria = []; - } - message.nextToken !== undefined && (obj.nextToken = message.nextToken); - return obj; - }, - - create, I>>(base?: I): ScanRequest { - return ScanRequest.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ScanRequest { - const message = createBaseScanRequest(); - message.criteria = object.criteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.nextToken = object.nextToken ?? undefined; - return message; - }, -}; - -function createBaseScanResult(): ScanResult { - return { nextToken: undefined, items: [] }; -} - -export const ScanResult = { - encode(message: ScanResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.nextToken !== undefined) { - writer.uint32(10).string(message.nextToken); - } - for (const v of message.items) { - Struct.encode(Struct.wrap(v!), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ScanResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScanResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextToken = reader.string(); - break; - case 2: - message.items.push(Struct.unwrap(Struct.decode(reader, reader.uint32()))); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScanResult { - return { - nextToken: isSet(object.nextToken) ? String(object.nextToken) : undefined, - items: Array.isArray(object?.items) ? [...object.items] : [], - }; - }, - - toJSON(message: ScanResult): unknown { - const obj: any = {}; - message.nextToken !== undefined && (obj.nextToken = message.nextToken); - if (message.items) { - obj.items = message.items.map((e) => e); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): ScanResult { - return ScanResult.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ScanResult { - const message = createBaseScanResult(); - message.nextToken = object.nextToken ?? undefined; - message.items = object.items?.map((e) => e) || []; - return message; - }, -}; - -function createBaseCreateResult(): CreateResult { - return { kind: undefined }; -} - -export const CreateResult = { - encode(message: CreateResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "integerId": - writer.uint32(8).int64(message.kind.integerId); - break; - case "stringId": - writer.uint32(18).string(message.kind.stringId); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "integerId", integerId: longToNumber(reader.int64() as Long) }; - break; - case 2: - message.kind = { $case: "stringId", stringId: reader.string() }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateResult { - return { - kind: isSet(object.integerId) - ? { $case: "integerId", integerId: Number(object.integerId) } - : isSet(object.stringId) - ? { $case: "stringId", stringId: String(object.stringId) } - : undefined, - }; - }, - - toJSON(message: CreateResult): unknown { - const obj: any = {}; - message.kind?.$case === "integerId" && (obj.integerId = Math.round(message.kind?.integerId)); - message.kind?.$case === "stringId" && (obj.stringId = message.kind?.stringId); - return obj; - }, - - create, I>>(base?: I): CreateResult { - return CreateResult.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateResult { - const message = createBaseCreateResult(); - if (object.kind?.$case === "integerId" && object.kind?.integerId !== undefined && object.kind?.integerId !== null) { - message.kind = { $case: "integerId", integerId: object.kind.integerId }; - } - if (object.kind?.$case === "stringId" && object.kind?.stringId !== undefined && object.kind?.stringId !== null) { - message.kind = { $case: "stringId", stringId: object.kind.stringId }; - } - return message; - }, -}; - -function createBaseUpdateResult(): UpdateResult { - return { updatedCount: 0, message: undefined }; -} - -export const UpdateResult = { - encode(message: UpdateResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.updatedCount !== 0) { - writer.uint32(8).int64(message.updatedCount); - } - if (message.message !== undefined) { - writer.uint32(18).string(message.message); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.updatedCount = longToNumber(reader.int64() as Long); - break; - case 2: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateResult { - return { - updatedCount: isSet(object.updatedCount) ? Number(object.updatedCount) : 0, - message: isSet(object.message) ? String(object.message) : undefined, - }; - }, - - toJSON(message: UpdateResult): unknown { - const obj: any = {}; - message.updatedCount !== undefined && (obj.updatedCount = Math.round(message.updatedCount)); - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - create, I>>(base?: I): UpdateResult { - return UpdateResult.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateResult { - const message = createBaseUpdateResult(); - message.updatedCount = object.updatedCount ?? 0; - message.message = object.message ?? undefined; - return message; - }, -}; - -function createBaseCheckExistsResult(): CheckExistsResult { - return { exists: false }; -} - -export const CheckExistsResult = { - encode(message: CheckExistsResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.exists === true) { - writer.uint32(8).bool(message.exists); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CheckExistsResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckExistsResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exists = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CheckExistsResult { - return { exists: isSet(object.exists) ? Boolean(object.exists) : false }; - }, - - toJSON(message: CheckExistsResult): unknown { - const obj: any = {}; - message.exists !== undefined && (obj.exists = message.exists); - return obj; - }, - - create, I>>(base?: I): CheckExistsResult { - return CheckExistsResult.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CheckExistsResult { - const message = createBaseCheckExistsResult(); - message.exists = object.exists ?? false; - return message; - }, -}; - -function createBaseLookupCriteria(): LookupCriteria { - return { key: "", value: undefined }; -} - -export const LookupCriteria = { - encode(message: LookupCriteria, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LookupCriteria { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLookupCriteria(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 3: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LookupCriteria { - return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined }; - }, - - toJSON(message: LookupCriteria): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - create, I>>(base?: I): LookupCriteria { - return LookupCriteria.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): LookupCriteria { - const message = createBaseLookupCriteria(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; - return message; - }, -}; - -function createBaseGoogleProtobufTypesPlaceholder(): GoogleProtobufTypesPlaceholder { - return { timestamp: undefined, empty: undefined }; -} - -export const GoogleProtobufTypesPlaceholder = { - encode(message: GoogleProtobufTypesPlaceholder, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).ldelim(); - } - if (message.empty !== undefined) { - Empty.encode(message.empty, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GoogleProtobufTypesPlaceholder { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGoogleProtobufTypesPlaceholder(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.empty = Empty.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GoogleProtobufTypesPlaceholder { - return { - timestamp: isSet(object.timestamp) ? String(object.timestamp) : undefined, - empty: isSet(object.empty) ? Empty.fromJSON(object.empty) : undefined, - }; - }, - - toJSON(message: GoogleProtobufTypesPlaceholder): unknown { - const obj: any = {}; - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - message.empty !== undefined && (obj.empty = message.empty ? Empty.toJSON(message.empty) : undefined); - return obj; - }, - - create, I>>(base?: I): GoogleProtobufTypesPlaceholder { - return GoogleProtobufTypesPlaceholder.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): GoogleProtobufTypesPlaceholder { - const message = createBaseGoogleProtobufTypesPlaceholder(); - message.timestamp = object.timestamp ?? undefined; - message.empty = (object.empty !== undefined && object.empty !== null) ? Empty.fromPartial(object.empty) : undefined; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(dateStr: string): Timestamp { - const date = new Date(dateStr); - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): string { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis).toISOString(); -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/attachment.ts b/src/models/domain-layer/challenge/attachment.ts deleted file mode 100644 index a90cf02..0000000 --- a/src/models/domain-layer/challenge/attachment.ts +++ /dev/null @@ -1,495 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface Attachment { - id: string; - url: string; - fileSize: number; - name: string; - challengeId: string; - description?: string | undefined; -} - -export interface AttachmentList { - items: Attachment[]; -} - -export interface CreateAttachmentInput { - url: string; - fileSize: number; - name: string; - challengeId: string; - description?: string | undefined; -} - -export interface UpdateAttachmentInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateAttachmentInput_UpdateInput; -} - -export interface UpdateAttachmentInput_UpdateInput { - url: string; - fileSize: number; - name: string; - challengeId: string; - description?: string | undefined; -} - -function createBaseAttachment(): Attachment { - return { id: "", url: "", fileSize: 0, name: "", challengeId: "", description: undefined }; -} - -export const Attachment = { - encode(message: Attachment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.url !== "") { - writer.uint32(18).string(message.url); - } - if (message.fileSize !== 0) { - writer.uint32(24).int64(message.fileSize); - } - if (message.name !== "") { - writer.uint32(34).string(message.name); - } - if (message.challengeId !== "") { - writer.uint32(42).string(message.challengeId); - } - if (message.description !== undefined) { - writer.uint32(50).string(message.description); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Attachment { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAttachment(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.url = reader.string(); - break; - case 3: - message.fileSize = longToNumber(reader.int64() as Long); - break; - case 4: - message.name = reader.string(); - break; - case 5: - message.challengeId = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Attachment { - return { - id: isSet(object.id) ? String(object.id) : "", - url: isSet(object.url) ? String(object.url) : "", - fileSize: isSet(object.fileSize) ? Number(object.fileSize) : 0, - name: isSet(object.name) ? String(object.name) : "", - challengeId: isSet(object.challengeId) ? String(object.challengeId) : "", - description: isSet(object.description) ? String(object.description) : undefined, - }; - }, - - toJSON(message: Attachment): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.url !== undefined && (obj.url = message.url); - message.fileSize !== undefined && (obj.fileSize = Math.round(message.fileSize)); - message.name !== undefined && (obj.name = message.name); - message.challengeId !== undefined && (obj.challengeId = message.challengeId); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - - create, I>>(base?: I): Attachment { - return Attachment.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Attachment { - const message = createBaseAttachment(); - message.id = object.id ?? ""; - message.url = object.url ?? ""; - message.fileSize = object.fileSize ?? 0; - message.name = object.name ?? ""; - message.challengeId = object.challengeId ?? ""; - message.description = object.description ?? undefined; - return message; - }, -}; - -function createBaseAttachmentList(): AttachmentList { - return { items: [] }; -} - -export const AttachmentList = { - encode(message: AttachmentList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - Attachment.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): AttachmentList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAttachmentList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(Attachment.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AttachmentList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => Attachment.fromJSON(e)) : [] }; - }, - - toJSON(message: AttachmentList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? Attachment.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): AttachmentList { - return AttachmentList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): AttachmentList { - const message = createBaseAttachmentList(); - message.items = object.items?.map((e) => Attachment.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateAttachmentInput(): CreateAttachmentInput { - return { url: "", fileSize: 0, name: "", challengeId: "", description: undefined }; -} - -export const CreateAttachmentInput = { - encode(message: CreateAttachmentInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.url !== "") { - writer.uint32(10).string(message.url); - } - if (message.fileSize !== 0) { - writer.uint32(16).int64(message.fileSize); - } - if (message.name !== "") { - writer.uint32(26).string(message.name); - } - if (message.challengeId !== "") { - writer.uint32(34).string(message.challengeId); - } - if (message.description !== undefined) { - writer.uint32(42).string(message.description); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateAttachmentInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateAttachmentInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.fileSize = longToNumber(reader.int64() as Long); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.challengeId = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateAttachmentInput { - return { - url: isSet(object.url) ? String(object.url) : "", - fileSize: isSet(object.fileSize) ? Number(object.fileSize) : 0, - name: isSet(object.name) ? String(object.name) : "", - challengeId: isSet(object.challengeId) ? String(object.challengeId) : "", - description: isSet(object.description) ? String(object.description) : undefined, - }; - }, - - toJSON(message: CreateAttachmentInput): unknown { - const obj: any = {}; - message.url !== undefined && (obj.url = message.url); - message.fileSize !== undefined && (obj.fileSize = Math.round(message.fileSize)); - message.name !== undefined && (obj.name = message.name); - message.challengeId !== undefined && (obj.challengeId = message.challengeId); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - - create, I>>(base?: I): CreateAttachmentInput { - return CreateAttachmentInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateAttachmentInput { - const message = createBaseCreateAttachmentInput(); - message.url = object.url ?? ""; - message.fileSize = object.fileSize ?? 0; - message.name = object.name ?? ""; - message.challengeId = object.challengeId ?? ""; - message.description = object.description ?? undefined; - return message; - }, -}; - -function createBaseUpdateAttachmentInput(): UpdateAttachmentInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateAttachmentInput = { - encode(message: UpdateAttachmentInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateAttachmentInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateAttachmentInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateAttachmentInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateAttachmentInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateAttachmentInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateAttachmentInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateAttachmentInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && - (obj.updateInput = message.updateInput - ? UpdateAttachmentInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateAttachmentInput { - return UpdateAttachmentInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateAttachmentInput { - const message = createBaseUpdateAttachmentInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateAttachmentInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateAttachmentInput_UpdateInput(): UpdateAttachmentInput_UpdateInput { - return { url: "", fileSize: 0, name: "", challengeId: "", description: undefined }; -} - -export const UpdateAttachmentInput_UpdateInput = { - encode(message: UpdateAttachmentInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.url !== "") { - writer.uint32(18).string(message.url); - } - if (message.fileSize !== 0) { - writer.uint32(24).int64(message.fileSize); - } - if (message.name !== "") { - writer.uint32(34).string(message.name); - } - if (message.challengeId !== "") { - writer.uint32(42).string(message.challengeId); - } - if (message.description !== undefined) { - writer.uint32(50).string(message.description); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateAttachmentInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateAttachmentInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.url = reader.string(); - break; - case 3: - message.fileSize = longToNumber(reader.int64() as Long); - break; - case 4: - message.name = reader.string(); - break; - case 5: - message.challengeId = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateAttachmentInput_UpdateInput { - return { - url: isSet(object.url) ? String(object.url) : "", - fileSize: isSet(object.fileSize) ? Number(object.fileSize) : 0, - name: isSet(object.name) ? String(object.name) : "", - challengeId: isSet(object.challengeId) ? String(object.challengeId) : "", - description: isSet(object.description) ? String(object.description) : undefined, - }; - }, - - toJSON(message: UpdateAttachmentInput_UpdateInput): unknown { - const obj: any = {}; - message.url !== undefined && (obj.url = message.url); - message.fileSize !== undefined && (obj.fileSize = Math.round(message.fileSize)); - message.name !== undefined && (obj.name = message.name); - message.challengeId !== undefined && (obj.challengeId = message.challengeId); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateAttachmentInput_UpdateInput { - return UpdateAttachmentInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateAttachmentInput_UpdateInput { - const message = createBaseUpdateAttachmentInput_UpdateInput(); - message.url = object.url ?? ""; - message.fileSize = object.fileSize ?? 0; - message.name = object.name ?? ""; - message.challengeId = object.challengeId ?? ""; - message.description = object.description ?? undefined; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/challenge.ts b/src/models/domain-layer/challenge/challenge.ts deleted file mode 100644 index a1389d8..0000000 --- a/src/models/domain-layer/challenge/challenge.ts +++ /dev/null @@ -1,3299 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; -import { Timestamp } from "../../google/protobuf/timestamp"; - -export interface Challenge { - id: string; - legacyId?: number | undefined; - name: string; - typeId: string; - trackId: string; - legacy?: Challenge_Legacy | undefined; - billing?: Challenge_Billing | undefined; - description: string; - privateDescription?: string | undefined; - descriptionFormat?: string | undefined; - metadata: Challenge_Metadata[]; - task?: Challenge_Task | undefined; - timelineTemplateId?: string | undefined; - phases: Challenge_Phase[]; - events: Challenge_Event[]; - terms: Challenge_Term[]; - prizeSets: Challenge_PrizeSet[]; - tags: string[]; - projectId?: number | undefined; - startDate?: number | undefined; - endDate?: number | undefined; - status: string; - attachments: string[]; - groups: string[]; - winners: Challenge_Winner[]; - discussions: Challenge_Discussion[]; - createdBy: string; - updatedBy?: string | undefined; - created: number; - updated?: number | undefined; - overview?: Challenge_Overview; -} - -export interface Challenge_Legacy { - /** Develop, Design, Data Science, QA */ - track?: string | undefined; - subTrack?: string | undefined; - forumId?: number | undefined; - directProjectId: number; - /** COMMUNITY, INTERNAL */ - reviewType: string; - /** public, private */ - confidentialityType: string; - reviewScorecardId?: number | undefined; - screeningScorecardId?: number | undefined; - pureV5Task?: boolean | undefined; - selfService?: boolean | undefined; - selfServiceCopilot?: string | undefined; -} - -export interface Challenge_Billing { - billingAccountId: number; - markup: number; -} - -export interface Challenge_Event { - id?: number | undefined; - name: string; - key: string; -} - -export interface Challenge_Term { - id: string; - roleId: string; -} - -export interface Challenge_Metadata { - name: string; - value: string; -} - -export interface Challenge_Discussion { - id?: string | undefined; - name: string; - /** challenge */ - type: string; - provider: string; - url?: string | undefined; -} - -export interface Challenge_Phase { - duration: number; - scheduledStartDate?: string | undefined; - scheduledEndDate?: string | undefined; - actualStartDate?: string | undefined; - actualEndDate?: string | undefined; - name: string; - phaseId: string; - id: string; - isOpen: boolean; - constraints: Challenge_Phase_Constraint[]; -} - -export interface Challenge_Phase_Constraint { - name: string; - value: number; -} - -export interface Challenge_Winner { - handle: string; - placement: number; - userId: number; -} - -export interface Challenge_Task { - isTask: boolean; - isAssigned: boolean; - memberId?: number | undefined; -} - -export interface Challenge_PrizeSet { - /** Placement, Copilot, Reviewer */ - type: string; - description?: string | undefined; - prizes: Challenge_PrizeSet_Prize[]; -} - -export interface Challenge_PrizeSet_Prize { - value: number; - type: string; -} - -export interface Challenge_Overview { - totalPrizes: number; -} - -export interface ChallengeList { - items: Challenge[]; -} - -export interface CreateChallengeInput { - name: string; - typeId: string; - trackId: string; - timelineTemplateId?: string | undefined; - legacy?: Challenge_Legacy; - billing?: Challenge_Billing; - description?: string | undefined; - privateDescription?: string | undefined; - descriptionFormat?: string | undefined; - metadata: Challenge_Metadata[]; - task?: Challenge_Task | undefined; - phases: Challenge_Phase[]; - events: Challenge_Event[]; - terms: Challenge_Term[]; - prizeSets: Challenge_PrizeSet[]; - tags: string[]; - projectId?: number | undefined; - startDate?: number | undefined; - endDate?: number | undefined; - status: string; - attachments: string[]; - groups: string[]; - discussions: Challenge_Discussion[]; -} - -export interface UpdateChallengeInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateChallengeInput_UpdateInput; -} - -export interface UpdateChallengeInput_UpdateInput { - id: string; - legacyId?: number | undefined; - name?: string | undefined; - typeId?: string | undefined; - trackId?: string | undefined; - legacy?: Challenge_Legacy | undefined; - billing?: Challenge_Billing | undefined; - description?: string | undefined; - privateDescription?: string | undefined; - descriptionFormat?: string | undefined; - metadata: Challenge_Metadata[]; - task?: Challenge_Task | undefined; - timelineTemplateId?: string | undefined; - phases: Challenge_Phase[]; - events: Challenge_Event[]; - terms: Challenge_Term[]; - prizeSets: Challenge_PrizeSet[]; - tags: string[]; - projectId?: number | undefined; - startDate?: number | undefined; - endDate?: number | undefined; - status?: string | undefined; - attachments: string[]; - groups: string[]; - winners: Challenge_Winner[]; - discussions: Challenge_Discussion[]; - createdBy?: string | undefined; - updatedBy?: string | undefined; - created?: number | undefined; - updated?: number | undefined; - overview?: Challenge_Overview | undefined; -} - -export interface UpdateChallengeInputForACL { - filterCriteria: ScanCriteria[]; - updateInputForAcl?: UpdateChallengeInputForACL_UpdateInputForACL; -} - -export interface UpdateChallengeInputForACL_UpdateInputForACL { - status?: string | undefined; - phases?: UpdateChallengeInputForACL_PhasesACL | undefined; - currentPhase?: Challenge_Phase | undefined; - currentPhaseNames?: UpdateChallengeInputForACL_CurrentPhaseNamesACL | undefined; - registrationStartDate?: string | undefined; - registrationEndDate?: string | undefined; - submissionStartDate?: string | undefined; - submissionEndDate?: string | undefined; - startDate?: string | undefined; - endDate?: string | undefined; - legacy?: UpdateChallengeInputForACL_LegacyACL | undefined; - prizeSets?: UpdateChallengeInputForACL_PrizeSetsACL | undefined; - overview?: Challenge_Overview | undefined; - winners?: UpdateChallengeInputForACL_WinnersACL | undefined; -} - -export interface UpdateChallengeInputForACL_PhasesACL { - phases: Challenge_Phase[]; -} - -export interface UpdateChallengeInputForACL_CurrentPhaseNamesACL { - currentPhaseNames: string[]; -} - -export interface UpdateChallengeInputForACL_LegacyACL { - reviewScorecardId?: number | undefined; - screeningScorecardId?: number | undefined; -} - -export interface UpdateChallengeInputForACL_PrizeSetsACL { - prizeSets: Challenge_PrizeSet[]; -} - -export interface UpdateChallengeInputForACL_WinnersACL { - winners: UpdateChallengeInputForACL_WinnerACL[]; -} - -export interface UpdateChallengeInputForACL_WinnerACL { - handle: string; - placement: number; -} - -function createBaseChallenge(): Challenge { - return { - id: "", - legacyId: undefined, - name: "", - typeId: "", - trackId: "", - legacy: undefined, - billing: undefined, - description: "", - privateDescription: undefined, - descriptionFormat: undefined, - metadata: [], - task: undefined, - timelineTemplateId: undefined, - phases: [], - events: [], - terms: [], - prizeSets: [], - tags: [], - projectId: undefined, - startDate: undefined, - endDate: undefined, - status: "", - attachments: [], - groups: [], - winners: [], - discussions: [], - createdBy: "", - updatedBy: undefined, - created: 0, - updated: undefined, - overview: undefined, - }; -} - -export const Challenge = { - encode(message: Challenge, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.legacyId !== undefined) { - writer.uint32(16).int32(message.legacyId); - } - if (message.name !== "") { - writer.uint32(26).string(message.name); - } - if (message.typeId !== "") { - writer.uint32(34).string(message.typeId); - } - if (message.trackId !== "") { - writer.uint32(42).string(message.trackId); - } - if (message.legacy !== undefined) { - Challenge_Legacy.encode(message.legacy, writer.uint32(50).fork()).ldelim(); - } - if (message.billing !== undefined) { - Challenge_Billing.encode(message.billing, writer.uint32(58).fork()).ldelim(); - } - if (message.description !== "") { - writer.uint32(66).string(message.description); - } - if (message.privateDescription !== undefined) { - writer.uint32(74).string(message.privateDescription); - } - if (message.descriptionFormat !== undefined) { - writer.uint32(82).string(message.descriptionFormat); - } - for (const v of message.metadata) { - Challenge_Metadata.encode(v!, writer.uint32(90).fork()).ldelim(); - } - if (message.task !== undefined) { - Challenge_Task.encode(message.task, writer.uint32(98).fork()).ldelim(); - } - if (message.timelineTemplateId !== undefined) { - writer.uint32(106).string(message.timelineTemplateId); - } - for (const v of message.phases) { - Challenge_Phase.encode(v!, writer.uint32(114).fork()).ldelim(); - } - for (const v of message.events) { - Challenge_Event.encode(v!, writer.uint32(122).fork()).ldelim(); - } - for (const v of message.terms) { - Challenge_Term.encode(v!, writer.uint32(130).fork()).ldelim(); - } - for (const v of message.prizeSets) { - Challenge_PrizeSet.encode(v!, writer.uint32(138).fork()).ldelim(); - } - for (const v of message.tags) { - writer.uint32(146).string(v!); - } - if (message.projectId !== undefined) { - writer.uint32(152).int32(message.projectId); - } - if (message.startDate !== undefined) { - writer.uint32(160).int64(message.startDate); - } - if (message.endDate !== undefined) { - writer.uint32(168).int64(message.endDate); - } - if (message.status !== "") { - writer.uint32(178).string(message.status); - } - for (const v of message.attachments) { - writer.uint32(186).string(v!); - } - for (const v of message.groups) { - writer.uint32(194).string(v!); - } - for (const v of message.winners) { - Challenge_Winner.encode(v!, writer.uint32(202).fork()).ldelim(); - } - for (const v of message.discussions) { - Challenge_Discussion.encode(v!, writer.uint32(210).fork()).ldelim(); - } - if (message.createdBy !== "") { - writer.uint32(218).string(message.createdBy); - } - if (message.updatedBy !== undefined) { - writer.uint32(226).string(message.updatedBy); - } - if (message.created !== 0) { - writer.uint32(232).int64(message.created); - } - if (message.updated !== undefined) { - writer.uint32(240).int64(message.updated); - } - if (message.overview !== undefined) { - Challenge_Overview.encode(message.overview, writer.uint32(250).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.legacyId = reader.int32(); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.typeId = reader.string(); - break; - case 5: - message.trackId = reader.string(); - break; - case 6: - message.legacy = Challenge_Legacy.decode(reader, reader.uint32()); - break; - case 7: - message.billing = Challenge_Billing.decode(reader, reader.uint32()); - break; - case 8: - message.description = reader.string(); - break; - case 9: - message.privateDescription = reader.string(); - break; - case 10: - message.descriptionFormat = reader.string(); - break; - case 11: - message.metadata.push(Challenge_Metadata.decode(reader, reader.uint32())); - break; - case 12: - message.task = Challenge_Task.decode(reader, reader.uint32()); - break; - case 13: - message.timelineTemplateId = reader.string(); - break; - case 14: - message.phases.push(Challenge_Phase.decode(reader, reader.uint32())); - break; - case 15: - message.events.push(Challenge_Event.decode(reader, reader.uint32())); - break; - case 16: - message.terms.push(Challenge_Term.decode(reader, reader.uint32())); - break; - case 17: - message.prizeSets.push(Challenge_PrizeSet.decode(reader, reader.uint32())); - break; - case 18: - message.tags.push(reader.string()); - break; - case 19: - message.projectId = reader.int32(); - break; - case 20: - message.startDate = longToNumber(reader.int64() as Long); - break; - case 21: - message.endDate = longToNumber(reader.int64() as Long); - break; - case 22: - message.status = reader.string(); - break; - case 23: - message.attachments.push(reader.string()); - break; - case 24: - message.groups.push(reader.string()); - break; - case 25: - message.winners.push(Challenge_Winner.decode(reader, reader.uint32())); - break; - case 26: - message.discussions.push(Challenge_Discussion.decode(reader, reader.uint32())); - break; - case 27: - message.createdBy = reader.string(); - break; - case 28: - message.updatedBy = reader.string(); - break; - case 29: - message.created = longToNumber(reader.int64() as Long); - break; - case 30: - message.updated = longToNumber(reader.int64() as Long); - break; - case 31: - message.overview = Challenge_Overview.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge { - return { - id: isSet(object.id) ? String(object.id) : "", - legacyId: isSet(object.legacyId) ? Number(object.legacyId) : undefined, - name: isSet(object.name) ? String(object.name) : "", - typeId: isSet(object.typeId) ? String(object.typeId) : "", - trackId: isSet(object.trackId) ? String(object.trackId) : "", - legacy: isSet(object.legacy) ? Challenge_Legacy.fromJSON(object.legacy) : undefined, - billing: isSet(object.billing) ? Challenge_Billing.fromJSON(object.billing) : undefined, - description: isSet(object.description) ? String(object.description) : "", - privateDescription: isSet(object.privateDescription) ? String(object.privateDescription) : undefined, - descriptionFormat: isSet(object.descriptionFormat) ? String(object.descriptionFormat) : undefined, - metadata: Array.isArray(object?.metadata) ? object.metadata.map((e: any) => Challenge_Metadata.fromJSON(e)) : [], - task: isSet(object.task) ? Challenge_Task.fromJSON(object.task) : undefined, - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : undefined, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => Challenge_Phase.fromJSON(e)) : [], - events: Array.isArray(object?.events) ? object.events.map((e: any) => Challenge_Event.fromJSON(e)) : [], - terms: Array.isArray(object?.terms) ? object.terms.map((e: any) => Challenge_Term.fromJSON(e)) : [], - prizeSets: Array.isArray(object?.prizeSets) - ? object.prizeSets.map((e: any) => Challenge_PrizeSet.fromJSON(e)) - : [], - tags: Array.isArray(object?.tags) ? object.tags.map((e: any) => String(e)) : [], - projectId: isSet(object.projectId) ? Number(object.projectId) : undefined, - startDate: isSet(object.startDate) ? Number(object.startDate) : undefined, - endDate: isSet(object.endDate) ? Number(object.endDate) : undefined, - status: isSet(object.status) ? String(object.status) : "", - attachments: Array.isArray(object?.attachments) ? object.attachments.map((e: any) => String(e)) : [], - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => String(e)) : [], - winners: Array.isArray(object?.winners) ? object.winners.map((e: any) => Challenge_Winner.fromJSON(e)) : [], - discussions: Array.isArray(object?.discussions) - ? object.discussions.map((e: any) => Challenge_Discussion.fromJSON(e)) - : [], - createdBy: isSet(object.createdBy) ? String(object.createdBy) : "", - updatedBy: isSet(object.updatedBy) ? String(object.updatedBy) : undefined, - created: isSet(object.created) ? Number(object.created) : 0, - updated: isSet(object.updated) ? Number(object.updated) : undefined, - overview: isSet(object.overview) ? Challenge_Overview.fromJSON(object.overview) : undefined, - }; - }, - - toJSON(message: Challenge): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.legacyId !== undefined && (obj.legacyId = Math.round(message.legacyId)); - message.name !== undefined && (obj.name = message.name); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.trackId !== undefined && (obj.trackId = message.trackId); - message.legacy !== undefined && (obj.legacy = message.legacy ? Challenge_Legacy.toJSON(message.legacy) : undefined); - message.billing !== undefined && - (obj.billing = message.billing ? Challenge_Billing.toJSON(message.billing) : undefined); - message.description !== undefined && (obj.description = message.description); - message.privateDescription !== undefined && (obj.privateDescription = message.privateDescription); - message.descriptionFormat !== undefined && (obj.descriptionFormat = message.descriptionFormat); - if (message.metadata) { - obj.metadata = message.metadata.map((e) => e ? Challenge_Metadata.toJSON(e) : undefined); - } else { - obj.metadata = []; - } - message.task !== undefined && (obj.task = message.task ? Challenge_Task.toJSON(message.task) : undefined); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? Challenge_Phase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - if (message.events) { - obj.events = message.events.map((e) => e ? Challenge_Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - if (message.terms) { - obj.terms = message.terms.map((e) => e ? Challenge_Term.toJSON(e) : undefined); - } else { - obj.terms = []; - } - if (message.prizeSets) { - obj.prizeSets = message.prizeSets.map((e) => e ? Challenge_PrizeSet.toJSON(e) : undefined); - } else { - obj.prizeSets = []; - } - if (message.tags) { - obj.tags = message.tags.map((e) => e); - } else { - obj.tags = []; - } - message.projectId !== undefined && (obj.projectId = Math.round(message.projectId)); - message.startDate !== undefined && (obj.startDate = Math.round(message.startDate)); - message.endDate !== undefined && (obj.endDate = Math.round(message.endDate)); - message.status !== undefined && (obj.status = message.status); - if (message.attachments) { - obj.attachments = message.attachments.map((e) => e); - } else { - obj.attachments = []; - } - if (message.groups) { - obj.groups = message.groups.map((e) => e); - } else { - obj.groups = []; - } - if (message.winners) { - obj.winners = message.winners.map((e) => e ? Challenge_Winner.toJSON(e) : undefined); - } else { - obj.winners = []; - } - if (message.discussions) { - obj.discussions = message.discussions.map((e) => e ? Challenge_Discussion.toJSON(e) : undefined); - } else { - obj.discussions = []; - } - message.createdBy !== undefined && (obj.createdBy = message.createdBy); - message.updatedBy !== undefined && (obj.updatedBy = message.updatedBy); - message.created !== undefined && (obj.created = Math.round(message.created)); - message.updated !== undefined && (obj.updated = Math.round(message.updated)); - message.overview !== undefined && - (obj.overview = message.overview ? Challenge_Overview.toJSON(message.overview) : undefined); - return obj; - }, - - create, I>>(base?: I): Challenge { - return Challenge.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge { - const message = createBaseChallenge(); - message.id = object.id ?? ""; - message.legacyId = object.legacyId ?? undefined; - message.name = object.name ?? ""; - message.typeId = object.typeId ?? ""; - message.trackId = object.trackId ?? ""; - message.legacy = (object.legacy !== undefined && object.legacy !== null) - ? Challenge_Legacy.fromPartial(object.legacy) - : undefined; - message.billing = (object.billing !== undefined && object.billing !== null) - ? Challenge_Billing.fromPartial(object.billing) - : undefined; - message.description = object.description ?? ""; - message.privateDescription = object.privateDescription ?? undefined; - message.descriptionFormat = object.descriptionFormat ?? undefined; - message.metadata = object.metadata?.map((e) => Challenge_Metadata.fromPartial(e)) || []; - message.task = (object.task !== undefined && object.task !== null) - ? Challenge_Task.fromPartial(object.task) - : undefined; - message.timelineTemplateId = object.timelineTemplateId ?? undefined; - message.phases = object.phases?.map((e) => Challenge_Phase.fromPartial(e)) || []; - message.events = object.events?.map((e) => Challenge_Event.fromPartial(e)) || []; - message.terms = object.terms?.map((e) => Challenge_Term.fromPartial(e)) || []; - message.prizeSets = object.prizeSets?.map((e) => Challenge_PrizeSet.fromPartial(e)) || []; - message.tags = object.tags?.map((e) => e) || []; - message.projectId = object.projectId ?? undefined; - message.startDate = object.startDate ?? undefined; - message.endDate = object.endDate ?? undefined; - message.status = object.status ?? ""; - message.attachments = object.attachments?.map((e) => e) || []; - message.groups = object.groups?.map((e) => e) || []; - message.winners = object.winners?.map((e) => Challenge_Winner.fromPartial(e)) || []; - message.discussions = object.discussions?.map((e) => Challenge_Discussion.fromPartial(e)) || []; - message.createdBy = object.createdBy ?? ""; - message.updatedBy = object.updatedBy ?? undefined; - message.created = object.created ?? 0; - message.updated = object.updated ?? undefined; - message.overview = (object.overview !== undefined && object.overview !== null) - ? Challenge_Overview.fromPartial(object.overview) - : undefined; - return message; - }, -}; - -function createBaseChallenge_Legacy(): Challenge_Legacy { - return { - track: undefined, - subTrack: undefined, - forumId: undefined, - directProjectId: 0, - reviewType: "", - confidentialityType: "", - reviewScorecardId: undefined, - screeningScorecardId: undefined, - pureV5Task: undefined, - selfService: undefined, - selfServiceCopilot: undefined, - }; -} - -export const Challenge_Legacy = { - encode(message: Challenge_Legacy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.track !== undefined) { - writer.uint32(10).string(message.track); - } - if (message.subTrack !== undefined) { - writer.uint32(18).string(message.subTrack); - } - if (message.forumId !== undefined) { - writer.uint32(24).int32(message.forumId); - } - if (message.directProjectId !== 0) { - writer.uint32(32).int32(message.directProjectId); - } - if (message.reviewType !== "") { - writer.uint32(42).string(message.reviewType); - } - if (message.confidentialityType !== "") { - writer.uint32(50).string(message.confidentialityType); - } - if (message.reviewScorecardId !== undefined) { - writer.uint32(56).int32(message.reviewScorecardId); - } - if (message.screeningScorecardId !== undefined) { - writer.uint32(64).int32(message.screeningScorecardId); - } - if (message.pureV5Task !== undefined) { - writer.uint32(72).bool(message.pureV5Task); - } - if (message.selfService !== undefined) { - writer.uint32(80).bool(message.selfService); - } - if (message.selfServiceCopilot !== undefined) { - writer.uint32(90).string(message.selfServiceCopilot); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Legacy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Legacy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.track = reader.string(); - break; - case 2: - message.subTrack = reader.string(); - break; - case 3: - message.forumId = reader.int32(); - break; - case 4: - message.directProjectId = reader.int32(); - break; - case 5: - message.reviewType = reader.string(); - break; - case 6: - message.confidentialityType = reader.string(); - break; - case 7: - message.reviewScorecardId = reader.int32(); - break; - case 8: - message.screeningScorecardId = reader.int32(); - break; - case 9: - message.pureV5Task = reader.bool(); - break; - case 10: - message.selfService = reader.bool(); - break; - case 11: - message.selfServiceCopilot = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Legacy { - return { - track: isSet(object.track) ? String(object.track) : undefined, - subTrack: isSet(object.subTrack) ? String(object.subTrack) : undefined, - forumId: isSet(object.forumId) ? Number(object.forumId) : undefined, - directProjectId: isSet(object.directProjectId) ? Number(object.directProjectId) : 0, - reviewType: isSet(object.reviewType) ? String(object.reviewType) : "", - confidentialityType: isSet(object.confidentialityType) ? String(object.confidentialityType) : "", - reviewScorecardId: isSet(object.reviewScorecardId) ? Number(object.reviewScorecardId) : undefined, - screeningScorecardId: isSet(object.screeningScorecardId) ? Number(object.screeningScorecardId) : undefined, - pureV5Task: isSet(object.pureV5Task) ? Boolean(object.pureV5Task) : undefined, - selfService: isSet(object.selfService) ? Boolean(object.selfService) : undefined, - selfServiceCopilot: isSet(object.selfServiceCopilot) ? String(object.selfServiceCopilot) : undefined, - }; - }, - - toJSON(message: Challenge_Legacy): unknown { - const obj: any = {}; - message.track !== undefined && (obj.track = message.track); - message.subTrack !== undefined && (obj.subTrack = message.subTrack); - message.forumId !== undefined && (obj.forumId = Math.round(message.forumId)); - message.directProjectId !== undefined && (obj.directProjectId = Math.round(message.directProjectId)); - message.reviewType !== undefined && (obj.reviewType = message.reviewType); - message.confidentialityType !== undefined && (obj.confidentialityType = message.confidentialityType); - message.reviewScorecardId !== undefined && (obj.reviewScorecardId = Math.round(message.reviewScorecardId)); - message.screeningScorecardId !== undefined && (obj.screeningScorecardId = Math.round(message.screeningScorecardId)); - message.pureV5Task !== undefined && (obj.pureV5Task = message.pureV5Task); - message.selfService !== undefined && (obj.selfService = message.selfService); - message.selfServiceCopilot !== undefined && (obj.selfServiceCopilot = message.selfServiceCopilot); - return obj; - }, - - create, I>>(base?: I): Challenge_Legacy { - return Challenge_Legacy.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Legacy { - const message = createBaseChallenge_Legacy(); - message.track = object.track ?? undefined; - message.subTrack = object.subTrack ?? undefined; - message.forumId = object.forumId ?? undefined; - message.directProjectId = object.directProjectId ?? 0; - message.reviewType = object.reviewType ?? ""; - message.confidentialityType = object.confidentialityType ?? ""; - message.reviewScorecardId = object.reviewScorecardId ?? undefined; - message.screeningScorecardId = object.screeningScorecardId ?? undefined; - message.pureV5Task = object.pureV5Task ?? undefined; - message.selfService = object.selfService ?? undefined; - message.selfServiceCopilot = object.selfServiceCopilot ?? undefined; - return message; - }, -}; - -function createBaseChallenge_Billing(): Challenge_Billing { - return { billingAccountId: 0, markup: 0 }; -} - -export const Challenge_Billing = { - encode(message: Challenge_Billing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.billingAccountId !== 0) { - writer.uint32(8).int32(message.billingAccountId); - } - if (message.markup !== 0) { - writer.uint32(21).float(message.markup); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Billing { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Billing(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.billingAccountId = reader.int32(); - break; - case 2: - message.markup = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Billing { - return { - billingAccountId: isSet(object.billingAccountId) ? Number(object.billingAccountId) : 0, - markup: isSet(object.markup) ? Number(object.markup) : 0, - }; - }, - - toJSON(message: Challenge_Billing): unknown { - const obj: any = {}; - message.billingAccountId !== undefined && (obj.billingAccountId = Math.round(message.billingAccountId)); - message.markup !== undefined && (obj.markup = message.markup); - return obj; - }, - - create, I>>(base?: I): Challenge_Billing { - return Challenge_Billing.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Billing { - const message = createBaseChallenge_Billing(); - message.billingAccountId = object.billingAccountId ?? 0; - message.markup = object.markup ?? 0; - return message; - }, -}; - -function createBaseChallenge_Event(): Challenge_Event { - return { id: undefined, name: "", key: "" }; -} - -export const Challenge_Event = { - encode(message: Challenge_Event, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== undefined) { - writer.uint32(8).int32(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.key !== "") { - writer.uint32(26).string(message.key); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Event { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Event(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.key = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Event { - return { - id: isSet(object.id) ? Number(object.id) : undefined, - name: isSet(object.name) ? String(object.name) : "", - key: isSet(object.key) ? String(object.key) : "", - }; - }, - - toJSON(message: Challenge_Event): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = Math.round(message.id)); - message.name !== undefined && (obj.name = message.name); - message.key !== undefined && (obj.key = message.key); - return obj; - }, - - create, I>>(base?: I): Challenge_Event { - return Challenge_Event.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Event { - const message = createBaseChallenge_Event(); - message.id = object.id ?? undefined; - message.name = object.name ?? ""; - message.key = object.key ?? ""; - return message; - }, -}; - -function createBaseChallenge_Term(): Challenge_Term { - return { id: "", roleId: "" }; -} - -export const Challenge_Term = { - encode(message: Challenge_Term, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.roleId !== "") { - writer.uint32(18).string(message.roleId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Term { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Term(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.roleId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Term { - return { id: isSet(object.id) ? String(object.id) : "", roleId: isSet(object.roleId) ? String(object.roleId) : "" }; - }, - - toJSON(message: Challenge_Term): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.roleId !== undefined && (obj.roleId = message.roleId); - return obj; - }, - - create, I>>(base?: I): Challenge_Term { - return Challenge_Term.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Term { - const message = createBaseChallenge_Term(); - message.id = object.id ?? ""; - message.roleId = object.roleId ?? ""; - return message; - }, -}; - -function createBaseChallenge_Metadata(): Challenge_Metadata { - return { name: "", value: "" }; -} - -export const Challenge_Metadata = { - encode(message: Challenge_Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Metadata { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Metadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Metadata { - return { - name: isSet(object.name) ? String(object.name) : "", - value: isSet(object.value) ? String(object.value) : "", - }; - }, - - toJSON(message: Challenge_Metadata): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - create, I>>(base?: I): Challenge_Metadata { - return Challenge_Metadata.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Metadata { - const message = createBaseChallenge_Metadata(); - message.name = object.name ?? ""; - message.value = object.value ?? ""; - return message; - }, -}; - -function createBaseChallenge_Discussion(): Challenge_Discussion { - return { id: undefined, name: "", type: "", provider: "", url: undefined }; -} - -export const Challenge_Discussion = { - encode(message: Challenge_Discussion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== undefined) { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.type !== "") { - writer.uint32(26).string(message.type); - } - if (message.provider !== "") { - writer.uint32(34).string(message.provider); - } - if (message.url !== undefined) { - writer.uint32(42).string(message.url); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Discussion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Discussion(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.type = reader.string(); - break; - case 4: - message.provider = reader.string(); - break; - case 5: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Discussion { - return { - id: isSet(object.id) ? String(object.id) : undefined, - name: isSet(object.name) ? String(object.name) : "", - type: isSet(object.type) ? String(object.type) : "", - provider: isSet(object.provider) ? String(object.provider) : "", - url: isSet(object.url) ? String(object.url) : undefined, - }; - }, - - toJSON(message: Challenge_Discussion): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.type !== undefined && (obj.type = message.type); - message.provider !== undefined && (obj.provider = message.provider); - message.url !== undefined && (obj.url = message.url); - return obj; - }, - - create, I>>(base?: I): Challenge_Discussion { - return Challenge_Discussion.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Discussion { - const message = createBaseChallenge_Discussion(); - message.id = object.id ?? undefined; - message.name = object.name ?? ""; - message.type = object.type ?? ""; - message.provider = object.provider ?? ""; - message.url = object.url ?? undefined; - return message; - }, -}; - -function createBaseChallenge_Phase(): Challenge_Phase { - return { - duration: 0, - scheduledStartDate: undefined, - scheduledEndDate: undefined, - actualStartDate: undefined, - actualEndDate: undefined, - name: "", - phaseId: "", - id: "", - isOpen: false, - constraints: [], - }; -} - -export const Challenge_Phase = { - encode(message: Challenge_Phase, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.duration !== 0) { - writer.uint32(8).int32(message.duration); - } - if (message.scheduledStartDate !== undefined) { - Timestamp.encode(toTimestamp(message.scheduledStartDate), writer.uint32(18).fork()).ldelim(); - } - if (message.scheduledEndDate !== undefined) { - Timestamp.encode(toTimestamp(message.scheduledEndDate), writer.uint32(26).fork()).ldelim(); - } - if (message.actualStartDate !== undefined) { - Timestamp.encode(toTimestamp(message.actualStartDate), writer.uint32(34).fork()).ldelim(); - } - if (message.actualEndDate !== undefined) { - Timestamp.encode(toTimestamp(message.actualEndDate), writer.uint32(42).fork()).ldelim(); - } - if (message.name !== "") { - writer.uint32(50).string(message.name); - } - if (message.phaseId !== "") { - writer.uint32(58).string(message.phaseId); - } - if (message.id !== "") { - writer.uint32(66).string(message.id); - } - if (message.isOpen === true) { - writer.uint32(72).bool(message.isOpen); - } - for (const v of message.constraints) { - Challenge_Phase_Constraint.encode(v!, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Phase { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Phase(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duration = reader.int32(); - break; - case 2: - message.scheduledStartDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.scheduledEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.actualStartDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.actualEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.name = reader.string(); - break; - case 7: - message.phaseId = reader.string(); - break; - case 8: - message.id = reader.string(); - break; - case 9: - message.isOpen = reader.bool(); - break; - case 10: - message.constraints.push(Challenge_Phase_Constraint.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Phase { - return { - duration: isSet(object.duration) ? Number(object.duration) : 0, - scheduledStartDate: isSet(object.scheduledStartDate) ? String(object.scheduledStartDate) : undefined, - scheduledEndDate: isSet(object.scheduledEndDate) ? String(object.scheduledEndDate) : undefined, - actualStartDate: isSet(object.actualStartDate) ? String(object.actualStartDate) : undefined, - actualEndDate: isSet(object.actualEndDate) ? String(object.actualEndDate) : undefined, - name: isSet(object.name) ? String(object.name) : "", - phaseId: isSet(object.phaseId) ? String(object.phaseId) : "", - id: isSet(object.id) ? String(object.id) : "", - isOpen: isSet(object.isOpen) ? Boolean(object.isOpen) : false, - constraints: Array.isArray(object?.constraints) - ? object.constraints.map((e: any) => Challenge_Phase_Constraint.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Challenge_Phase): unknown { - const obj: any = {}; - message.duration !== undefined && (obj.duration = Math.round(message.duration)); - message.scheduledStartDate !== undefined && (obj.scheduledStartDate = message.scheduledStartDate); - message.scheduledEndDate !== undefined && (obj.scheduledEndDate = message.scheduledEndDate); - message.actualStartDate !== undefined && (obj.actualStartDate = message.actualStartDate); - message.actualEndDate !== undefined && (obj.actualEndDate = message.actualEndDate); - message.name !== undefined && (obj.name = message.name); - message.phaseId !== undefined && (obj.phaseId = message.phaseId); - message.id !== undefined && (obj.id = message.id); - message.isOpen !== undefined && (obj.isOpen = message.isOpen); - if (message.constraints) { - obj.constraints = message.constraints.map((e) => e ? Challenge_Phase_Constraint.toJSON(e) : undefined); - } else { - obj.constraints = []; - } - return obj; - }, - - create, I>>(base?: I): Challenge_Phase { - return Challenge_Phase.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Phase { - const message = createBaseChallenge_Phase(); - message.duration = object.duration ?? 0; - message.scheduledStartDate = object.scheduledStartDate ?? undefined; - message.scheduledEndDate = object.scheduledEndDate ?? undefined; - message.actualStartDate = object.actualStartDate ?? undefined; - message.actualEndDate = object.actualEndDate ?? undefined; - message.name = object.name ?? ""; - message.phaseId = object.phaseId ?? ""; - message.id = object.id ?? ""; - message.isOpen = object.isOpen ?? false; - message.constraints = object.constraints?.map((e) => Challenge_Phase_Constraint.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseChallenge_Phase_Constraint(): Challenge_Phase_Constraint { - return { name: "", value: 0 }; -} - -export const Challenge_Phase_Constraint = { - encode(message: Challenge_Phase_Constraint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.value !== 0) { - writer.uint32(16).int32(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Phase_Constraint { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Phase_Constraint(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Phase_Constraint { - return { - name: isSet(object.name) ? String(object.name) : "", - value: isSet(object.value) ? Number(object.value) : 0, - }; - }, - - toJSON(message: Challenge_Phase_Constraint): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.value !== undefined && (obj.value = Math.round(message.value)); - return obj; - }, - - create, I>>(base?: I): Challenge_Phase_Constraint { - return Challenge_Phase_Constraint.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Phase_Constraint { - const message = createBaseChallenge_Phase_Constraint(); - message.name = object.name ?? ""; - message.value = object.value ?? 0; - return message; - }, -}; - -function createBaseChallenge_Winner(): Challenge_Winner { - return { handle: "", placement: 0, userId: 0 }; -} - -export const Challenge_Winner = { - encode(message: Challenge_Winner, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.handle !== "") { - writer.uint32(10).string(message.handle); - } - if (message.placement !== 0) { - writer.uint32(16).int32(message.placement); - } - if (message.userId !== 0) { - writer.uint32(24).int32(message.userId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Winner { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Winner(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.handle = reader.string(); - break; - case 2: - message.placement = reader.int32(); - break; - case 3: - message.userId = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Winner { - return { - handle: isSet(object.handle) ? String(object.handle) : "", - placement: isSet(object.placement) ? Number(object.placement) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: Challenge_Winner): unknown { - const obj: any = {}; - message.handle !== undefined && (obj.handle = message.handle); - message.placement !== undefined && (obj.placement = Math.round(message.placement)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - create, I>>(base?: I): Challenge_Winner { - return Challenge_Winner.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Winner { - const message = createBaseChallenge_Winner(); - message.handle = object.handle ?? ""; - message.placement = object.placement ?? 0; - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseChallenge_Task(): Challenge_Task { - return { isTask: false, isAssigned: false, memberId: undefined }; -} - -export const Challenge_Task = { - encode(message: Challenge_Task, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.isTask === true) { - writer.uint32(8).bool(message.isTask); - } - if (message.isAssigned === true) { - writer.uint32(16).bool(message.isAssigned); - } - if (message.memberId !== undefined) { - writer.uint32(24).int32(message.memberId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Task { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Task(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.isTask = reader.bool(); - break; - case 2: - message.isAssigned = reader.bool(); - break; - case 3: - message.memberId = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Task { - return { - isTask: isSet(object.isTask) ? Boolean(object.isTask) : false, - isAssigned: isSet(object.isAssigned) ? Boolean(object.isAssigned) : false, - memberId: isSet(object.memberId) ? Number(object.memberId) : undefined, - }; - }, - - toJSON(message: Challenge_Task): unknown { - const obj: any = {}; - message.isTask !== undefined && (obj.isTask = message.isTask); - message.isAssigned !== undefined && (obj.isAssigned = message.isAssigned); - message.memberId !== undefined && (obj.memberId = Math.round(message.memberId)); - return obj; - }, - - create, I>>(base?: I): Challenge_Task { - return Challenge_Task.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Task { - const message = createBaseChallenge_Task(); - message.isTask = object.isTask ?? false; - message.isAssigned = object.isAssigned ?? false; - message.memberId = object.memberId ?? undefined; - return message; - }, -}; - -function createBaseChallenge_PrizeSet(): Challenge_PrizeSet { - return { type: "", description: undefined, prizes: [] }; -} - -export const Challenge_PrizeSet = { - encode(message: Challenge_PrizeSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - for (const v of message.prizes) { - Challenge_PrizeSet_Prize.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_PrizeSet { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_PrizeSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.prizes.push(Challenge_PrizeSet_Prize.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_PrizeSet { - return { - type: isSet(object.type) ? String(object.type) : "", - description: isSet(object.description) ? String(object.description) : undefined, - prizes: Array.isArray(object?.prizes) ? object.prizes.map((e: any) => Challenge_PrizeSet_Prize.fromJSON(e)) : [], - }; - }, - - toJSON(message: Challenge_PrizeSet): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.description !== undefined && (obj.description = message.description); - if (message.prizes) { - obj.prizes = message.prizes.map((e) => e ? Challenge_PrizeSet_Prize.toJSON(e) : undefined); - } else { - obj.prizes = []; - } - return obj; - }, - - create, I>>(base?: I): Challenge_PrizeSet { - return Challenge_PrizeSet.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_PrizeSet { - const message = createBaseChallenge_PrizeSet(); - message.type = object.type ?? ""; - message.description = object.description ?? undefined; - message.prizes = object.prizes?.map((e) => Challenge_PrizeSet_Prize.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseChallenge_PrizeSet_Prize(): Challenge_PrizeSet_Prize { - return { value: 0, type: "" }; -} - -export const Challenge_PrizeSet_Prize = { - encode(message: Challenge_PrizeSet_Prize, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.value !== 0) { - writer.uint32(13).float(message.value); - } - if (message.type !== "") { - writer.uint32(18).string(message.type); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_PrizeSet_Prize { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_PrizeSet_Prize(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.float(); - break; - case 2: - message.type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_PrizeSet_Prize { - return { - value: isSet(object.value) ? Number(object.value) : 0, - type: isSet(object.type) ? String(object.type) : "", - }; - }, - - toJSON(message: Challenge_PrizeSet_Prize): unknown { - const obj: any = {}; - message.value !== undefined && (obj.value = message.value); - message.type !== undefined && (obj.type = message.type); - return obj; - }, - - create, I>>(base?: I): Challenge_PrizeSet_Prize { - return Challenge_PrizeSet_Prize.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_PrizeSet_Prize { - const message = createBaseChallenge_PrizeSet_Prize(); - message.value = object.value ?? 0; - message.type = object.type ?? ""; - return message; - }, -}; - -function createBaseChallenge_Overview(): Challenge_Overview { - return { totalPrizes: 0 }; -} - -export const Challenge_Overview = { - encode(message: Challenge_Overview, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.totalPrizes !== 0) { - writer.uint32(8).int32(message.totalPrizes); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Challenge_Overview { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallenge_Overview(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalPrizes = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Challenge_Overview { - return { totalPrizes: isSet(object.totalPrizes) ? Number(object.totalPrizes) : 0 }; - }, - - toJSON(message: Challenge_Overview): unknown { - const obj: any = {}; - message.totalPrizes !== undefined && (obj.totalPrizes = Math.round(message.totalPrizes)); - return obj; - }, - - create, I>>(base?: I): Challenge_Overview { - return Challenge_Overview.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Challenge_Overview { - const message = createBaseChallenge_Overview(); - message.totalPrizes = object.totalPrizes ?? 0; - return message; - }, -}; - -function createBaseChallengeList(): ChallengeList { - return { items: [] }; -} - -export const ChallengeList = { - encode(message: ChallengeList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - Challenge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(Challenge.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => Challenge.fromJSON(e)) : [] }; - }, - - toJSON(message: ChallengeList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? Challenge.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): ChallengeList { - return ChallengeList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeList { - const message = createBaseChallengeList(); - message.items = object.items?.map((e) => Challenge.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateChallengeInput(): CreateChallengeInput { - return { - name: "", - typeId: "", - trackId: "", - timelineTemplateId: undefined, - legacy: undefined, - billing: undefined, - description: undefined, - privateDescription: undefined, - descriptionFormat: undefined, - metadata: [], - task: undefined, - phases: [], - events: [], - terms: [], - prizeSets: [], - tags: [], - projectId: undefined, - startDate: undefined, - endDate: undefined, - status: "", - attachments: [], - groups: [], - discussions: [], - }; -} - -export const CreateChallengeInput = { - encode(message: CreateChallengeInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.typeId !== "") { - writer.uint32(18).string(message.typeId); - } - if (message.trackId !== "") { - writer.uint32(26).string(message.trackId); - } - if (message.timelineTemplateId !== undefined) { - writer.uint32(34).string(message.timelineTemplateId); - } - if (message.legacy !== undefined) { - Challenge_Legacy.encode(message.legacy, writer.uint32(42).fork()).ldelim(); - } - if (message.billing !== undefined) { - Challenge_Billing.encode(message.billing, writer.uint32(50).fork()).ldelim(); - } - if (message.description !== undefined) { - writer.uint32(58).string(message.description); - } - if (message.privateDescription !== undefined) { - writer.uint32(66).string(message.privateDescription); - } - if (message.descriptionFormat !== undefined) { - writer.uint32(74).string(message.descriptionFormat); - } - for (const v of message.metadata) { - Challenge_Metadata.encode(v!, writer.uint32(82).fork()).ldelim(); - } - if (message.task !== undefined) { - Challenge_Task.encode(message.task, writer.uint32(90).fork()).ldelim(); - } - for (const v of message.phases) { - Challenge_Phase.encode(v!, writer.uint32(98).fork()).ldelim(); - } - for (const v of message.events) { - Challenge_Event.encode(v!, writer.uint32(106).fork()).ldelim(); - } - for (const v of message.terms) { - Challenge_Term.encode(v!, writer.uint32(114).fork()).ldelim(); - } - for (const v of message.prizeSets) { - Challenge_PrizeSet.encode(v!, writer.uint32(122).fork()).ldelim(); - } - for (const v of message.tags) { - writer.uint32(130).string(v!); - } - if (message.projectId !== undefined) { - writer.uint32(136).int32(message.projectId); - } - if (message.startDate !== undefined) { - writer.uint32(144).int64(message.startDate); - } - if (message.endDate !== undefined) { - writer.uint32(152).int64(message.endDate); - } - if (message.status !== "") { - writer.uint32(162).string(message.status); - } - for (const v of message.attachments) { - writer.uint32(170).string(v!); - } - for (const v of message.groups) { - writer.uint32(178).string(v!); - } - for (const v of message.discussions) { - Challenge_Discussion.encode(v!, writer.uint32(186).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateChallengeInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateChallengeInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.typeId = reader.string(); - break; - case 3: - message.trackId = reader.string(); - break; - case 4: - message.timelineTemplateId = reader.string(); - break; - case 5: - message.legacy = Challenge_Legacy.decode(reader, reader.uint32()); - break; - case 6: - message.billing = Challenge_Billing.decode(reader, reader.uint32()); - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.privateDescription = reader.string(); - break; - case 9: - message.descriptionFormat = reader.string(); - break; - case 10: - message.metadata.push(Challenge_Metadata.decode(reader, reader.uint32())); - break; - case 11: - message.task = Challenge_Task.decode(reader, reader.uint32()); - break; - case 12: - message.phases.push(Challenge_Phase.decode(reader, reader.uint32())); - break; - case 13: - message.events.push(Challenge_Event.decode(reader, reader.uint32())); - break; - case 14: - message.terms.push(Challenge_Term.decode(reader, reader.uint32())); - break; - case 15: - message.prizeSets.push(Challenge_PrizeSet.decode(reader, reader.uint32())); - break; - case 16: - message.tags.push(reader.string()); - break; - case 17: - message.projectId = reader.int32(); - break; - case 18: - message.startDate = longToNumber(reader.int64() as Long); - break; - case 19: - message.endDate = longToNumber(reader.int64() as Long); - break; - case 20: - message.status = reader.string(); - break; - case 21: - message.attachments.push(reader.string()); - break; - case 22: - message.groups.push(reader.string()); - break; - case 23: - message.discussions.push(Challenge_Discussion.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateChallengeInput { - return { - name: isSet(object.name) ? String(object.name) : "", - typeId: isSet(object.typeId) ? String(object.typeId) : "", - trackId: isSet(object.trackId) ? String(object.trackId) : "", - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : undefined, - legacy: isSet(object.legacy) ? Challenge_Legacy.fromJSON(object.legacy) : undefined, - billing: isSet(object.billing) ? Challenge_Billing.fromJSON(object.billing) : undefined, - description: isSet(object.description) ? String(object.description) : undefined, - privateDescription: isSet(object.privateDescription) ? String(object.privateDescription) : undefined, - descriptionFormat: isSet(object.descriptionFormat) ? String(object.descriptionFormat) : undefined, - metadata: Array.isArray(object?.metadata) ? object.metadata.map((e: any) => Challenge_Metadata.fromJSON(e)) : [], - task: isSet(object.task) ? Challenge_Task.fromJSON(object.task) : undefined, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => Challenge_Phase.fromJSON(e)) : [], - events: Array.isArray(object?.events) ? object.events.map((e: any) => Challenge_Event.fromJSON(e)) : [], - terms: Array.isArray(object?.terms) ? object.terms.map((e: any) => Challenge_Term.fromJSON(e)) : [], - prizeSets: Array.isArray(object?.prizeSets) - ? object.prizeSets.map((e: any) => Challenge_PrizeSet.fromJSON(e)) - : [], - tags: Array.isArray(object?.tags) ? object.tags.map((e: any) => String(e)) : [], - projectId: isSet(object.projectId) ? Number(object.projectId) : undefined, - startDate: isSet(object.startDate) ? Number(object.startDate) : undefined, - endDate: isSet(object.endDate) ? Number(object.endDate) : undefined, - status: isSet(object.status) ? String(object.status) : "", - attachments: Array.isArray(object?.attachments) ? object.attachments.map((e: any) => String(e)) : [], - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => String(e)) : [], - discussions: Array.isArray(object?.discussions) - ? object.discussions.map((e: any) => Challenge_Discussion.fromJSON(e)) - : [], - }; - }, - - toJSON(message: CreateChallengeInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.trackId !== undefined && (obj.trackId = message.trackId); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - message.legacy !== undefined && (obj.legacy = message.legacy ? Challenge_Legacy.toJSON(message.legacy) : undefined); - message.billing !== undefined && - (obj.billing = message.billing ? Challenge_Billing.toJSON(message.billing) : undefined); - message.description !== undefined && (obj.description = message.description); - message.privateDescription !== undefined && (obj.privateDescription = message.privateDescription); - message.descriptionFormat !== undefined && (obj.descriptionFormat = message.descriptionFormat); - if (message.metadata) { - obj.metadata = message.metadata.map((e) => e ? Challenge_Metadata.toJSON(e) : undefined); - } else { - obj.metadata = []; - } - message.task !== undefined && (obj.task = message.task ? Challenge_Task.toJSON(message.task) : undefined); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? Challenge_Phase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - if (message.events) { - obj.events = message.events.map((e) => e ? Challenge_Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - if (message.terms) { - obj.terms = message.terms.map((e) => e ? Challenge_Term.toJSON(e) : undefined); - } else { - obj.terms = []; - } - if (message.prizeSets) { - obj.prizeSets = message.prizeSets.map((e) => e ? Challenge_PrizeSet.toJSON(e) : undefined); - } else { - obj.prizeSets = []; - } - if (message.tags) { - obj.tags = message.tags.map((e) => e); - } else { - obj.tags = []; - } - message.projectId !== undefined && (obj.projectId = Math.round(message.projectId)); - message.startDate !== undefined && (obj.startDate = Math.round(message.startDate)); - message.endDate !== undefined && (obj.endDate = Math.round(message.endDate)); - message.status !== undefined && (obj.status = message.status); - if (message.attachments) { - obj.attachments = message.attachments.map((e) => e); - } else { - obj.attachments = []; - } - if (message.groups) { - obj.groups = message.groups.map((e) => e); - } else { - obj.groups = []; - } - if (message.discussions) { - obj.discussions = message.discussions.map((e) => e ? Challenge_Discussion.toJSON(e) : undefined); - } else { - obj.discussions = []; - } - return obj; - }, - - create, I>>(base?: I): CreateChallengeInput { - return CreateChallengeInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateChallengeInput { - const message = createBaseCreateChallengeInput(); - message.name = object.name ?? ""; - message.typeId = object.typeId ?? ""; - message.trackId = object.trackId ?? ""; - message.timelineTemplateId = object.timelineTemplateId ?? undefined; - message.legacy = (object.legacy !== undefined && object.legacy !== null) - ? Challenge_Legacy.fromPartial(object.legacy) - : undefined; - message.billing = (object.billing !== undefined && object.billing !== null) - ? Challenge_Billing.fromPartial(object.billing) - : undefined; - message.description = object.description ?? undefined; - message.privateDescription = object.privateDescription ?? undefined; - message.descriptionFormat = object.descriptionFormat ?? undefined; - message.metadata = object.metadata?.map((e) => Challenge_Metadata.fromPartial(e)) || []; - message.task = (object.task !== undefined && object.task !== null) - ? Challenge_Task.fromPartial(object.task) - : undefined; - message.phases = object.phases?.map((e) => Challenge_Phase.fromPartial(e)) || []; - message.events = object.events?.map((e) => Challenge_Event.fromPartial(e)) || []; - message.terms = object.terms?.map((e) => Challenge_Term.fromPartial(e)) || []; - message.prizeSets = object.prizeSets?.map((e) => Challenge_PrizeSet.fromPartial(e)) || []; - message.tags = object.tags?.map((e) => e) || []; - message.projectId = object.projectId ?? undefined; - message.startDate = object.startDate ?? undefined; - message.endDate = object.endDate ?? undefined; - message.status = object.status ?? ""; - message.attachments = object.attachments?.map((e) => e) || []; - message.groups = object.groups?.map((e) => e) || []; - message.discussions = object.discussions?.map((e) => Challenge_Discussion.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUpdateChallengeInput(): UpdateChallengeInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateChallengeInput = { - encode(message: UpdateChallengeInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateChallengeInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateChallengeInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateChallengeInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateChallengeInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && - (obj.updateInput = message.updateInput - ? UpdateChallengeInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateChallengeInput { - return UpdateChallengeInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateChallengeInput { - const message = createBaseUpdateChallengeInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateChallengeInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeInput_UpdateInput(): UpdateChallengeInput_UpdateInput { - return { - id: "", - legacyId: undefined, - name: undefined, - typeId: undefined, - trackId: undefined, - legacy: undefined, - billing: undefined, - description: undefined, - privateDescription: undefined, - descriptionFormat: undefined, - metadata: [], - task: undefined, - timelineTemplateId: undefined, - phases: [], - events: [], - terms: [], - prizeSets: [], - tags: [], - projectId: undefined, - startDate: undefined, - endDate: undefined, - status: undefined, - attachments: [], - groups: [], - winners: [], - discussions: [], - createdBy: undefined, - updatedBy: undefined, - created: undefined, - updated: undefined, - overview: undefined, - }; -} - -export const UpdateChallengeInput_UpdateInput = { - encode(message: UpdateChallengeInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.legacyId !== undefined) { - writer.uint32(16).int32(message.legacyId); - } - if (message.name !== undefined) { - writer.uint32(26).string(message.name); - } - if (message.typeId !== undefined) { - writer.uint32(34).string(message.typeId); - } - if (message.trackId !== undefined) { - writer.uint32(42).string(message.trackId); - } - if (message.legacy !== undefined) { - Challenge_Legacy.encode(message.legacy, writer.uint32(50).fork()).ldelim(); - } - if (message.billing !== undefined) { - Challenge_Billing.encode(message.billing, writer.uint32(58).fork()).ldelim(); - } - if (message.description !== undefined) { - writer.uint32(66).string(message.description); - } - if (message.privateDescription !== undefined) { - writer.uint32(74).string(message.privateDescription); - } - if (message.descriptionFormat !== undefined) { - writer.uint32(82).string(message.descriptionFormat); - } - for (const v of message.metadata) { - Challenge_Metadata.encode(v!, writer.uint32(90).fork()).ldelim(); - } - if (message.task !== undefined) { - Challenge_Task.encode(message.task, writer.uint32(98).fork()).ldelim(); - } - if (message.timelineTemplateId !== undefined) { - writer.uint32(106).string(message.timelineTemplateId); - } - for (const v of message.phases) { - Challenge_Phase.encode(v!, writer.uint32(114).fork()).ldelim(); - } - for (const v of message.events) { - Challenge_Event.encode(v!, writer.uint32(122).fork()).ldelim(); - } - for (const v of message.terms) { - Challenge_Term.encode(v!, writer.uint32(130).fork()).ldelim(); - } - for (const v of message.prizeSets) { - Challenge_PrizeSet.encode(v!, writer.uint32(138).fork()).ldelim(); - } - for (const v of message.tags) { - writer.uint32(146).string(v!); - } - if (message.projectId !== undefined) { - writer.uint32(152).int32(message.projectId); - } - if (message.startDate !== undefined) { - writer.uint32(160).int64(message.startDate); - } - if (message.endDate !== undefined) { - writer.uint32(168).int64(message.endDate); - } - if (message.status !== undefined) { - writer.uint32(178).string(message.status); - } - for (const v of message.attachments) { - writer.uint32(186).string(v!); - } - for (const v of message.groups) { - writer.uint32(194).string(v!); - } - for (const v of message.winners) { - Challenge_Winner.encode(v!, writer.uint32(202).fork()).ldelim(); - } - for (const v of message.discussions) { - Challenge_Discussion.encode(v!, writer.uint32(210).fork()).ldelim(); - } - if (message.createdBy !== undefined) { - writer.uint32(218).string(message.createdBy); - } - if (message.updatedBy !== undefined) { - writer.uint32(226).string(message.updatedBy); - } - if (message.created !== undefined) { - writer.uint32(232).int64(message.created); - } - if (message.updated !== undefined) { - writer.uint32(240).int64(message.updated); - } - if (message.overview !== undefined) { - Challenge_Overview.encode(message.overview, writer.uint32(250).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.legacyId = reader.int32(); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.typeId = reader.string(); - break; - case 5: - message.trackId = reader.string(); - break; - case 6: - message.legacy = Challenge_Legacy.decode(reader, reader.uint32()); - break; - case 7: - message.billing = Challenge_Billing.decode(reader, reader.uint32()); - break; - case 8: - message.description = reader.string(); - break; - case 9: - message.privateDescription = reader.string(); - break; - case 10: - message.descriptionFormat = reader.string(); - break; - case 11: - message.metadata.push(Challenge_Metadata.decode(reader, reader.uint32())); - break; - case 12: - message.task = Challenge_Task.decode(reader, reader.uint32()); - break; - case 13: - message.timelineTemplateId = reader.string(); - break; - case 14: - message.phases.push(Challenge_Phase.decode(reader, reader.uint32())); - break; - case 15: - message.events.push(Challenge_Event.decode(reader, reader.uint32())); - break; - case 16: - message.terms.push(Challenge_Term.decode(reader, reader.uint32())); - break; - case 17: - message.prizeSets.push(Challenge_PrizeSet.decode(reader, reader.uint32())); - break; - case 18: - message.tags.push(reader.string()); - break; - case 19: - message.projectId = reader.int32(); - break; - case 20: - message.startDate = longToNumber(reader.int64() as Long); - break; - case 21: - message.endDate = longToNumber(reader.int64() as Long); - break; - case 22: - message.status = reader.string(); - break; - case 23: - message.attachments.push(reader.string()); - break; - case 24: - message.groups.push(reader.string()); - break; - case 25: - message.winners.push(Challenge_Winner.decode(reader, reader.uint32())); - break; - case 26: - message.discussions.push(Challenge_Discussion.decode(reader, reader.uint32())); - break; - case 27: - message.createdBy = reader.string(); - break; - case 28: - message.updatedBy = reader.string(); - break; - case 29: - message.created = longToNumber(reader.int64() as Long); - break; - case 30: - message.updated = longToNumber(reader.int64() as Long); - break; - case 31: - message.overview = Challenge_Overview.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInput_UpdateInput { - return { - id: isSet(object.id) ? String(object.id) : "", - legacyId: isSet(object.legacyId) ? Number(object.legacyId) : undefined, - name: isSet(object.name) ? String(object.name) : undefined, - typeId: isSet(object.typeId) ? String(object.typeId) : undefined, - trackId: isSet(object.trackId) ? String(object.trackId) : undefined, - legacy: isSet(object.legacy) ? Challenge_Legacy.fromJSON(object.legacy) : undefined, - billing: isSet(object.billing) ? Challenge_Billing.fromJSON(object.billing) : undefined, - description: isSet(object.description) ? String(object.description) : undefined, - privateDescription: isSet(object.privateDescription) ? String(object.privateDescription) : undefined, - descriptionFormat: isSet(object.descriptionFormat) ? String(object.descriptionFormat) : undefined, - metadata: Array.isArray(object?.metadata) ? object.metadata.map((e: any) => Challenge_Metadata.fromJSON(e)) : [], - task: isSet(object.task) ? Challenge_Task.fromJSON(object.task) : undefined, - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : undefined, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => Challenge_Phase.fromJSON(e)) : [], - events: Array.isArray(object?.events) ? object.events.map((e: any) => Challenge_Event.fromJSON(e)) : [], - terms: Array.isArray(object?.terms) ? object.terms.map((e: any) => Challenge_Term.fromJSON(e)) : [], - prizeSets: Array.isArray(object?.prizeSets) - ? object.prizeSets.map((e: any) => Challenge_PrizeSet.fromJSON(e)) - : [], - tags: Array.isArray(object?.tags) ? object.tags.map((e: any) => String(e)) : [], - projectId: isSet(object.projectId) ? Number(object.projectId) : undefined, - startDate: isSet(object.startDate) ? Number(object.startDate) : undefined, - endDate: isSet(object.endDate) ? Number(object.endDate) : undefined, - status: isSet(object.status) ? String(object.status) : undefined, - attachments: Array.isArray(object?.attachments) ? object.attachments.map((e: any) => String(e)) : [], - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => String(e)) : [], - winners: Array.isArray(object?.winners) ? object.winners.map((e: any) => Challenge_Winner.fromJSON(e)) : [], - discussions: Array.isArray(object?.discussions) - ? object.discussions.map((e: any) => Challenge_Discussion.fromJSON(e)) - : [], - createdBy: isSet(object.createdBy) ? String(object.createdBy) : undefined, - updatedBy: isSet(object.updatedBy) ? String(object.updatedBy) : undefined, - created: isSet(object.created) ? Number(object.created) : undefined, - updated: isSet(object.updated) ? Number(object.updated) : undefined, - overview: isSet(object.overview) ? Challenge_Overview.fromJSON(object.overview) : undefined, - }; - }, - - toJSON(message: UpdateChallengeInput_UpdateInput): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.legacyId !== undefined && (obj.legacyId = Math.round(message.legacyId)); - message.name !== undefined && (obj.name = message.name); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.trackId !== undefined && (obj.trackId = message.trackId); - message.legacy !== undefined && (obj.legacy = message.legacy ? Challenge_Legacy.toJSON(message.legacy) : undefined); - message.billing !== undefined && - (obj.billing = message.billing ? Challenge_Billing.toJSON(message.billing) : undefined); - message.description !== undefined && (obj.description = message.description); - message.privateDescription !== undefined && (obj.privateDescription = message.privateDescription); - message.descriptionFormat !== undefined && (obj.descriptionFormat = message.descriptionFormat); - if (message.metadata) { - obj.metadata = message.metadata.map((e) => e ? Challenge_Metadata.toJSON(e) : undefined); - } else { - obj.metadata = []; - } - message.task !== undefined && (obj.task = message.task ? Challenge_Task.toJSON(message.task) : undefined); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? Challenge_Phase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - if (message.events) { - obj.events = message.events.map((e) => e ? Challenge_Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - if (message.terms) { - obj.terms = message.terms.map((e) => e ? Challenge_Term.toJSON(e) : undefined); - } else { - obj.terms = []; - } - if (message.prizeSets) { - obj.prizeSets = message.prizeSets.map((e) => e ? Challenge_PrizeSet.toJSON(e) : undefined); - } else { - obj.prizeSets = []; - } - if (message.tags) { - obj.tags = message.tags.map((e) => e); - } else { - obj.tags = []; - } - message.projectId !== undefined && (obj.projectId = Math.round(message.projectId)); - message.startDate !== undefined && (obj.startDate = Math.round(message.startDate)); - message.endDate !== undefined && (obj.endDate = Math.round(message.endDate)); - message.status !== undefined && (obj.status = message.status); - if (message.attachments) { - obj.attachments = message.attachments.map((e) => e); - } else { - obj.attachments = []; - } - if (message.groups) { - obj.groups = message.groups.map((e) => e); - } else { - obj.groups = []; - } - if (message.winners) { - obj.winners = message.winners.map((e) => e ? Challenge_Winner.toJSON(e) : undefined); - } else { - obj.winners = []; - } - if (message.discussions) { - obj.discussions = message.discussions.map((e) => e ? Challenge_Discussion.toJSON(e) : undefined); - } else { - obj.discussions = []; - } - message.createdBy !== undefined && (obj.createdBy = message.createdBy); - message.updatedBy !== undefined && (obj.updatedBy = message.updatedBy); - message.created !== undefined && (obj.created = Math.round(message.created)); - message.updated !== undefined && (obj.updated = Math.round(message.updated)); - message.overview !== undefined && - (obj.overview = message.overview ? Challenge_Overview.toJSON(message.overview) : undefined); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInput_UpdateInput { - return UpdateChallengeInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInput_UpdateInput { - const message = createBaseUpdateChallengeInput_UpdateInput(); - message.id = object.id ?? ""; - message.legacyId = object.legacyId ?? undefined; - message.name = object.name ?? undefined; - message.typeId = object.typeId ?? undefined; - message.trackId = object.trackId ?? undefined; - message.legacy = (object.legacy !== undefined && object.legacy !== null) - ? Challenge_Legacy.fromPartial(object.legacy) - : undefined; - message.billing = (object.billing !== undefined && object.billing !== null) - ? Challenge_Billing.fromPartial(object.billing) - : undefined; - message.description = object.description ?? undefined; - message.privateDescription = object.privateDescription ?? undefined; - message.descriptionFormat = object.descriptionFormat ?? undefined; - message.metadata = object.metadata?.map((e) => Challenge_Metadata.fromPartial(e)) || []; - message.task = (object.task !== undefined && object.task !== null) - ? Challenge_Task.fromPartial(object.task) - : undefined; - message.timelineTemplateId = object.timelineTemplateId ?? undefined; - message.phases = object.phases?.map((e) => Challenge_Phase.fromPartial(e)) || []; - message.events = object.events?.map((e) => Challenge_Event.fromPartial(e)) || []; - message.terms = object.terms?.map((e) => Challenge_Term.fromPartial(e)) || []; - message.prizeSets = object.prizeSets?.map((e) => Challenge_PrizeSet.fromPartial(e)) || []; - message.tags = object.tags?.map((e) => e) || []; - message.projectId = object.projectId ?? undefined; - message.startDate = object.startDate ?? undefined; - message.endDate = object.endDate ?? undefined; - message.status = object.status ?? undefined; - message.attachments = object.attachments?.map((e) => e) || []; - message.groups = object.groups?.map((e) => e) || []; - message.winners = object.winners?.map((e) => Challenge_Winner.fromPartial(e)) || []; - message.discussions = object.discussions?.map((e) => Challenge_Discussion.fromPartial(e)) || []; - message.createdBy = object.createdBy ?? undefined; - message.updatedBy = object.updatedBy ?? undefined; - message.created = object.created ?? undefined; - message.updated = object.updated ?? undefined; - message.overview = (object.overview !== undefined && object.overview !== null) - ? Challenge_Overview.fromPartial(object.overview) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL(): UpdateChallengeInputForACL { - return { filterCriteria: [], updateInputForAcl: undefined }; -} - -export const UpdateChallengeInputForACL = { - encode(message: UpdateChallengeInputForACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInputForAcl !== undefined) { - UpdateChallengeInputForACL_UpdateInputForACL.encode(message.updateInputForAcl, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInputForAcl = UpdateChallengeInputForACL_UpdateInputForACL.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInputForAcl: isSet(object.updateInputForAcl) - ? UpdateChallengeInputForACL_UpdateInputForACL.fromJSON(object.updateInputForAcl) - : undefined, - }; - }, - - toJSON(message: UpdateChallengeInputForACL): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInputForAcl !== undefined && (obj.updateInputForAcl = message.updateInputForAcl - ? UpdateChallengeInputForACL_UpdateInputForACL.toJSON(message.updateInputForAcl) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateChallengeInputForACL { - return UpdateChallengeInputForACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateChallengeInputForACL { - const message = createBaseUpdateChallengeInputForACL(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInputForAcl = (object.updateInputForAcl !== undefined && object.updateInputForAcl !== null) - ? UpdateChallengeInputForACL_UpdateInputForACL.fromPartial(object.updateInputForAcl) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_UpdateInputForACL(): UpdateChallengeInputForACL_UpdateInputForACL { - return { - status: undefined, - phases: undefined, - currentPhase: undefined, - currentPhaseNames: undefined, - registrationStartDate: undefined, - registrationEndDate: undefined, - submissionStartDate: undefined, - submissionEndDate: undefined, - startDate: undefined, - endDate: undefined, - legacy: undefined, - prizeSets: undefined, - overview: undefined, - winners: undefined, - }; -} - -export const UpdateChallengeInputForACL_UpdateInputForACL = { - encode(message: UpdateChallengeInputForACL_UpdateInputForACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.status !== undefined) { - writer.uint32(10).string(message.status); - } - if (message.phases !== undefined) { - UpdateChallengeInputForACL_PhasesACL.encode(message.phases, writer.uint32(18).fork()).ldelim(); - } - if (message.currentPhase !== undefined) { - Challenge_Phase.encode(message.currentPhase, writer.uint32(26).fork()).ldelim(); - } - if (message.currentPhaseNames !== undefined) { - UpdateChallengeInputForACL_CurrentPhaseNamesACL.encode(message.currentPhaseNames, writer.uint32(34).fork()) - .ldelim(); - } - if (message.registrationStartDate !== undefined) { - Timestamp.encode(toTimestamp(message.registrationStartDate), writer.uint32(42).fork()).ldelim(); - } - if (message.registrationEndDate !== undefined) { - Timestamp.encode(toTimestamp(message.registrationEndDate), writer.uint32(50).fork()).ldelim(); - } - if (message.submissionStartDate !== undefined) { - Timestamp.encode(toTimestamp(message.submissionStartDate), writer.uint32(58).fork()).ldelim(); - } - if (message.submissionEndDate !== undefined) { - Timestamp.encode(toTimestamp(message.submissionEndDate), writer.uint32(66).fork()).ldelim(); - } - if (message.startDate !== undefined) { - Timestamp.encode(toTimestamp(message.startDate), writer.uint32(74).fork()).ldelim(); - } - if (message.endDate !== undefined) { - Timestamp.encode(toTimestamp(message.endDate), writer.uint32(82).fork()).ldelim(); - } - if (message.legacy !== undefined) { - UpdateChallengeInputForACL_LegacyACL.encode(message.legacy, writer.uint32(90).fork()).ldelim(); - } - if (message.prizeSets !== undefined) { - UpdateChallengeInputForACL_PrizeSetsACL.encode(message.prizeSets, writer.uint32(98).fork()).ldelim(); - } - if (message.overview !== undefined) { - Challenge_Overview.encode(message.overview, writer.uint32(106).fork()).ldelim(); - } - if (message.winners !== undefined) { - UpdateChallengeInputForACL_WinnersACL.encode(message.winners, writer.uint32(114).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_UpdateInputForACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_UpdateInputForACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.phases = UpdateChallengeInputForACL_PhasesACL.decode(reader, reader.uint32()); - break; - case 3: - message.currentPhase = Challenge_Phase.decode(reader, reader.uint32()); - break; - case 4: - message.currentPhaseNames = UpdateChallengeInputForACL_CurrentPhaseNamesACL.decode(reader, reader.uint32()); - break; - case 5: - message.registrationStartDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.registrationEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.submissionStartDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 8: - message.submissionEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.startDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.endDate = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 11: - message.legacy = UpdateChallengeInputForACL_LegacyACL.decode(reader, reader.uint32()); - break; - case 12: - message.prizeSets = UpdateChallengeInputForACL_PrizeSetsACL.decode(reader, reader.uint32()); - break; - case 13: - message.overview = Challenge_Overview.decode(reader, reader.uint32()); - break; - case 14: - message.winners = UpdateChallengeInputForACL_WinnersACL.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_UpdateInputForACL { - return { - status: isSet(object.status) ? String(object.status) : undefined, - phases: isSet(object.phases) ? UpdateChallengeInputForACL_PhasesACL.fromJSON(object.phases) : undefined, - currentPhase: isSet(object.currentPhase) ? Challenge_Phase.fromJSON(object.currentPhase) : undefined, - currentPhaseNames: isSet(object.currentPhaseNames) - ? UpdateChallengeInputForACL_CurrentPhaseNamesACL.fromJSON(object.currentPhaseNames) - : undefined, - registrationStartDate: isSet(object.registrationStartDate) ? String(object.registrationStartDate) : undefined, - registrationEndDate: isSet(object.registrationEndDate) ? String(object.registrationEndDate) : undefined, - submissionStartDate: isSet(object.submissionStartDate) ? String(object.submissionStartDate) : undefined, - submissionEndDate: isSet(object.submissionEndDate) ? String(object.submissionEndDate) : undefined, - startDate: isSet(object.startDate) ? String(object.startDate) : undefined, - endDate: isSet(object.endDate) ? String(object.endDate) : undefined, - legacy: isSet(object.legacy) ? UpdateChallengeInputForACL_LegacyACL.fromJSON(object.legacy) : undefined, - prizeSets: isSet(object.prizeSets) - ? UpdateChallengeInputForACL_PrizeSetsACL.fromJSON(object.prizeSets) - : undefined, - overview: isSet(object.overview) ? Challenge_Overview.fromJSON(object.overview) : undefined, - winners: isSet(object.winners) ? UpdateChallengeInputForACL_WinnersACL.fromJSON(object.winners) : undefined, - }; - }, - - toJSON(message: UpdateChallengeInputForACL_UpdateInputForACL): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - message.phases !== undefined && - (obj.phases = message.phases ? UpdateChallengeInputForACL_PhasesACL.toJSON(message.phases) : undefined); - message.currentPhase !== undefined && - (obj.currentPhase = message.currentPhase ? Challenge_Phase.toJSON(message.currentPhase) : undefined); - message.currentPhaseNames !== undefined && (obj.currentPhaseNames = message.currentPhaseNames - ? UpdateChallengeInputForACL_CurrentPhaseNamesACL.toJSON(message.currentPhaseNames) - : undefined); - message.registrationStartDate !== undefined && (obj.registrationStartDate = message.registrationStartDate); - message.registrationEndDate !== undefined && (obj.registrationEndDate = message.registrationEndDate); - message.submissionStartDate !== undefined && (obj.submissionStartDate = message.submissionStartDate); - message.submissionEndDate !== undefined && (obj.submissionEndDate = message.submissionEndDate); - message.startDate !== undefined && (obj.startDate = message.startDate); - message.endDate !== undefined && (obj.endDate = message.endDate); - message.legacy !== undefined && - (obj.legacy = message.legacy ? UpdateChallengeInputForACL_LegacyACL.toJSON(message.legacy) : undefined); - message.prizeSets !== undefined && - (obj.prizeSets = message.prizeSets - ? UpdateChallengeInputForACL_PrizeSetsACL.toJSON(message.prizeSets) - : undefined); - message.overview !== undefined && - (obj.overview = message.overview ? Challenge_Overview.toJSON(message.overview) : undefined); - message.winners !== undefined && - (obj.winners = message.winners ? UpdateChallengeInputForACL_WinnersACL.toJSON(message.winners) : undefined); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_UpdateInputForACL { - return UpdateChallengeInputForACL_UpdateInputForACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_UpdateInputForACL { - const message = createBaseUpdateChallengeInputForACL_UpdateInputForACL(); - message.status = object.status ?? undefined; - message.phases = (object.phases !== undefined && object.phases !== null) - ? UpdateChallengeInputForACL_PhasesACL.fromPartial(object.phases) - : undefined; - message.currentPhase = (object.currentPhase !== undefined && object.currentPhase !== null) - ? Challenge_Phase.fromPartial(object.currentPhase) - : undefined; - message.currentPhaseNames = (object.currentPhaseNames !== undefined && object.currentPhaseNames !== null) - ? UpdateChallengeInputForACL_CurrentPhaseNamesACL.fromPartial(object.currentPhaseNames) - : undefined; - message.registrationStartDate = object.registrationStartDate ?? undefined; - message.registrationEndDate = object.registrationEndDate ?? undefined; - message.submissionStartDate = object.submissionStartDate ?? undefined; - message.submissionEndDate = object.submissionEndDate ?? undefined; - message.startDate = object.startDate ?? undefined; - message.endDate = object.endDate ?? undefined; - message.legacy = (object.legacy !== undefined && object.legacy !== null) - ? UpdateChallengeInputForACL_LegacyACL.fromPartial(object.legacy) - : undefined; - message.prizeSets = (object.prizeSets !== undefined && object.prizeSets !== null) - ? UpdateChallengeInputForACL_PrizeSetsACL.fromPartial(object.prizeSets) - : undefined; - message.overview = (object.overview !== undefined && object.overview !== null) - ? Challenge_Overview.fromPartial(object.overview) - : undefined; - message.winners = (object.winners !== undefined && object.winners !== null) - ? UpdateChallengeInputForACL_WinnersACL.fromPartial(object.winners) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_PhasesACL(): UpdateChallengeInputForACL_PhasesACL { - return { phases: [] }; -} - -export const UpdateChallengeInputForACL_PhasesACL = { - encode(message: UpdateChallengeInputForACL_PhasesACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.phases) { - Challenge_Phase.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_PhasesACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_PhasesACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.phases.push(Challenge_Phase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_PhasesACL { - return { phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => Challenge_Phase.fromJSON(e)) : [] }; - }, - - toJSON(message: UpdateChallengeInputForACL_PhasesACL): unknown { - const obj: any = {}; - if (message.phases) { - obj.phases = message.phases.map((e) => e ? Challenge_Phase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_PhasesACL { - return UpdateChallengeInputForACL_PhasesACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_PhasesACL { - const message = createBaseUpdateChallengeInputForACL_PhasesACL(); - message.phases = object.phases?.map((e) => Challenge_Phase.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_CurrentPhaseNamesACL(): UpdateChallengeInputForACL_CurrentPhaseNamesACL { - return { currentPhaseNames: [] }; -} - -export const UpdateChallengeInputForACL_CurrentPhaseNamesACL = { - encode( - message: UpdateChallengeInputForACL_CurrentPhaseNamesACL, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - for (const v of message.currentPhaseNames) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_CurrentPhaseNamesACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_CurrentPhaseNamesACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currentPhaseNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_CurrentPhaseNamesACL { - return { - currentPhaseNames: Array.isArray(object?.currentPhaseNames) - ? object.currentPhaseNames.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: UpdateChallengeInputForACL_CurrentPhaseNamesACL): unknown { - const obj: any = {}; - if (message.currentPhaseNames) { - obj.currentPhaseNames = message.currentPhaseNames.map((e) => e); - } else { - obj.currentPhaseNames = []; - } - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_CurrentPhaseNamesACL { - return UpdateChallengeInputForACL_CurrentPhaseNamesACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_CurrentPhaseNamesACL { - const message = createBaseUpdateChallengeInputForACL_CurrentPhaseNamesACL(); - message.currentPhaseNames = object.currentPhaseNames?.map((e) => e) || []; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_LegacyACL(): UpdateChallengeInputForACL_LegacyACL { - return { reviewScorecardId: undefined, screeningScorecardId: undefined }; -} - -export const UpdateChallengeInputForACL_LegacyACL = { - encode(message: UpdateChallengeInputForACL_LegacyACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.reviewScorecardId !== undefined) { - writer.uint32(8).int32(message.reviewScorecardId); - } - if (message.screeningScorecardId !== undefined) { - writer.uint32(16).int32(message.screeningScorecardId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_LegacyACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_LegacyACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reviewScorecardId = reader.int32(); - break; - case 2: - message.screeningScorecardId = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_LegacyACL { - return { - reviewScorecardId: isSet(object.reviewScorecardId) ? Number(object.reviewScorecardId) : undefined, - screeningScorecardId: isSet(object.screeningScorecardId) ? Number(object.screeningScorecardId) : undefined, - }; - }, - - toJSON(message: UpdateChallengeInputForACL_LegacyACL): unknown { - const obj: any = {}; - message.reviewScorecardId !== undefined && (obj.reviewScorecardId = Math.round(message.reviewScorecardId)); - message.screeningScorecardId !== undefined && (obj.screeningScorecardId = Math.round(message.screeningScorecardId)); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_LegacyACL { - return UpdateChallengeInputForACL_LegacyACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_LegacyACL { - const message = createBaseUpdateChallengeInputForACL_LegacyACL(); - message.reviewScorecardId = object.reviewScorecardId ?? undefined; - message.screeningScorecardId = object.screeningScorecardId ?? undefined; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_PrizeSetsACL(): UpdateChallengeInputForACL_PrizeSetsACL { - return { prizeSets: [] }; -} - -export const UpdateChallengeInputForACL_PrizeSetsACL = { - encode(message: UpdateChallengeInputForACL_PrizeSetsACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.prizeSets) { - Challenge_PrizeSet.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_PrizeSetsACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_PrizeSetsACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.prizeSets.push(Challenge_PrizeSet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_PrizeSetsACL { - return { - prizeSets: Array.isArray(object?.prizeSets) - ? object.prizeSets.map((e: any) => Challenge_PrizeSet.fromJSON(e)) - : [], - }; - }, - - toJSON(message: UpdateChallengeInputForACL_PrizeSetsACL): unknown { - const obj: any = {}; - if (message.prizeSets) { - obj.prizeSets = message.prizeSets.map((e) => e ? Challenge_PrizeSet.toJSON(e) : undefined); - } else { - obj.prizeSets = []; - } - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_PrizeSetsACL { - return UpdateChallengeInputForACL_PrizeSetsACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_PrizeSetsACL { - const message = createBaseUpdateChallengeInputForACL_PrizeSetsACL(); - message.prizeSets = object.prizeSets?.map((e) => Challenge_PrizeSet.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_WinnersACL(): UpdateChallengeInputForACL_WinnersACL { - return { winners: [] }; -} - -export const UpdateChallengeInputForACL_WinnersACL = { - encode(message: UpdateChallengeInputForACL_WinnersACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.winners) { - UpdateChallengeInputForACL_WinnerACL.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_WinnersACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_WinnersACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.winners.push(UpdateChallengeInputForACL_WinnerACL.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_WinnersACL { - return { - winners: Array.isArray(object?.winners) - ? object.winners.map((e: any) => UpdateChallengeInputForACL_WinnerACL.fromJSON(e)) - : [], - }; - }, - - toJSON(message: UpdateChallengeInputForACL_WinnersACL): unknown { - const obj: any = {}; - if (message.winners) { - obj.winners = message.winners.map((e) => e ? UpdateChallengeInputForACL_WinnerACL.toJSON(e) : undefined); - } else { - obj.winners = []; - } - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_WinnersACL { - return UpdateChallengeInputForACL_WinnersACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_WinnersACL { - const message = createBaseUpdateChallengeInputForACL_WinnersACL(); - message.winners = object.winners?.map((e) => UpdateChallengeInputForACL_WinnerACL.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUpdateChallengeInputForACL_WinnerACL(): UpdateChallengeInputForACL_WinnerACL { - return { handle: "", placement: 0 }; -} - -export const UpdateChallengeInputForACL_WinnerACL = { - encode(message: UpdateChallengeInputForACL_WinnerACL, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.handle !== "") { - writer.uint32(10).string(message.handle); - } - if (message.placement !== 0) { - writer.uint32(16).int32(message.placement); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeInputForACL_WinnerACL { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeInputForACL_WinnerACL(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.handle = reader.string(); - break; - case 2: - message.placement = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeInputForACL_WinnerACL { - return { - handle: isSet(object.handle) ? String(object.handle) : "", - placement: isSet(object.placement) ? Number(object.placement) : 0, - }; - }, - - toJSON(message: UpdateChallengeInputForACL_WinnerACL): unknown { - const obj: any = {}; - message.handle !== undefined && (obj.handle = message.handle); - message.placement !== undefined && (obj.placement = Math.round(message.placement)); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeInputForACL_WinnerACL { - return UpdateChallengeInputForACL_WinnerACL.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeInputForACL_WinnerACL { - const message = createBaseUpdateChallengeInputForACL_WinnerACL(); - message.handle = object.handle ?? ""; - message.placement = object.placement ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(dateStr: string): Timestamp { - const date = new Date(dateStr); - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): string { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis).toISOString(); -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/challenge_timeline_template.ts b/src/models/domain-layer/challenge/challenge_timeline_template.ts deleted file mode 100644 index c2eeeee..0000000 --- a/src/models/domain-layer/challenge/challenge_timeline_template.ts +++ /dev/null @@ -1,447 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface ChallengeTimelineTemplate { - id: string; - trackId: string; - typeId: string; - timelineTemplateId: string; - isDefault: boolean; -} - -export interface ChallengeTimelineTemplateList { - items: ChallengeTimelineTemplate[]; -} - -export interface CreateChallengeTimelineTemplateInput { - trackId: string; - typeId: string; - timelineTemplateId: string; - isDefault: boolean; -} - -export interface UpdateChallengeTimelineTemplateInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateChallengeTimelineTemplateInput_UpdateInput; -} - -export interface UpdateChallengeTimelineTemplateInput_UpdateInput { - trackId?: string | undefined; - typeId?: string | undefined; - timelineTemplateId?: string | undefined; - isDefault?: boolean | undefined; -} - -function createBaseChallengeTimelineTemplate(): ChallengeTimelineTemplate { - return { id: "", trackId: "", typeId: "", timelineTemplateId: "", isDefault: false }; -} - -export const ChallengeTimelineTemplate = { - encode(message: ChallengeTimelineTemplate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.trackId !== "") { - writer.uint32(18).string(message.trackId); - } - if (message.typeId !== "") { - writer.uint32(26).string(message.typeId); - } - if (message.timelineTemplateId !== "") { - writer.uint32(34).string(message.timelineTemplateId); - } - if (message.isDefault === true) { - writer.uint32(40).bool(message.isDefault); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeTimelineTemplate { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeTimelineTemplate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.trackId = reader.string(); - break; - case 3: - message.typeId = reader.string(); - break; - case 4: - message.timelineTemplateId = reader.string(); - break; - case 5: - message.isDefault = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeTimelineTemplate { - return { - id: isSet(object.id) ? String(object.id) : "", - trackId: isSet(object.trackId) ? String(object.trackId) : "", - typeId: isSet(object.typeId) ? String(object.typeId) : "", - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : "", - isDefault: isSet(object.isDefault) ? Boolean(object.isDefault) : false, - }; - }, - - toJSON(message: ChallengeTimelineTemplate): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.trackId !== undefined && (obj.trackId = message.trackId); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - message.isDefault !== undefined && (obj.isDefault = message.isDefault); - return obj; - }, - - create, I>>(base?: I): ChallengeTimelineTemplate { - return ChallengeTimelineTemplate.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeTimelineTemplate { - const message = createBaseChallengeTimelineTemplate(); - message.id = object.id ?? ""; - message.trackId = object.trackId ?? ""; - message.typeId = object.typeId ?? ""; - message.timelineTemplateId = object.timelineTemplateId ?? ""; - message.isDefault = object.isDefault ?? false; - return message; - }, -}; - -function createBaseChallengeTimelineTemplateList(): ChallengeTimelineTemplateList { - return { items: [] }; -} - -export const ChallengeTimelineTemplateList = { - encode(message: ChallengeTimelineTemplateList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - ChallengeTimelineTemplate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeTimelineTemplateList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeTimelineTemplateList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(ChallengeTimelineTemplate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeTimelineTemplateList { - return { - items: Array.isArray(object?.items) ? object.items.map((e: any) => ChallengeTimelineTemplate.fromJSON(e)) : [], - }; - }, - - toJSON(message: ChallengeTimelineTemplateList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? ChallengeTimelineTemplate.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): ChallengeTimelineTemplateList { - return ChallengeTimelineTemplateList.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): ChallengeTimelineTemplateList { - const message = createBaseChallengeTimelineTemplateList(); - message.items = object.items?.map((e) => ChallengeTimelineTemplate.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateChallengeTimelineTemplateInput(): CreateChallengeTimelineTemplateInput { - return { trackId: "", typeId: "", timelineTemplateId: "", isDefault: false }; -} - -export const CreateChallengeTimelineTemplateInput = { - encode(message: CreateChallengeTimelineTemplateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.trackId !== "") { - writer.uint32(10).string(message.trackId); - } - if (message.typeId !== "") { - writer.uint32(18).string(message.typeId); - } - if (message.timelineTemplateId !== "") { - writer.uint32(26).string(message.timelineTemplateId); - } - if (message.isDefault === true) { - writer.uint32(32).bool(message.isDefault); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateChallengeTimelineTemplateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateChallengeTimelineTemplateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trackId = reader.string(); - break; - case 2: - message.typeId = reader.string(); - break; - case 3: - message.timelineTemplateId = reader.string(); - break; - case 4: - message.isDefault = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateChallengeTimelineTemplateInput { - return { - trackId: isSet(object.trackId) ? String(object.trackId) : "", - typeId: isSet(object.typeId) ? String(object.typeId) : "", - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : "", - isDefault: isSet(object.isDefault) ? Boolean(object.isDefault) : false, - }; - }, - - toJSON(message: CreateChallengeTimelineTemplateInput): unknown { - const obj: any = {}; - message.trackId !== undefined && (obj.trackId = message.trackId); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - message.isDefault !== undefined && (obj.isDefault = message.isDefault); - return obj; - }, - - create, I>>( - base?: I, - ): CreateChallengeTimelineTemplateInput { - return CreateChallengeTimelineTemplateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): CreateChallengeTimelineTemplateInput { - const message = createBaseCreateChallengeTimelineTemplateInput(); - message.trackId = object.trackId ?? ""; - message.typeId = object.typeId ?? ""; - message.timelineTemplateId = object.timelineTemplateId ?? ""; - message.isDefault = object.isDefault ?? false; - return message; - }, -}; - -function createBaseUpdateChallengeTimelineTemplateInput(): UpdateChallengeTimelineTemplateInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateChallengeTimelineTemplateInput = { - encode(message: UpdateChallengeTimelineTemplateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateChallengeTimelineTemplateInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTimelineTemplateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTimelineTemplateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateChallengeTimelineTemplateInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTimelineTemplateInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateChallengeTimelineTemplateInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateChallengeTimelineTemplateInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && (obj.updateInput = message.updateInput - ? UpdateChallengeTimelineTemplateInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeTimelineTemplateInput { - return UpdateChallengeTimelineTemplateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeTimelineTemplateInput { - const message = createBaseUpdateChallengeTimelineTemplateInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateChallengeTimelineTemplateInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeTimelineTemplateInput_UpdateInput(): UpdateChallengeTimelineTemplateInput_UpdateInput { - return { trackId: undefined, typeId: undefined, timelineTemplateId: undefined, isDefault: undefined }; -} - -export const UpdateChallengeTimelineTemplateInput_UpdateInput = { - encode( - message: UpdateChallengeTimelineTemplateInput_UpdateInput, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.trackId !== undefined) { - writer.uint32(18).string(message.trackId); - } - if (message.typeId !== undefined) { - writer.uint32(26).string(message.typeId); - } - if (message.timelineTemplateId !== undefined) { - writer.uint32(34).string(message.timelineTemplateId); - } - if (message.isDefault !== undefined) { - writer.uint32(40).bool(message.isDefault); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTimelineTemplateInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTimelineTemplateInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.trackId = reader.string(); - break; - case 3: - message.typeId = reader.string(); - break; - case 4: - message.timelineTemplateId = reader.string(); - break; - case 5: - message.isDefault = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTimelineTemplateInput_UpdateInput { - return { - trackId: isSet(object.trackId) ? String(object.trackId) : undefined, - typeId: isSet(object.typeId) ? String(object.typeId) : undefined, - timelineTemplateId: isSet(object.timelineTemplateId) ? String(object.timelineTemplateId) : undefined, - isDefault: isSet(object.isDefault) ? Boolean(object.isDefault) : undefined, - }; - }, - - toJSON(message: UpdateChallengeTimelineTemplateInput_UpdateInput): unknown { - const obj: any = {}; - message.trackId !== undefined && (obj.trackId = message.trackId); - message.typeId !== undefined && (obj.typeId = message.typeId); - message.timelineTemplateId !== undefined && (obj.timelineTemplateId = message.timelineTemplateId); - message.isDefault !== undefined && (obj.isDefault = message.isDefault); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeTimelineTemplateInput_UpdateInput { - return UpdateChallengeTimelineTemplateInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeTimelineTemplateInput_UpdateInput { - const message = createBaseUpdateChallengeTimelineTemplateInput_UpdateInput(); - message.trackId = object.trackId ?? undefined; - message.typeId = object.typeId ?? undefined; - message.timelineTemplateId = object.timelineTemplateId ?? undefined; - message.isDefault = object.isDefault ?? undefined; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/challenge_track.ts b/src/models/domain-layer/challenge/challenge_track.ts deleted file mode 100644 index 45bc212..0000000 --- a/src/models/domain-layer/challenge/challenge_track.ts +++ /dev/null @@ -1,432 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface ChallengeTrack { - id: string; - name: string; - description?: string | undefined; - isActive: boolean; - abbreviation: string; -} - -export interface ChallengeTrackList { - items: ChallengeTrack[]; -} - -export interface CreateChallengeTrackInput { - name: string; - description?: string | undefined; - isActive: boolean; - abbreviation: string; -} - -export interface UpdateChallengeTrackInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateChallengeTrackInput_UpdateInput; -} - -export interface UpdateChallengeTrackInput_UpdateInput { - name: string; - description?: string | undefined; - isActive: boolean; - abbreviation: string; -} - -function createBaseChallengeTrack(): ChallengeTrack { - return { id: "", name: "", description: undefined, isActive: false, abbreviation: "" }; -} - -export const ChallengeTrack = { - encode(message: ChallengeTrack, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - if (message.abbreviation !== "") { - writer.uint32(42).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeTrack { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeTrack(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeTrack { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: ChallengeTrack): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>(base?: I): ChallengeTrack { - return ChallengeTrack.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeTrack { - const message = createBaseChallengeTrack(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -function createBaseChallengeTrackList(): ChallengeTrackList { - return { items: [] }; -} - -export const ChallengeTrackList = { - encode(message: ChallengeTrackList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - ChallengeTrack.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeTrackList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeTrackList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(ChallengeTrack.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeTrackList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => ChallengeTrack.fromJSON(e)) : [] }; - }, - - toJSON(message: ChallengeTrackList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? ChallengeTrack.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): ChallengeTrackList { - return ChallengeTrackList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeTrackList { - const message = createBaseChallengeTrackList(); - message.items = object.items?.map((e) => ChallengeTrack.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateChallengeTrackInput(): CreateChallengeTrackInput { - return { name: "", description: undefined, isActive: false, abbreviation: "" }; -} - -export const CreateChallengeTrackInput = { - encode(message: CreateChallengeTrackInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.isActive === true) { - writer.uint32(24).bool(message.isActive); - } - if (message.abbreviation !== "") { - writer.uint32(34).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateChallengeTrackInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateChallengeTrackInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.isActive = reader.bool(); - break; - case 4: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateChallengeTrackInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: CreateChallengeTrackInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>(base?: I): CreateChallengeTrackInput { - return CreateChallengeTrackInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateChallengeTrackInput { - const message = createBaseCreateChallengeTrackInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -function createBaseUpdateChallengeTrackInput(): UpdateChallengeTrackInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateChallengeTrackInput = { - encode(message: UpdateChallengeTrackInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateChallengeTrackInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTrackInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTrackInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateChallengeTrackInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTrackInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateChallengeTrackInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateChallengeTrackInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && (obj.updateInput = message.updateInput - ? UpdateChallengeTrackInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateChallengeTrackInput { - return UpdateChallengeTrackInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateChallengeTrackInput { - const message = createBaseUpdateChallengeTrackInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateChallengeTrackInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeTrackInput_UpdateInput(): UpdateChallengeTrackInput_UpdateInput { - return { name: "", description: undefined, isActive: false, abbreviation: "" }; -} - -export const UpdateChallengeTrackInput_UpdateInput = { - encode(message: UpdateChallengeTrackInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - if (message.abbreviation !== "") { - writer.uint32(42).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTrackInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTrackInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTrackInput_UpdateInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: UpdateChallengeTrackInput_UpdateInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeTrackInput_UpdateInput { - return UpdateChallengeTrackInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeTrackInput_UpdateInput { - const message = createBaseUpdateChallengeTrackInput_UpdateInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/challenge_type.ts b/src/models/domain-layer/challenge/challenge_type.ts deleted file mode 100644 index a8c9e5c..0000000 --- a/src/models/domain-layer/challenge/challenge_type.ts +++ /dev/null @@ -1,462 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface ChallengeType { - id: string; - name: string; - description?: string | undefined; - isActive: boolean; - isTask: boolean; - abbreviation: string; -} - -export interface ChallengeTypeList { - items: ChallengeType[]; -} - -export interface CreateChallengeTypeInput { - name: string; - description?: string | undefined; - isActive: boolean; - isTask: boolean; - abbreviation: string; -} - -export interface UpdateChallengeTypeInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateChallengeTypeInput_UpdateInput; -} - -export interface UpdateChallengeTypeInput_UpdateInput { - name: string; - description?: string | undefined; - isActive: boolean; - isTask: boolean; - abbreviation: string; -} - -function createBaseChallengeType(): ChallengeType { - return { id: "", name: "", description: undefined, isActive: false, isTask: false, abbreviation: "" }; -} - -export const ChallengeType = { - encode(message: ChallengeType, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - if (message.isTask === true) { - writer.uint32(40).bool(message.isTask); - } - if (message.abbreviation !== "") { - writer.uint32(50).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeType { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeType(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.isTask = reader.bool(); - break; - case 6: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeType { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - isTask: isSet(object.isTask) ? Boolean(object.isTask) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: ChallengeType): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.isTask !== undefined && (obj.isTask = message.isTask); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>(base?: I): ChallengeType { - return ChallengeType.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeType { - const message = createBaseChallengeType(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.isTask = object.isTask ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -function createBaseChallengeTypeList(): ChallengeTypeList { - return { items: [] }; -} - -export const ChallengeTypeList = { - encode(message: ChallengeTypeList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - ChallengeType.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengeTypeList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengeTypeList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(ChallengeType.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengeTypeList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => ChallengeType.fromJSON(e)) : [] }; - }, - - toJSON(message: ChallengeTypeList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? ChallengeType.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): ChallengeTypeList { - return ChallengeTypeList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ChallengeTypeList { - const message = createBaseChallengeTypeList(); - message.items = object.items?.map((e) => ChallengeType.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateChallengeTypeInput(): CreateChallengeTypeInput { - return { name: "", description: undefined, isActive: false, isTask: false, abbreviation: "" }; -} - -export const CreateChallengeTypeInput = { - encode(message: CreateChallengeTypeInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.isActive === true) { - writer.uint32(24).bool(message.isActive); - } - if (message.isTask === true) { - writer.uint32(32).bool(message.isTask); - } - if (message.abbreviation !== "") { - writer.uint32(42).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateChallengeTypeInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateChallengeTypeInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.isActive = reader.bool(); - break; - case 4: - message.isTask = reader.bool(); - break; - case 5: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateChallengeTypeInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - isTask: isSet(object.isTask) ? Boolean(object.isTask) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: CreateChallengeTypeInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.isTask !== undefined && (obj.isTask = message.isTask); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>(base?: I): CreateChallengeTypeInput { - return CreateChallengeTypeInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateChallengeTypeInput { - const message = createBaseCreateChallengeTypeInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.isTask = object.isTask ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -function createBaseUpdateChallengeTypeInput(): UpdateChallengeTypeInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateChallengeTypeInput = { - encode(message: UpdateChallengeTypeInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateChallengeTypeInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTypeInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTypeInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateChallengeTypeInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTypeInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateChallengeTypeInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateChallengeTypeInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && (obj.updateInput = message.updateInput - ? UpdateChallengeTypeInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateChallengeTypeInput { - return UpdateChallengeTypeInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateChallengeTypeInput { - const message = createBaseUpdateChallengeTypeInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateChallengeTypeInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateChallengeTypeInput_UpdateInput(): UpdateChallengeTypeInput_UpdateInput { - return { name: "", description: undefined, isActive: false, isTask: false, abbreviation: "" }; -} - -export const UpdateChallengeTypeInput_UpdateInput = { - encode(message: UpdateChallengeTypeInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - if (message.isTask === true) { - writer.uint32(40).bool(message.isTask); - } - if (message.abbreviation !== "") { - writer.uint32(50).string(message.abbreviation); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateChallengeTypeInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChallengeTypeInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.isTask = reader.bool(); - break; - case 6: - message.abbreviation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateChallengeTypeInput_UpdateInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - isTask: isSet(object.isTask) ? Boolean(object.isTask) : false, - abbreviation: isSet(object.abbreviation) ? String(object.abbreviation) : "", - }; - }, - - toJSON(message: UpdateChallengeTypeInput_UpdateInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - message.isTask !== undefined && (obj.isTask = message.isTask); - message.abbreviation !== undefined && (obj.abbreviation = message.abbreviation); - return obj; - }, - - create, I>>( - base?: I, - ): UpdateChallengeTypeInput_UpdateInput { - return UpdateChallengeTypeInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateChallengeTypeInput_UpdateInput { - const message = createBaseUpdateChallengeTypeInput_UpdateInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.isTask = object.isTask ?? false; - message.abbreviation = object.abbreviation ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/phase.ts b/src/models/domain-layer/challenge/phase.ts deleted file mode 100644 index 1a05e96..0000000 --- a/src/models/domain-layer/challenge/phase.ts +++ /dev/null @@ -1,457 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface Phase { - id: string; - name: string; - description?: string | undefined; - isOpen: boolean; - duration: number; -} - -export interface PhaseList { - items: Phase[]; -} - -export interface CreatePhaseInput { - name: string; - description?: string | undefined; - isOpen: boolean; - duration: number; -} - -export interface UpdatePhaseInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdatePhaseInput_UpdateInput; -} - -export interface UpdatePhaseInput_UpdateInput { - name: string; - description?: string | undefined; - isOpen: boolean; - duration: number; -} - -function createBasePhase(): Phase { - return { id: "", name: "", description: undefined, isOpen: false, duration: 0 }; -} - -export const Phase = { - encode(message: Phase, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isOpen === true) { - writer.uint32(32).bool(message.isOpen); - } - if (message.duration !== 0) { - writer.uint32(40).int64(message.duration); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Phase { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePhase(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isOpen = reader.bool(); - break; - case 5: - message.duration = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Phase { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isOpen: isSet(object.isOpen) ? Boolean(object.isOpen) : false, - duration: isSet(object.duration) ? Number(object.duration) : 0, - }; - }, - - toJSON(message: Phase): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isOpen !== undefined && (obj.isOpen = message.isOpen); - message.duration !== undefined && (obj.duration = Math.round(message.duration)); - return obj; - }, - - create, I>>(base?: I): Phase { - return Phase.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Phase { - const message = createBasePhase(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isOpen = object.isOpen ?? false; - message.duration = object.duration ?? 0; - return message; - }, -}; - -function createBasePhaseList(): PhaseList { - return { items: [] }; -} - -export const PhaseList = { - encode(message: PhaseList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - Phase.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PhaseList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePhaseList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(Phase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PhaseList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => Phase.fromJSON(e)) : [] }; - }, - - toJSON(message: PhaseList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? Phase.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): PhaseList { - return PhaseList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): PhaseList { - const message = createBasePhaseList(); - message.items = object.items?.map((e) => Phase.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreatePhaseInput(): CreatePhaseInput { - return { name: "", description: undefined, isOpen: false, duration: 0 }; -} - -export const CreatePhaseInput = { - encode(message: CreatePhaseInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.isOpen === true) { - writer.uint32(24).bool(message.isOpen); - } - if (message.duration !== 0) { - writer.uint32(32).int64(message.duration); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreatePhaseInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreatePhaseInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.isOpen = reader.bool(); - break; - case 4: - message.duration = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreatePhaseInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isOpen: isSet(object.isOpen) ? Boolean(object.isOpen) : false, - duration: isSet(object.duration) ? Number(object.duration) : 0, - }; - }, - - toJSON(message: CreatePhaseInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isOpen !== undefined && (obj.isOpen = message.isOpen); - message.duration !== undefined && (obj.duration = Math.round(message.duration)); - return obj; - }, - - create, I>>(base?: I): CreatePhaseInput { - return CreatePhaseInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreatePhaseInput { - const message = createBaseCreatePhaseInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isOpen = object.isOpen ?? false; - message.duration = object.duration ?? 0; - return message; - }, -}; - -function createBaseUpdatePhaseInput(): UpdatePhaseInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdatePhaseInput = { - encode(message: UpdatePhaseInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdatePhaseInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdatePhaseInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdatePhaseInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdatePhaseInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdatePhaseInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) ? UpdatePhaseInput_UpdateInput.fromJSON(object.updateInput) : undefined, - }; - }, - - toJSON(message: UpdatePhaseInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && - (obj.updateInput = message.updateInput ? UpdatePhaseInput_UpdateInput.toJSON(message.updateInput) : undefined); - return obj; - }, - - create, I>>(base?: I): UpdatePhaseInput { - return UpdatePhaseInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdatePhaseInput { - const message = createBaseUpdatePhaseInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdatePhaseInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdatePhaseInput_UpdateInput(): UpdatePhaseInput_UpdateInput { - return { name: "", description: undefined, isOpen: false, duration: 0 }; -} - -export const UpdatePhaseInput_UpdateInput = { - encode(message: UpdatePhaseInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isOpen === true) { - writer.uint32(32).bool(message.isOpen); - } - if (message.duration !== 0) { - writer.uint32(40).int64(message.duration); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdatePhaseInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdatePhaseInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isOpen = reader.bool(); - break; - case 5: - message.duration = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdatePhaseInput_UpdateInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isOpen: isSet(object.isOpen) ? Boolean(object.isOpen) : false, - duration: isSet(object.duration) ? Number(object.duration) : 0, - }; - }, - - toJSON(message: UpdatePhaseInput_UpdateInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isOpen !== undefined && (obj.isOpen = message.isOpen); - message.duration !== undefined && (obj.duration = Math.round(message.duration)); - return obj; - }, - - create, I>>(base?: I): UpdatePhaseInput_UpdateInput { - return UpdatePhaseInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdatePhaseInput_UpdateInput { - const message = createBaseUpdatePhaseInput_UpdateInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isOpen = object.isOpen ?? false; - message.duration = object.duration ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/domain-layer/challenge/services/attachment.ts b/src/models/domain-layer/challenge/services/attachment.ts deleted file mode 100644 index 438b3a5..0000000 --- a/src/models/domain-layer/challenge/services/attachment.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { Attachment, AttachmentList, CreateAttachmentInput, UpdateAttachmentInput } from "../attachment"; - -export type AttachmentService = typeof AttachmentService; -export const AttachmentService = { - scan: { - path: "/topcoder.domain.service.attachment.Attachment/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.attachment.Attachment/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: Attachment) => Buffer.from(Attachment.encode(value).finish()), - responseDeserialize: (value: Buffer) => Attachment.decode(value), - }, - create: { - path: "/topcoder.domain.service.attachment.Attachment/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateAttachmentInput) => Buffer.from(CreateAttachmentInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateAttachmentInput.decode(value), - responseSerialize: (value: Attachment) => Buffer.from(Attachment.encode(value).finish()), - responseDeserialize: (value: Buffer) => Attachment.decode(value), - }, - update: { - path: "/topcoder.domain.service.attachment.Attachment/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateAttachmentInput) => Buffer.from(UpdateAttachmentInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateAttachmentInput.decode(value), - responseSerialize: (value: AttachmentList) => Buffer.from(AttachmentList.encode(value).finish()), - responseDeserialize: (value: Buffer) => AttachmentList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.attachment.Attachment/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: AttachmentList) => Buffer.from(AttachmentList.encode(value).finish()), - responseDeserialize: (value: Buffer) => AttachmentList.decode(value), - }, -} as const; - -export interface AttachmentServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/challenge.ts b/src/models/domain-layer/challenge/services/challenge.ts deleted file mode 100644 index aa9aa9b..0000000 --- a/src/models/domain-layer/challenge/services/challenge.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { Empty } from "../../../google/protobuf/empty"; -import { - Challenge, - ChallengeList, - CreateChallengeInput, - UpdateChallengeInput, - UpdateChallengeInputForACL, -} from "../challenge"; - -export type ChallengeService = typeof ChallengeService; -export const ChallengeService = { - create: { - path: "/topcoder.domain.service.challenge.Challenge/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateChallengeInput) => Buffer.from(CreateChallengeInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateChallengeInput.decode(value), - responseSerialize: (value: Challenge) => Buffer.from(Challenge.encode(value).finish()), - responseDeserialize: (value: Buffer) => Challenge.decode(value), - }, - scan: { - path: "/topcoder.domain.service.challenge.Challenge/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.challenge.Challenge/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: Challenge) => Buffer.from(Challenge.encode(value).finish()), - responseDeserialize: (value: Buffer) => Challenge.decode(value), - }, - update: { - path: "/topcoder.domain.service.challenge.Challenge/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateChallengeInput) => Buffer.from(UpdateChallengeInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateChallengeInput.decode(value), - responseSerialize: (value: ChallengeList) => Buffer.from(ChallengeList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.challenge.Challenge/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeList) => Buffer.from(ChallengeList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeList.decode(value), - }, - updateForAcl: { - path: "/topcoder.domain.service.challenge.Challenge/UpdateForACL", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateChallengeInputForACL) => - Buffer.from(UpdateChallengeInputForACL.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateChallengeInputForACL.decode(value), - responseSerialize: (value: Empty) => Buffer.from(Empty.encode(value).finish()), - responseDeserialize: (value: Buffer) => Empty.decode(value), - }, -} as const; - -export interface ChallengeServer extends UntypedServiceImplementation { - create: handleUnaryCall; - scan: handleUnaryCall; - lookup: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; - updateForAcl: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/challenge_timeline_template.ts b/src/models/domain-layer/challenge/services/challenge_timeline_template.ts deleted file mode 100644 index b8f61d4..0000000 --- a/src/models/domain-layer/challenge/services/challenge_timeline_template.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { - ChallengeTimelineTemplate, - ChallengeTimelineTemplateList, - CreateChallengeTimelineTemplateInput, - UpdateChallengeTimelineTemplateInput, -} from "../challenge_timeline_template"; - -export type ChallengeTimelineTemplateService = typeof ChallengeTimelineTemplateService; -export const ChallengeTimelineTemplateService = { - scan: { - path: "/topcoder.domain.service.challenge_timeline_template.ChallengeTimelineTemplate/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.challenge_timeline_template.ChallengeTimelineTemplate/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeTimelineTemplate) => - Buffer.from(ChallengeTimelineTemplate.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTimelineTemplate.decode(value), - }, - create: { - path: "/topcoder.domain.service.challenge_timeline_template.ChallengeTimelineTemplate/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateChallengeTimelineTemplateInput) => - Buffer.from(CreateChallengeTimelineTemplateInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateChallengeTimelineTemplateInput.decode(value), - responseSerialize: (value: ChallengeTimelineTemplate) => - Buffer.from(ChallengeTimelineTemplate.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTimelineTemplate.decode(value), - }, - update: { - path: "/topcoder.domain.service.challenge_timeline_template.ChallengeTimelineTemplate/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateChallengeTimelineTemplateInput) => - Buffer.from(UpdateChallengeTimelineTemplateInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateChallengeTimelineTemplateInput.decode(value), - responseSerialize: (value: ChallengeTimelineTemplateList) => - Buffer.from(ChallengeTimelineTemplateList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTimelineTemplateList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.challenge_timeline_template.ChallengeTimelineTemplate/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeTimelineTemplateList) => - Buffer.from(ChallengeTimelineTemplateList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTimelineTemplateList.decode(value), - }, -} as const; - -export interface ChallengeTimelineTemplateServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/challenge_track.ts b/src/models/domain-layer/challenge/services/challenge_track.ts deleted file mode 100644 index 11cbd58..0000000 --- a/src/models/domain-layer/challenge/services/challenge_track.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { - ChallengeTrack, - ChallengeTrackList, - CreateChallengeTrackInput, - UpdateChallengeTrackInput, -} from "../challenge_track"; - -export type ChallengeTrackService = typeof ChallengeTrackService; -export const ChallengeTrackService = { - scan: { - path: "/topcoder.domain.service.challenge_track.ChallengeTrack/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.challenge_track.ChallengeTrack/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeTrack) => Buffer.from(ChallengeTrack.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTrack.decode(value), - }, - create: { - path: "/topcoder.domain.service.challenge_track.ChallengeTrack/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateChallengeTrackInput) => - Buffer.from(CreateChallengeTrackInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateChallengeTrackInput.decode(value), - responseSerialize: (value: ChallengeTrack) => Buffer.from(ChallengeTrack.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTrack.decode(value), - }, - update: { - path: "/topcoder.domain.service.challenge_track.ChallengeTrack/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateChallengeTrackInput) => - Buffer.from(UpdateChallengeTrackInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateChallengeTrackInput.decode(value), - responseSerialize: (value: ChallengeTrackList) => Buffer.from(ChallengeTrackList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTrackList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.challenge_track.ChallengeTrack/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeTrackList) => Buffer.from(ChallengeTrackList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTrackList.decode(value), - }, -} as const; - -export interface ChallengeTrackServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/challenge_type.ts b/src/models/domain-layer/challenge/services/challenge_type.ts deleted file mode 100644 index 178ec7c..0000000 --- a/src/models/domain-layer/challenge/services/challenge_type.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { - ChallengeType, - ChallengeTypeList, - CreateChallengeTypeInput, - UpdateChallengeTypeInput, -} from "../challenge_type"; - -export type ChallengeTypeService = typeof ChallengeTypeService; -export const ChallengeTypeService = { - scan: { - path: "/topcoder.domain.service.challenge_type.ChallengeType/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.challenge_type.ChallengeType/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeType) => Buffer.from(ChallengeType.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeType.decode(value), - }, - create: { - path: "/topcoder.domain.service.challenge_type.ChallengeType/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateChallengeTypeInput) => Buffer.from(CreateChallengeTypeInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateChallengeTypeInput.decode(value), - responseSerialize: (value: ChallengeType) => Buffer.from(ChallengeType.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeType.decode(value), - }, - update: { - path: "/topcoder.domain.service.challenge_type.ChallengeType/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateChallengeTypeInput) => Buffer.from(UpdateChallengeTypeInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateChallengeTypeInput.decode(value), - responseSerialize: (value: ChallengeTypeList) => Buffer.from(ChallengeTypeList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTypeList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.challenge_type.ChallengeType/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: ChallengeTypeList) => Buffer.from(ChallengeTypeList.encode(value).finish()), - responseDeserialize: (value: Buffer) => ChallengeTypeList.decode(value), - }, -} as const; - -export interface ChallengeTypeServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/phase.ts b/src/models/domain-layer/challenge/services/phase.ts deleted file mode 100644 index cc0ba55..0000000 --- a/src/models/domain-layer/challenge/services/phase.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { CreatePhaseInput, Phase, PhaseList, UpdatePhaseInput } from "../phase"; - -export type PhaseService = typeof PhaseService; -export const PhaseService = { - scan: { - path: "/topcoder.domain.service.phase.Phase/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.phase.Phase/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: Phase) => Buffer.from(Phase.encode(value).finish()), - responseDeserialize: (value: Buffer) => Phase.decode(value), - }, - create: { - path: "/topcoder.domain.service.phase.Phase/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreatePhaseInput) => Buffer.from(CreatePhaseInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreatePhaseInput.decode(value), - responseSerialize: (value: Phase) => Buffer.from(Phase.encode(value).finish()), - responseDeserialize: (value: Buffer) => Phase.decode(value), - }, - update: { - path: "/topcoder.domain.service.phase.Phase/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdatePhaseInput) => Buffer.from(UpdatePhaseInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdatePhaseInput.decode(value), - responseSerialize: (value: PhaseList) => Buffer.from(PhaseList.encode(value).finish()), - responseDeserialize: (value: Buffer) => PhaseList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.phase.Phase/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: PhaseList) => Buffer.from(PhaseList.encode(value).finish()), - responseDeserialize: (value: Buffer) => PhaseList.decode(value), - }, -} as const; - -export interface PhaseServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/services/timeline_template.ts b/src/models/domain-layer/challenge/services/timeline_template.ts deleted file mode 100644 index c13f5f0..0000000 --- a/src/models/domain-layer/challenge/services/timeline_template.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* eslint-disable */ -import { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; -import { LookupCriteria, ScanRequest, ScanResult } from "../../../common/common"; -import { - CreateTimelineTemplateInput, - TimelineTemplate, - TimelineTemplateList, - UpdateTimelineTemplateInput, -} from "../timeline_template"; - -export type TimelineTemplateService = typeof TimelineTemplateService; -export const TimelineTemplateService = { - scan: { - path: "/topcoder.domain.service.timeline_template.TimelineTemplate/Scan", - requestStream: false, - responseStream: false, - requestSerialize: (value: ScanRequest) => Buffer.from(ScanRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => ScanRequest.decode(value), - responseSerialize: (value: ScanResult) => Buffer.from(ScanResult.encode(value).finish()), - responseDeserialize: (value: Buffer) => ScanResult.decode(value), - }, - lookup: { - path: "/topcoder.domain.service.timeline_template.TimelineTemplate/Lookup", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: TimelineTemplate) => Buffer.from(TimelineTemplate.encode(value).finish()), - responseDeserialize: (value: Buffer) => TimelineTemplate.decode(value), - }, - create: { - path: "/topcoder.domain.service.timeline_template.TimelineTemplate/Create", - requestStream: false, - responseStream: false, - requestSerialize: (value: CreateTimelineTemplateInput) => - Buffer.from(CreateTimelineTemplateInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => CreateTimelineTemplateInput.decode(value), - responseSerialize: (value: TimelineTemplate) => Buffer.from(TimelineTemplate.encode(value).finish()), - responseDeserialize: (value: Buffer) => TimelineTemplate.decode(value), - }, - update: { - path: "/topcoder.domain.service.timeline_template.TimelineTemplate/Update", - requestStream: false, - responseStream: false, - requestSerialize: (value: UpdateTimelineTemplateInput) => - Buffer.from(UpdateTimelineTemplateInput.encode(value).finish()), - requestDeserialize: (value: Buffer) => UpdateTimelineTemplateInput.decode(value), - responseSerialize: (value: TimelineTemplateList) => Buffer.from(TimelineTemplateList.encode(value).finish()), - responseDeserialize: (value: Buffer) => TimelineTemplateList.decode(value), - }, - delete: { - path: "/topcoder.domain.service.timeline_template.TimelineTemplate/Delete", - requestStream: false, - responseStream: false, - requestSerialize: (value: LookupCriteria) => Buffer.from(LookupCriteria.encode(value).finish()), - requestDeserialize: (value: Buffer) => LookupCriteria.decode(value), - responseSerialize: (value: TimelineTemplateList) => Buffer.from(TimelineTemplateList.encode(value).finish()), - responseDeserialize: (value: Buffer) => TimelineTemplateList.decode(value), - }, -} as const; - -export interface TimelineTemplateServer extends UntypedServiceImplementation { - scan: handleUnaryCall; - lookup: handleUnaryCall; - create: handleUnaryCall; - update: handleUnaryCall; - delete: handleUnaryCall; -} diff --git a/src/models/domain-layer/challenge/timeline_template.ts b/src/models/domain-layer/challenge/timeline_template.ts deleted file mode 100644 index 1f3f948..0000000 --- a/src/models/domain-layer/challenge/timeline_template.ts +++ /dev/null @@ -1,553 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ScanCriteria } from "../../common/common"; - -export interface TimelineTemplatePhase { - phaseId: string; - defaultDuration: number; - predecessor?: string | undefined; -} - -export interface TimelineTemplate { - id: string; - name: string; - description?: string | undefined; - isActive: boolean; - phases: TimelineTemplatePhase[]; -} - -export interface TimelineTemplateList { - items: TimelineTemplate[]; -} - -export interface CreateTimelineTemplateInput { - name: string; - description?: string | undefined; - isActive: boolean; - phases: TimelineTemplatePhase[]; -} - -export interface UpdateTimelineTemplateInput { - filterCriteria: ScanCriteria[]; - updateInput?: UpdateTimelineTemplateInput_UpdateInput; -} - -export interface UpdateTimelineTemplateInput_UpdateInput { - name: string; - description?: string | undefined; - isActive: boolean; - phases: TimelineTemplatePhase[]; -} - -function createBaseTimelineTemplatePhase(): TimelineTemplatePhase { - return { phaseId: "", defaultDuration: 0, predecessor: undefined }; -} - -export const TimelineTemplatePhase = { - encode(message: TimelineTemplatePhase, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.phaseId !== "") { - writer.uint32(10).string(message.phaseId); - } - if (message.defaultDuration !== 0) { - writer.uint32(16).int64(message.defaultDuration); - } - if (message.predecessor !== undefined) { - writer.uint32(26).string(message.predecessor); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TimelineTemplatePhase { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimelineTemplatePhase(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.phaseId = reader.string(); - break; - case 2: - message.defaultDuration = longToNumber(reader.int64() as Long); - break; - case 3: - message.predecessor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TimelineTemplatePhase { - return { - phaseId: isSet(object.phaseId) ? String(object.phaseId) : "", - defaultDuration: isSet(object.defaultDuration) ? Number(object.defaultDuration) : 0, - predecessor: isSet(object.predecessor) ? String(object.predecessor) : undefined, - }; - }, - - toJSON(message: TimelineTemplatePhase): unknown { - const obj: any = {}; - message.phaseId !== undefined && (obj.phaseId = message.phaseId); - message.defaultDuration !== undefined && (obj.defaultDuration = Math.round(message.defaultDuration)); - message.predecessor !== undefined && (obj.predecessor = message.predecessor); - return obj; - }, - - create, I>>(base?: I): TimelineTemplatePhase { - return TimelineTemplatePhase.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): TimelineTemplatePhase { - const message = createBaseTimelineTemplatePhase(); - message.phaseId = object.phaseId ?? ""; - message.defaultDuration = object.defaultDuration ?? 0; - message.predecessor = object.predecessor ?? undefined; - return message; - }, -}; - -function createBaseTimelineTemplate(): TimelineTemplate { - return { id: "", name: "", description: undefined, isActive: false, phases: [] }; -} - -export const TimelineTemplate = { - encode(message: TimelineTemplate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - for (const v of message.phases) { - TimelineTemplatePhase.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TimelineTemplate { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimelineTemplate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.phases.push(TimelineTemplatePhase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TimelineTemplate { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => TimelineTemplatePhase.fromJSON(e)) : [], - }; - }, - - toJSON(message: TimelineTemplate): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? TimelineTemplatePhase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - return obj; - }, - - create, I>>(base?: I): TimelineTemplate { - return TimelineTemplate.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): TimelineTemplate { - const message = createBaseTimelineTemplate(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.phases = object.phases?.map((e) => TimelineTemplatePhase.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseTimelineTemplateList(): TimelineTemplateList { - return { items: [] }; -} - -export const TimelineTemplateList = { - encode(message: TimelineTemplateList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.items) { - TimelineTemplate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TimelineTemplateList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimelineTemplateList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items.push(TimelineTemplate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TimelineTemplateList { - return { items: Array.isArray(object?.items) ? object.items.map((e: any) => TimelineTemplate.fromJSON(e)) : [] }; - }, - - toJSON(message: TimelineTemplateList): unknown { - const obj: any = {}; - if (message.items) { - obj.items = message.items.map((e) => e ? TimelineTemplate.toJSON(e) : undefined); - } else { - obj.items = []; - } - return obj; - }, - - create, I>>(base?: I): TimelineTemplateList { - return TimelineTemplateList.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): TimelineTemplateList { - const message = createBaseTimelineTemplateList(); - message.items = object.items?.map((e) => TimelineTemplate.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateTimelineTemplateInput(): CreateTimelineTemplateInput { - return { name: "", description: undefined, isActive: false, phases: [] }; -} - -export const CreateTimelineTemplateInput = { - encode(message: CreateTimelineTemplateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.isActive === true) { - writer.uint32(24).bool(message.isActive); - } - for (const v of message.phases) { - TimelineTemplatePhase.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateTimelineTemplateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateTimelineTemplateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.isActive = reader.bool(); - break; - case 4: - message.phases.push(TimelineTemplatePhase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateTimelineTemplateInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => TimelineTemplatePhase.fromJSON(e)) : [], - }; - }, - - toJSON(message: CreateTimelineTemplateInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? TimelineTemplatePhase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - return obj; - }, - - create, I>>(base?: I): CreateTimelineTemplateInput { - return CreateTimelineTemplateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): CreateTimelineTemplateInput { - const message = createBaseCreateTimelineTemplateInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.phases = object.phases?.map((e) => TimelineTemplatePhase.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUpdateTimelineTemplateInput(): UpdateTimelineTemplateInput { - return { filterCriteria: [], updateInput: undefined }; -} - -export const UpdateTimelineTemplateInput = { - encode(message: UpdateTimelineTemplateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.filterCriteria) { - ScanCriteria.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.updateInput !== undefined) { - UpdateTimelineTemplateInput_UpdateInput.encode(message.updateInput, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTimelineTemplateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateTimelineTemplateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterCriteria.push(ScanCriteria.decode(reader, reader.uint32())); - break; - case 2: - message.updateInput = UpdateTimelineTemplateInput_UpdateInput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateTimelineTemplateInput { - return { - filterCriteria: Array.isArray(object?.filterCriteria) - ? object.filterCriteria.map((e: any) => ScanCriteria.fromJSON(e)) - : [], - updateInput: isSet(object.updateInput) - ? UpdateTimelineTemplateInput_UpdateInput.fromJSON(object.updateInput) - : undefined, - }; - }, - - toJSON(message: UpdateTimelineTemplateInput): unknown { - const obj: any = {}; - if (message.filterCriteria) { - obj.filterCriteria = message.filterCriteria.map((e) => e ? ScanCriteria.toJSON(e) : undefined); - } else { - obj.filterCriteria = []; - } - message.updateInput !== undefined && (obj.updateInput = message.updateInput - ? UpdateTimelineTemplateInput_UpdateInput.toJSON(message.updateInput) - : undefined); - return obj; - }, - - create, I>>(base?: I): UpdateTimelineTemplateInput { - return UpdateTimelineTemplateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): UpdateTimelineTemplateInput { - const message = createBaseUpdateTimelineTemplateInput(); - message.filterCriteria = object.filterCriteria?.map((e) => ScanCriteria.fromPartial(e)) || []; - message.updateInput = (object.updateInput !== undefined && object.updateInput !== null) - ? UpdateTimelineTemplateInput_UpdateInput.fromPartial(object.updateInput) - : undefined; - return message; - }, -}; - -function createBaseUpdateTimelineTemplateInput_UpdateInput(): UpdateTimelineTemplateInput_UpdateInput { - return { name: "", description: undefined, isActive: false, phases: [] }; -} - -export const UpdateTimelineTemplateInput_UpdateInput = { - encode(message: UpdateTimelineTemplateInput_UpdateInput, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - if (message.isActive === true) { - writer.uint32(32).bool(message.isActive); - } - for (const v of message.phases) { - TimelineTemplatePhase.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTimelineTemplateInput_UpdateInput { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateTimelineTemplateInput_UpdateInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.isActive = reader.bool(); - break; - case 5: - message.phases.push(TimelineTemplatePhase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateTimelineTemplateInput_UpdateInput { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : undefined, - isActive: isSet(object.isActive) ? Boolean(object.isActive) : false, - phases: Array.isArray(object?.phases) ? object.phases.map((e: any) => TimelineTemplatePhase.fromJSON(e)) : [], - }; - }, - - toJSON(message: UpdateTimelineTemplateInput_UpdateInput): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.isActive !== undefined && (obj.isActive = message.isActive); - if (message.phases) { - obj.phases = message.phases.map((e) => e ? TimelineTemplatePhase.toJSON(e) : undefined); - } else { - obj.phases = []; - } - return obj; - }, - - create, I>>( - base?: I, - ): UpdateTimelineTemplateInput_UpdateInput { - return UpdateTimelineTemplateInput_UpdateInput.fromPartial(base ?? {}); - }, - - fromPartial, I>>( - object: I, - ): UpdateTimelineTemplateInput_UpdateInput { - const message = createBaseUpdateTimelineTemplateInput_UpdateInput(); - message.name = object.name ?? ""; - message.description = object.description ?? undefined; - message.isActive = object.isActive ?? false; - message.phases = object.phases?.map((e) => TimelineTemplatePhase.fromPartial(e)) || []; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/google/protobuf/empty.ts b/src/models/google/protobuf/empty.ts deleted file mode 100644 index a56f883..0000000 --- a/src/models/google/protobuf/empty.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - */ -export interface Empty { -} - -function createBaseEmpty(): Empty { - return {}; -} - -export const Empty = { - encode(_: Empty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Empty { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEmpty(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): Empty { - return {}; - }, - - toJSON(_: Empty): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>(base?: I): Empty { - return Empty.fromPartial(base ?? {}); - }, - - fromPartial, I>>(_: I): Empty { - const message = createBaseEmpty(); - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; diff --git a/src/models/google/protobuf/struct.ts b/src/models/google/protobuf/struct.ts deleted file mode 100644 index 362dcd5..0000000 --- a/src/models/google/protobuf/struct.ts +++ /dev/null @@ -1,495 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - */ -export enum NullValue { - /** NULL_VALUE - Null value. */ - NULL_VALUE = 0, - UNRECOGNIZED = -1, -} - -export function nullValueFromJSON(object: any): NullValue { - switch (object) { - case 0: - case "NULL_VALUE": - return NullValue.NULL_VALUE; - case -1: - case "UNRECOGNIZED": - default: - return NullValue.UNRECOGNIZED; - } -} - -export function nullValueToJSON(object: NullValue): string { - switch (object) { - case NullValue.NULL_VALUE: - return "NULL_VALUE"; - case NullValue.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - */ -export interface Struct { - /** Unordered map of dynamically typed values. */ - fields: { [key: string]: any }; -} - -export interface Struct_FieldsEntry { - key: string; - value?: any; -} - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of these - * variants. Absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - */ -export interface Value { - kind?: - | { $case: "nullValue"; nullValue: NullValue } - | { $case: "numberValue"; numberValue: number } - | { $case: "stringValue"; stringValue: string } - | { $case: "boolValue"; boolValue: boolean } - | { $case: "structValue"; structValue: { [key: string]: any } } - | { $case: "listValue"; listValue: Array }; -} - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - */ -export interface ListValue { - /** Repeated field of dynamically typed values. */ - values: any[]; -} - -function createBaseStruct(): Struct { - return { fields: {} }; -} - -export const Struct = { - encode(message: Struct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - Object.entries(message.fields).forEach(([key, value]) => { - if (value !== undefined) { - Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); - } - }); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Struct { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32()); - if (entry1.value !== undefined) { - message.fields[entry1.key] = entry1.value; - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Struct { - return { - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; - }, - - toJSON(message: Struct): unknown { - const obj: any = {}; - obj.fields = {}; - if (message.fields) { - Object.entries(message.fields).forEach(([k, v]) => { - obj.fields[k] = v; - }); - } - return obj; - }, - - create, I>>(base?: I): Struct { - return Struct.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Struct { - const message = createBaseStruct(); - message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: any }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); - return message; - }, - - wrap(object: { [key: string]: any } | undefined): Struct { - const struct = createBaseStruct(); - if (object !== undefined) { - Object.keys(object).forEach((key) => { - struct.fields[key] = object[key]; - }); - } - return struct; - }, - - unwrap(message: Struct): { [key: string]: any } { - const object: { [key: string]: any } = {}; - if (message.fields) { - Object.keys(message.fields).forEach((key) => { - object[key] = message.fields[key]; - }); - } - return object; - }, -}; - -function createBaseStruct_FieldsEntry(): Struct_FieldsEntry { - return { key: "", value: undefined }; -} - -export const Struct_FieldsEntry = { - encode(message: Struct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Struct_FieldsEntry { - return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined }; - }, - - toJSON(message: Struct_FieldsEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - create, I>>(base?: I): Struct_FieldsEntry { - return Struct_FieldsEntry.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Struct_FieldsEntry { - const message = createBaseStruct_FieldsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; - return message; - }, -}; - -function createBaseValue(): Value { - return { kind: undefined }; -} - -export const Value = { - encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - switch (message.kind?.$case) { - case "nullValue": - writer.uint32(8).int32(message.kind.nullValue); - break; - case "numberValue": - writer.uint32(17).double(message.kind.numberValue); - break; - case "stringValue": - writer.uint32(26).string(message.kind.stringValue); - break; - case "boolValue": - writer.uint32(32).bool(message.kind.boolValue); - break; - case "structValue": - Struct.encode(Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).ldelim(); - break; - case "listValue": - ListValue.encode(ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).ldelim(); - break; - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Value { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = { $case: "nullValue", nullValue: reader.int32() as any }; - break; - case 2: - message.kind = { $case: "numberValue", numberValue: reader.double() }; - break; - case 3: - message.kind = { $case: "stringValue", stringValue: reader.string() }; - break; - case 4: - message.kind = { $case: "boolValue", boolValue: reader.bool() }; - break; - case 5: - message.kind = { $case: "structValue", structValue: Struct.unwrap(Struct.decode(reader, reader.uint32())) }; - break; - case 6: - message.kind = { $case: "listValue", listValue: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) }; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Value { - return { - kind: isSet(object.nullValue) - ? { $case: "nullValue", nullValue: nullValueFromJSON(object.nullValue) } - : isSet(object.numberValue) - ? { $case: "numberValue", numberValue: Number(object.numberValue) } - : isSet(object.stringValue) - ? { $case: "stringValue", stringValue: String(object.stringValue) } - : isSet(object.boolValue) - ? { $case: "boolValue", boolValue: Boolean(object.boolValue) } - : isSet(object.structValue) - ? { $case: "structValue", structValue: object.structValue } - : isSet(object.listValue) - ? { $case: "listValue", listValue: [...object.listValue] } - : undefined, - }; - }, - - toJSON(message: Value): unknown { - const obj: any = {}; - message.kind?.$case === "nullValue" && - (obj.nullValue = message.kind?.nullValue !== undefined ? nullValueToJSON(message.kind?.nullValue) : undefined); - message.kind?.$case === "numberValue" && (obj.numberValue = message.kind?.numberValue); - message.kind?.$case === "stringValue" && (obj.stringValue = message.kind?.stringValue); - message.kind?.$case === "boolValue" && (obj.boolValue = message.kind?.boolValue); - message.kind?.$case === "structValue" && (obj.structValue = message.kind?.structValue); - message.kind?.$case === "listValue" && (obj.listValue = message.kind?.listValue); - return obj; - }, - - create, I>>(base?: I): Value { - return Value.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Value { - const message = createBaseValue(); - if (object.kind?.$case === "nullValue" && object.kind?.nullValue !== undefined && object.kind?.nullValue !== null) { - message.kind = { $case: "nullValue", nullValue: object.kind.nullValue }; - } - if ( - object.kind?.$case === "numberValue" && - object.kind?.numberValue !== undefined && - object.kind?.numberValue !== null - ) { - message.kind = { $case: "numberValue", numberValue: object.kind.numberValue }; - } - if ( - object.kind?.$case === "stringValue" && - object.kind?.stringValue !== undefined && - object.kind?.stringValue !== null - ) { - message.kind = { $case: "stringValue", stringValue: object.kind.stringValue }; - } - if (object.kind?.$case === "boolValue" && object.kind?.boolValue !== undefined && object.kind?.boolValue !== null) { - message.kind = { $case: "boolValue", boolValue: object.kind.boolValue }; - } - if ( - object.kind?.$case === "structValue" && - object.kind?.structValue !== undefined && - object.kind?.structValue !== null - ) { - message.kind = { $case: "structValue", structValue: object.kind.structValue }; - } - if (object.kind?.$case === "listValue" && object.kind?.listValue !== undefined && object.kind?.listValue !== null) { - message.kind = { $case: "listValue", listValue: object.kind.listValue }; - } - return message; - }, - - wrap(value: any): Value { - const result = createBaseValue(); - if (value === null) { - result.kind = { $case: "nullValue", nullValue: NullValue.NULL_VALUE }; - } else if (typeof value === "boolean") { - result.kind = { $case: "boolValue", boolValue: value }; - } else if (typeof value === "number") { - result.kind = { $case: "numberValue", numberValue: value }; - } else if (typeof value === "string") { - result.kind = { $case: "stringValue", stringValue: value }; - } else if (Array.isArray(value)) { - result.kind = { $case: "listValue", listValue: value }; - } else if (typeof value === "object") { - result.kind = { $case: "structValue", structValue: value }; - } else if (typeof value !== "undefined") { - throw new Error("Unsupported any value type: " + typeof value); - } - return result; - }, - - unwrap(message: Value): string | number | boolean | Object | null | Array | undefined { - if (message.kind?.$case === "nullValue") { - return null; - } else if (message.kind?.$case === "numberValue") { - return message.kind?.numberValue; - } else if (message.kind?.$case === "stringValue") { - return message.kind?.stringValue; - } else if (message.kind?.$case === "boolValue") { - return message.kind?.boolValue; - } else if (message.kind?.$case === "structValue") { - return message.kind?.structValue; - } else if (message.kind?.$case === "listValue") { - return message.kind?.listValue; - } else { - return undefined; - } - }, -}; - -function createBaseListValue(): ListValue { - return { values: [] }; -} - -export const ListValue = { - encode(message: ListValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.values) { - Value.encode(Value.wrap(v!), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ListValue { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListValue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.values.push(Value.unwrap(Value.decode(reader, reader.uint32()))); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ListValue { - return { values: Array.isArray(object?.values) ? [...object.values] : [] }; - }, - - toJSON(message: ListValue): unknown { - const obj: any = {}; - if (message.values) { - obj.values = message.values.map((e) => e); - } else { - obj.values = []; - } - return obj; - }, - - create, I>>(base?: I): ListValue { - return ListValue.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): ListValue { - const message = createBaseListValue(); - message.values = object.values?.map((e) => e) || []; - return message; - }, - - wrap(array: Array | undefined): ListValue { - const result = createBaseListValue(); - result.values = array ?? []; - return result; - }, - - unwrap(message: ListValue): Array { - if (message?.hasOwnProperty("values") && Array.isArray(message.values)) { - return message.values; - } else { - return message as any; - } - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/google/protobuf/timestamp.ts b/src/models/google/protobuf/timestamp.ts deleted file mode 100644 index 23d4800..0000000 --- a/src/models/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -function createBaseTimestamp(): Timestamp { - return { seconds: 0, nanos: 0 }; -} - -export const Timestamp = { - encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimestamp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - return { - seconds: isSet(object.seconds) ? Number(object.seconds) : 0, - nanos: isSet(object.nanos) ? Number(object.nanos) : 0, - }; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = Math.round(message.seconds)); - message.nanos !== undefined && (obj.nanos = Math.round(message.nanos)); - return obj; - }, - - create, I>>(base?: I): Timestamp { - return Timestamp.fromPartial(base ?? {}); - }, - - fromPartial, I>>(object: I): Timestamp { - const message = createBaseTimestamp(); - message.seconds = object.seconds ?? 0; - message.nanos = object.nanos ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends { $case: string } ? { [K in keyof Omit]?: DeepPartial } & { $case: T["$case"] } - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/models/tsconfig.json b/src/models/tsconfig.json deleted file mode 100644 index 8807068..0000000 --- a/src/models/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "composite": true, - "outDir": "../../dist/models", - "noImplicitReturns": false, - "forceConsistentCasingInFileNames": true - }, - "include": ["**/*"], - "exclude": ["node_modules"] -} diff --git a/src/schema/AttachmentSchema.ts b/src/schema/AttachmentSchema.ts deleted file mode 100644 index 288212a..0000000 --- a/src/schema/AttachmentSchema.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const AttachmentSchema = { - tableName: "Attachment", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "url", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "fileSize", - type: DataType.DATA_TYPE_NUMBER, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "challengeId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/schema/Challenge.ts b/src/schema/Challenge.ts deleted file mode 100644 index 85f850c..0000000 --- a/src/schema/Challenge.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const ChallengeSchema = { - tableName: "Challenge", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "phases", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "legacyId", - type: DataType.DATA_TYPE_NUMBER, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "typeId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "trackId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "legacy", - type: DataType.DATA_TYPE_MAP, - }, - { - name: "billing", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "privateDescription", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "descriptionFormat", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "metadata", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "task", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "timelineTemplateId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "events", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "terms", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "prizeSets", - type: DataType.DATA_TYPE_STRING_SET, - }, - { - name: "tags", - type: DataType.DATA_TYPE_STRING_SET, - }, - { - name: "projectId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "startDate", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "endDate", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "status", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "attachments", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "groups", - type: DataType.DATA_TYPE_STRING_SET, - }, - { - name: "winners", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "discussions", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "createdBy", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "created", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "updatedBy", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "updated", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "overview", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: { - legacyId: { - index: "legacyId-index", - partitionKey: "legacyId", - }, - }, -}; diff --git a/src/schema/ChallengeTimelineTemplate.ts b/src/schema/ChallengeTimelineTemplate.ts deleted file mode 100644 index 3064648..0000000 --- a/src/schema/ChallengeTimelineTemplate.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const ChallengeTimelineTemplateSchema = { - tableName: "ChallengeTimelineTemplate", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "isDefault", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "timelineTemplateId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "trackId", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "typeId", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/schema/ChallengeTrackSchema.ts b/src/schema/ChallengeTrackSchema.ts deleted file mode 100644 index 6aa1c47..0000000 --- a/src/schema/ChallengeTrackSchema.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const ChallengeTrackSchema = { - tableName: "ChallengeTrack", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "isActive", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "abbreviation", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/schema/ChallengeTypeSchema.ts b/src/schema/ChallengeTypeSchema.ts deleted file mode 100644 index dc630ef..0000000 --- a/src/schema/ChallengeTypeSchema.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const ChallengeTypeSchema = { - tableName: "ChallengeType", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "isActive", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "isTask", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "abbreviation", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/schema/PhaseSchema.ts b/src/schema/PhaseSchema.ts deleted file mode 100644 index 86544f3..0000000 --- a/src/schema/PhaseSchema.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const PhaseSchema = { - tableName: "Phase", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "isOpen", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "duration", - type: DataType.DATA_TYPE_NUMBER, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/schema/TimelineTemplateSchema.ts b/src/schema/TimelineTemplateSchema.ts deleted file mode 100644 index 65c883f..0000000 --- a/src/schema/TimelineTemplateSchema.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { DataType } from "../dal/models/nosql/parti_ql"; - -export const TimelineTemplateSchema = { - tableName: "TimelineTemplate", - attributes: [ - { - name: "id", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "isActive", - type: DataType.DATA_TYPE_BOOLEAN, - }, - { - name: "phases", - type: DataType.DATA_TYPE_LIST, - }, - { - name: "name", - type: DataType.DATA_TYPE_STRING, - }, - { - name: "description", - type: DataType.DATA_TYPE_STRING, - }, - ], - indices: {}, -}; diff --git a/src/server.ts b/src/server.ts deleted file mode 100644 index 510da97..0000000 --- a/src/server.ts +++ /dev/null @@ -1,75 +0,0 @@ -import "source-map-support/register"; - -import * as dotenv from "dotenv"; -import * as path from "path"; -import * as grpc from "@grpc/grpc-js"; - -dotenv.config(); - -import { Server, ServerCredentials } from "@grpc/grpc-js"; -import { addReflection } from "grpc-server-reflection"; - -import { - ChallengeTimelineTemplateServer, - ChallengeTimelineTemplateService, -} from "./service/ChallengeTimelineTemplateService"; -import { - ChallengeTrackServer, - ChallengeTrackService, -} from "./service/ChallengeTrackService"; - -import { - ChallengeTypeServer, - ChallengeTypeService, -} from "./service/ChallengeTypeService"; -import { - AttachmentServer, - AttachmentService, -} from "./service/AttachmentService"; - -import { - TimelineTemplateServer, - TimelineTemplateService, -} from "./service/TimelineTemplateService"; - -import { PhaseServer, PhaseService } from "./service/PhaseService"; -import { ChallengeServer, ChallengeService } from "./service/ChallengeService"; - -const { ENV, GRPC_SERVER_HOST = "", GRPC_SERVER_PORT = 9092 } = process.env; - -const server = new Server({ - "grpc.max_send_message_length": -1, - "grpc.max_receive_message_length": -1, -}); - -if (ENV === "local") { - addReflection(server, path.join(__dirname, "../reflections/reflection.bin")); -} - -server.addService( - ChallengeTimelineTemplateService, - new ChallengeTimelineTemplateServer() -); - -server.addService(ChallengeService, new ChallengeServer()); -server.addService(ChallengeTrackService, new ChallengeTrackServer()); -server.addService(ChallengeTypeService, new ChallengeTypeServer()); -server.addService(AttachmentService, new AttachmentServer()); -server.addService(PhaseService, new PhaseServer()); -server.addService(TimelineTemplateService, new TimelineTemplateServer()); - -server.bindAsync( - `${GRPC_SERVER_HOST}:${GRPC_SERVER_PORT}`, - ServerCredentials.createInsecure(), - (err: Error | null, bindPort: number) => { - if (err) { - throw err; - } - - console.info( - `gRPC:Server running at: ${GRPC_SERVER_HOST}:${bindPort}`, - new Date().toLocaleString() - ); - server.start(); - } -); diff --git a/src/service/AttachmentService.ts b/src/service/AttachmentService.ts deleted file mode 100644 index 7bcd4fc..0000000 --- a/src/service/AttachmentService.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - StatusObject, -} from "@grpc/grpc-js"; -import { - ScanRequest, - ScanResult, - LookupCriteria, -} from "../models/common/common"; - -import { - Attachment, - CreateAttachmentInput, - UpdateAttachmentInput, - AttachmentList, -} from "../models/domain-layer/challenge/attachment"; - -import { - AttachmentServer, - AttachmentService, -} from "../models/domain-layer/challenge/services/attachment"; - -import Domain from "../domain/Attachment"; - -class AttachmentServerImpl implements AttachmentServer { - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - const { items, nextToken } = await Domain.scan(criteria, inputNextToken); - - callback(null, { - items, - nextToken, - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - const Attachment = await Domain.lookup(lookupCriteria); - - callback(null, Attachment); - }; - - create: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - - const Attachment = await Domain.create(createRequestInput); - - callback(null, Attachment); - }; - - update: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((challengeTypeList) => { - callback(null, AttachmentList.fromJSON(challengeTypeList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - const challengeTypes = await Domain.delete(lookupCriteria); - - callback(null, AttachmentList.fromJSON(challengeTypes)); - }; -} - -export { AttachmentServerImpl as AttachmentServer, AttachmentService }; diff --git a/src/service/ChallengeService.ts b/src/service/ChallengeService.ts deleted file mode 100644 index aa1c403..0000000 --- a/src/service/ChallengeService.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { - UntypedHandleCall, - handleUnaryCall, - ServerUnaryCall, - sendUnaryData, -} from "@grpc/grpc-js"; - -import { - LookupCriteria, - ScanRequest, - ScanResult, -} from "../models/common/common"; - -import { - ChallengeServer, - ChallengeService, -} from "../models/domain-layer/challenge/services/challenge"; - -import { - CreateChallengeInput, - Challenge, - ChallengeList, - UpdateChallengeInput, - UpdateChallengeInputForACL, -} from "../models/domain-layer/challenge/challenge"; - -import Domain from "../domain/Challenge"; -import { Empty } from "../models/google/protobuf/empty"; -class ChallengeServerImpl implements ChallengeServer { - [name: string]: UntypedHandleCall; - - create: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createChallengeInput } = call; - Domain.create(createChallengeInput) - .then((challenge) => callback(null, challenge)) - .catch((error) => callback(error, null)); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - const challenge = await Domain.lookup(lookupCriteria); - - callback(null, challenge); - }; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - const { items, nextToken } = await Domain.scan(criteria, inputNextToken); - - callback(null, { items, nextToken }); - }; - - update: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - try { - const { updateInput, filterCriteria } = call.request; - if (!updateInput) return callback(null, { items: [] }); - const result = await Domain.update(filterCriteria, updateInput); - callback(null, result); - } catch (error: any) { - callback(error, null); - } - }; - - updateForAcl: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - try { - const { updateInputForAcl, filterCriteria } = call.request; - if (!updateInputForAcl) return callback(null); - await Domain.updateForAcl(filterCriteria, updateInputForAcl); - callback(null); - } catch (error) { - console.error(`Error in updateForAcl: ${JSON.stringify(error)}`); - callback(null); - } - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => {}; -} - -export { ChallengeServerImpl as ChallengeServer, ChallengeService }; diff --git a/src/service/ChallengeTimelineTemplateService.ts b/src/service/ChallengeTimelineTemplateService.ts deleted file mode 100644 index d9c9da0..0000000 --- a/src/service/ChallengeTimelineTemplateService.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - StatusObject, - ServerUnaryCall, -} from "@grpc/grpc-js"; -import { - ScanRequest, - ScanResult, - LookupCriteria, -} from "../models/common/common"; - -import { - ChallengeTimelineTemplate, - CreateChallengeTimelineTemplateInput, - UpdateChallengeTimelineTemplateInput, - ChallengeTimelineTemplateList, -} from "../models/domain-layer/challenge/challenge_timeline_template"; - -import { - ChallengeTimelineTemplateServer, - ChallengeTimelineTemplateService, -} from "../models/domain-layer/challenge/services/challenge_timeline_template"; - -import Domain from "../domain/ChallengeTimelineTemplate"; - -class ChallengeTimelineTemplatServerImpl - implements ChallengeTimelineTemplateServer -{ - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - Domain.scan(criteria, inputNextToken) - .then(({ items, nextToken }) => { - callback(null, { items, nextToken }); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.lookup(lookupCriteria) - .then((challengeTimelineTemplate) => { - callback(null, challengeTimelineTemplate); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - create: handleUnaryCall< - CreateChallengeTimelineTemplateInput, - ChallengeTimelineTemplate - > = async ( - call: ServerUnaryCall< - CreateChallengeTimelineTemplateInput, - ChallengeTimelineTemplate - >, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - Domain.create(createRequestInput) - .then((challengeTimelineTemplate) => { - callback(null, challengeTimelineTemplate); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - update: handleUnaryCall< - UpdateChallengeTimelineTemplateInput, - ChallengeTimelineTemplateList - > = async ( - call: ServerUnaryCall< - UpdateChallengeTimelineTemplateInput, - ChallengeTimelineTemplateList - >, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((challengeTimelineTemplateList) => { - callback( - null, - ChallengeTimelineTemplateList.fromJSON(challengeTimelineTemplateList) - ); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = - async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.delete(lookupCriteria) - .then((challengeTimelineTemplateList) => { - callback( - null, - ChallengeTimelineTemplateList.fromJSON( - challengeTimelineTemplateList - ) - ); - }) - .catch((error) => { - callback(error, null); - }); - }; -} - -export { - ChallengeTimelineTemplatServerImpl as ChallengeTimelineTemplateServer, - ChallengeTimelineTemplateService, -}; diff --git a/src/service/ChallengeTrackService.ts b/src/service/ChallengeTrackService.ts deleted file mode 100644 index 413fea2..0000000 --- a/src/service/ChallengeTrackService.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - StatusObject, -} from "@grpc/grpc-js"; -import { - ScanRequest, - ScanResult, - LookupCriteria, -} from "../models/common/common"; - -import { - ChallengeTrack, - CreateChallengeTrackInput, - UpdateChallengeTrackInput, - ChallengeTrackList, -} from "../models/domain-layer/challenge/challenge_track"; - -import { - ChallengeTrackServer, - ChallengeTrackService, -} from "../models/domain-layer/challenge/services/challenge_track"; - -import Domain from "../domain/ChallengeTrack"; - -class ChallengeTrackServerImpl implements ChallengeTrackServer { - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - Domain.scan(criteria, inputNextToken) - .then(({ items, nextToken }) => { - callback(null, { items, nextToken }); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.lookup(lookupCriteria) - .then((challengeTrack) => { - callback(null, challengeTrack); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - create: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - - Domain.create(createRequestInput) - .then((challengeTrack) => { - callback(null, challengeTrack); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - update: handleUnaryCall = - async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((challengeTrackList) => { - callback(null, ChallengeTrackList.fromJSON(challengeTrackList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.delete(lookupCriteria) - .then((challengeTrackList) => { - callback(null, ChallengeTrackList.fromJSON(challengeTrackList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; -} - -export { - ChallengeTrackServerImpl as ChallengeTrackServer, - ChallengeTrackService, -}; diff --git a/src/service/ChallengeTypeService.ts b/src/service/ChallengeTypeService.ts deleted file mode 100644 index 92481ad..0000000 --- a/src/service/ChallengeTypeService.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - StatusObject, -} from "@grpc/grpc-js"; -import { - ScanRequest, - ScanResult, - LookupCriteria, -} from "../models/common/common"; - -import { - ChallengeType, - CreateChallengeTypeInput, - UpdateChallengeTypeInput, - ChallengeTypeList, -} from "../models/domain-layer/challenge/challenge_type"; - -import { - ChallengeTypeServer, - ChallengeTypeService, -} from "../models/domain-layer/challenge/services/challenge_type"; - -import Domain from "../domain/ChallengeType"; - -class ChallengeTypeServerImpl implements ChallengeTypeServer { - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - Domain.scan(criteria, inputNextToken) - .then(({ items, nextToken }) => { - callback(null, { items, nextToken }); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.lookup(lookupCriteria) - .then((challengeType) => { - callback(null, challengeType); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - create: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - - Domain.create(createRequestInput) - .then((challengeType) => { - callback(null, challengeType); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - update: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((challengeTypeList) => { - callback(null, ChallengeTypeList.fromJSON(challengeTypeList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.delete(lookupCriteria) - .then((challengeTypeList) => { - callback(null, ChallengeTypeList.fromJSON(challengeTypeList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; -} - -export { ChallengeTypeServerImpl as ChallengeTypeServer, ChallengeTypeService }; diff --git a/src/service/PhaseService.ts b/src/service/PhaseService.ts deleted file mode 100644 index 67fa885..0000000 --- a/src/service/PhaseService.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - StatusObject, -} from "@grpc/grpc-js"; -import { - ScanRequest, - ScanResult, - LookupCriteria, -} from "../models/common/common"; - -import { - Phase, - CreatePhaseInput, - UpdatePhaseInput, - PhaseList, -} from "../models/domain-layer/challenge/phase"; - -import { - PhaseServer, - PhaseService, -} from "../models/domain-layer/challenge/services/phase"; - -import Domain from "../domain/Phase"; - -class PhaseServerImpl implements PhaseServer { - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - Domain.scan(criteria, inputNextToken) - .then(({ items, nextToken }) => { - callback(null, { items, nextToken }); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.lookup(lookupCriteria) - .then((phase) => { - callback(null, phase); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - create: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - - Domain.create(createRequestInput) - .then((phase) => { - callback(null, phase); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - update: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((phaseList) => { - callback(null, PhaseList.fromJSON(phaseList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.delete(lookupCriteria) - .then((phaseList) => { - callback(null, PhaseList.fromJSON(phaseList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; -} - -export { PhaseServerImpl as PhaseServer, PhaseService }; diff --git a/src/service/TimelineTemplateService.ts b/src/service/TimelineTemplateService.ts deleted file mode 100644 index 92a3963..0000000 --- a/src/service/TimelineTemplateService.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - StatusObject, -} from "@grpc/grpc-js"; -import { - LookupCriteria, - ScanRequest, - ScanResult, -} from "../models/common/common"; - -import { - CreateTimelineTemplateInput, - TimelineTemplate, - TimelineTemplateList, - UpdateTimelineTemplateInput, -} from "../models/domain-layer/challenge/timeline_template"; - -import { - TimelineTemplateServer, - TimelineTemplateService, -} from "../models/domain-layer/challenge/services/timeline_template"; - -import Domain from "../domain/TimelineTemplate"; - -class TimelineTemplateServerImpl implements TimelineTemplateServer { - [name: string]: import("@grpc/grpc-js").UntypedHandleCall; - - scan: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { criteria, nextToken: inputNextToken }, - } = call; - - Domain.scan(criteria, inputNextToken) - .then(({ items, nextToken }) => { - callback(null, { items, nextToken }); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - lookup: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.lookup(lookupCriteria) - .then((timelineTemplate) => { - callback(null, timelineTemplate); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - create: handleUnaryCall = - async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: createRequestInput } = call; - - Domain.create(createRequestInput) - .then((timelineTemplate) => { - callback(null, timelineTemplate); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - update: handleUnaryCall = - async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { - request: { updateInput, filterCriteria }, - } = call; - - Domain.update(filterCriteria, updateInput) - .then((timelineTemplateList) => { - callback(null, TimelineTemplateList.fromJSON(timelineTemplateList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; - - delete: handleUnaryCall = async ( - call: ServerUnaryCall, - callback: sendUnaryData - ): Promise => { - const { request: lookupCriteria } = call; - - Domain.delete(lookupCriteria) - .then((timelineTemplateList) => { - callback(null, TimelineTemplateList.fromJSON(timelineTemplateList)); - }) - .catch((error: StatusObject) => { - callback(error, null); - }); - }; -} - -export { - TimelineTemplateServerImpl as TimelineTemplateServer, - TimelineTemplateService, -}; diff --git a/src/util/ChallengeScheduler.ts b/src/util/ChallengeScheduler.ts deleted file mode 100644 index dc25b85..0000000 --- a/src/util/ChallengeScheduler.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { InvokeCommand, LambdaClient } from "@aws-sdk/client-lambda"; -import { fromUtf8 } from "@aws-sdk/util-utf8-node"; - -export interface IChallengeScheduler { - action: "schedule" | "remove"; - challengeId: string; - phases: { - name: string; - scheduledStartDate?: string; - scheduledEndDate?: string; - }[]; -} - -export default new (class { - #client: LambdaClient = new LambdaClient({ region: process.env.AWS_REGION }); - - async schedule(challenge: IChallengeScheduler) { - const invokeCommand = new InvokeCommand({ - FunctionName: process.env.CHALLENGE_SCHEDULER_LAMBDA_ARN, - Payload: fromUtf8(JSON.stringify(challenge)), - }); - - try { - await this.#client.send(invokeCommand); - } catch (error) { - console.error(error); - } - } -})(); diff --git a/src/util/DateUtil.ts b/src/util/DateUtil.ts deleted file mode 100644 index 262c108..0000000 --- a/src/util/DateUtil.ts +++ /dev/null @@ -1,24 +0,0 @@ -import dayjs from "dayjs"; -import utc from "dayjs/plugin/utc"; -import timezone from "dayjs/plugin/timezone"; - -dayjs.extend(utc); -dayjs.extend(timezone); - -export const IFX_TIMEZONE = "America/New_York"; -export const dateFormatIfx = "YYYY-MM-DD HH:mm:ss"; - -class DateUtil { - public formatDateForIfx(date: string): string | undefined { - const parsedDate = dayjs(date); - return parsedDate.isValid() - ? parsedDate.tz(IFX_TIMEZONE).format(dateFormatIfx) - : undefined; - } - - public isValidDate(date: string) { - return dayjs(date).isValid(); - } -} - -export default new DateUtil(); diff --git a/src/util/LegacyMapper.ts b/src/util/LegacyMapper.ts deleted file mode 100644 index 0af4d38..0000000 --- a/src/util/LegacyMapper.ts +++ /dev/null @@ -1,241 +0,0 @@ -import _ from "lodash"; -import { PrizeSetTypes } from "../common/Constants"; -import { V5_TO_V4 } from "../common/ConversionMap"; -import { legacyChallengeStatusesMap } from "./constants"; -import DateUtil from "./DateUtil"; - -class LegacyMapper { - // To be used on challenge:update calls that change state from New -> Draft - public mapChallengeDraftUpdateInput = (input: any) => { - const prizeSets = this.mapPrizeSets(input.prizeSets); - const projectInfo = this.mapProjectInfo(input, prizeSets); - - return { - name: input.name, - projectStatusId: legacyChallengeStatusesMap.Draft, - ...this.mapTrackAndTypeToCategoryStudioSpecAndMmSpec( - input.legacy.track, - input.legacy.subTrack - ), - tcDirectProjectId: input.legacy?.directProjectId!, - winnerPrizes: - prizeSets[PrizeSetTypes.ChallengePrizes]?.map( - (amount: number, index: number) => ({ - amount, - place: index + 1, - numSubmissions: 1, - type: PrizeSetTypes.ChallengePrizes, - }) - ) ?? [], - phases: input.phases.map((phase: any, index: number) => ({ - phaseTypeId: this.mapPhaseNameToPhaseTypeId(phase.name), - phaseStatusId: 1, - fixedStartTime: - index == 0 - ? DateUtil.formatDateForIfx(phase.scheduledStartDate) - : undefined, // Registration Phase needs a fixedStartTime - scheduledStartTime: DateUtil.formatDateForIfx(phase.scheduledStartDate), - scheduledEndTime: DateUtil.formatDateForIfx(phase.scheduledEndDate), - actualStartTime: DateUtil.formatDateForIfx(phase.actualStartDate), - actualEndTime: DateUtil.formatDateForIfx(phase.actualEndDate), - duration: phase.duration, - phaseCriteria: this.mapPhaseCriteria(phase), - })), - reviewType: input.legacy?.reviewType ?? "INTERNAL", - confidentialityType: input.legacy?.confidentialityType ?? "public", - billingProject: input.billing?.billingAccountId!, - projectInfo, - }; - }; - - public mapTrackAndType(trackId: string, typeId: string, tags: string[]) { - return V5_TO_V4[trackId][typeId](tags); - } - - private mapTrackAndTypeToCategoryStudioSpecAndMmSpec( - track: string, // TODO: Properly map studio challenges - subTrack: string - ): { - projectCategoryId: number; - projectStudioSpecId: number | undefined; - projectMmSpecId: number | undefined; - } { - subTrack = subTrack.replace(" ", "").toLowerCase(); - - let projectCategoryId = 39; // code - if (subTrack === "first2finish") { - projectCategoryId = 38; - } else if (subTrack === "marathonmatch") { - projectCategoryId = 37; - } else if (subTrack === "bughunt") { - projectCategoryId = 9; - } - - return { - projectCategoryId, - projectStudioSpecId: undefined, // TODO: Handle design challenges - projectMmSpecId: undefined, // TODO: Handle mMM challenges - }; - } - - private mapPrizeSets( - prizeSets: { type: string; prizes: { value: number }[] }[] - ) { - return prizeSets.reduce((acc: { [key: string]: number[] }, prize) => { - acc[prize.type] = prize.prizes.map((p) => p.value).sort((a, b) => b - a); - - return acc; - }, {}); - } - - private mapProjectInfo( - input: any, - prizeSets: any - ): { [key: number]: string | undefined } { - const firstPlacePrize = - prizeSets[PrizeSetTypes.ChallengePrizes]?.length >= 1 - ? prizeSets[PrizeSetTypes.ChallengePrizes][0]?.toString() - : undefined; - - return { - 3: "1", - 4: "0", - 7: "1.0", - 9: "Off", // Turn Auto Pilot Off - 78: "Development", // Forum Type - value doesn't matter - 10: "Off", // Turn status notification off - 11: "Off", // Turn timeline notification off - 12: "Yes", // Public -> Yes (make it dynamic) - 13: "Yes", // Rated -> Yes (make it dynamic) - 14: "Open", // Eligibility -> Open (value doesn't matter) - 16: firstPlacePrize?.toString(), - 26: "Off", // No Digital Run - 30: "0", // No DR Points - 6: input.name, - 31: "0", // Admin Fee - 32: input.billing?.billingAccountId!.toString(), - // Review Cost - 33: - prizeSets[PrizeSetTypes.ReviewerPayment]?.length == 1 - ? prizeSets[PrizeSetTypes.ReviewerPayment][0]?.toString() - : undefined, - // Confidentiality Type - 34: input.legacy?.confidentialityType ?? "public", - // Review Type - 79: input.legacy?.reviewType ?? "COMMUNITY", - // Spec Review Cost - 35: undefined, - // First Place Prize - 36: firstPlacePrize?.toString(), - // Second Place Prize - 37: - prizeSets[PrizeSetTypes.ChallengePrizes]?.length >= 2 - ? prizeSets[PrizeSetTypes.ChallengePrizes][1]?.toString() - : undefined, - // Reliability Bonus Cost - 38: undefined, - // Checkpoint Bonus Cost - 39: undefined, - 41: "true", // Approval Required - 43: "true", // Send Winner Emails - 44: "false", // Post-mortem required (set to false - new Autopilot will handle this) - 45: "false", // Reliability bonus eligible - 46: "true", // Member Payments Eligible - 48: "true", // Track Late Deliverables - 52: "false", // Allow Stock Art - 57: "0.5", // Contest Fee Percentage - 59: "false", // Review Feedback Flag - 88: "0", // Effort Hours Estimate - 89: "0", // Estimate Efforts Days Offshore (extract from metadata) - 90: "0", // Estimate Efforts Days Onsite (extract from metadata) - }; - } - - private mapPhaseCriteria(phase: any) { - const reviewPhaseConstraint = phase.constraints?.find( - (constraint: { name: string; value: number }) => - constraint.name === "Number of Reviewers" - ); - - const submissionPhaseConstraint = phase.constraints?.find( - (constraint: { name: string; value: number }) => - constraint.name === "Number of Submissions" - ); - - return { - 1: phase.name === "Review" ? 30001610 : undefined, // Scorecard ID - 2: phase.name === "Registration" ? 1 : undefined, // Registration Number - 3: - phase.name === "Submission" - ? submissionPhaseConstraint?.value ?? - reviewPhaseConstraint?.value != null - ? 1 - : undefined - : undefined, // Submission Number - 4: undefined, // View Response During Appeals - 5: undefined, // Manual Screening - 6: - phase.name === "Review" ? reviewPhaseConstraint?.value ?? 2 : undefined, // Reviewer Number - 7: undefined, // View Reviews During Review - }; - } - - private mapPhaseNameToPhaseTypeId(name: string) { - if (name == "Registration") { - return 1; - } - if (name == "Submission") { - return 2; - } - if (name == "Screening") { - return 3; - } - if (name == "Review") { - return 4; - } - if (name == "Appeals") { - return 5; - } - if (name == "Appeals Response") { - return 6; - } - if (name == "Aggregation") { - return 7; - } - if (name == "Aggregation Review") { - return 8; - } - if (name == "Final Fix") { - return 9; - } - if (name == "Final Review") { - return 10; - } - if (name == "Approval") { - return 11; - } - if (name == "Post-Mortem") { - return 12; - } - if (name == "Specification Submission") { - return 13; - } - if (name == "Specification Review") { - return 14; - } - if (name == "Checkpoint Submission") { - return 15; - } - if (name == "Checkpoint Screening") { - return 16; - } - if (name == "Checkpoint Review") { - return 17; - } - if (name == "Iterative Review") { - return 18; - } - } -} - -export default new LegacyMapper(); diff --git a/src/util/constants.ts b/src/util/constants.ts deleted file mode 100644 index 55809d6..0000000 --- a/src/util/constants.ts +++ /dev/null @@ -1,190 +0,0 @@ -/** - * constants - */ -import metadataExtractor from "./metadataExtractor"; - -const EVENT_ORIGINATOR = "legacy-challenge-processor"; - -const EVENT_MIME_TYPE = "application/json"; - -export const legacyChallengeStatusesMap = { - Active: 1, - Draft: 2, - New: 2, - Cancelled: 9, - Completed: 7, - Deleted: 3, - CancelledFailedReview: 4, - CancelledFailedScreening: 5, - CancelledZeroSubmissions: 6, - CancelledWinnerUnresponsive: 8, - CancelledClientRequest: 9, - CancelledRequirementsInfeasible: 10, - CancelledZeroRegistrations: 11, -}; - -const challengeStatuses = { - New: "New", - Draft: "Draft", - Approved: "Approved", - Canceled: "Canceled", - Active: "Active", - Completed: "Completed", - Deleted: "Deleted", - CancelledFailedReview: "Cancelled - Failed Review", - CancelledFailedScreening: "Cancelled - Failed Screening", - CancelledZeroSubmissions: "Cancelled - Zero Submissions", - CancelledWinnerUnresponsive: "Cancelled - Winner Unresponsive", - CancelledClientRequest: "Cancelled - Client Request", - CancelledRequirementsInfeasible: "Cancelled - Requirements Infeasible", - CancelledZeroRegistrations: "Cancelled - Zero Registrations", - CancelledPaymentFailed: "Cancelled - Payment Failed", -}; - -const scorecardQuestionMapping: any = { - 30002212: [ - { - questionId: 30007531, - description: - "Does the submission sufficiently satisfy the requirements as described in the provided specification?", - }, - { - questionId: 30007533, - description: "How would you rate the work ethic of this submitter?", - }, - { - questionId: 30007532, - description: "How would you rate the quality of this submitters work?", - }, - ], -}; - -const PhaseStatusTypes = { - Scheduled: 1, - Open: 2, - Closed: 3, -}; - -const prizeTypesIds = { - Contest: 15, - Checkpoint: 14, -}; - -const supportedMetadata: any = { - 32: { - method: metadataExtractor.extractBillingProject, - defaultValue: null, - description: "Billing Project", - }, - 31: { - method: metadataExtractor.extractAdminFee, - defaultValue: 0, - description: "Admin Fee", - }, - 30: { - method: metadataExtractor.extractDrPoints, - defaultValue: 0, - description: "DR points", - }, - 57: { - method: metadataExtractor.extractMarkup, - defaultValue: 0, - description: "Markup", - }, - 35: { - method: metadataExtractor.extractSpecReviewCost, - defaultValue: null, - description: "Spec review cost", - }, - 41: { - method: metadataExtractor.extractApprovalRequired, - defaultValue: true, - description: "Approval Required", - }, - 44: { - method: metadataExtractor.extractPostMortemRequired, - defaultValue: true, - description: "Post-Mortem Required", - }, - 48: { - method: metadataExtractor.extractTrackLateDeliverablesRequired, - defaultValue: true, - description: "Track Late Deliverables", - }, - 51: { - method: metadataExtractor.extractSubmissionLimit, - defaultValue: null, - description: "Maximum submissions", - }, - 52: { - method: metadataExtractor.extractAllowStockArtRequired, - defaultValue: false, - description: "Allow Stock Art", - }, - 53: { - method: metadataExtractor.extractSubmissionViewable, - defaultValue: false, - description: "Viewable Submissions Flag", - }, - 59: { - method: metadataExtractor.extractReviewFeedback, - defaultValue: false, - description: "Review Feedback Flag", - }, - 84: { - method: metadataExtractor.extractEnvironment, - defaultValue: null, - description: "Environment", - }, - 85: { - method: metadataExtractor.extractCodeRepo, - defaultValue: null, - description: "Code repo", - }, - 88: { - method: metadataExtractor.extractEstimateEffortHours, - defaultValue: 0, - description: "Effort Hours Estimate", - }, - 89: { - method: metadataExtractor.extractEstimateEffortOffshore, - defaultValue: 0, - description: "Estimate Effort Days offshore", - }, - 90: { - method: metadataExtractor.extractEstimateEffortOnsite, - defaultValue: 0, - description: "Estimate Effort Days Onsite", - }, - 33: { - method: metadataExtractor.extractReviewerPayment, - defaultValue: null, - description: "Reviewer Payment", - } -}; - -const STUDIO_CATEGORY_TYPES = [ - 16, // Banners/Icons - 17, // Web designs - 18, // wireframes - 20, // logo design - 21, // print/presentation - 30, // widget or mobile screen design - 31, // front-end flash - 32, // application front-end design - 34, // studio other - 22, // idea generation - 40, // design f2f -]; - -export default { - EVENT_ORIGINATOR, - EVENT_MIME_TYPE, - legacyChallengeStatusesMap, - challengeStatuses, - PhaseStatusTypes, - prizeTypesIds, - supportedMetadata, - scorecardQuestionMapping, - STUDIO_CATEGORY_TYPES, -}; diff --git a/src/util/metadataExtractor.ts b/src/util/metadataExtractor.ts deleted file mode 100644 index b7011dc..0000000 --- a/src/util/metadataExtractor.ts +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Metadata extractor - */ -import _ from "lodash"; -import { PrizeSetTypes } from "../common/Constants"; - -/** - * Get metadata entry by key - * @param {Array} metadata the metadata array - * @param {String} key the metadata key - */ -export const getMeta = (metadata = [], key:any) => _.find(metadata, (meta:any) => meta.name === key) - -/** - * Extract billing project - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractBillingProject (challenge:any, defaultValue:any) { - return _.get(challenge, 'billingAccountId', _.get(challenge, 'billing.billingAccountId', _.toString(defaultValue))) -} - -/** - * Extract markup - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractMarkup (challenge:any, defaultValue:any) { - return _.toString(_.get(challenge, 'billing.markup', defaultValue)) -} - -/** - * Extract Admin Fee - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractAdminFee (challenge:any, defaultValue:any) { - // TODO for now just return 0 - return _.toString(_.get(challenge, 0, defaultValue)) -} - -/** - * Extract submission limit - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractSubmissionLimit (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'submissionLimit') - if (!entry) return _.toString(defaultValue) - try { - const parsedEntryValue = JSON.parse(entry.value) - if (parsedEntryValue.limit) { - entry.value = parsedEntryValue.count - } else { - entry.value = null - } - } catch (e) { - entry.value = null - } - return _.toString(entry.value || defaultValue) -} - -/** - * Extract spec review cost - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractSpecReviewCost (challenge:any, defaultValue:any) { - return _.get(_.find(_.get(challenge, 'prizeSets', []), p => p.type === 'specReviewer') || {}, 'prizes[0].value', _.toString(defaultValue)) -} - -/** - * Extract DR points - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractDrPoints (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'drPoints') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value || defaultValue) -} - -/** - * Extract Approval required - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractApprovalRequired (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'approvalRequired') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract Post-mortem required - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractPostMortemRequired (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'postMortemRequired') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract track late deliverables required - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractTrackLateDeliverablesRequired (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'trackLateDeliverables') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract allow stock art required - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -export function extractAllowStockArtRequired (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'allowStockArt') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract submission viewable - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractSubmissionViewable (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'submissionViewable') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract review feedback - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractReviewFeedback (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'reviewFeedback') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract environment - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractEnvironment (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'environment') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract code repo - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractCodeRepo (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'codeRepo') - if (!entry) return _.toString(defaultValue) - return _.toString(entry.value) -} - -/** - * Extract estimate effort hours - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractEstimateEffortHours (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'effortHoursEstimate') - if (!entry) return _.toString(defaultValue) - return _.toNumber(entry.value) -} - -/** - * Extract estimate effort days offshore - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractEstimateEffortOffshore (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'offshoreEfforts') - if (!entry) return _.toString(defaultValue) - return _.toNumber(entry.value) -} - -/** - * Extract estimate effort days Onsite - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractEstimateEffortOnsite (challenge:any, defaultValue:any) { - const entry = getMeta(challenge.metadata, 'onsiteEfforts') - if (!entry) return _.toString(defaultValue) - return _.toNumber(entry.value) -} - -/** - * Extract reviewer payment - * @param {Object} challenge the challenge object - * @param {Any} defaultValue the default value - */ -function extractReviewerPayment (challenge:any, defaultValue:any) { - try { - const value = challenge?.prizeSets[PrizeSetTypes.ReviewerPayment]?.length == 1 ? challenge?.prizeSets[PrizeSetTypes.ReviewerPayment][0] : null - if (!value) return _.toString(defaultValue) - return _.toString(value) - } catch (e) { - return _.toString(defaultValue) - } -} - -export default { - extractMarkup, - extractAdminFee, - extractBillingProject, - extractSubmissionLimit, - extractSpecReviewCost, - extractDrPoints, - extractApprovalRequired, - extractPostMortemRequired, - extractTrackLateDeliverablesRequired, - extractAllowStockArtRequired, - extractSubmissionViewable, - extractReviewFeedback, - extractEnvironment, - extractCodeRepo, - extractEstimateEffortHours, - extractEstimateEffortOffshore, - extractEstimateEffortOnsite, - extractReviewerPayment -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 973c44e..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "lib": ["ES2021"], - "module": "commonjs", - "target": "ES2021", - "strict": true, - "moduleResolution": "Node16", - "esModuleInterop": true, - "outDir": "dist", - "forceConsistentCasingInFileNames": true - }, - "include": ["typings/global.d.ts", "src/**/*"], - "exclude": ["node_modules", "src/models", "src/dal/models/nosql"], - "references": [{ "path": "src/models" }, { "path": "src/dal/models/nosql" }] -} diff --git a/typings/global.d.ts b/typings/global.d.ts deleted file mode 100644 index 4af3ab0..0000000 --- a/typings/global.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Promise method -type Resolve = (value: T) => void; -type Reject = (reason?: unknown) => void; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index dfc34bc..0000000 --- a/yarn.lock +++ /dev/null @@ -1,2411 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@aws-crypto/ie11-detection@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz#640ae66b4ec3395cee6a8e94ebcd9f80c24cd688" - integrity sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q== - dependencies: - tslib "^1.11.1" - -"@aws-crypto/sha256-browser@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz#05f160138ab893f1c6ba5be57cfd108f05827766" - integrity sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ== - dependencies: - "@aws-crypto/ie11-detection" "^3.0.0" - "@aws-crypto/sha256-js" "^3.0.0" - "@aws-crypto/supports-web-crypto" "^3.0.0" - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-locate-window" "^3.0.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - -"@aws-crypto/sha256-js@3.0.0", "@aws-crypto/sha256-js@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2" - integrity sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - -"@aws-crypto/supports-web-crypto@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz#5d1bf825afa8072af2717c3e455f35cda0103ec2" - integrity sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg== - dependencies: - tslib "^1.11.1" - -"@aws-crypto/util@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-3.0.0.tgz#1c7ca90c29293f0883468ad48117937f0fe5bfb0" - integrity sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w== - dependencies: - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - -"@aws-sdk/abort-controller@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/abort-controller/-/abort-controller-3.292.0.tgz#37c43fd2ce5bcb158aa62e3a5632045ee8a7e3cc" - integrity sha512-lf+OPptL01kvryIJy7+dvFux5KbJ6OTwLPPEekVKZ2AfEvwcVtOZWFUhyw3PJCBTVncjKB1Kjl3V/eTS3YuPXQ== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/client-lambda@^3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-lambda/-/client-lambda-3.294.0.tgz#725705142560601af6e3cd212b13567cce72fd43" - integrity sha512-zqkRsODF7R/4d597mjPExqyrRqwut+PCffQvLsfmxCnRHQPWVmMRBVl9xAvmsPM0mWlvrqcwa/GGOJplG3z/vQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.294.0" - "@aws-sdk/config-resolver" "3.292.0" - "@aws-sdk/credential-provider-node" "3.294.0" - "@aws-sdk/fetch-http-handler" "3.292.0" - "@aws-sdk/hash-node" "3.292.0" - "@aws-sdk/invalid-dependency" "3.292.0" - "@aws-sdk/middleware-content-length" "3.292.0" - "@aws-sdk/middleware-endpoint" "3.292.0" - "@aws-sdk/middleware-host-header" "3.292.0" - "@aws-sdk/middleware-logger" "3.292.0" - "@aws-sdk/middleware-recursion-detection" "3.292.0" - "@aws-sdk/middleware-retry" "3.293.0" - "@aws-sdk/middleware-serde" "3.292.0" - "@aws-sdk/middleware-signing" "3.292.0" - "@aws-sdk/middleware-stack" "3.292.0" - "@aws-sdk/middleware-user-agent" "3.293.0" - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/node-http-handler" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/smithy-client" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - "@aws-sdk/util-base64" "3.292.0" - "@aws-sdk/util-body-length-browser" "3.292.0" - "@aws-sdk/util-body-length-node" "3.292.0" - "@aws-sdk/util-defaults-mode-browser" "3.292.0" - "@aws-sdk/util-defaults-mode-node" "3.292.0" - "@aws-sdk/util-endpoints" "3.293.0" - "@aws-sdk/util-retry" "3.292.0" - "@aws-sdk/util-user-agent-browser" "3.292.0" - "@aws-sdk/util-user-agent-node" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - "@aws-sdk/util-waiter" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/client-sso-oidc@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.294.0.tgz#eeb1689c5ee1cc77d92ea341fcd919e04d45372d" - integrity sha512-/ZfDud76MdSPJ/TxjV2xLE30XbBQDZwKQ32axwoK1eziPvrAIUBYVgpBwj+m0quhoiQhBKkg3aFl6j39AF2thw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/config-resolver" "3.292.0" - "@aws-sdk/fetch-http-handler" "3.292.0" - "@aws-sdk/hash-node" "3.292.0" - "@aws-sdk/invalid-dependency" "3.292.0" - "@aws-sdk/middleware-content-length" "3.292.0" - "@aws-sdk/middleware-endpoint" "3.292.0" - "@aws-sdk/middleware-host-header" "3.292.0" - "@aws-sdk/middleware-logger" "3.292.0" - "@aws-sdk/middleware-recursion-detection" "3.292.0" - "@aws-sdk/middleware-retry" "3.293.0" - "@aws-sdk/middleware-serde" "3.292.0" - "@aws-sdk/middleware-stack" "3.292.0" - "@aws-sdk/middleware-user-agent" "3.293.0" - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/node-http-handler" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/smithy-client" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - "@aws-sdk/util-base64" "3.292.0" - "@aws-sdk/util-body-length-browser" "3.292.0" - "@aws-sdk/util-body-length-node" "3.292.0" - "@aws-sdk/util-defaults-mode-browser" "3.292.0" - "@aws-sdk/util-defaults-mode-node" "3.292.0" - "@aws-sdk/util-endpoints" "3.293.0" - "@aws-sdk/util-retry" "3.292.0" - "@aws-sdk/util-user-agent-browser" "3.292.0" - "@aws-sdk/util-user-agent-node" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/client-sso@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.294.0.tgz#27391306759fd071fdb715ff3bb0693ae6053a84" - integrity sha512-+FuxQTi5WvnaXM5JbNLkBIzQ3An4gA0ox61N1u+3xled+nywKb1yQ7WmRpyMG5bLbkmnj3aqoo5/uskFc4c4EA== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/config-resolver" "3.292.0" - "@aws-sdk/fetch-http-handler" "3.292.0" - "@aws-sdk/hash-node" "3.292.0" - "@aws-sdk/invalid-dependency" "3.292.0" - "@aws-sdk/middleware-content-length" "3.292.0" - "@aws-sdk/middleware-endpoint" "3.292.0" - "@aws-sdk/middleware-host-header" "3.292.0" - "@aws-sdk/middleware-logger" "3.292.0" - "@aws-sdk/middleware-recursion-detection" "3.292.0" - "@aws-sdk/middleware-retry" "3.293.0" - "@aws-sdk/middleware-serde" "3.292.0" - "@aws-sdk/middleware-stack" "3.292.0" - "@aws-sdk/middleware-user-agent" "3.293.0" - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/node-http-handler" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/smithy-client" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - "@aws-sdk/util-base64" "3.292.0" - "@aws-sdk/util-body-length-browser" "3.292.0" - "@aws-sdk/util-body-length-node" "3.292.0" - "@aws-sdk/util-defaults-mode-browser" "3.292.0" - "@aws-sdk/util-defaults-mode-node" "3.292.0" - "@aws-sdk/util-endpoints" "3.293.0" - "@aws-sdk/util-retry" "3.292.0" - "@aws-sdk/util-user-agent-browser" "3.292.0" - "@aws-sdk/util-user-agent-node" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/client-sts@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.294.0.tgz#1d89acb6d49d02b0840c5a8b93e1b14acfb43b23" - integrity sha512-AefqwhFjTDzelZuSYhriJbiI+GQwf2yKiKAnCt0gRj6rswewStM63Gtlhfb01sFPp+ZiqPcyQ47LqUaHp1mz/g== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/config-resolver" "3.292.0" - "@aws-sdk/credential-provider-node" "3.294.0" - "@aws-sdk/fetch-http-handler" "3.292.0" - "@aws-sdk/hash-node" "3.292.0" - "@aws-sdk/invalid-dependency" "3.292.0" - "@aws-sdk/middleware-content-length" "3.292.0" - "@aws-sdk/middleware-endpoint" "3.292.0" - "@aws-sdk/middleware-host-header" "3.292.0" - "@aws-sdk/middleware-logger" "3.292.0" - "@aws-sdk/middleware-recursion-detection" "3.292.0" - "@aws-sdk/middleware-retry" "3.293.0" - "@aws-sdk/middleware-sdk-sts" "3.292.0" - "@aws-sdk/middleware-serde" "3.292.0" - "@aws-sdk/middleware-signing" "3.292.0" - "@aws-sdk/middleware-stack" "3.292.0" - "@aws-sdk/middleware-user-agent" "3.293.0" - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/node-http-handler" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/smithy-client" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - "@aws-sdk/util-base64" "3.292.0" - "@aws-sdk/util-body-length-browser" "3.292.0" - "@aws-sdk/util-body-length-node" "3.292.0" - "@aws-sdk/util-defaults-mode-browser" "3.292.0" - "@aws-sdk/util-defaults-mode-node" "3.292.0" - "@aws-sdk/util-endpoints" "3.293.0" - "@aws-sdk/util-retry" "3.292.0" - "@aws-sdk/util-user-agent-browser" "3.292.0" - "@aws-sdk/util-user-agent-node" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - fast-xml-parser "4.1.2" - tslib "^2.3.1" - -"@aws-sdk/config-resolver@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/config-resolver/-/config-resolver-3.292.0.tgz#c5c9b86a2a75aa591bc7acdbe94557367a2a7d90" - integrity sha512-cB3twnNR7vYvlt2jvw8VlA1+iv/tVzl+/S39MKqw2tepU+AbJAM0EHwb/dkf1OKSmlrnANXhshx80MHF9zL4mA== - dependencies: - "@aws-sdk/signature-v4" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-config-provider" "3.292.0" - "@aws-sdk/util-middleware" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-env@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.292.0.tgz#bde3333b7bee715c8a41113f1c6deb0e896a59da" - integrity sha512-YbafSG0ZEKE2969CJWVtUhh3hfOeLPecFVoXOtegCyAJgY5Ghtu4TsVhL4DgiGAgOC30ojAmUVQEXzd7xJF5xA== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-imds@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.292.0.tgz#557e59c637c3852cac54534319c75eb015aa3081" - integrity sha512-W/peOgDSRYulgzFpUhvgi1pCm6piBz6xrVN17N4QOy+3NHBXRVMVzYk6ct2qpLPgJUSEZkcpP+Gds+bBm8ed1A== - dependencies: - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-ini@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.294.0.tgz#b4ff9f5da2c46b12c61acf85caab9eb3ed5330cd" - integrity sha512-pdTPbaAb5bWA+DnuKoL2TpXeNDp6Ejpv/OYt+bw2gdzl9w5r/ZCtUTTbW+Vvejr4WL5s3c1bY96kwdqCn7iLqA== - dependencies: - "@aws-sdk/credential-provider-env" "3.292.0" - "@aws-sdk/credential-provider-imds" "3.292.0" - "@aws-sdk/credential-provider-process" "3.292.0" - "@aws-sdk/credential-provider-sso" "3.294.0" - "@aws-sdk/credential-provider-web-identity" "3.292.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-node@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.294.0.tgz#0475d63f9627e3e429cda19b8b0f164fc01437a0" - integrity sha512-zUL1Qhb4BsQIZCs/TPpG4oIYH/9YsGiS+Se1tasSGjTOLfBy7jhOZ0QIdpEeyAx/EP8blOBredM9xWfEXgiHVA== - dependencies: - "@aws-sdk/credential-provider-env" "3.292.0" - "@aws-sdk/credential-provider-imds" "3.292.0" - "@aws-sdk/credential-provider-ini" "3.294.0" - "@aws-sdk/credential-provider-process" "3.292.0" - "@aws-sdk/credential-provider-sso" "3.294.0" - "@aws-sdk/credential-provider-web-identity" "3.292.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-process@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.292.0.tgz#52caa9d46d227e02fda5807d32a177a0819eee97" - integrity sha512-CFVXuMuUvg/a4tknzRikEDwZBnKlHs1LZCpTXIGjBdUTdosoi4WNzDLzGp93ZRTtcgFz+4wirz2f7P3lC0NrQw== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-sso@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.294.0.tgz#719ad377a41c80bdf087ca11e80890c3b8cbb8f4" - integrity sha512-UxrcAA/0l7j9+3tolYcG5M61D/IE1Bjd/9H87H1i2A2BrwUUBhW1Dp/vvROEDrrywlMDG3CDF3T/7ADtTak+sg== - dependencies: - "@aws-sdk/client-sso" "3.294.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/token-providers" "3.294.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/credential-provider-web-identity@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.292.0.tgz#60e180eadd0947891ed041f6a4574fa2074d0d4c" - integrity sha512-4DbtIEM9gGVfqYlMdYXg3XY+vBhemjB1zXIequottW8loLYM8Vuz4/uGxxKNze6evVVzowsA0wKrYclE1aj/Rg== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/fetch-http-handler@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.292.0.tgz#a99d915e019e888bfdfa3e5da68606bfc4c80522" - integrity sha512-zh3bhUJbL8RSa39ZKDcy+AghtUkIP8LwcNlwRIoxMQh3Row4D1s4fCq0KZCx98NJBEXoiTLyTQlZxxI//BOb1Q== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/querystring-builder" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-base64" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/hash-node@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/hash-node/-/hash-node-3.292.0.tgz#4f62e36a7cdefd0f4bca4c1d16261d36a4596442" - integrity sha512-1yLxmIsvE+eK36JXEgEIouTITdykQLVhsA5Oai//Lar6Ddgu1sFpLDbdkMtKbrh4I0jLN9RacNCkeVQjZPTCCQ== - dependencies: - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-buffer-from" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/invalid-dependency@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/invalid-dependency/-/invalid-dependency-3.292.0.tgz#0e5b47cacf459db6ae8dddc02d613a5bd0ff3555" - integrity sha512-39OUV78CD3TmEbjhpt+V+Fk4wAGWhixqHxDSN8+4WL0uB4Fl7k5m3Z9hNY78AttHQSl2twR7WtLztnXPAFsriw== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/is-array-buffer@3.201.0": - version "3.201.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/is-array-buffer/-/is-array-buffer-3.201.0.tgz#06e557adc284fac2f26071c2944ae01f61b95854" - integrity sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/is-array-buffer@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/is-array-buffer/-/is-array-buffer-3.292.0.tgz#d599c7ad4ad104918d52b8d2160091ca5b0a1971" - integrity sha512-kW/G5T/fzI0sJH5foZG6XJiNCevXqKLxV50qIT4B1pMuw7regd4ALIy0HwSqj1nnn9mSbRWBfmby0jWCJsMcwg== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/middleware-content-length@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-content-length/-/middleware-content-length-3.292.0.tgz#f2035aee536abf553b743202879ee86171c4c3c7" - integrity sha512-2gMWzQus5mj14menolpPDbYBeaOYcj7KNFZOjTjjI3iQ0KqyetG6XasirNrcJ/8QX1BRmpTol8Xjp2Ue3Gbzwg== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-endpoint@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.292.0.tgz#c6809a2e001ab03cac223dfae48439e893da627b" - integrity sha512-cPMkiSxpZGG6tYlW4OS+ucS6r43f9ddX9kcUoemJCY10MOuogdPjulCAjE0HTs2PLKSOrrG4CTP4Q4wWDrH4Bw== - dependencies: - "@aws-sdk/middleware-serde" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/signature-v4" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/url-parser" "3.292.0" - "@aws-sdk/util-config-provider" "3.292.0" - "@aws-sdk/util-middleware" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-host-header@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.292.0.tgz#513b011fcabedf29e0a6706a4aa3867bc7d813e4" - integrity sha512-mHuCWe3Yg2S5YZ7mB7sKU6C97XspfqrimWjMW9pfV2usAvLA3R0HrB03jpR5vpZ3P4q7HB6wK3S6CjYMGGRNag== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-logger@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.292.0.tgz#dd5ca0f20b06b1b74f918ddf0264ece1e9887aa1" - integrity sha512-yZNY1XYmG3NG+uonET7jzKXNiwu61xm/ZZ6i/l51SusuaYN+qQtTAhOFsieQqTehF9kP4FzbsWgPDwD8ZZX9lw== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-recursion-detection@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.292.0.tgz#d422bbc9efa2df2481ad56d0db553b0c0652e615" - integrity sha512-kA3VZpPko0Zqd7CYPTKAxhjEv0HJqFu2054L04dde1JLr43ro+2MTdX7vsHzeAFUVRphqatFFofCumvXmU6Mig== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-retry@3.293.0": - version "3.293.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-retry/-/middleware-retry-3.293.0.tgz#e7706c926cce1f21e5dbea2ab8d2828e50d6a303" - integrity sha512-7tiaz2GzRecNHaZ6YnF+Nrtk3au8qF6oiipf11R7MJiqJ0fkMLnz/iRrlakDziS9qF/a9v+3yxb4W4NHK3f4Tw== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/service-error-classification" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-middleware" "3.292.0" - "@aws-sdk/util-retry" "3.292.0" - tslib "^2.3.1" - uuid "^8.3.2" - -"@aws-sdk/middleware-sdk-sts@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.292.0.tgz#927cecb0167b84aceddc959039f368ea2a593e87" - integrity sha512-GN5ZHEqXZqDi+HkVbaXRX9HaW/vA5rikYpWKYsmxTUZ7fB7ijvEO3co3lleJv2C+iGYRtUIHC4wYNB5xgoTCxg== - dependencies: - "@aws-sdk/middleware-signing" "3.292.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/signature-v4" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-serde@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-serde/-/middleware-serde-3.292.0.tgz#4834ee9b03c50e11349306753c27086bac4dac08" - integrity sha512-6hN9mTQwSvV8EcGvtXbS/MpK7WMCokUku5Wu7X24UwCNMVkoRHLIkYcxHcvBTwttuOU0d8hph1/lIX4dkLwkQw== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-signing@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.292.0.tgz#51868199d23d28d264a06adcec52373c8da88c85" - integrity sha512-GVfoSjDjEQ4TaO6x9MffyP3uRV+2KcS5FtexLCYOM9pJcnE9tqq9FJOrZ1xl1g+YjUVKxo4x8lu3tpEtIb17qg== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/signature-v4" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-middleware" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/middleware-stack@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-stack/-/middleware-stack-3.292.0.tgz#279f4b688d91f9757cedd5311ae86ad6e3e6ac63" - integrity sha512-WdQpRkuMysrEwrkByCM1qCn2PPpFGGQ2iXqaFha5RzCdZDlxJni9cVNb6HzWUcgjLEYVTXCmOR9Wxm3CNW44Qg== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/middleware-user-agent@3.293.0": - version "3.293.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.293.0.tgz#ce802bc73c5d4db043b5454e894e4dd1663442b2" - integrity sha512-gZ7/e6XwpKk9mvgA78q4Ffc796jTn02TUKx2qMDnkLVbeJXBNN2jnvYEKq8v70+o7fd/ALRudg8gBDmkkhM/Hw== - dependencies: - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-endpoints" "3.293.0" - tslib "^2.3.1" - -"@aws-sdk/node-config-provider@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/node-config-provider/-/node-config-provider-3.292.0.tgz#52817db9e056fedb967704b156fde4b5516dacf1" - integrity sha512-S3NnC9dQ5GIbJYSDIldZb4zdpCOEua1tM7bjYL3VS5uqCEM93kIi/o/UkIUveMp/eqTS2LJa5HjNIz5Te6je0A== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/node-http-handler@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/node-http-handler/-/node-http-handler-3.292.0.tgz#f7a8fca359932ba56acf65eafd169db9d2cebc9d" - integrity sha512-L/E3UDSwXLXjt1XWWh0RBD55F+aZI1AEdPwdES9i1PjnZLyuxuDhEDptVibNN56+I9/4Q3SbmuVRVlOD0uzBag== - dependencies: - "@aws-sdk/abort-controller" "3.292.0" - "@aws-sdk/protocol-http" "3.292.0" - "@aws-sdk/querystring-builder" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/property-provider@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/property-provider/-/property-provider-3.292.0.tgz#2bdf9f6e15521350936636107a2057a19c1e55ec" - integrity sha512-dHArSvsiqhno/g55N815gXmAMrmN8DP7OeFNqJ4wJG42xsF2PFN3DAsjIuHuXMwu+7A3R1LHqIpvv0hA9KeoJQ== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/protocol-http@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-http/-/protocol-http-3.292.0.tgz#1829036bdec59698f44daadb590e3fa552494955" - integrity sha512-NLi4fq3k41aXIh1I97yX0JTy+3p6aW1NdwFwdMa674z86QNfb4SfRQRZBQe9wEnAZ/eWHVnlKIuII+U1URk/Kg== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/querystring-builder@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-builder/-/querystring-builder-3.292.0.tgz#a2fd9c2540a80718fb2f52c606926f8d2e08a695" - integrity sha512-XElIFJaReIm24eEvBtV2dOtZvcm3gXsGu/ftG8MLJKbKXFKpAP1q+K6En0Bs7/T88voKghKdKpKT+eZUWgTqlg== - dependencies: - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-uri-escape" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/querystring-parser@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-parser/-/querystring-parser-3.292.0.tgz#32645c834b4dd1660176bf0b6df201d688242c66" - integrity sha512-iTYpYo7a8X9RxiPbjjewIpm6XQPx2EOcF1dWCPRII9EFlmZ4bwnX+PDI36fIo9oVs8TIKXmwNGODU9nsg7CSAw== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/service-error-classification@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/service-error-classification/-/service-error-classification-3.292.0.tgz#8fef4ee8e553218234eca91dd479902092b12bac" - integrity sha512-X1k3sixCeC45XSNHBe+kRBQBwPDyTFtFITb8O5Qw4dS9XWGhrUJT4CX0qE5aj8qP3F9U5nRizs9c2mBVVP0Caw== - -"@aws-sdk/shared-ini-file-loader@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.292.0.tgz#08260536116c4e0b44ebd0d0bd197ff15815090f" - integrity sha512-Av2TTYg1Jig2kbkD56ybiqZJB6vVrYjv1W5UQwY/q3nA/T2mcrgQ20ByCOt5Bv9VvY7FSgC+znj+L4a7RLGmBg== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/signature-v4@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.292.0.tgz#1fbb9ceea4c80c079b64f836af365985970f2a5f" - integrity sha512-+rw47VY5mvBecn13tDQTl1ipGWg5tE63faWgmZe68HoBL87ZiDzsd7bUKOvjfW21iMgWlwAppkaNNQayYRb2zg== - dependencies: - "@aws-sdk/is-array-buffer" "3.292.0" - "@aws-sdk/types" "3.292.0" - "@aws-sdk/util-hex-encoding" "3.292.0" - "@aws-sdk/util-middleware" "3.292.0" - "@aws-sdk/util-uri-escape" "3.292.0" - "@aws-sdk/util-utf8" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/smithy-client@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/smithy-client/-/smithy-client-3.292.0.tgz#232b7bac2115d52390057bab6a79d14cffe06698" - integrity sha512-S8PKzjPkZ6SXYZuZiU787dMsvQ0d/LFEhw2OI4Oe2An9Fc2IwJ2FYukyHoQJOV2tV0DiuMebPo7eMyQyjKElvA== - dependencies: - "@aws-sdk/middleware-stack" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/token-providers@3.294.0": - version "3.294.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.294.0.tgz#cac10f395f89680fda464015723439bcdabc0903" - integrity sha512-6nwO04LtC5f4AsUvGZXyjaswuEK4Rr2VsuANpMKrPCgunRfI58a8YXLniudOSXN6e7CFJ6M3uo/h5YXqtnzGug== - dependencies: - "@aws-sdk/client-sso-oidc" "3.294.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/shared-ini-file-loader" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/types@3.292.0", "@aws-sdk/types@^3.222.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.292.0.tgz#54aa7347123116ac368f08df5e02954207328c63" - integrity sha512-1teYAY2M73UXZxMAxqZxVS2qwXjQh0OWtt7qyLfha0TtIk/fZ1hRwFgxbDCHUFcdNBSOSbKH/ESor90KROXLCQ== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/url-parser@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/url-parser/-/url-parser-3.292.0.tgz#b8b81d1c099e248813afbc33206e24b97f14228a" - integrity sha512-NZeAuZCk1x6TIiWuRfbOU6wHPBhf0ly2qOHzWut4BCH+b4RrDmFF8EmXcH1auEfGhE7yRyR6XqIN0t3S+hYACA== - dependencies: - "@aws-sdk/querystring-parser" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-base64@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64/-/util-base64-3.292.0.tgz#b07fc9752edad18b32ad4b1cc752b5df2d133377" - integrity sha512-zjNCwNdy617yFvEjZorepNWXB2sQCVfsShCwFy/kIQ5iW5tT2jQKaqc0K77diU9atkooxw9p1W9m9sOgrkOFNw== - dependencies: - "@aws-sdk/util-buffer-from" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-body-length-browser@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.292.0.tgz#1baefd126c8881ff140c83111aeb79c6d5b21cb3" - integrity sha512-Wd/BM+JsMiKvKs/bN3z6TredVEHh2pKudGfg3CSjTRpqFpOG903KDfyHBD42yg5PuCHoHoewJvTPKwgn7/vhaw== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-body-length-node@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-node/-/util-body-length-node-3.292.0.tgz#9f3f91c80e9b4e2afb226550e9a0b3acde8bcd02" - integrity sha512-BBgipZ2P6RhogWE/qj0oqpdlyd3iSBYmb+aD/TBXwB2lA/X8A99GxweBd/kp06AmcJRoMS9WIXgbWkiiBlRlSA== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-buffer-from@3.208.0": - version "3.208.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-buffer-from/-/util-buffer-from-3.208.0.tgz#285e86f6dc9030148a4147d65239e75cb254a1b0" - integrity sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw== - dependencies: - "@aws-sdk/is-array-buffer" "3.201.0" - tslib "^2.3.1" - -"@aws-sdk/util-buffer-from@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-buffer-from/-/util-buffer-from-3.292.0.tgz#b2d0eff4e63b0cc8a5d5dc133b76c3fe3daee2fc" - integrity sha512-RxNZjLoXNxHconH9TYsk5RaEBjSgTtozHeyIdacaHPj5vlQKi4hgL2hIfKeeNiAfQEVjaUFF29lv81xpNMzVMQ== - dependencies: - "@aws-sdk/is-array-buffer" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-config-provider@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-config-provider/-/util-config-provider-3.292.0.tgz#6a9c7b7e29028135862ba880c615e2f975d68c6d" - integrity sha512-t3noYll6bPRSxeeNNEkC5czVjAiTPcsq00OwfJ2xyUqmquhLEfLwoJKmrT1uP7DjIEXdUtfoIQ2jWiIVm/oO5A== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-defaults-mode-browser@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.292.0.tgz#8890ee4ff8939c9ada363cae14ec7196269ff14c" - integrity sha512-7+zVUlMGfa8/KT++9humHo6IDxTnxMCmWUj5jVNlkpk6h7Ecmppf7aXotviyVIA43lhtz0p2AErs0N0ekEUK+w== - dependencies: - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - bowser "^2.11.0" - tslib "^2.3.1" - -"@aws-sdk/util-defaults-mode-node@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.292.0.tgz#fc7f54cd935b8974d1b16d6c8bed8b9ae99af20e" - integrity sha512-SSIw85eF4BVs0fOJRyshT+R3b/UmBPhiVKCUZm2rq6+lIGkDPiSwQU3d/80AhXtiL5SFT/IzAKKgQd8qMa7q3A== - dependencies: - "@aws-sdk/config-resolver" "3.292.0" - "@aws-sdk/credential-provider-imds" "3.292.0" - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/property-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-endpoints@3.293.0": - version "3.293.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.293.0.tgz#fd3ecd35a84b91a8ba1672f6e2e92cf39ef205ba" - integrity sha512-R/99aNV49Refpv5guiUjEUrZYlvnfaNBniB+/ZtMO3ixxUopapssCrUivuJrmhccmrYaTCZw7dRzIWjU1jJhKg== - dependencies: - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-hex-encoding@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.292.0.tgz#a8b8b989fcf518a18606cb6d81f90d92b0660db4" - integrity sha512-qBd5KFIUywQ3qSSbj814S2srk0vfv8A6QMI+Obs1y2LHZFdQN5zViptI4UhXhKOHe+NnrHWxSuLC/LMH6q3SmA== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-locate-window@^3.0.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.292.0.tgz#cba0911be4fdf1db31a0b379cc6229a5a0ba1ae0" - integrity sha512-6xnFJXZI9pKw5lQCDvuWA5PnOaUtNRKWwdxvGkkLx5orboFaoVMS6zowjSQxwVNRjW82u6dYNkhmj9mZ8VSjWg== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-middleware@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-middleware/-/util-middleware-3.292.0.tgz#d4819246c66229df405850004d9e3ae4a6fca8ea" - integrity sha512-KjhS7flfoBKDxbiBZjLjMvEizXgjfQb7GQEItgzGoI9rfGCmZtvqCcqQQoIlxb8bIzGRggAUHtBGWnlLbpb+GQ== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-retry@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-retry/-/util-retry-3.292.0.tgz#a72dd74760864aa03feb00f2cee8b97c25c297c4" - integrity sha512-JEHyF7MpVeRF5uR4LDYgpOKcFpOPiAj8TqN46SVOQQcL1K+V7cSr7O7N7J6MwJaN9XOzAcBadeIupMm7/BFbgw== - dependencies: - "@aws-sdk/service-error-classification" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-uri-escape@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-uri-escape/-/util-uri-escape-3.292.0.tgz#306a36e3574af3509c542c7224669082f6abc633" - integrity sha512-hOQtUMQ4VcQ9iwKz50AoCp1XBD5gJ9nly/gJZccAM7zSA5mOO8RRKkbdonqquVHxrO0CnYgiFeCh3V35GFecUw== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-user-agent-browser@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.292.0.tgz#26c4e5ffbe046cebe9d15c357839ea38ada95c56" - integrity sha512-dld+lpC3QdmTQHdBWJ0WFDkXDSrJgfz03q6mQ8+7H+BC12ZhT0I0g9iuvUjolqy7QR00OxOy47Y9FVhq8EC0Gg== - dependencies: - "@aws-sdk/types" "3.292.0" - bowser "^2.11.0" - tslib "^2.3.1" - -"@aws-sdk/util-user-agent-node@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.292.0.tgz#9065307641eb246f32fee78eec5d961cffbba6a9" - integrity sha512-f+NfIMal5E61MDc5WGhUEoicr7b1eNNhA+GgVdSB/Hg5fYhEZvFK9RZizH5rrtsLjjgcr9nPYSR7/nDKCJLumw== - dependencies: - "@aws-sdk/node-config-provider" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-utf8-browser@^3.0.0": - version "3.259.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff" - integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/util-utf8-node@^3.259.0": - version "3.259.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-node/-/util-utf8-node-3.259.0.tgz#8a4024e735f948f5e045a79e486a98dee2689860" - integrity sha512-2sbGdmrkODKeJb6kbEOKpX8cYtS9IO16XRAtINcN7sInWfspAITDofrabf0i0tFQF0hsJtbC5dyJRn87w0gYIQ== - dependencies: - "@aws-sdk/util-buffer-from" "3.208.0" - tslib "^2.3.1" - -"@aws-sdk/util-utf8@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8/-/util-utf8-3.292.0.tgz#c12049a01de36f1133232f95cbb0c0177e8d3c36" - integrity sha512-FPkj+Z59/DQWvoVu2wFaRncc3KVwe/pgK3MfVb0Lx+Ibey5KUx+sNpJmYcVYHUAe/Nv/JeIpOtYuC96IXOnI6w== - dependencies: - "@aws-sdk/util-buffer-from" "3.292.0" - tslib "^2.3.1" - -"@aws-sdk/util-waiter@3.292.0": - version "3.292.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-waiter/-/util-waiter-3.292.0.tgz#860b6615f1d5d0cd545b2d5fefd0bb3c03b0a32d" - integrity sha512-+7j+mcWUY4GwU8nTK4MvLWpOzS34SJZL85qLxQ04pysoCSHkInyS51D1ejBVNlJdbUSFvIcU0WHU0y6MDDeJzg== - dependencies: - "@aws-sdk/abort-controller" "3.292.0" - "@aws-sdk/types" "3.292.0" - tslib "^2.3.1" - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@grpc/grpc-js@^1.7.1", "@grpc/grpc-js@^1.8.0", "@grpc/grpc-js@^1.8.7": - version "1.8.12" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.8.12.tgz#bc0120859e8b153db764b473cc019ddf6bb2b414" - integrity sha512-MbUMvpVvakeKhdYux6gbSIPJaFMLNSY8jw4PqLI+FFztGrQRrYYAnHlR94+ncBQQewkpXQaW449m3tpH/B/ZnQ== - dependencies: - "@grpc/proto-loader" "^0.7.0" - "@types/node" ">=12.12.47" - -"@grpc/proto-loader@^0.7.0": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.5.tgz#ee9e7488fa585dc6b0f7fe88cd39723a3e64c906" - integrity sha512-mfcTuMbFowq1wh/Rn5KQl6qb95M21Prej3bewD9dUQMurYGVckGO/Pbe2Ocwto6sD05b/mxZLspvqwx60xO2Rg== - dependencies: - "@types/long" "^4.0.1" - lodash.camelcase "^4.3.0" - long "^4.0.0" - protobufjs "^7.0.0" - yargs "^16.2.0" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@opensearch-project/opensearch@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@opensearch-project/opensearch/-/opensearch-2.2.0.tgz#2a31a67242bf3bacedc9644a0c68893eb5fb9420" - integrity sha512-E0f2Hooruz9y+17AF69oyyruikVMAEr1TxcQBNEQV4aQnI3o0+6CjqZS+t94SCZdWRTuN7HjIIVGbaYCJDpxgA== - dependencies: - aws4 "^1.11.0" - debug "^4.3.1" - hpagent "^1.2.0" - ms "^2.1.3" - secure-json-parse "^2.4.0" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" - integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" - integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" - integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" - integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" - integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@topcoder-framework/client-relational@^0.7.0": - version "0.7.0" - resolved "https://topcoder-409275337247.d.codeartifact.us-east-1.amazonaws.com:443/npm/topcoder-framework/@topcoder-framework/client-relational/-/client-relational-0.7.0.tgz#bd219fb466ce2d436ca393b1f1bb4bdd0f05be80" - integrity sha512-AXkKyzmKfQap+eib9FehQZbZ7oAYGW+41gMXNFpxmqrZ0/TMgh8znnaw6uPmwyalVPh1bZdvxIGadCQxgi3jWw== - dependencies: - "@grpc/grpc-js" "^1.8.0" - "@topcoder-framework/lib-common" "^0.7.0" - topcoder-interface "github:topcoder-platform/plat-interface-definition#v0.0.29" - tslib "^2.4.1" - -"@topcoder-framework/domain-acl@^0.7.0": - version "0.7.0" - resolved "https://topcoder-409275337247.d.codeartifact.us-east-1.amazonaws.com:443/npm/topcoder-framework/@topcoder-framework/domain-acl/-/domain-acl-0.7.0.tgz#76d8c2090a7df2a9aa476d4344b6cc2edf504482" - integrity sha512-g3PLnglWIrETT/ESDe3GBP2VIIk6DAykuuMTdGe95Xx8czHbSrN6Oav3konxvVlCuilRxN62D/kwxEZivEpvYQ== - dependencies: - "@grpc/grpc-js" "^1.8.7" - "@topcoder-framework/client-relational" "^0.7.0" - "@topcoder-framework/lib-common" "^0.7.0" - topcoder-interface "github:topcoder-platform/plat-interface-definition#v0.0.29" - tslib "^2.4.1" - -"@topcoder-framework/lib-common@^0.7.0": - version "0.7.0" - resolved "https://topcoder-409275337247.d.codeartifact.us-east-1.amazonaws.com:443/npm/topcoder-framework/@topcoder-framework/lib-common/-/lib-common-0.7.0.tgz#557900413fe2e0b67d233f04c63db2e81eac5dbc" - integrity sha512-3qjcRYGHqRiBWPbOM2C/BwpZEswIqCbc+scskIHmtY/FYn52lTT1w7Cm/KOcgBpE3S/mmWq0YwtZKNNzbRwglA== - dependencies: - "@grpc/grpc-js" "^1.8.0" - rimraf "^3.0.2" - topcoder-interface "github:topcoder-platform/plat-interface-definition#v0.0.29" - tslib "^2.4.1" - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/express-jwt@0.0.42": - version "0.0.42" - resolved "https://registry.yarnpkg.com/@types/express-jwt/-/express-jwt-0.0.42.tgz#4f04e1fadf9d18725950dc041808a4a4adf7f5ae" - integrity sha512-WszgUddvM1t5dPpJ3LhWNH8kfNN8GPIBrAGxgIYXVCEGx6Bx4A036aAuf/r5WH9DIEdlmp7gHOYvSM6U87B0ag== - dependencies: - "@types/express" "*" - "@types/express-unless" "*" - -"@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express-unless@*": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/express-unless/-/express-unless-2.0.1.tgz#7d5728315caf95a315a6bcc19ac99f6a8becbe49" - integrity sha512-PJLiNw03EjkWDkQbhNjIXXDLObC3eMQhFASDV+WakFbT8eL7YdjlbV6MXd3Av5Lejq499d6pFuV1jyK+EHyG3Q== - dependencies: - express-unless "*" - -"@types/express@*": - version "4.17.17" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/lodash@^4.14.191": - version "4.14.191" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa" - integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ== - -"@types/long@^4.0.1": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" - integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== - -"@types/mime@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" - integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== - -"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^18.11.17": - version "18.15.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.3.tgz#f0b991c32cfc6a4e7f3399d6cb4b8cf9a0315014" - integrity sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw== - -"@types/object-hash@^1.3.0": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-1.3.4.tgz#079ba142be65833293673254831b5e3e847fe58b" - integrity sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/serve-static@*": - version "1.15.1" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" - integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== - dependencies: - "@types/mime" "*" - "@types/node" "*" - -"@types/strip-bom@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/strip-bom/-/strip-bom-3.0.0.tgz#14a8ec3956c2e81edb7520790aecf21c290aebd2" - integrity sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ== - -"@types/strip-json-comments@0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" - integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== - -"@types/uuid@8.3.4": - version "8.3.4" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" - integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== - -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.11.0, aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -axios@^0.19.0: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== - dependencies: - follow-redirects "1.5.10" - -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - -axios@^1.2.2: - version "1.3.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" - integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -babel-runtime@6.6.1: - version "6.6.1" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.6.1.tgz#788b94b6f634e25b91bd6c5df72d467457afb000" - integrity sha512-5pdhO3jaxqh9L42oBfbrqy58swDhciM47sRGoODURdRxwfiqttEvK87LX27W/PYY6f4cJt2mEdyoLcr/+cM/iw== - dependencies: - core-js "^2.1.0" - -backoff@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - integrity sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA== - dependencies: - precond "0.2" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bowser@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" - integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -bunyan@^1.8.12: - version "1.8.15" - resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.15.tgz#8ce34ca908a17d0776576ca1b2f6cbd916e93b46" - integrity sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig== - optionalDependencies: - dtrace-provider "~0.8" - moment "^2.19.3" - mv "~2" - safe-json-stringify "~1" - -case-anything@^2.1.10: - version "2.1.10" - resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.10.tgz#d18a6ca968d54ec3421df71e3e190f3bced23410" - integrity sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chokidar@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -codependency@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/codependency/-/codependency-0.1.4.tgz#d1763ab7264bd70c91d9626e98862d3792bf8d4a" - integrity sha512-26yAvd3+17xSfDADtnzpnL5GK+8+x4QeZ3DegekkHyno6LWeHqXuSU7q8w/IrAur7SY6ISPApOWtWTfuIF0Xpg== - dependencies: - semver "5.0.1" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -core-js@^2.1.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cssfilter@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" - integrity sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw== - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -dataloader@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8" - integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== - -dayjs@^1.11.7: - version "1.11.7" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" - integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== - -debug@4, debug@^4.1.0, debug@^4.3.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -dotenv@^16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" - integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== - -dprint-node@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/dprint-node/-/dprint-node-1.0.7.tgz#f571eaf61affb3a696cff1bdde78a021875ba540" - integrity sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA== - dependencies: - detect-libc "^1.0.3" - -dtrace-provider@~0.8: - version "0.8.8" - resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" - integrity sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg== - dependencies: - nan "^2.14.0" - -dynamic-dedupe@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz#06e44c223f5e4e94d78ef9db23a6515ce2f962a1" - integrity sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ== - dependencies: - xtend "^4.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -express-unless@*: - version "2.1.3" - resolved "https://registry.yarnpkg.com/express-unless/-/express-unless-2.1.3.tgz#f951c6cca52a24da3de32d42cfd4db57bc0f9a2e" - integrity sha512-wj4tLMyCVYuIIKHGt0FhCtIViBcwzWejX0EjNxveAa6dG+0XBCQhMbx+PnkLkFCxLC69qoFrxds4pIyL88inaQ== - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-xml-parser@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.1.2.tgz#5a98c18238d28a57bbdfa9fe4cda01211fff8f4a" - integrity sha512-CDYeykkle1LiA/uqQyNwYpFbyF6Axec6YapmpUP+/RHWIoR1zKjocdvNaTsxCxZzQ6v9MLXaSYm9Qq0thv0DHg== - dependencies: - strnum "^1.0.5" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -follow-redirects@^1.14.0, follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^6.0.1: - version "6.0.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" - integrity sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A== - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -google-protobuf@^3.19.1: - version "3.21.2" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.2.tgz#4580a2bea8bbb291ee579d1fefb14d6fa3070ea4" - integrity sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA== - -grpc-server-reflection@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/grpc-server-reflection/-/grpc-server-reflection-0.1.5.tgz#76ba71649fd71b0ebae7d5254ddc781ba61054d0" - integrity sha512-i69RYu6v65enzknNAPUgerFuVQfo+L3n9g4c1A/Sv5jUHMpxMIjSbBA+YWls9Sr4Flac4oohp4Gx8f389CaHuw== - dependencies: - google-protobuf "^3.19.1" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hpagent@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-1.2.0.tgz#0ae417895430eb3770c03443456b8d90ca464903" - integrity sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jwks-rsa@^1.6.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/jwks-rsa/-/jwks-rsa-1.12.3.tgz#40232f85d16734cb82837f38bb3e350a34435400" - integrity sha512-cFipFDeYYaO9FhhYJcZWX/IyZgc0+g316rcHnDpT2dNRNIE/lMOmWKKqp09TkJoYlNFzrEVODsR4GgXJMgWhnA== - dependencies: - "@types/express-jwt" "0.0.42" - axios "^0.21.1" - debug "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - jsonwebtoken "^8.5.1" - limiter "^1.1.5" - lru-memoizer "^2.1.2" - ms "^2.1.2" - proxy-from-env "^1.1.0" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - -limiter@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" - integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== - -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== - -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" - integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== - -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" - integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== - -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== - -lodash@4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - -lodash@^4.17.15, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -long@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.1.tgz#e27595d0083d103d2fa2c20c7699f8e0c92b897f" - integrity sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A== - -lru-cache@~4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" - integrity sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw== - dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" - -lru-memoizer@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/lru-memoizer/-/lru-memoizer-2.2.0.tgz#b9d90c91637b4b1a423ef76f3156566691293df8" - integrity sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw== - dependencies: - lodash.clonedeep "^4.5.0" - lru-cache "~4.0.0" - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -millisecond@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/millisecond/-/millisecond-0.1.2.tgz#6cc5ad386241cab8e78aff964f87028eec92dac5" - integrity sha512-BJ8XtxY+woL+5TkP6uS6XvOArm0JVrX2otkgtWZseHpIax0oOOPW3cnwhOjRqbEJg7YRO/BDF7fO/PTWNT3T9Q== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -"minimatch@2 || 3", minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -moment@^2.19.3, moment@^2.29.4: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1, ms@^2.1.2, ms@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -mv@~2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2" - integrity sha512-at/ZndSy3xEGJ8i0ygALh8ru9qy7gWW1cmkaqBN29JmMlIvM//MEO9y1sk/avxuwnPcfhkejkLsuPxH81BrkSg== - dependencies: - mkdirp "~0.5.1" - ncp "~2.0.0" - rimraf "~2.4.0" - -nan@^2.14.0: - version "2.17.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" - integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== - -ncp@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" - integrity sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-hash@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" - integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -precond@0.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" - integrity sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ== - -protobufjs@^6.11.3, protobufjs@^6.8.8: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - -protobufjs@^7.0.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.2.tgz#2af401d8c547b9476fb37ffc65782cf302342ca3" - integrity sha512-++PrQIjrom+bFDPpfmqXfAGSQs40116JRrqqyf53dymUMvvb5d/LMRyicRoF1AUKoXVS1/IgJXlEgcpr4gTF3Q== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/node" ">=13.7.0" - long "^5.0.0" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -pseudomap@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -r7insight_node@^1.8.4: - version "1.8.4" - resolved "https://registry.yarnpkg.com/r7insight_node/-/r7insight_node-1.8.4.tgz#875633032137545b3cc7c80763baf09f6ba66801" - integrity sha512-6cQrzLkaOxdv/SRFXWRJjgFr8a3nXUOT/4IMFuBv+mWzBnu5DJl+HzONAsWYvclrlZnvfa54PaIPqPuPRSlbrQ== - dependencies: - babel-runtime "6.6.1" - codependency "0.1.4" - json-stringify-safe "5.0.1" - lodash "4.17.15" - reconnect-core "1.3.0" - semver "5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -reconnect-core@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reconnect-core/-/reconnect-core-1.3.0.tgz#fbae52919a7877d844e3246d01a2f26701c833c8" - integrity sha512-+gLKwmyRf2tjl6bLR03DoeWELzyN6LW9Xgr3vh7NXHHwPi0JC0N2TwPyf90oUEBkCRcD+bgQ+s3HORoG3nwHDg== - dependencies: - backoff "~2.5.0" - -request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve@^1.0.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -rimraf@^2.6.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rimraf@~2.4.0: - version "2.4.5" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" - integrity sha512-J5xnxTyqaiw06JjMftq7L9ouA448dw/E7dKghkP9WpKNuwmARNNg+Gk8/u5ryb9N/Yo2+z3MCwuqFK/+qPOPfQ== - dependencies: - glob "^6.0.1" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-json-stringify@~1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd" - integrity sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -secure-json-parse@^2.4.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" - integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== - -semver@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.1.tgz#9fb3f4004f900d83c47968fe42f7583e05832cc9" - integrity sha512-Ne6/HdGZvvpXBdjW3o8J0pvxC2jnmVNBK7MKkMgsOBfrsIdTXfA5x+H9DUbQ2xzyvnLv0A0v9x8R4B40xNZIRQ== - -semver@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.1.0.tgz#85f2cf8550465c4df000cf7d86f6b054106ab9e5" - integrity sha512-sfKXKhcz5XVyfUZa2V4RbjK0xjOJCMLNF9H4p4v0UCo9wNHM/lH9RDuyDbGEtxWLMDlPBc8xI7AbbVLKXty+rQ== - -semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -source-map-support@^0.5.12, source-map-support@^0.5.21: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-json-comments@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -strnum@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" - integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -tc-core-library-js@appirio-tech/tc-core-library-js.git#v2.6.4: - version "2.4.1" - resolved "https://codeload.github.com/appirio-tech/tc-core-library-js/tar.gz/df0b36c51cf80918194cbff777214b3c0cf5a151" - dependencies: - axios "^0.19.0" - bunyan "^1.8.12" - jsonwebtoken "^8.5.1" - jwks-rsa "^1.6.0" - lodash "^4.17.15" - millisecond "^0.1.2" - r7insight_node "^1.8.4" - request "^2.88.0" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -"topcoder-interface@github:topcoder-platform/plat-interface-definition#v0.0.29": - version "1.0.0" - resolved "https://codeload.github.com/topcoder-platform/plat-interface-definition/tar.gz/6ad366c0dc28a8452bd71ed87d718ac559bee62b" - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - -ts-node-dev@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ts-node-dev/-/ts-node-dev-2.0.0.tgz#bdd53e17ab3b5d822ef519928dc6b4a7e0f13065" - integrity sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w== - dependencies: - chokidar "^3.5.1" - dynamic-dedupe "^0.3.0" - minimist "^1.2.6" - mkdirp "^1.0.4" - resolve "^1.0.0" - rimraf "^2.6.1" - source-map-support "^0.5.12" - tree-kill "^1.2.2" - ts-node "^10.4.0" - tsconfig "^7.0.0" - -ts-node@^10.4.0: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -ts-poet@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-6.4.1.tgz#e68d314a07cf9c0d568a3bfd87023ec91ff77964" - integrity sha512-AjZEs4h2w4sDfwpHMxQKHrTlNh2wRbM5NRXmLz0RiH+yPGtSQFbe9hBpNocU8vqVNgfh0BIOiXR80xDz3kKxUQ== - dependencies: - dprint-node "^1.0.7" - -ts-proto-descriptors@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/ts-proto-descriptors/-/ts-proto-descriptors-1.7.1.tgz#685d00305b06adfa929fd5a016a419382cd64c50" - integrity sha512-oIKUh3K4Xts4v29USGLfUG+2mEk32MsqpgZAOUyUlkrcIdv34yE+k2oZ2Nzngm6cV/JgFdOxRCqeyvmWHuYAyw== - dependencies: - long "^4.0.0" - protobufjs "^6.8.8" - -ts-proto@^1.126.1: - version "1.142.1" - resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.142.1.tgz#1bd42195bcff35dedd0d9e7ae56dba9888f95be2" - integrity sha512-J0W3OWrX/+xNVu+AdukLOjYrFDsinngQ9uh+/jnYwObd6VwCjc6sbBz8VFVbQgTSDGv3ysEagCbimkCXcvYDWQ== - dependencies: - "@types/object-hash" "^1.3.0" - case-anything "^2.1.10" - dataloader "^1.4.0" - object-hash "^1.3.1" - protobufjs "^6.11.3" - ts-poet "^6.4.1" - ts-proto-descriptors "1.7.1" - -tsconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7" - integrity sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw== - dependencies: - "@types/strip-bom" "^3.0.0" - "@types/strip-json-comments" "0.0.30" - strip-bom "^3.0.0" - strip-json-comments "^2.0.0" - -tslib@^1.11.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.3.1, tslib@^2.4.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -typescript@^4.9.4: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@8.3.2, uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuidv4@^6.2.13: - version "6.2.13" - resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.13.tgz#8f95ec5ef22d1f92c8e5d4c70b735d1c89572cb7" - integrity sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ== - dependencies: - "@types/uuid" "8.3.4" - uuid "8.3.2" - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -xss@^1.0.14: - version "1.0.14" - resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.14.tgz#4f3efbde75ad0d82e9921cc3c95e6590dd336694" - integrity sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw== - dependencies: - commander "^2.20.3" - cssfilter "0.0.10" - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==